Search loading...

API Hub

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

Description

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) = https://api.dev1.ers.ncrs.nhs.uk/ers-api
  • {AttachmentLogicalID} = Reference to attachment as provided in the output from A005 Retrieve Referral Request

Operation Definition

Prerequisite Conditions

- - -

INPUT

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

XAPI_ASID:200000000220
HTTP_X_SESSION_KEY:pro-xapi-session_5a399946-23c5-4543-8c4f-7eca38732a58
Accept:*/*

OUTPUT

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