Skip to main content
PUT
/
api
/
appointments
/
:id
Update Appointment
curl --request PUT \
  --url https://api.example.com/api/appointments/:id \
  --header 'Content-Type: application/json' \
  --data '
{
  "date": "<string>",
  "time": "<string>",
  "duration_minutes": 123,
  "status": "<string>",
  "reason": "<string>",
  "notes": "<string>",
  "diagnosis": "<string>",
  "prescription": "<string>",
  "follow_up_required": true,
  "follow_up_date": "<string>",
  "cancellation_reason": "<string>",
  "send_notification": true
}
'
{
  "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>",
  "diagnosis": "<string>",
  "prescription": "<string>",
  "follow_up_required": true,
  "follow_up_date": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>",
  "completed_at": "<string>",
  "cancelled_at": "<string>",
  "cancellation_reason": "<string>",
  "error": {
    "code": "<string>",
    "message": "<string>",
    "details": {}
  }
}

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 the details of an existing appointment. You can modify the date, time, status, notes, and other appointment information.

Path Parameters

id
string
required
Unique identifier of the appointment to update

Request Body

date
string
New date for the appointment in ISO 8601 format (YYYY-MM-DD)
time
string
New time for the appointment in 24-hour format (HH:MM)
duration_minutes
integer
Updated duration of the appointment in minutes
status
string
Update appointment status. Options: scheduled, confirmed, in_progress, completed, cancelled, no_show
reason
string
Updated reason for the appointment visit
notes
string
Updated notes or special instructions
diagnosis
string
Medical diagnosis (typically set when status changes to completed)
prescription
string
Prescribed medications or treatment plan
follow_up_required
boolean
Whether a follow-up appointment is recommended
follow_up_date
string
Recommended date for follow-up appointment (ISO 8601 format)
cancellation_reason
string
Reason for cancellation (required when status is set to cancelled)
send_notification
boolean
default:"true"
Whether to send update notification to the patient

Response

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
reason
string
Reason for the appointment visit
notes
string
Additional notes or special instructions
diagnosis
string
Medical diagnosis
prescription
string
Prescribed medications or treatment
follow_up_required
boolean
Whether a follow-up appointment is recommended
follow_up_date
string
Recommended date for follow-up appointment
created_at
string
Timestamp when the appointment was created
updated_at
string
Timestamp when the appointment was last updated
completed_at
string
Timestamp when the appointment was completed (if applicable)
cancelled_at
string
Timestamp when the appointment was cancelled (if applicable)
cancellation_reason
string
Reason for cancellation (if applicable)

Example Request - Reschedule Appointment

curl -X PUT "https://api.saludya.com/api/appointments/apt_7k3m9n2p4q" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "date": "2026-03-12",
    "time": "10:00",
    "notes": "Paciente solicitó cambio de horario",
    "send_notification": true
  }'

Example Request - Complete Appointment

curl -X PUT "https://api.saludya.com/api/appointments/apt_7k3m9n2p4q" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "completed",
    "diagnosis": "Hipertensión arterial controlada",
    "prescription": "Continuar con Enalapril 10mg una vez al día. Control en 3 meses.",
    "follow_up_required": true,
    "follow_up_date": "2026-06-10",
    "send_notification": false
  }'

Example Request - Cancel Appointment

curl -X PUT "https://api.saludya.com/api/appointments/apt_7k3m9n2p4q" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "cancelled",
    "cancellation_reason": "Paciente tuvo una emergencia familiar",
    "send_notification": true
  }'

Example Response

{
  "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-12",
  "time": "10:00",
  "duration_minutes": 30,
  "status": "scheduled",
  "reason": "Consulta de control cardiovascular",
  "notes": "Paciente solicitó cambio de horario",
  "diagnosis": null,
  "prescription": null,
  "follow_up_required": false,
  "follow_up_date": null,
  "created_at": "2026-03-05T14:22:10Z",
  "updated_at": "2026-03-06T11:45:30Z",
  "completed_at": null,
  "cancelled_at": null,
  "cancellation_reason": null
}

Error Responses

error
object
code
string
Error code identifier
message
string
Human-readable error message
details
object
Additional error details (when applicable)

400 Bad Request

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request data",
    "details": {
      "status": "Cannot change status to 'completed' without providing diagnosis"
    }
  }
}

401 Unauthorized

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

403 Forbidden

{
  "error": {
    "code": "FORBIDDEN",
    "message": "You don't have permission to modify this appointment"
  }
}

404 Not Found

{
  "error": {
    "code": "RESOURCE_NOT_FOUND",
    "message": "Appointment with ID 'apt_7k3m9n2p4q' not found"
  }
}

409 Conflict

{
  "error": {
    "code": "APPOINTMENT_CONFLICT",
    "message": "Doctor is not available at the requested time",
    "details": {
      "conflicting_appointment_id": "apt_8m4n1p5r7s",
      "suggested_times": ["10:30", "11:00", "11:30"]
    }
  }
}

422 Unprocessable Entity

{
  "error": {
    "code": "INVALID_STATE_TRANSITION",
    "message": "Cannot update a completed appointment. Contact support if you need to make changes."
  }
}

Build docs developers (and LLMs) love