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

# Reject referral (A014, FHIR STU3)

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

## Request

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

## Overview
Use this endpoint, as a service provider, to reject a referral that is booked into your bookable service and awaiting review. 
This returns the referral to the referrer with a mandatory rejection reason and optional user comment to explain why it has been rejected.

Consider using [[HYPERLINK_A022]] instead if you wish to ask your admin team to get the patient into the most appropriate service.

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

## Pre-requisites
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`

You need to use [[HYPERLINK_A008]] to retrieve the contents of the 'Referrals For Review' worklist. [[HYPERLINK_A014]] 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.

You need to use [[HYPERLINK_A004]] to retrieve a list of rejection reason reference data codes along with their user-friendly display names.  To find 
relevant rejection reasons, obtain reference data from `APPOINTMENT-CANCELLATION-REASON` and filter as follows:

  - `appointmentBookingCancellationReasonType` must be `PROVIDER_REJECT`
  - `effectiveFrom` must be in the past, and
  - `effectiveTo` must not be in the past

## 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.

## Use cases
As an authenticated user

I need to reject an inbound referral back to the referrer after its review with an explanation of why

So that the referrer can address the reason for rejection and progress the referral appropriately.

## 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~1Task/get/parameters/1` (unresolved $ref)
- `#/paths/~1STU3~1Task/get/parameters/2` (unresolved $ref)
- `#/paths/~1STU3~1Task/get/parameters/3` (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)

## Request body

- object
  - `resourceType` 'Parameters', required
  - `meta` object, required
    - `profile` string[], required
  - `parameter` union[], required: | Field | Cardinality | Notes | | --------------------------------- | ----------- | ------------------------------------------ | | `rejectionReason` | `1..1` | The reason why the referral is being rejected | | `rejectionComments` | `0..1` | This may be mandatory if mandatory comment indicator is set to 'Yes' for the Rejection Reason Type selected. Maximum 2000 characters. | | `appointmentCancelledInPAS` | `0..1` | This flag is mandatory for indirectly bookable services |
    - union
      - object: Parameter to supply a rejectionReason
        - `name` 'rejectionReason', required
        - `valueCoding` object, required
          - `system` string, required
          - `code` string, required
      - object: Parameter to supply the rejectionComments
        - `name` 'rejectionComments', required
        - `valueString` string, required
      - object: Parameter to supply a appointmentCancelledInPAS
        - `name` 'appointmentCancelledInPAS', required
        - `valueBoolean` boolean, required

## 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)
- `415` (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 | | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | | INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. | | MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. | | INVALID_VALUE | The input provided does not conform to the expected data types and format. | | INVALID_CODE | The input provided for a field is not one of the defined legal values. | | UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. | | VALUE_IS_REQUIRED | A business rule defines a value as mandatory but it has not been provided. | | FIELD_NOT_PERMITTED | A business rule defines a field as not permitted but it has been provided. | | 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. | | UNABLE_TO_CANCEL_APPOINTMENT | System is unable to cancel the appointment. |
- `423` (unresolved $ref)
- `429` (unresolved $ref)
- `500` (unresolved $ref)
- `503` (unresolved $ref)
- `504`: Where status code 504 (Gateway Timeout) is returned then an eRS-OperationOutcome-1 will be included in the body. Check diagnostics property for specific information regarding the error. In response to receiving this status code, it is recommended that clients retry at a later time. | Error code | Description | | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | | PAS_NOT_RESPONDING | No response from PAS. |

---

[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)
