curl -X POST "https://api.nevatal.com/api/v1/appointments/doctors/schedule/66dc441b8208f63a0269eecf" \
-H "Authorization: Bearer nvtl_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"workingDays": [
{ "day": "thursday", "locationId": "696bdadfee83d82621f17748", "startTime": "08:00", "endTime": "12:00" },
{ "day": "thursday", "locationId": "69616b710ea6a551535841bb", "startTime": "14:00", "endTime": "17:00" }
]
}'
{
"success": true,
"data": {
"doctorId": "66dc441b8208f63a0269eecf",
"workingDays": [
{ "day": "thursday", "locationId": "696bdadfee83d82621f17748", "locationName": "Pereira", "startTime": "08:00", "endTime": "12:00" },
{ "day": "thursday", "locationId": "69616b710ea6a551535841bb", "locationName": "Armenia", "startTime": "14:00", "endTime": "17:00" }
],
"exceptions": []
},
"message": "Horario del doctor actualizado exitosamente"
}
{
"success": false,
"error": "Bloques solapados el jueves: 08:00–12:00 (Pereira) y 11:00–15:00 (Armenia). El doctor no puede estar en dos sedes a la vez",
"code": "VALIDATION_ERROR"
}
Appointments
Save Doctor Schedule
Create or fully replace the doctor’s schedule — the submitted block set is the new truth
POST
/
api
/
v1
/
appointments
/
doctors
/
schedule
/
{doctorId}
curl -X POST "https://api.nevatal.com/api/v1/appointments/doctors/schedule/66dc441b8208f63a0269eecf" \
-H "Authorization: Bearer nvtl_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"workingDays": [
{ "day": "thursday", "locationId": "696bdadfee83d82621f17748", "startTime": "08:00", "endTime": "12:00" },
{ "day": "thursday", "locationId": "69616b710ea6a551535841bb", "startTime": "14:00", "endTime": "17:00" }
]
}'
{
"success": true,
"data": {
"doctorId": "66dc441b8208f63a0269eecf",
"workingDays": [
{ "day": "thursday", "locationId": "696bdadfee83d82621f17748", "locationName": "Pereira", "startTime": "08:00", "endTime": "12:00" },
{ "day": "thursday", "locationId": "69616b710ea6a551535841bb", "locationName": "Armenia", "startTime": "14:00", "endTime": "17:00" }
],
"exceptions": []
},
"message": "Horario del doctor actualizado exitosamente"
}
{
"success": false,
"error": "Bloques solapados el jueves: 08:00–12:00 (Pereira) y 11:00–15:00 (Armenia). El doctor no puede estar en dos sedes a la vez",
"code": "VALIDATION_ERROR"
}
Full-replacement semantics: the submitted
workingDays set replaces the
existing schedule. Requires Manage permission on the Appointments module.
Every block’s locationId must be a location assigned to the doctor, and
blocks of the same day must not overlap — same or different location (the
doctor cannot be in two places at once). Violations return a localized 400
with code: VALIDATION_ERROR.
Path Parameters
string
required
The doctor’s user ID
Body
array
required
Schedule blocks (min 1). Each block:
day (monday…sunday), locationId
(must be assigned to the doctor), startTime/endTime ("HH:MM", end after
start), optional lunchStartTime/lunchEndTime (both or neither, inside the block).array
ISO 8601 dates. When omitted, existing exceptions are preserved.
curl -X POST "https://api.nevatal.com/api/v1/appointments/doctors/schedule/66dc441b8208f63a0269eecf" \
-H "Authorization: Bearer nvtl_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"workingDays": [
{ "day": "thursday", "locationId": "696bdadfee83d82621f17748", "startTime": "08:00", "endTime": "12:00" },
{ "day": "thursday", "locationId": "69616b710ea6a551535841bb", "startTime": "14:00", "endTime": "17:00" }
]
}'
{
"success": true,
"data": {
"doctorId": "66dc441b8208f63a0269eecf",
"workingDays": [
{ "day": "thursday", "locationId": "696bdadfee83d82621f17748", "locationName": "Pereira", "startTime": "08:00", "endTime": "12:00" },
{ "day": "thursday", "locationId": "69616b710ea6a551535841bb", "locationName": "Armenia", "startTime": "14:00", "endTime": "17:00" }
],
"exceptions": []
},
"message": "Horario del doctor actualizado exitosamente"
}
{
"success": false,
"error": "Bloques solapados el jueves: 08:00–12:00 (Pereira) y 11:00–15:00 (Armenia). El doctor no puede estar en dos sedes a la vez",
"code": "VALIDATION_ERROR"
}

