Skip to main content

File attachments

Find out about upcoming changes to file attachments and its impact to the NHS e-Referral Service API.

Introduction

Over the course of financial year (FY) 2025/2026, the e-Referral Service (e-RS) will be making file attachment changes in our API.

This page aims to provide a high-level summary of the release plan. It will also contain detailed changes for each release, their impact on your integrated software, and what actions you need to take.

All partners integrated with the Retrieve attachment (A006, FHIR STU3) or Upload file to document store (A020, FHIR STU3) endpoints will be impacted. Partners will be required to make changes to mitigate the impact of future releases. This is irrespective of whether you choose to integrate with the new endpoints or not.


Overview

The file attachments work includes:

  • an increase of the file size limit
  • a switch to direct file upload and download
  • the introduction of malware scanning

File size limit

For a long time, e-RS has maintained a file size limit of 5MB.

To support new care settings and share high-resolution media, the e-RS will be increasing the maximum supported file size. The maximum file size will increase to 100MB, and may increase beyond this in the future.

Direct file upload/download

To enable fast, efficient transfer of large files, new endpoints will be introduced. These endpoints will allow direct file transfer to and from the e-RS object store.

The 5MB limit for the existing upload and download endpoints will remain in place. As will attachments uploaded via the HL7 V3 API.

Malware scanning

Alongside the file size increase, the e-RS will scan all file uploads for malware. This will impact how you process file downloads.


Accessibility description

This diagram illustrates the current state of the file attachments API, upcoming changes in 4 releases and how it impacts partners.

Current state

This shows the two existing API endpoints related to file attachments:

  1. Download endpoint: Retrieve attachment (A006, FHIR STU3)
  2. Upload endpoint: Upload file to document store (A020, FHIR STU3)

Release 1

The changes in Release 1 include the introduction of:

  • a new download endpoint - Retrieve attachment (A042, FHIR R4)
  • a deprecation notice for the current download endpoint - Retrieve attachment (A006, FHIR STU3)
  • file availability status in the existing API endpoints
  • updated API documentation
  • new sandbox examples

Release 1 is a non-breaking change but will allow partners to prepare for future breaking releases.

The guidance for partners is to modify their software to:

  1. Support attachments that are not available for download
  2. Enable the download of large file attachments

Release 2

Release 2 introduces a change to start sending all file availability states in the API responses.

Release 2 is a breaking change. Partners must implement changes in their software to support attachments that are not available for download

Release 3

The changes in Release 3 includes the introduction of:

Release 3 is a non-breaking change. Partners wishing to leverage their software should enable the upload of large file attachments.

Release 4

Release 4 increases the maximum file size limit to 100MB.

Release 4 is a breaking change. Partners must implement changes in their software to enable the download of large file attachments.

The dates for releases 2, 3, and 4 are still unconfirmed. Our intention is to deliver these in the FY 2025/2026.

The final release dates will depend on available budget, ministerial priorities, and the transition of our main delivery partner. However, we believe providing this advance notice will be helpful to our partners.


Release 1

There is no direct impact to partners in Release 1, due on 18 February 2025 (subject to final testing).

However, we strongly recommend that partners make changes now to mitigate the impact of future releases.

Partners will have the opportunity to test changes in the integration environment from 10 February 2025 (subject to release testing).

Release 1 includes a new download endpoint, alongside a deprecation notice.

There are also updates to the:

  • existing API responses to include the file availability status
  • API documentation
  • API sandbox

New download endpoint

To allow faster and more efficient transfer of large files, a new endpoint is required to facilitate download directly from the e-RS object store.

The download endpoint Retrieve attachment (A042, FHIR R4):

  • is being released early to give partners the opportunity to integrate before the file size limit increases
  • must be used to retrieve file attachments larger than 5MB

Deprecation notice

The Retrieve attachment (A006, FHIR STU3) endpoint will only support a maximum file size of 5MB (5242880 bytes) and will be deprecated.

The deprecation notice includes a migration guide to assist partners in moving to the new FHIR R4 endpoint.

File availability status

With the introduction of direct uploads, files will be processed asynchronously and may not always be available for download immediately. This processing includes validation checks, for example, file type, file size, and malware scanning.

To allow your integrated software to take the appropriate action, an availability status will be added to the attachment metadata.

In this release, the file availability status will always be set to AVAILABLE. Ensuring that files are immediately ready for download.

API documentation

The API technical specification will be updated to include guidance on each availability state and where the file availability status can be found.

API sandbox

The API sandbox will be upgraded to support the technical specification and enable early integration.


Release 2

Release 2 contains breaking changes in the API.

Partners must take action prior to this release to minimise impact to their software.

Release 2 will start to send all file availability states in the API responses:

  1. AVAILABLE - the file is available for download.

  2. PENDING - the file is being scanned and cannot be retrieved.

  3. VALIDATION_FAILED - the file has failed validation and cannot be retrieved.

  4. THREATS_DETECTED - the file has been quarantined after detecting a threat and cannot be retrieved.

Partner software must be able to deal with scenarios where an attachment is not available.

Guidance on how to implement changes to your software is documented as part of the Release 1 page.


Release 3

There is no direct impact to partners in Release 3.

Release 3 includes:

  • a new upload endpoint
  • a deprecation notice for the existing upload endpoint
  • updates to the API documentation

New upload endpoint

To allow faster and more efficient transfer of large files, a new endpoint is required to facilitate upload directly to the e-RS object store.

The new Upload file to document store (A039, FHIR R4) endpoint will allow the upload of file attachments larger than 5MB.

Partners will need to integrate with this endpoint if you wish to leverage your integration.

Deprecation notice

The Upload file to document store (A020, FHIR STU3) endpoint will only support a maximum file size of 5MB (5242880 bytes) and will be deprecated.

The deprecation notice includes a migration guide to assist partners in moving to the new FHIR R4 endpoint.

API documentation

The API technical specification and API sandbox will be updated to introduce the new upload endpoint.


Release 4

Release 4 contains breaking changes in the API.

There should be no impact to partners if the guidance provided in the Release 1 page has been implemented.

Release 4 introduces the capability, in both the e-RS professional web application and the API, to support file sizes up to 100MB. Prior to this release, the file size limit will remain at 5MB.

The existing upload/download endpoints will continue to be limited to 5MB:


Contact us

If you have a query or need further information about file attachments, please contact us at [email protected].

Last edited: 28 January 2025 10:48 am