Skip to main content
POST/transactional-api/book-appointment

Book Appointment

Books an appointment for a patient into a specific diary slot. Use List Available Slots to obtain the diaryId, startTime, and endTime for a bookable slot.

Authorization: Bearer token (JWT). See Authentication.

Request​

curl -L -X POST 'https://{tenantId}.api.england.medicus.health/transactional-api/book-appointment' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"patientId": "4d59c916-9726-11ec-af3f-0a58a9feac02",
"diaryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"appointmentServiceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"appointmentTypeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"startTime": "2026-01-15T09:00:00Z",
"endTime": "2026-01-15T09:20:00Z",
"reasonForAppointment": "Follow-up review of blood pressure medication.",
"additionalInformation": "Patient has requested a female clinician if possible.",
"embargoOverrideReason": "Urgent clinical need identified by triage.",
"gpadReportingExceptionReasons": [
"patient-preferred-an-appointment-on-a-future-date-or-at-a-specific-time"
]
}'

Body parameters

FieldTypeRequiredDescription
patientIdstring<uuid>YesMedicus patient identifier.
diaryIdstring<uuid>YesDiary to book into. Returned by List Available Slots.
appointmentServiceIdstring<uuid>YesAppointment service for the booking. Must match the service associated with the diary.
appointmentTypeIdstring<uuid>YesAppointment type for the booking.
startTimestring<date-time>YesSlot start time (ISO 8601, UTC). Must match an available slot and must not be in the past.
endTimestring<date-time>YesSlot end time (ISO 8601, UTC). Must match the end time of the selected slot.
reasonForAppointmentstring (nullable)NoPatient-supplied reason for the appointment.
additionalInformationstring (nullable)NoAdditional information to include with the booking.
embargoOverrideReasonstring (nullable)NoReason for overriding a booking embargo, if the slot is embargoed. Required when the slot is embargoed.
gpadReportingExceptionReasonsarray<string> (nullable)NoGPAD reporting exception reasons, required for certain appointment types.

Responses​

200 Appointment booked successfully.

Response fields

FieldTypeDescription
appointmentIdstring<uuid>The newly created appointment identifier.
{
"appointmentId": "00000000-0000-0000-0000-000000000000"
}
400 Validation error.
12 possible code values
CodeDescriptionWhen
invalid-patient-idThe patientId is not a UUIDpatientId missing or not a UUID
invalid-diary-idThe diaryId is not a UUIDdiaryId missing or not a UUID
invalid-appointment-service-idThe appointmentServiceId is not a UUIDappointmentServiceId missing or not a UUID
invalid-appointment-type-idThe appointmentTypeId is not a UUIDappointmentTypeId missing or not a UUID
invalid-start-timeThe startTime is not a valid date/time formatstartTime missing or not a valid date/time
invalid-end-timeThe endTime is not a valid date/time formatendTime missing or not a valid date/time
start-time-in-the-pastThe requested startTime is in the past.startTime is before now
invalid-gpad-reporting-exception-reason'some-value' is not a recognised GPAD reporting exception reason.a value in gpadReportingExceptionReasons isn't recognised
appointment-service-mismatchThe appointmentServiceId does not match the appointment service for this diaryId.appointmentServiceId doesn't match the diary's or appointment type's actual service
embargo-override-reason-requiredThe reason for overriding the booking embargo is required.slot is embargoed and no embargoOverrideReason was supplied
gpad-reporting-exception-reasons-requiredAt least one GPAD reporting exception reason is required when booking more than 14 days in advance.startTime more than 14 days out, category eligible, no reason supplied
validation-failedThis slot is no longer available. Please choose another.the slot is already booked by another appointment

Response fields

FieldTypeDescription
errors[].codestring
errors[].descriptionstring
{
"errors": [
{
"code": "invalid-patient-id",
"description": "The patientId is not a UUID"
}
]
}
404 A referenced resource was not found (patient, diary, appointment type, or slot).
4 possible code values
CodeDescriptionWhen
patient-not-foundPatient not found for the id: 3fa85f64-5717-4562-b3fc-2c963f66afa6patientId doesn't exist
diary-not-foundDiary not found for this diaryId.diaryId doesn't exist
appointment-type-not-foundAppointment type not found for this appointmentTypeId.appointmentTypeId doesn't exist
slot-not-foundThe requested startTime and endTime are outside the diary's scheduled hours for diaryId.startTime/endTime fall outside the diary's hours, or don't align to a generated slot

Response fields

FieldTypeDescription
errors[].codestring
errors[].descriptionstring
{
"errors": [
{
"code": "patient-not-found",
"description": "Patient not found for the id: 3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
]
}