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

Cancel Appointment

Cancels an existing appointment for a patient. A cancellation reason is required. Returns 204 No Content on success.

Authorization: Bearer token (JWT). See Authentication.

Request

curl -L -X POST 'https://{tenantId}.api.england.medicus.health/transactional-api/cancel-appointment' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"appointmentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"patientId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cancellationReason": "string"
}'

Body parameters

FieldTypeRequiredDescription
appointmentIdstring<uuid>YesThe appointment to cancel.
patientIdstring<uuid>YesMedicus patient identifier. Must match the patient the appointment was booked for.
cancellationReasonstringYesHuman-readable reason for cancellation. Must not be empty.

Responses

204 Appointment cancelled successfully.
400 Validation error.
5 possible code values
CodeDescriptionWhen
missing-patient-idThe patientId is requiredpatientId missing
invalid-patient-idThe patientId is not validpatientId not a valid UUID
missing-appointment-idThe appointmentId is requiredappointmentId missing
invalid-appointment-idThe appointmentId is not validappointmentId not a valid UUID
missing-cancellation-reasonThe cancellationReason is requiredcancellationReason is missing or blank
{
"errors": [
{
"code": "missing-patient-id",
"description": "The patientId is required"
}
]
}
404 No appointment found for the given appointmentId and patientId combination.
{
"errors": [
{
"code": "appointment-not-found",
"description": "Appointment not found for this appointmentId and patientId."
}
]
}
409 The appointment exists but cannot be cancelled in its current state.
{
"errors": [
{
"code": "appointment-cannot-be-cancelled",
"description": "The appointment cannot be cancelled because it has already started or has already been cancelled."
}
]
}