v1

latestOpenAPI 3.0.32026-07-26229361630.0 KB
Appointment API

Reschedule Appointment

Overview

This API is used to reschedule an appointment. Rescheduling does not update the existing appointment. Instead, a brand new appointment is created with the supplied start_time and end_time, while the previous appointment's status is marked as RES (which represents rescheduled).

The newly created appointment carries a prev_aids field — an array containing the ids of the previous, rescheduled appointment(s). Each previous appointment in turn carries a next_aid field, which holds the id of the next appointment it was rescheduled to. This forms a linked chain across the reschedule history.

The response of this API is the new appointment that is created as a result of the reschedule.

patch/appointments/v1/{appointment_id}/reschedule

Path parameters

appointment_idstring required

The id (aid) of the existing appointment to reschedule. When partner_appointment_id is supplied, this is treated as the partner appointment id.

Headers

authstring required

Request body

start_timeinteger required

New start time of the appointment as a Unix epoch in seconds.

end_timeinteger required

New end time of the appointment as a Unix epoch in seconds. Must be after start_time.

partner_appointment_idstring

Optional partner-provided appointment id. When omitted, the server generates the new appointment id and the appointment_id path param is used as-is. When supplied, the new id is derived with the help of this field and the appointment_id path param is treated as a partner appointment id.

Example request

{
  "start_time": 1730189586,
  "end_time": 1730193186
}

Response

OK — the newly created (rescheduled) appointment.

appointment_idstring

Id of the newly created appointment.

patient_idstring
doctor_idstring nullable
clinic_idstring
statusstring
modestring
start_timeinteger

Start time as a Unix epoch in seconds.

end_timeinteger

End time as a Unix epoch in seconds.

created_atinteger

Creation time as a Unix epoch in seconds.

prev_aidsstring[]

Ids of the previous rescheduled appointment(s).

next_aidstring

Id of the next appointment this one was rescheduled to. Present only on previous appointments.