---
title: "Accept referral (A013, FHIR STU3)"
method: POST
path: "/STU3/ReferralRequest/{ubrn}/$ers.acceptReferral"
tags: ["Review referral requests"]
---

# Accept referral (A013, FHIR STU3)

`POST /STU3/ReferralRequest/{ubrn}/$ers.acceptReferral`

## Request

- Base URL: `https://sandbox.api.service.nhs.uk/referrals/FHIR`
- URL: `https://sandbox.api.service.nhs.uk/referrals/FHIR/STU3/ReferralRequest/{ubrn}/$ers.acceptReferral`
- Auth: HTTP bearer

## Overview
Use this endpoint, as a service provider, to accept a referral that is booked into your bookable service and awaiting review.

## Supported security patterns
- Healthcare worker, user-restricted access
- Application-restricted, unattended access

## Pre-requisites
### Healthcare worker, user-restricted access
In order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:
  - `SERVICE_PROVIDER_CLINICIAN`
  - `SERVICE_PROVIDER_CLINICIAN_ADMIN`

### Application-restricted, unattended access
In order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.

To access this endpoint in application-restricted, unattended mode, you will be required to submit your use case for review.

## Important notes

In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. 
The availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code. 

Further details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications.  

You need to use [[HYPERLINK_A008]] to retrieve the contents of the 'Referrals For Review' worklist. [[HYPERLINK_A013]] can only be used for referrals 
booked into bookable services, and not the referrals sent into triage services.

You need to use [[HYPERLINK_A005]] to retrieve the details for the referral.

You need to use [[HYPERLINK_A006]] to retrieve the clinical attachments for the referral.

You need to use [[HYPERLINK_A007]] to retrieve the clinical information summary PDF for the referral.

## Use cases
As an authenticated user

I need to accept an inbound referral after its review

So that I can confirm the patient's referral is appropriate for the current service and booked appointment date/time.

## Known Issues

1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.
2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.

## Parameters

- `#/paths/~1STU3~1Task/get/parameters/0` (unresolved $ref)
- `#/paths/~1STU3~1Communication/get/parameters/3` (unresolved $ref)
- `#/paths/~1STU3~1Communication/get/parameters/4` (unresolved $ref)
- `#/paths/~1STU3~1Communication/get/parameters/5` (unresolved $ref)
- `#/paths/~1STU3~1Task/get/parameters/4` (unresolved $ref)
- `#/paths/~1STU3~1ReferralRequest~1%7Bubrn%7D/get/parameters/0` (unresolved $ref)
- `#/paths/~1STU3~1Appointment~1%7Bid%7D/put/parameters/5` (unresolved $ref)

## Response `200`

e-RS Referral Request

- Schema (unresolved $ref)

## Other responses

- `400` (unresolved $ref)
- `401` (unresolved $ref)
- `403` (unresolved $ref)
- `404` (unresolved $ref)
- `406` (unresolved $ref)
- `409` (unresolved $ref)
- `412` (unresolved $ref)
- `422`: Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. Check diagnostics property for specific information regarding the error. | Error code | Description | | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | | INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. | | PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. | | NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |
- `423` (unresolved $ref)
- `429` (unresolved $ref)
- `500` (unresolved $ref)
- `503` (unresolved $ref)

---

[API](https://skmtc.dev/nhs/apis/e-referrals-service-api.md) - [All operations](https://skmtc.dev/nhs/apis/e-referrals-service-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nhs/apis/e-referrals-service-api/revisions/916969ea472f?raw)
