Skip to main content
POST/transactional-api/appointment/create-booking-link

Create Appointment Booking Link

Generates a public URL for self-service appointment booking. Provide either requiredProcedures (SNOMED CT coded) or both appointmentServiceId and appointmentTypeId, but not both; see Get Appointment Metadata for the available services, types and procedures.

Authorization: Bearer token (JWT). See Authentication.

Request

curl -L -X POST 'https://{tenantId}.api.england.medicus.health/transactional-api/appointment/create-booking-link' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"patientId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"appointmentServiceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"appointmentTypeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"requiredProcedures": [
{
"conceptId": "string",
"description": "string"
}
],
"predefinedReasonForAppointment": "string"
}'

Body parameters

FieldTypeRequiredDescription
patientIdstring<uuid>YesMedicus patient identifier.
appointmentServiceIdstring<uuid> (nullable)NoMust be provided together with appointmentTypeId. Mutually exclusive with requiredProcedures.
appointmentTypeIdstring<uuid> (nullable)NoMust be provided together with appointmentServiceId. Mutually exclusive with requiredProcedures.
requiredProceduresarray<object> (nullable)NoSNOMED CT coded procedures the booked appointment type must support. Mutually exclusive with appointmentServiceId/appointmentTypeId.
predefinedReasonForAppointmentstring (nullable)NoReason for appointment to pre-fill on the booking link.

Responses

200 Booking link created.
{
"url": "string"
}
400 Validation error.
8 possible code values
CodeDescriptionWhen
invalid-patient-idThe patientId is not a UUIDpatientId missing or not a UUID
patient-not-foundPatient not found for this patientIdpatientId doesn't exist
invalid-requestProvide either requiredProcedures or both appointmentServiceId and appointmentTypeIdinvalid/missing combination of requiredProcedures, appointmentServiceId and appointmentTypeId
invalid-appointment-service-idThe appointmentServiceId is not a valid UUIDappointmentServiceId not a valid UUID
invalid-appointment-type-idThe appointmentTypeId is not a valid UUIDappointmentTypeId not a valid UUID
appointment-service-not-foundAppointment service not found for this appointmentServiceIdappointmentServiceId doesn't exist
appointment-type-not-foundAppointment type not found on this serviceappointmentTypeId doesn't exist on the service
invalid-procedureEach entry in requiredProcedures must have a non-empty conceptIda requiredProcedures entry has an empty or unresolvable conceptId
{
"errors": [
{
"code": "invalid-patient-id",
"description": "The patientId is not a UUID"
}
]
}