v1

latestOpenAPI 3.0.02026-07-14732267.9 KB

Create a proxy role

Overview

Use this endpoint to create a new proxy role between a patient and a related person (proxy).

Access modes

This endpoint supports the following access modes:

  • Healthcare worker access
  • Application-restricted access

Sandbox test scenarios

You can test the following scenarios in our sandbox environment:

ScenarioRequestResponse
Successful parent-child proxy creationValid request with a legal basis of parental responsibility, with performer identifier value of 9000000009HTTP Status 201 and OperationOutcome response
Successful adult-adult proxy creationValid request with legal basis of consent, with performer identifier value of 9000000017HTTP Status 201 and OperationOutcome response
Valid OTHER reason code with free textRequest with reason code 'OTHER' and free text provided, performer identifier 9000000051HTTP Status 201 and OperationOutcome response
Non-OTHER reason code without free textRequest with a reason code other than 'OTHER', no free text, performer identifier 9000000052HTTP Status 201 and OperationOutcome response
Non-OTHER reason code with free textRequest with a reason code other than 'OTHER', with free text, performer identifier 9000000053HTTP Status 201 and OperationOutcome response
Missing free text for OTHER reason codeRequest with reason code 'OTHER' but missing free text, performer identifier 9000000050HTTP Status 400 and MISSING_FREE_TEXT_FOR_OTHER error response
Missing grantorValid request with status 'active' but no grantor extension, performer identifier 9000000054HTTP Status 400 and MISSING_GRANTOR error response
Missing grantor valueReferenceRequest with grantor extension but missing valueReference, performer identifier 9000000057HTTP Status 400 and MISSING_GRANTOR_REFERENCE error response
Missing grantor valueIdentifierRequest with grantor extension but missing valueIdentifier, performer identifier 9000000058HTTP Status 400 and MISSING_GRANTOR_IDENTIFIER error response
Invalid grantor ODS code valueRequest with grantor extension but missing/empty/invalid ODS code, performer identifier 9000000055HTTP Status 422 and INVALID_GRANTOR_VALUE error response
Invalid grantor identifier systemRequest with grantor extension but wrong/missing identifier system, performer identifier 9000000056HTTP Status 422 and INVALID_GRANTOR_SYSTEM error response
Duplicate relationshipRequest for relationship that already exists, with performer identifier value of 9000000049HTTP Status 409 and DUPLICATE_RELATIONSHIP error response

Sandbox constraints

The sandbox environment has the following constraints for this endpoint:

  • patient.identifier.value is disregarded. The returned response is based on the performer.identifier.value only.
  • Request body is not validated.
  • Request headers are not tested. X-Request-ID and X-Correlation-ID are disregarded.
  • No proxy role is created.
post/Consent

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.

Response

Consent resource successfully created