Hello,
We are currently experiencing an issue while retrieving attachments using the NHS e-Referral Service APIs.
Please find the request and response details below:
-
API Name:
A042 – Retrieve Attachment -
Organization:
TD008463 TEST TRUST 001 -
Request URI:
https://int.api.service.nhs.uk/referrals/FHIR/R4/Binary/dacf8b90-9379-4931-93d3-b55530891003 -
Request Data:
-
referralAttachmentId - dacf8b90-9379-4931-93d3-b55530891003
-
Headers:
{"Authorization": "Bearer FUJhOQ68hGBwO0TYk9fOyE3G7ih8", "NHSD-End-User-Organisation-ODS": "Z9X9M", "NHSD-eRS-Business-Function": "SERVICE_PROVIDER_CLINICIAN", "user-id": "555340925109", "x-correlation-id": "28203cee-be7b-4e81-b691-76ba04d96830", "accept": "\*/\*"
}
-
Response Data:
{"resourceType": "OperationOutcome",“meta”: {
“lastUpdated”: “2026-04-23T05:32:47.753Z”,
“profile”: [
https://www.hl7.org/fhir/R4/operationoutcome.html
]
},
“issue”: [
{
"severity": "error",
"code": "forbidden",
"diagnostics": "No Legitimate Relationship for Binary with ID dacf8b90-9379-4931-93d3-b55530891003.",
"details": {
"coding": \[
{
"system": [https://fhir.nhs.uk/CodeSystem/ers-error-codes](https://fhir.nhs.uk/CodeSystem/ers-error-codes),
"code": "NO_RELATIONSHIP"
}
\]
}
}
]
}
Observed Issue:
The API returns a NO_RELATIONSHIP error, indicating that there is no legitimate relationship between the requesting user/organisation and the specified attachment.
We would appreciate it if you could investigate this issue and advise on the next steps to resolve it.
Please let us know if any further information or logs are required from our side.
