Search loading...

API Hub

Explore and Make use of Nationally Defined Messaging APIs

 

A002: Professional Session Select Role (Deprecated)

Status:

Deprecated

This endpoint has been deprecated, meaning you should not use it for new integrations.

Instead, please use our newer e-RS FHIR API solution which is documented here: https://digital.nhs.uk/developer/api-catalogue/e-referral-service-fhir

Description

Updates a Professional Session with the appropriate NHS organisation and role. This ensures the correct access rights for the user.

Resource URL

Method URL
PUT {Base URL}/v1/ProfessionalSession/{sessionKey}
  • {Base URL} (Dev1) = https://api.dev1.ers.ncrs.nhs.uk/ers-api

Prerequisite Conditions

  • The Create Session endpoint must be called in order to create the session. This endpoint can then be used to select one of the applicable roles/permissions returned. The ProfessionalSession.id returned from the Create Session endpoint should be included as a header (HTTP_X_SESSION_KEY) for this and all subsequent API requests.

INPUT

Request Operation: Header

Field Name Value
XAPI_ASID The “Accredited System ID” issued to the third party
HTTP_X_SESSION_KEY The session key generated by the Create Session endpoint (A001)

Request Operation: Body

Provide token and permission fields when selecting a role.

Example Request Header

XAPI_ASID:200000000220
Content-Type:application/json
HTTP_X_SESSION_KEY: pro-xapi-session_222c42c7-820f-4f9b-92fb-3add4b1db9f7

Example Request Body

Note: These examples may contain environment specific URLs and test data, these should be replaced with appropriate values for your implementation.

OUTPUT

Response: Success

The created Professional Session Resource is returned with the selected permission applied.

The response code 200 (OK) is returned.

Example Response Body

Note: These examples may contain environment specific URLs and test data, these should be replaced with appropriate values for your implementation.

Response: Failure

If an error occurs, the relating HTTP status code will be returned in the header.

Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below:

| OutcomeKey | Description | Suggested Diagnostic | | ———- | ———– | ——————– |


All content is available under the Open Government Licence v3.0, except where otherwise stated