A014 - Reject Referral API returning timeout

Hi,
we’re receiving a timeout when trying to use the A014 endpoint in DEP. Other endpoints are working fine.

Time: 21/05/2026 06:34:37
Application ID: 6e0409c6-0514-4944-a436-2b5afd43cc2b
correlation-id: 247e29ec-76ba-4aa2-bfac-dc36d277dee9

curl --location ‘https://dep.api.service.nhs.uk/referrals-dep/FHIR/STU3/ReferralRequest/000049534849/$ers.rejectReferral’ \
–header ‘accept: application/fhir+json’ \
–header ‘content-type: application/fhir+json’ \
–header ‘nhsd-end-user-organisation-ods: RTX’ \
–header ‘nhsd-ers-business-function: SERVICE_PROVIDER_CLINICIAN_ADMIN’ \
–header ‘nhsd-ers-on-behalf-of-user-id: 125448493028’ \
–header ‘x-correlation-id: 247e29ec-76ba-4aa2-bfac-dc36d277dee9’ \
–header ‘Authorization: Bearer GwSJh3FNgrphbl05nHQmVMFVVoNo’ \
–header ‘If-Match: W/“7”’ \
–data ‘{
“meta”: {
“profile”: [
https://fhir.nhs.uk/STU3/StructureDefinition/eRS-RejectReferral-Parameters-1
]
},
“resourceType”: “Parameters”,
“parameter”: [
{
“name”: “rejectionReason”,
“valueCoding”: {
“system”: “https://dep.api.service.nhs.uk/referrals-dep/FHIR/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON”,
“code”: “SERVICE_INAPPROPRIATE”
}
},
{
“name”: “rejectionComments”,
“valueString”: “This is a sample comment”
}
]
}’

Thanks, Rob

Hi Rob, thanks for using the forum. I am looking into this now :slight_smile:

Hi Rob, I have had a look at the logs regarding this request.

When rejecting a referral with a booked appointment, eRS sends an appointment cancellation message(PRSC_IN070000UK08) via spine to the PAS/TAS endpoint registered for your organisation. The message was successfully delivered by eRS but your PAS/TAS endpoint did not return a response within the timeout window, resulting in the 504.

Could you check that your TAS is running and correctly processing PRSC_IN070000UK08 appointment cancellation messages?

Please retry too and let us know.

Hi George,

Thanks for your response, we were testing the API on a system that doesn’t have the messaging configured.

Thanks, Rob

@Rob_Stevenson

Just to clarify, are you saying you’ll configure something your end, or were you simply updating us on how you are setup?

Hi Tony,

We were testing the API on a system without the messaging, but we’re configuring the messaging so we’ll be fine now.

Thanks!