|
1 | 1 | { |
2 | 2 | "info": { |
3 | 3 | "_postman_id": "c3ee07a1-47e5-43f7-96f9-5e56d403af45", |
4 | | - "name": "Validated Relationship Service - Integration", |
| 4 | + "name": "Validated Relationship Service - Integration - 18/12/25", |
5 | 5 | "description": "## About the collection\n\nThe collection has been organised by API endpoint - you will find a folder for each one.\n\nWithin those endpoints are requests covering success and error response scenarios.\n\nEach request has at least 1 example against it. This shows the expected response for that request. Some requests have multiple examples showing how the response differs when different parameters are provided.\n\n### Authorization types\n\nWhen you send a request to the Validated Relationship Service, your request will first be authorised by the API Management service (APIM).\n\nThe Validated Relationship Service has 3 types of authorization:\n\n- CIS2 - For healthcare practitioners\n \n- App-restricted - for service-to-service authorization\n \n- Login - For patient/proxy access via the NHS App\n \n\nEach VRS API endpoint uses a different combination of these auth types depending on their use case.\n\nYou will need to follow the steps in the 'Getting Started' section below to set the correct authorization tokens for each of these types.\n\nPlease see the folder-level docs for each endpoint for details about what auth types are available to use.\n\n## Getting started\n\n### Environment variables\n\nYou will need to add the following environment variables to the collection.\n\n#### `cis2_token`\n\nAuthorization token value for CIS2 (healthcare practitioner access).\n\n_Only required when using endponts that require this auth method._\n\nThis value can be generated by running the `get_cis2_access_token_int.py` script . See more details in the 'How to create a valid Authorization header' section below.\n\n#### `login_token`\n\nAuthorization token value for NHS Login (patient access).\n\n_Only required when using endponts that require this auth method._\n\nThis value can be generated by running the `get_nhs_login_access_token_int.py` script . See more details in the 'How to create a valid Authorization header' section below.\n\n#### `vrs_api_private_key`\n\n**(This is not the same as the private key in the NHS Developer Account portal.)**\n\nAPI private key for the Validated Relationship Service integration application.\n\n_Only required when using endponts that use the app restricted auth method._\n\nThis value can be copied from the /main/vrs-app-credentials-{id} secret in **AWS Secrets Manager** or requested to be sent securely from a member of the VRS team.\n\n#### `nhs_developer_account_api_key`\n\nAPI app key for the Validated Relationship Service integration application.\n\n_Only required when using endponts that use the app restricted auth method._\n\nThis value can be copied from the NHS - Proxy Core Services - Integration environment resource in the NHS Developer Account portal.\n\n#### `consent_app_auth_header_value` (Generated automatically)\n\nAuthorization token value for app restricted auth.\n\n_Only required when using endponts that use the app restricted auth method._\n\n**You do not need to change this value as it is automatically set in the pre-request script.**\n\n#### `tpp_9674998535_access_token`, `tpp_9674998454_access_token`, `emis_9692113698_access_token,` and `emis_9692113612_access_token`\n\nAuthorization token value for connecting to GPIT supplier systems in NAM tests (Get proxy roles only).\n\n_Only required when running the_ `_Get proxy roles (GET/Consent) Valid request - NAM - Get proxy roles_` _requests._\n\nValues for these environment variables can be found on the [Test data page in Confluence](https://nhsd-confluence.digital.nhs.uk/spaces/NPA/pages/950553445/Test+data+and+accounts+repository+-+NPA#TestdataandaccountsrepositoryNPA-GPITtestaccountsforEXT).\n\n### How to create a valid Authorization header\n\n#### Manually through Python scripts (required for Login and CIS2)\n\n##### Pre-requisites\n\nAccess the token generation scripts from the [validated-relationships-service-api repo](https://github.com/NHSDigital/validated-relationships-service-api/tree/master/scripts):\n\n- get_app_access_token_int.py - for app restricted authorization\n \n- get_cis2_access_token_int.py - for CIS2 authorization\n \n- get_nhs_login_access_token_int.py - for Login user authorization\n \n\nSee the [README](https://github.com/NHSDigital/validated-relationships-service-api/tree/master/scripts/README.md) for information about how to run them and what environment variables are needed.\n\n##### Steps\n\n1. Generate bearer tokens for each of the above methods using the provided scripts\n \n2. Go to the Authorization tab for this Postman request\n \n3. Select 'Bearer token' from the drop-down\n \n4. Copy just the 'access_request' value from the script output into the Token field. You do **not** need to add the word 'bearer' before the value.\n \n\nTokens expire every 5 minutes. Once expired, you will receive an 'Unauthorised' response from the API endpoints. At this point, a new token will need to be generated by repeating the above steps.\n\n#### Automatically through pre-request script (for App-restricted)\n\nA pre-request script has been added to the endpoints where app-restricted auth can be used to obtain app-restricted tokens automatically. For this to work, you will need to add values for the following environment variables:\n\n- `private_key`\n \n- `api_key`\n \n\nIf those values are set and valid, then no further action is required.\n\n## Running a request\n\nOnce you have completed the above 'Getting Started' steps you will be able to send requests by either clicking the 'Send' button on each request, or the 'Try' button on each example.\n\nThe pre-prod environments are not constricted to just the requests provided in this collection. Feel free to change and create requests/examples as you require. However, only the test users provided will work in these environments.\n\n## Test data\n\nAll of the requests in the collection use test data and users that have been set up to demonstrate each specific scenario. No sensitive data is stored in this collection.\n\nSee each scenario for information about what test users are being used.", |
6 | 6 | "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", |
7 | | - "_exporter_id": "18067099", |
8 | | - "_collection_link": "https://www.postman.com/lunar-crescent-672573/workspace/validated-relationship-service-pre-prod-20-11-2025/collection/18067099-c3ee07a1-47e5-43f7-96f9-5e56d403af45?action=share&source=collection_link&creator=18067099" |
| 7 | + "_exporter_id": "50770159", |
| 8 | + "_collection_link": "https://www.postman.com/lunar-crescent-672573/workspace/validated-relationship-service/collection/18067099-c3ee07a1-47e5-43f7-96f9-5e56d403af45?action=share&source=collection_link&creator=50770159" |
9 | 9 | }, |
10 | 10 | "item": [ |
11 | 11 | { |
|
6777 | 6777 | ], |
6778 | 6778 | "body": { |
6779 | 6779 | "mode": "raw", |
6780 | | - "raw": "[\n {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\n {\n \"op\": \"replace\",\n \"path\": \"/extension\",\n \"value\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_DEACTIVATED_NOT_NEEDED\",\n \"display\": \"Patient no longer needs proxy support\"\n }\n ]\n }\n }\n ]\n }\n]\n", |
| 6780 | + "raw": "[\n {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\n {\n \"op\": \"replace\",\n \"path\": \"/extension\",\n \"value\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_DEACTIVATED_PATIENT_REQUEST\",\n \"display\": \"At patients request\"\n }\n ]\n }\n }\n ]\n }\n]\n", |
6781 | 6781 | "options": { |
6782 | 6782 | "raw": { |
6783 | 6783 | "language": "json" |
|
6826 | 6826 | ], |
6827 | 6827 | "body": { |
6828 | 6828 | "mode": "raw", |
6829 | | - "raw": "[\n {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\n {\n \"op\": \"replace\",\n \"path\": \"/extension\",\n \"value\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_DEACTIVATED_NOT_NEEDED\",\n \"display\": \"Patient no longer needs proxy support\"\n }\n ]\n }\n }\n ]\n }\n]", |
| 6829 | + "raw": "[\n {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\n {\n \"op\": \"replace\",\n \"path\": \"/extension\",\n \"value\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_DEACTIVATED_PATIENT_REQUEST\",\n \"display\": \"At patients request\"\n }\n ]\n }\n }\n ]\n }\n]", |
6830 | 6830 | "options": { |
6831 | 6831 | "raw": { |
6832 | 6832 | "language": "json" |
|
7123 | 7123 | ], |
7124 | 7124 | "body": { |
7125 | 7125 | "mode": "raw", |
7126 | | - "raw": "[\n {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\n {\n \"op\": \"replace\",\n \"path\": \"/extension\",\n \"value\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_DEACTIVATED_NOT_NEEDED\",\n \"display\": \"Patient no longer needs proxy support\"\n }\n ]\n }\n }\n ]\n },\n {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31\"\n }\n]", |
| 7126 | + "raw": "[\n {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\n {\n \"op\": \"replace\",\n \"path\": \"/extension\",\n \"value\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_DEACTIVATED_PATIENT_REQUEST\",\n \"display\": \"At patients request\"\n }\n ]\n }\n }\n ]\n },\n {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31\"\n }\n]", |
7127 | 7127 | "options": { |
7128 | 7128 | "raw": { |
7129 | 7129 | "language": "json" |
|
7172 | 7172 | ], |
7173 | 7173 | "body": { |
7174 | 7174 | "mode": "raw", |
7175 | | - "raw": "[\n {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\n {\n \"op\": \"replace\",\n \"path\": \"/extension\",\n \"value\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_DEACTIVATED_NOT_NEEDED\",\n \"display\": \"Patient no longer needs proxy support\"\n }\n ]\n }\n }\n ]\n },\n {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31\"\n }\n]", |
| 7175 | + "raw": "[\n {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\n {\n \"op\": \"replace\",\n \"path\": \"/extension\",\n \"value\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_DEACTIVATED_PATIENT_REQUEST\",\n \"display\": \"At patients request\"\n }\n ]\n }\n }\n ]\n },\n {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31\"\n }\n]", |
7176 | 7176 | "options": { |
7177 | 7177 | "raw": { |
7178 | 7178 | "language": "json" |
|
0 commit comments