We have query regarding eRS API A005. We are not able to hit the API (A005 - Retrieve referral request : GET /STU3/ReferralRequest/{ubrn}), getting error 403.
We are sending the following parameters in the request header as below -
403 indicates an authorisation issue with access forbidden, therefore look at the authentication process you’re using if you are certain you have authorisation to use the method.
The call to retrieve the referral is failing as the on-behalf-of user provided is not valid. The on-behalf-of user ID cannot be the same as the SPCA user ID.
As you can see from your response to A040 user 555294209105 does not have any valid on-behalf-of users to use.
Note: If you don’t want to use on-behalf-of then use the SERVICE_PROVIDER_CLINICIAN business function and do not provide the NHSD-eRS-On-Behalf-Of-User-ID header.
I have passed the REFERRING_CLINICIAN business function and do not provide the NHSD-eRS-On-Behalf-Of-User-ID header, then I can retrieve the referral by UBRN.
@zubeir.tai Please setup for on-behalf-of user Id.
Yes, if we are using REFERRING_CLINICIAN business function, so we don’t need to pass the ‘on-behalf-of’ user-id, It is only required for the SPCA business function. Right now, we can continue with RC role instead of SPCA.