Skip to main content
PUT
/
api
/
schedules
/
:id
curl -X PUT "https://api.saludya.com/api/schedules/101" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "end_time": "13:00:00"
  }'
{
  "id": 101,
  "doctor_id": 5,
  "day_of_week": "monday",
  "start_time": "08:00:00",
  "end_time": "13:00:00",
  "is_available": true,
  "created_at": "2026-01-15T10:30:00Z",
  "updated_at": "2026-03-06T15:45:00Z"
}

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/DUVAN100/saludya-api/llms.txt

Use this file to discover all available pages before exploring further.

Update a doctor’s schedule to modify availability times, enable/disable the slot, or change the day of week.

Path Parameters

id
integer
required
The unique identifier of the schedule to update

Request Body

doctor_id
integer
ID of the doctor (changing ownership of schedule)
day_of_week
string
Day of the week. Valid values: monday, tuesday, wednesday, thursday, friday, saturday, sunday
start_time
string
Start time in HH:MM:SS format (24-hour). Example: 08:00:00
end_time
string
End time in HH:MM:SS format (24-hour). Must be after start_time. Example: 17:00:00
is_available
boolean
Whether this schedule slot is available for appointments. Use false to temporarily disable a schedule without deleting it.

Response

id
integer
Unique identifier for the schedule
doctor_id
integer
ID of the doctor this schedule belongs to
day_of_week
string
Day of the week (monday-sunday)
start_time
string
Start time in HH:MM:SS format
end_time
string
End time in HH:MM:SS format
is_available
boolean
Availability status of this schedule
created_at
string
ISO 8601 timestamp of creation
updated_at
string
ISO 8601 timestamp of last update
curl -X PUT "https://api.saludya.com/api/schedules/101" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "end_time": "13:00:00"
  }'
{
  "id": 101,
  "doctor_id": 5,
  "day_of_week": "monday",
  "start_time": "08:00:00",
  "end_time": "13:00:00",
  "is_available": true,
  "created_at": "2026-01-15T10:30:00Z",
  "updated_at": "2026-03-06T15:45:00Z"
}

Common Update Scenarios

Temporarily Disable a Schedule

Set is_available to false when a doctor is temporarily unavailable (vacation, sick leave) without deleting the schedule:
{
  "is_available": false
}

Extend Working Hours

Modify start or end times to accommodate more patients:
{
  "start_time": "07:00:00",
  "end_time": "14:00:00"
}

Change Schedule Day

Move a schedule to a different day of the week:
{
  "day_of_week": "tuesday"
}

Impact on Existing Appointments

Important: Updating a schedule does not automatically cancel or modify existing appointments. Consider these scenarios:
  1. Shortening hours: Appointments outside new time range remain valid
  2. Disabling schedule: Existing appointments are preserved
  3. Changing day: Appointments remain on original day
Best practice: Query existing appointments before making schedule changes that might create conflicts:
# Check for appointments in this schedule's time slot
curl "https://api.saludya.com/api/appointments?doctor_id=5&day_of_week=monday&status=scheduled"

Build docs developers (and LLMs) love