Search loading...

API Hub

Explore and Make use of Nationally Defined Messaging APIs

 

A001: Create Professional Session (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

As an e-RS user working in an integrated system
I want to create a Professional Session in the Spine using my smartcard roles So that I can securely access e-RS functions through my integrated system

Resource URL

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

Prerequisite Conditions

  • HSCN / N3 Connection
  • NHS Smartcard with e-RS role(s)

Using the identity agent

Guidance on using the identity agent and authenticating with NHS Smartcards can be found at developer.nhs.uk/apis/spine-core/smartcards.html

INPUT

Request Operation: Header

Field Name Value
XAPI_ASID The “Accredited System ID” issued to the third party

Request Operation: Parameters

Name Description
token Token from the Smartcard

Example Request Header

XAPI_ASID:200000000220
Accept:application/json
Accept-Encoding:gzip,deflate
Content-Type:application/json

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 response code 201 (Created) is returned. The created Professional Session Resource is returned with available user permissions populated.

Once the session has been created a list of applicable permissions for the user will be returned. The session will not be usable until a permission/role has been selected using the A002 Select Role endpoint.

The ProfessionalSession.id returned should be included as a header (HTTP_X_SESSION_KEY) for all subsequent requests.

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