Skip to main content
POST/transactional-api/create-outbound-referral

Create Outbound Referral

Creates an outbound referral against a patient record. Supply a SNOMED CT coded reason via code (required). If a ubrn is provided the referral is created as an NHS e-RS referral; otherwise a manual referral is created. Optional file attachments are base64-encoded. The referrer defaults to the act practitioner and organisation in the access token. Send referredByPractitioner / referredByOrganisation when the clinician who decided to refer is not the token user. With neither, the referrer shows as Unknown. Send referredToService for the service or clinic it was booked to.

Authorization: Bearer token (JWT). See Authentication.

Request​

curl -L -X POST 'https://{tenantId}.api.england.medicus.health/transactional-api/create-outbound-referral' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"patientId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"code": {
"conceptId": "185389009",
"description": "Telephone encounter"
},
"referralDate": "2026-01-15",
"priority": "routine",
"ubrn": "123456789012",
"referredToOrganisation": {
"name": "Queen Elizabeth Hospital"
},
"referredToPractitioner": {
"name": "Dr Sarah Chen"
},
"referredToService": {
"name": "Cardiology Outpatients"
},
"referredByPractitioner": {
"name": "Dr James Patel",
"gmcNumber": "1234567"
},
"referredByOrganisation": {
"name": "Riverside Medical Centre",
"odsCode": "A12345"
},
"additionalInformation": "Patient has been informed of the referral and agreed to proceed.",
"consultationTopicHeadingId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"hiddenFromPatientFacingServices": false,
"confidentialFromThirdParties": false,
"attachments": [
{
"fileName": "referral-letter.pdf",
"contentType": "application/pdf",
"data": "JVBERi0xLjQK..."
}
]
}'

Body parameters

FieldTypeRequiredDescription
patientIdstring<uuid>YesMedicus patient identifier.
codeobjectYesSNOMED CT coded referral reason. Required; resolved against the NHS term browser.
referralDatestring<date>NoReferral date (YYYY-MM-DD). Defaults to today.
prioritystringNoOutbound referral priority.
ubrnstringNoUnique Booking Reference Number. When present, the referral is created as an NHS e-RS referral.
referredToOrganisationobjectNoObject with: name.
referredToPractitionerobjectNoObject with: name.
referredToServiceobjectNoService or clinic the referral was booked to. For an e-RS referral this is the shortlisted service name.
referredByPractitionerobjectNoClinician who decided to refer. Defaults to the token user. The token user is still recorded in the audit trail as the person who submitted it.
referredByOrganisationobjectNoOrganisation the referral was made from. Defaults to the token organisation, or this practice.
additionalInformationstringNo
consultationTopicHeadingIdstring<uuid> (nullable)No
hiddenFromPatientFacingServicesbooleanNoIf true, hidden from Patient Facing Services (IM1) such as the NHS App.
confidentialFromThirdPartiesbooleanNo
attachmentsarray<object>NoFile attachments to file against the referral.

Responses​

200 Referral created.

Response fields

FieldTypeDescription
idstring<uuid>Identifier of the created outbound referral.
{
"id": "00000000-0000-0000-0000-000000000000"
}
400 Validation error.
12 possible code values
CodeDescriptionWhen
missing-patient-idThe patientId is requiredpatientId missing
invalid-patient-idThe patientId is not validpatientId not a valid UUID
patient-not-foundPatient not found for this patientIdpatientId doesn't exist
invalid-codeCould not resolve conceptId into a SNOMED CT code. Check the NHS term browser.code conceptId doesn't resolve to a SNOMED CT code
no-codeYou must specify a code for the referral.code missing
invalid-referral-dateThe referralDate is not a valid date in Y-m-d format.referralDate not a valid date in Y-m-d format, or in the future
invalid-priorityThe priority is not a valid outbound referral priority.priority not a valid outbound referral priority
missing-referred-by-practitioner-nameThe referredByPractitioner name is requiredreferredByPractitioner supplied without a name
missing-referred-by-organisation-nameThe referredByOrganisation name is requiredreferredByOrganisation supplied without a name
invalid-consultation-topic-heading-idThe consultationTopicHeadingId is not a UUIDconsultationTopicHeadingId not a UUID
consultation-topic-heading-not-foundConsultation topic heading not found for this consultationTopicHeadingIdconsultationTopicHeadingId doesn't exist
empty-fileA file is required: data is missing or empty.data is missing or empty

Response fields

FieldTypeDescription
errors[].codestring
errors[].descriptionstring
{
"errors": [
{
"code": "missing-patient-id",
"description": "The patientId is required"
}
]
}