Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
organisation_id | integer | Yes | Organisation to book with |
Path Parameters
No path parameters
Header Parameters
No header parameters
Request Body
SlotBooking object
| Name | Type | Required | Description |
|---|---|---|---|
appointment_type_id | integer | Yes | The ID of the appointment type |
start | datetime | Yes | The start time (UTC) of the activity, e.g. 2023-07-27 06:30:00+00 |
end | datetime | Yes | The end time (UTC) of the activity, e.g. 2023-07-27 06:30:00+00 |
patient_id | int | No | The ID of the patient to be booked |
provider_ids | array[integer] | No | Candidate providers to book; one is chosen by availability. Empty means any available provider |
first_name | string | No | First name of the patient to create when no patient_ids is given |
last_name | string | No | Last name of the patient to create when no patient_ids is given |
email | string | No | Email of the patient to create when no patient_ids is given |
state | string | No | State of the patient to create when no patient_ids is given |
coverage | string | No | Insurance of the patient to create when no patient_ids is given |
Responses
200 — OK
Booking created (or joined an existing session).
{
"id": 123,
"appointment_type_id": 5,
"start": "2023-07-27T06:30:00+00:00",
"end": "2023-07-27T07:00:00+00:00",
"notes": null,
"organisation_id": 1,
"provider": "Jane Smith"
}403 — Forbidden
| Detail | When |
|---|---|
You don't have permission to use this appointmnet type or it does not exist | appointment_type_id not found for the org |
409 — Conflict
| Detail | When |
|---|---|
This time is no longer available | Single/any provider: no free shift contains the slot |
This time is no longer available for all selected providers | Multiple provider_ids: not all are free |
This session is full | Joining an existing activity that's at max_capacity |
422 — Unprocessable Entity
| Detail | When |
|---|---|
No shift available at the requested time | No shift spans the requested start/end |
Unprocessable Entity | Missing required organisation_id, or malformed slot_in body (bad/missing activity_type_id, start, end). |
Too many providers for this appointment type | More providers than required_hosts allows |
This appointment type requires {N role(s)...} | required_hosts not satisfied |
This appointment type allows at most {max_capacity} patients | Too many patient_ids |
The selected provider is not licensed in the patient's state | Provider lacks state license |
The selected provider is not enrolled in the patient's payor | Payor enrollment required, provider not enrolled |
The selected provider does not have a required skill for this patient | patient_match_criteria skill not met |
429 — Too Many Requests
Rate limit exceeded (PRIMARY_RATE_LIMIT).
