Search loading...


Explore and Make use of Nationally Defined Messaging APIs


A006: Retrieve Attachment

Notice: This page is under review, some details may be inaccurate
If you are using the deprecated FHIR v2 endpoint, please click here.

Status: Live


This API lets users retrieve and download linked files for a referral, also known as attachments.

Note: The AttachmentLogicalID won’t be made available explicitly, but the full path required to retrieve the attachment is returned by A005 Retrieve Referral Request. The path to the attachment can be found in the “url” field of the DocumentReference.content.attachment in the contained section of the ReferralRequest resource.

Resource URL

Method URL
GET {Base URL}/STU3v1/Binary/{AttachmentLogicalID}
  • {Base URL} (Dev1) =
  • {AttachmentLogicalID} = Reference to attachment as provided in the output from A005 Retrieve Referral Request

Operation Definition

Prerequisite Conditions

- - -


Request Operation: Header

Field Name Value
XAPI_ASID The “Accredited System ID” issued to the third party
HTTP_X_SESSION_KEY The session key generated by the Authentication and Authorisation APIs

Request Operation: Parameters

No body is required.

Example URI

Example Request Header



Response: Success

If successful, the response code 200 (OK) is returned along with the binary of the requested file.

Response: Failure

If an error occurs, the relating HTTP status code will be returned in the header.

Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below:

| OutcomeKey | Description | Suggested Diagnostic | | ———- | ———– | ——————– |

All content is available under the Open Government Licence v3.0, except where otherwise stated