Book an appointment
Book a visit for a patient, the way the clinic's front desk does in Medos.
Books a visit for a patient, as the clinic's own staff do in Medos: from a hospital system, a call-centre tool or your own scheduling screen. The booking appears on the clinic's calendar, and Medos sends the patient the same confirmations and reminders it sends for any staff booking.
API-key only, gated on devapi_appointments_book. Send
X-Acting-User-Id to attribute the booking to a
staff member. Without it, the booking is attributed to the workspace admin.
Parameters
Headers
x-api-keystringrequiredExample: mk_…Your Developer API key. Server-side only.
X-Acting-User-IdstringExample: MDU_A1B2C3D4E5F6The staff member the call is attributed to, as an MDU_… id. Omit it to attribute the call to the workspace admin.
Content-TypestringrequiredExample: application/jsonThe body is JSON. Anything else is a 415.
Body
patientIdintegerrequiredExample: 4821The patient, from GET /v1/patients.
doctorIdstringrequiredExample: MDU_A1B2C3D4E5F6The practitioner's MDU_… staff id, from GET /v1/doctors. Not a number.
addressIdintegerrequiredExample: 1The location, from GET /v1/addresses.
mode"OFFLINE" | "ONLINE" | "HOME_VISIT" | "HOME_COLLECTION"enumrequiredHow the visit happens.
fromDateTimeIsostringExample: 2026-11-20T10:00:00+05:30A slot's start, exactly as GET /v1/doctors/{doctorId}/slots returns it. Required unless you book a token with sessionId and date.
toDateTimeIsostringExample: 2026-11-20T10:30:00+05:30That slot's end.
sessionIdstringExample: 31To book a token instead of a slot: a sessions[].sessionId from the practitioner's slots. Send with date, and without the two times.
datedateExample: 2026-11-20With sessionId only: the session's day, YYYY-MM-DD.
consultationChargestringrequiredExample: 800A decimal string, at most two places. Not a JSON number.
paymentModestringrequiredExample: CASHOne of the clinic's payment methods, e.g. CASH or UPI.
visitType"CONSULTATION" | "FOLLOW_UP" | "EMERGENCY" | "PROCEDURE" | "LAB_TEST" | "SURGERY" | "VIRTUAL" | "IN_PERSON"enumappointmentNotesstringUp to 500 characters.
chiefComplaintstringUp to 500 characters.
- Pick the time from the practitioner's slots. Call
GET /v1/doctors/{doctorId}/slotsfor the day and send one slot'sstartandendasfromDateTimeIsoandtoDateTimeIso, unchanged. They are in the location's own offset, which is how Medos reads the clinic-local time. The same moment in another offset (in UTC, say) names a different local time and is refused. - Or book a token in a session. When the practitioner runs token sessions,
their slots list them under
sessions. Send a session'ssessionIdand thedateinstead offromDateTimeIsoandtoDateTimeIso; sending both, or neither, is a400naming the fields. Medos gives the patient the next token, and the response carries it underqueueToken: its number, display (C-013), the session and the patient's tracking link. The live estimate of when it will be seen is in search results. AsessionIdthat is not one of the practitioner's sessions at that location on that date is a400namingsessionId; a full or ended session is Medos's own400. doctorIdis theMDU_…staff id fromGET /v1/doctors. A number is a400.- Use your own ids for the rest:
patientIdfromGET /v1/patients,addressIdfromGET /v1/addresses. consultationChargeis a decimal string, like all money in this API:"800"or"750.50".paymentModeis one of the payment methods the clinic has set up in Medos, such asCASHorUPI. Medos refuses one it does not have.- The body is strict. A field this route does not know is a
400naming it, so nothing is silently dropped. Packs, discounts and online payment are not part of this route.
Responses
The 201 carries Location: /v1/appointments/SCHEDULED:<id>, and the body is
the appointment in the same shape as
GET /v1/appointments/{appointmentRef}.
Medos marks the booking as made through the Developer API.
One call, one booking
Each successful call books a new appointment. If a request times out, search the patient's appointments for that day before you retry.