v1
latestOpenAPI 3.0.0MIT2026-07-14400587.2 KBRetrieve "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:
| Query | e-RS Role(s) |
|---|---|
| onBehalfOf | SERVICE_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.
Query parameters
A mandatory URL parameter where "onBehalfOf" is the name of the query operation.
Headers
Required in all environments except sandbox.
Arbitrary string value provided by API Consumer
Tends to be unique, but does not have to be
Returned, unchanged, in the response
The ODS code of the caller's Organisation
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.