HI,
While accessing attachments on UBRN receive this error from Integration environment.
Response code – 422 – UnprocessableContent
Exception:- {“meta”:{“profile”:[https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1]},“resourceType”:“OperationOutcome”,“issue”:[{“severity”:“error”,“code”:“business-rule”,“details”:{“coding”:[{“code”:“NO_RELATIONSHIP”,“system”:https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1,“display”:“No relationship”}]},“diagnostics”:“No legitimate relationship with referral (000049809107).”}]}
ClientId :- KGpE3NY5ZijzfAkHtcOG0XhqTZwLZ7FG
Any suggestions?
Appreciate your help.
Good Morning,
If you don’t get any answers here you can try emailing NHS e-Referral Service - nhserspartners@nhs.net.
Thank you.
Hi Kumar,
Thank you for your patience.
There are some details which we will need to help you with your query:
-
which API are you attempting to call?
-
when was this call made roughly?
-
what was the Application ID used?
-
what was the X-correlation-id used?
The error you are receiving is related to legitimate relationships. Can you confirm the current state of the referral you are attempting to retrieve?
Thanks,
Balal.
Hi Balal,
API: - https://int.api.service.nhs.uk/referrals/FHIR/STU3/ReferralRequest/000049809107
Time: - Around Fri,29 Aug 2025 10:30:50 GMT
Application ID: - 96102ee1-120e-4f6b-bbcd-c25592a03743
X-correlation-id: - 61c4j3d47A5aq332pj0Ovw2jIaXj
Current status of the referral: - Deferred to provider
Thank you,
Kumar Dharmendra.
Hi Kumar,
After a brief look into the details you have provided the error you are seeing is stemming out of not having the legitimate relationship in place in order to retrieve the documentation.
This could be due to the set up of workgroups here is some guidance about creating workgroups: Creating a new workgroup - NHS England Digital. Can you check the users that you’re trying to fetch the referral for is in the right service, and that you are not attempting to access a referral which you do not have the legitimate relationship to do so.
Thanks,
Balal