Endpoints
The twenty-four routes a Developer API key can call, one page each.
The Developer API is a hospital records API: fifteen reads and nine writes:
the patient upsert, recording vitals, replacing a medical history, booking,
rescheduling, updating the status of and cancelling an appointment, and adding and
updating staff. Each route has its own page covering what it is for, every
parameter, the response, and the mistakes that produce a 400.
What every request needs
x-api-key: mk_…
X-Acting-User-Id: MDU_A1B2C3D4E5F6 # optional, on any routeThe API key is the credential, so it belongs on your server and nowhere else.
Requests are refused unless they come from an address on the key's
IP allowlist. X-Acting-User-Id is optional
everywhere. It names the staff member the call belongs to; see
Acting user.
Two things are decided for you and cannot be sent:
workspaceIdcomes from the key. Every route is scoped to the workspace the key belongs to. AworkspaceIdin a query string is a400, because no route accepts one, and in the search body it is a400too.- The identity Medos sees. The gateway calls the Medos core as your workspace's admin, or as the acting user when you name one.
Every route is also entitlement-gated on its own feature item, and follows the shared conventions: paging, ids, dates, money, and errors as RFC 9457 problem details.
This list is the whole surface
API keys can call these twenty-four routes and no others. Any other /v1 path
is a 403 ROUTE_NOT_AVAILABLE, any /v2 path is a 404, and a listed path
called with the wrong method is a 405 with an Allow header. Patient
self-booking, OTP, payments, session packs and the other widget features are
not part of the Developer API. They run in the widgets on a
patient's own session.
Patients
| Method | Path | What it does |
|---|---|---|
GET | /v1/patients | Look a patient up by MRN, email or phone, or page through the roster |
GET | /v1/patients/{patientId} | One patient record |
GET | /v1/patients/{patientId}/visits | Visit history with the clinical summary |
GET | /v1/patients/{patientId}/vitals | Recorded vitals, newest first |
POST | /v1/patients/{patientId}/vitals | Record one vitals reading |
GET | /v1/patients/{patientId}/medical-history | Allergies, chronic conditions, surgical history |
PUT | /v1/patients/{patientId}/medical-history | Replace that history from your system |
POST | /v1/patients | Create or update a patient from your system |
Appointments
| Method | Path | What it does |
|---|---|---|
GET | /v1/appointments/{appointmentRef} | One appointment |
POST | /v1/appointments/search | Appointments in a date window, filtered |
POST | /v1/appointments | Book an appointment |
PUT | /v1/appointments/{appointmentRef}/reschedule | Move an appointment to a new time |
PUT | /v1/appointments/{appointmentRef}/status | Mark it in consultation, completed or a no-show |
DELETE | /v1/appointments/{appointmentRef} | Cancel an appointment (it is deleted and marked CANCELLED) |
Clinical records
| Method | Path | What it does |
|---|---|---|
GET | /v1/patients/{patientId}/prescriptions | A patient's prescriptions |
GET | /v1/prescriptions/{id} | One prescription |
GET | /v1/prescriptions/{prescriptionId}/pdf | The rendered prescription as a PDF |
GET | /v1/patients/{patientId}/documents | A patient's documents and their metadata |
Staff
| Method | Path | What it does |
|---|---|---|
POST | /v1/staff | Add a staff member to your workspace, with their public profile |
PUT | /v1/staff/{staffId} | Change their details, role or public profile |
Reference data
| Method | Path | What it does |
|---|---|---|
GET | /v1/addresses | The clinic's locations |
GET | /v1/doctors | The clinic's practitioners |
GET | /v1/doctors/{doctorId}/slots | One practitioner's open and taken slots on a day |
GET | /v1/appointment-configs | Each practitioner's hours, slot length, modes and fees, by location |
The first two are the lookup tables every other response points into: a record's
location.id resolves against GET /v1/addresses, and its practitioner.id
against GET /v1/doctors. Those two are cacheable for five minutes; everything else,
slots included, is Cache-Control: no-store. See Polling and caching.