v50

latestOpenAPI 3.0.0raw.githubusercontent.com2026-07-21732169.1 KB

Get proxy roles

Overview

Use this endpoint to get the details about proxy roles, including current status, based on a provided NHS Number.

Either performer:identifier or patient:identifier request parameters must be provided. performer:identifier and patient:identifier can be used together.

You can (optionally) include a status={status} query string parameter to filter the response to records with a given status bound to the http://hl7.org/fhir/consent-state-codes CodeSystem e.g. status=active or status=proposed,active.

You can (optionally) include the _include=Consent:performer request parameter to include the proxy's details in the response.

You can (optionally) include the _include=Consent:patient request parameter to include the patient's details in the response.

Access modes

This endpoint supports the following access modes:

  • Patient access
  • Healthcare worker access
  • Application-restricted access

Sandbox test scenarios

You can test the following scenarios in our sandbox environment:

ScenarioRequestResponse
Multiple proxy relationships filtered by 'active' status including detailsperformer:identifier=9000000017&_include=Consent:patient&_include=Consent:performer&status=activeHTTP Status 200 Bundle containing a multiple active proxy relationships including performer and patient details
Multiple proxy relationships filtered by 'inactive' statusperformer:identifier=9000000017&status=inactiveHTTP Status 200 Bundle containing a multiple inactive proxy relationships
Multiple proxy relationships filtered by 'proposed' and 'active' statusperformer:identifier=9000000017&status=proposed,activeHTTP Status 200 Bundle containing a multiple proposed and active proxy relationships
Multiple proxy relationships without filtering and detailsperformer:identifier=9000000022HTTP Status 200 Bundle containing a multiple proxy relationships without details
Multiple proxy relationships including performer detailsperformer:identifier=9000000022&_include=Consent:performerHTTP Status 200 Bundle containing a multiple proxy relationships including performer details
Multiple proxy relationships including patient detailsperformer:identifier=9000000022&_include=Consent:patientHTTP Status 200 Bundle containing a multiple proxy relationships including patient details
Multiple proxy relationships including performer and patient detailsperformer:identifier=9000000022&_include=Consent:patient&_include=Consent:performerHTTP Status 200 Bundle containing a multiple proxy relationships including performer and patient details
Multiple proxy relationships, single patientpatient:identifier=9000000100HTTP Status 200 Bundle containing a multiple proxy relationships including performer and patient details
Multiple proxy relationships, single patient, including proxy detailspatient:identifier=9000000100&_include=Consent:performerHTTP Status 200 Bundle containing a multiple proxy relationships including proxy details
Multiple proxy relationships, single patient, including patient detailspatient:identifier=9000000100&_include=Consent:patientHTTP Status 200 Bundle containing a multiple proxy relationships including patient details
Multiple proxy relationships, single patient, including proxy and patient detailspatient:identifier=9000000100&_include=Consent:patient&_include=Consent:performerHTTP Status 200 Bundle containing a multiple proxy relationships including proxy and patient details
No proxy relationshipsperformer:identifier=9000000025&_include=Consent:patient&_include=Consent:performer&status=activeHTTP Status 200 empty bundle
A single proxy relationship between consenting adultsperformer:identifier=9000000010 and/or patient:identifier=9000000005HTTP Status 200 Bundle containing a single proxy relationship
A single proxy relationship between consenting adults including detailsperformer:identifier=9000000010 and/or patient:identifier=9000000005&_include=Consent:patient&_include=Consent:performerHTTP Status 200 Bundle containing a single proxy relationship including performer and patient details
A single proxy relationship between a mother and childperformer:identifier=9000000019 and/or patient:identifier=9000000009HTTP Status 200 Bundle containing a single proxy relationship
A single proxy relationship between a mother and child including detailsperformer:identifier=9000000019 and/or patient:identifier=9000000009&_include=Consent:patient&_include=Consent:performerHTTP Status 200 Bundle containing a single proxy relationship including performer and patient details
A single proxy relationship between a mother and child with legal basis unknownperformer:identifier=9000000111 and/or patient:identifier=9000000119HTTP Status 200 Bundle containing a single proxy relationship with legal basis unknown
Invalid status parameterperformer:identifier=9000000019 and/or patient:identifier=9000000009&status=testHTTP Status 422 and INVALID_PARAMETER error response
Invalid include parameterperformer:identifier=9000000019 and/or patient:identifier=9000000009&_include=testHTTP Status 422 and INVALID_PARAMETER error response
Missing identifierpatient:identifier=9000000009HTTP Status 400 and MISSING_IDENTIFIER_VALUE error response
Invalid identifieridentifier=900000000 Note: This identifier is 9 characters long, too short to be NHS NumberHTTP Status 422 and INVALID_IDENTIFIER_VALUE error response
Invalid identifier systemidentifier=https://fhir.nhs.uk/Id/nhs-number/9730675929HTTP Status 422 and INVALID_IDENTIFIER_SYSTEM error response
No performer record foundidentifier=9000000999HTTP Status 404 and INVALIDATED_RESOURCE error response
GP Practice not foundidentifier=9000000012HTTP Status 404 and GP_PRACTICE_NOT_FOUND error response

Sandbox constraints

The sandbox environment has the following constraints for this endpoint:

  • Request headers are not tested. X-IM1-Connection-Params, X-Request-ID and X-Correlation-ID are disregarded.
get/Consent

Query parameters

performer:identifierstring token

The performer's (Proxy) NHS number. For more information on FHIR tokens in general, see here.

patient:identifierstring token

The patient's NHS number. For more information on FHIR tokens in general, see here.

statusstring[]

Specify one or more status values to filter the records returned in the bundle.

Supports FHIR search conventions:

  • OR — comma-separated values within a single parameter, e.g. status=active,proposed returns records with status active or proposed.
  • AND — repeated parameters, e.g. status=active&status=proposed. For a single-valued field like status, AND groups are intersected; disjoint groups will return no results.
  • AND of ORs — e.g. status=active,proposed&status=inactive.

Valid status values are bound to the http://hl7.org/fhir/consent-state-codes CodeSystem: proposed, active, rejected, inactive, entered-in-error.

_includestring[]

Include referenced resources in the bundle response by specifying one or more _include parameters. Further info here.

Headers

Authorizationstring ^Bearer\ [[:ascii:]]+$ required
Example:Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM
X-Request-IDstring uuid required
Example:60E0B220-8136-4CA5-AE46-1D97EF59D068

A globally unique identifier (GUID) for the request, which we use to correlate logs through different components. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.

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

An optional ID which you can use to track transactions across multiple systems. Must be a universally unique identifier (UUID) (ideally version 4). Mirrored back in a response header.

X-IM1-Connection-Paramsstring
Example:NiV3CyMJH3xYV26ghlVpbbjT7pDVEA8HpFczAjRLTs1VezC4CYzupZ3XxXAWM7ELuseqrV8r0Ill7EL7G2tXUaVHCPWgg4q10+MxFjnRPrjDvckBRSZazqZcp0K2VBdUV0rZ7RUYJNJsjVAeefWhiK/Y4R+GFO86QDpt41JS9xA=;G123456

An optional ; delimited string containing parameters required to refresh proxy relationships from GPIT supplier systems. Parameters that comprise this string are:

  • IM1 User Connection token
  • ODS Code

Response

Information successfully returned.