v1

latestOpenAPI 3.0.0MIT2026-07-14400587.2 KB
Retrieve user information

Retrieve "on-behalf-of" practitioner user information (A040, FHIR R4)

Overview

Use this endpoint to determine which e-RS users a SERVICE_PROVIDER_CLINICIAN_ADMIN is allowed to work "on-behalf-of".

Note: In e-RS, SERVICE_PROVIDER_CLINICIAN_ADMIN users always act "on-behalf-of" a SERVICE_PROVIDER_CLINICIAN. This endpoint specifically helps SERVICE_PROVIDER_CLINICIAN_ADMIN identify who they are allowed to log in as.

Supported security patterns

  • Healthcare worker, user-restricted access

Pre-requisites

To use this endpoint, you must be an authenticated e-RS user and use one of the following e-RS roles depending on the query being invoked:

Querye-RS Role(s)
onBehalfOfSERVICE_PROVIDER_CLINICIAN_ADMIN

Use case

As an authenticated user who has the SERVICE_PROVIDER_CLINICIAN_ADMIN role

I need to know which provider clinical users I am allowed to work "on-behalf-of" at my provider organisation

So I can log in as a SERVICE_PROVIDER_CLINICIAN_ADMIN user and complete tasks on behalf of a chosen SERVICE_PROVIDER_CLINICIAN user.

Related endpoints

To perform actions as a SERVICE_PROVIDER_CLINICIAN_ADMIN user, you must provide one of the returned Practitioner IDs, in the NHSD-eRS-On-Behalf-Of-User-ID header parameter, to indicate which SERVICE_PROVIDER_CLINICIAN the call is on-behalf-of.

get/R4/Practitioner

Query parameters

_query'onBehalfOf' required
Example:onBehalfOf

A mandatory URL parameter where "onBehalfOf" is the name of the query operation.

Headers

Authorizationstring ^Bearer\ [[:ascii:]]+$ required
Example:Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM

An OAuth 2.0 bearer token.

Required in all environments except sandbox.

X-Correlation-IDstring
Example:11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA

Arbitrary string value provided by API Consumer

Tends to be unique, but does not have to be

Returned, unchanged, in the response

NHSD-End-User-Organisation-ODSstring required
Example:R69

The ODS code of the caller's Organisation

NHSD-eRS-Business-Function'REFERRING_CLINICIAN' | 'REFERRING_CLINICIAN_ADMIN' | 'REFERRING_ADMIN' | 'COMMISSIONER' | 'SERVICE_PROVIDER_CLINICIAN_ADMIN' | 'SERVICE_PROVIDER_CLINICIAN' | 'SERVICE_PROVIDER_ADMIN' | 'INFORMATION_ANALYST' | 'BOOKING_MANAGER' | 'ADDITIONAL_REQUIREMENTS_MANAGER' required
Example:SERVICE_PROVIDER_CLINICIAN_ADMIN

The e-RS Business Function of the caller

Response

The response body is a Bundle that contains Practitioner entries which define the [[HYPERLINK_ERS_BUS_FUNCTIONS]] that the user has available at each Organisation where they have a role.