Appointments
Book, manage, and confirm appointments at test locations.
Create an appointment
POST
/api/appointment/
Create a new appointment. Use a slot_id from the Test Locations slots endpoint to book a specific time.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
slot_id |
string | Yes* | Slot ID from the test location slots endpoint |
confirmed |
boolean | Yes | true to confirm immediately, false for provisional |
patient_id |
string | No | UUID of the patient |
* If slot_id is not provided, starts_at (ISO 8601 datetime) can be used as a fallback.
Example request
curl -X POST "https://api.londonmedicallaboratory.co.uk/api/appointment/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"slot_id": "a1b2c3d4-...",
"confirmed": true,
"patient_id": "e5f6a7b8-..."
}'
Example response
Returns 201 Created:
{
"id": "f8a9b0c1-...",
"type": "brand_location",
"test_location_id": "d4e5f6a7-...",
"brand_id": "b2c3d4e5-...",
"starts_at": "2024-04-15T10:00:00+01:00",
"ends_at": "2024-04-15T10:15:00+01:00",
"patient_id": "e5f6a7b8-...",
"confirmed": true,
"time_id": null,
"expires_at": null,
"slot_id": "a1b2c3d4-...",
"full_address": "10 Harley Street, London, W1G 9PF",
"point": {
"latitude": 51.5188,
"longitude": -0.1487
}
}
Get an appointment
GET
/api/appointment/{id}
Retrieve a single appointment by UUID.
List appointments
GET
/api/appointment/
Returns a paginated list of appointments.
Query parameters
| Parameter | Type | Description |
|---|---|---|
start_date |
string | Filter appointments created after this date (YYYY-MM-DD) |
end_date |
string | Filter appointments created before this date (YYYY-MM-DD) |
Update an appointment
PATCH
/api/appointment/{id}
Update an existing appointment. Use this to reschedule, assign a patient, change the location, or confirm a provisional appointment.
Patchable fields
| Field | Type | Description |
|---|---|---|
appointment_time |
string | New appointment time (ISO 8601 format) |
patient_id |
string|null | Assign or remove a patient |
test_location_id |
string | Move to a different test location |
confirmed |
boolean | Set to true to confirm a provisional appointment |
Appointment types
| Type | Description |
|---|---|
brand_location |
In-person appointment at a test location |
home_visit_phlebotomist |
Home visit by a phlebotomist |
video |
Video consultation |
Sub-resources
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/appointment/{id}/products |
Get products linked to this appointment |