Skip to main content
GET
/
api
/
schedules
curl -X GET "https://api.saludya.com/api/schedules?doctor_id=5&day_of_week=monday" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "schedules": [
    {
      "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-01-15T10:30:00Z",
      "updated_at": "2026-01-15T10:30:00Z"
    },
    {
      "id": 102,
      "doctor_id": 5,
      "day_of_week": "monday",
      "start_time": "14:00:00",
      "end_time": "18:00:00",
      "is_available": true,
      "created_at": "2026-01-15T10:30:00Z",
      "updated_at": "2026-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 2,
    "per_page": 20
  }
}

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.

Retrieve a paginated list of all doctor schedules in the system. Schedules define when doctors are available for appointments.

Query Parameters

doctor_id
integer
Filter schedules by doctor ID
day_of_week
string
Filter by day of week (monday, tuesday, wednesday, thursday, friday, saturday, sunday)
is_available
boolean
Filter by availability status
page
integer
default:"1"
Page number for pagination
limit
integer
default:"20"
Number of schedules per page (max 100)

Response

schedules
array
Array of schedule objects
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 (24-hour)
end_time
string
End time in HH:MM:SS format (24-hour)
is_available
boolean
Whether the schedule slot is currently available
created_at
string
ISO 8601 timestamp of creation
updated_at
string
ISO 8601 timestamp of last update
pagination
object
Pagination metadata
current_page
integer
Current page number
total_pages
integer
Total number of pages
total_count
integer
Total number of schedules
per_page
integer
Number of items per page
curl -X GET "https://api.saludya.com/api/schedules?doctor_id=5&day_of_week=monday" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "schedules": [
    {
      "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-01-15T10:30:00Z",
      "updated_at": "2026-01-15T10:30:00Z"
    },
    {
      "id": 102,
      "doctor_id": 5,
      "day_of_week": "monday",
      "start_time": "14:00:00",
      "end_time": "18:00:00",
      "is_available": true,
      "created_at": "2026-01-15T10:30:00Z",
      "updated_at": "2026-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 2,
    "per_page": 20
  }
}

Schedule Patterns

Schedules define recurring availability patterns for doctors. Each schedule represents a weekly time slot that repeats every week. Common patterns include:
  • Split shifts: Morning (08:00-12:00) and afternoon (14:00-18:00) slots
  • Full day: Single long slot (08:00-17:00)
  • Evening hours: Late availability (15:00-21:00)

Relationship to Appointments

Schedules determine when appointments can be booked. The system checks:
  1. Doctor has a schedule for the requested day of week
  2. Requested time falls within schedule’s start_time and end_time
  3. Schedule’s is_available flag is true
  4. No conflicting appointments already exist in that slot