Skip to main content
POST
/
api
/
schedules
curl -X POST "https://api.saludya.com/api/schedules" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "doctor_id": 5,
    "day_of_week": "monday",
    "start_time": "08:00:00",
    "end_time": "12:00:00",
    "is_available": true
  }'
{
  "id": 101,
  "doctor_id": 5,
  "day_of_week": "monday",
  "start_time": "08:00:00",
  "end_time": "12:00:00",
  "is_available": true,
  "created_at": "2026-03-06T10:30:00Z",
  "updated_at": "2026-03-06T10:30: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.

Create a new recurring schedule for a doctor. Schedules define weekly availability patterns for appointment booking.

Request Body

doctor_id
integer
required
ID of the doctor this schedule is for
day_of_week
string
required
Day of the week for this schedule. Valid values: monday, tuesday, wednesday, thursday, friday, saturday, sunday
start_time
string
required
Start time in HH:MM:SS format (24-hour). Example: 08:00:00
end_time
string
required
End time in HH:MM:SS format (24-hour). Must be after start_time. Example: 17:00:00
is_available
boolean
default:"true"
Whether this schedule slot is available for appointments

Response

id
integer
Unique identifier for the created 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 POST "https://api.saludya.com/api/schedules" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "doctor_id": 5,
    "day_of_week": "monday",
    "start_time": "08:00:00",
    "end_time": "12:00:00",
    "is_available": true
  }'
{
  "id": 101,
  "doctor_id": 5,
  "day_of_week": "monday",
  "start_time": "08:00:00",
  "end_time": "12:00:00",
  "is_available": true,
  "created_at": "2026-03-06T10:30:00Z",
  "updated_at": "2026-03-06T10:30:00Z"
}

Creating Full Week Schedules

To set up a doctor’s complete weekly availability, create multiple schedules with different day_of_week values:
Example: Full Week Setup
# Monday - Friday morning shifts
for day in monday tuesday wednesday thursday friday; do
  curl -X POST "https://api.saludya.com/api/schedules" \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "doctor_id": 5,
      "day_of_week": "'$day'",
      "start_time": "08:00:00",
      "end_time": "12:00:00"
    }'
done

Validation Rules

  • start_time must be before end_time
  • day_of_week must be lowercase and valid weekday name
  • Doctor cannot have overlapping schedules for the same day
  • doctor_id must reference an existing doctor
  • Time slots should align with appointment duration settings

Build docs developers (and LLMs) love