Binary response in A006 (Retrieve Attachment)

Hi All,

I am working through the various endpoints related to receipt of attachments from eRS (documents uploaded by users and system generated letters).

The corresponding binary stream being received, always appears to be corrupted. I wondered if this is something being set by the endpoint itself or perhaps an issue on the receiving endpoint side within our infrastructure.

Is there an option to recieve the data as base64?

example curl taken from online weblink: https://digital.nhs.uk/developer/api-catalogue/e-referral-service-fhir#get-/STU3/Binary/-attachmentLogicalID-

curl -X GET “https://sandbox.api.service.nhs.uk/referrals/FHIR/STU3/Binary/c5d2d200-7613-4a69-9c5f-1bb68e04b8d8”
-H “accept: text/plain”
-H “nhsd-end-user-organisation-ods: R69”
-H “nhsd-ers-business-function: SERVICE_PROVIDER_CLINICIAN_ADMIN”
-H “nhsd-ers-on-behalf-of-user-id: 021600556514”
-H “x-correlation-id: 11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA” \

Hi @integration_uk,

The sandbox will always return a single sample PDF file.

The file returned seems fine if I use the “Try” functionality in the documentation, or if I simply navigate to https://sandbox.api.service.nhs.uk/referrals/FHIR/STU3/Binary/c5d2d200-7613-4a69-9c5f-1bb68e04b8d8 in the brower (i.e. click the link).

That would suggest the issue is within your infrastructure?

There is no option to receive the data as base64.

Thanks,

Adam.

Hi Adam,

Thanks for the response, appreciate the explanation.

1 Like