Skip to main content
GET
/
api
/
appointments
List Appointments
curl --request GET \
  --url https://api.example.com/api/appointments
{
  "appointments": [
    {
      "id": "<string>",
      "patient_id": "<string>",
      "patient_name": "<string>",
      "doctor_id": "<string>",
      "doctor_name": "<string>",
      "specialty": "<string>",
      "date": "<string>",
      "time": "<string>",
      "duration_minutes": 123,
      "status": "<string>",
      "reason": "<string>",
      "notes": "<string>",
      "created_at": "<string>",
      "updated_at": "<string>"
    }
  ],
  "pagination": {
    "current_page": 123,
    "total_pages": 123,
    "total_count": 123,
    "per_page": 123
  },
  "error": {
    "code": "<string>",
    "message": "<string>"
  }
}

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 all appointments in the system with support for pagination, filtering by status, date range, patient, and doctor, as well as sorting options.

Query Parameters

page
integer
default:"1"
Page number for pagination
limit
integer
default:"20"
Number of appointments per page (max: 100)
status
string
Filter by appointment status. Options: scheduled, confirmed, in_progress, completed, cancelled, no_show
patient_id
string
Filter appointments by patient ID
doctor_id
string
Filter appointments by doctor ID
date_from
string
Filter appointments from this date (ISO 8601 format: YYYY-MM-DD)
date_to
string
Filter appointments until this date (ISO 8601 format: YYYY-MM-DD)
sort_by
string
default:"date"
Field to sort by. Options: date, created_at, status
sort_order
string
default:"asc"
Sort order. Options: asc, desc

Response

appointments
array
Array of appointment objects
id
string
Unique appointment identifier
patient_id
string
ID of the patient
patient_name
string
Full name of the patient
doctor_id
string
ID of the assigned doctor
doctor_name
string
Full name of the doctor
specialty
string
Medical specialty for the appointment
date
string
Appointment date (ISO 8601 format)
time
string
Appointment time (HH:MM format)
duration_minutes
integer
Expected duration of the appointment in minutes
status
string
Current status of the appointment: scheduled, confirmed, in_progress, completed, cancelled, no_show
reason
string
Reason for the appointment visit
notes
string
Additional notes or special instructions
created_at
string
Timestamp when the appointment was created
updated_at
string
Timestamp when the appointment was last updated
pagination
object
Pagination metadata
current_page
integer
Current page number
total_pages
integer
Total number of pages
total_count
integer
Total number of appointments matching the filters
per_page
integer
Number of items per page

Example Request

curl -X GET "https://api.saludya.com/api/appointments?page=1&limit=10&status=scheduled&date_from=2026-03-06&sort_by=date&sort_order=asc" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Example Response

{
  "appointments": [
    {
      "id": "apt_7k3m9n2p4q",
      "patient_id": "pat_5x8y2z4a6b",
      "patient_name": "María González",
      "doctor_id": "doc_3j5k7m9n1p",
      "doctor_name": "Dr. Carlos Ramírez",
      "specialty": "Cardiología",
      "date": "2026-03-10",
      "time": "09:30",
      "duration_minutes": 30,
      "status": "scheduled",
      "reason": "Consulta de control cardiovascular",
      "notes": "Traer resultados de análisis de sangre",
      "created_at": "2026-03-05T14:22:10Z",
      "updated_at": "2026-03-05T14:22:10Z"
    },
    {
      "id": "apt_8m4n1p5r7s",
      "patient_id": "pat_6y9z3a5b7c",
      "patient_name": "Juan Pérez",
      "doctor_id": "doc_4k6m8n2p3q",
      "doctor_name": "Dra. Ana Martínez",
      "specialty": "Medicina General",
      "date": "2026-03-10",
      "time": "10:00",
      "duration_minutes": 20,
      "status": "confirmed",
      "reason": "Revisión anual",
      "notes": null,
      "created_at": "2026-03-04T10:15:30Z",
      "updated_at": "2026-03-05T16:45:22Z"
    }
  ],
  "pagination": {
    "current_page": 1,
    "total_pages": 5,
    "total_count": 48,
    "per_page": 10
  }
}

Error Responses

error
object
code
string
Error code identifier
message
string
Human-readable error message

400 Bad Request

{
  "error": {
    "code": "INVALID_PARAMETERS",
    "message": "Invalid date format for date_from. Expected ISO 8601 format (YYYY-MM-DD)"
  }
}

401 Unauthorized

{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API token"
  }
}

429 Too Many Requests

{
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Rate limit exceeded. Please try again in 60 seconds"
  }
}

Build docs developers (and LLMs) love