Skip to content

Commit 7b195e7

Browse files
committed
NPA-4474 Update Postman Collection
1 parent c4addd2 commit 7b195e7

File tree

2 files changed

+86
-13
lines changed

2 files changed

+86
-13
lines changed

postman/Validate_Relationship_Service_Sandbox.postman_collection.json renamed to postman/Validate Relationship Service Sandbox 06-03-25.postman_collection.json

Lines changed: 85 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"info": {
3-
"_postman_id": "ee3d65ab-78e5-4207-9820-2e7e053875d7",
4-
"name": "Validate Relationship Service Sandbox 05/03/25",
3+
"_postman_id": "d04a9e84-1e0e-4bc0-a172-9f860e79cc30",
4+
"name": "Validate Relationship Service Sandbox 06/03/25",
55
"description": "Example usage of the Validate Relationship Service (VRS) sandbox.\n\nFull specification is available at [https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service)",
66
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
7-
"_exporter_id": "21394218"
7+
"_exporter_id": "34042403",
8+
"_collection_link": "https://www.postman.com/jackplowman2/validated-relationship-service-06-03-2025/collection/fwk4h2j/validate-relationship-service-sandbox-06-03-25?action=share&source=collection_link&creator=34042403"
89
},
910
"item": [
1011
{
@@ -1365,7 +1366,7 @@
13651366
" {",
13661367
" \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",",
13671368
" \"code\": \"PRN\",",
1368-
" \"display\": \"Parent\"",
1369+
" \"display\": \"parent\"",
13691370
" },",
13701371
" {",
13711372
" \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",",
@@ -1636,7 +1637,8 @@
16361637
" pm.expect(responseJson).to.eql(expectedResponseBody);",
16371638
"});"
16381639
],
1639-
"type": "text/javascript"
1640+
"type": "text/javascript",
1641+
"packages": {}
16401642
}
16411643
}
16421644
],
@@ -4451,8 +4453,8 @@
44514453
"",
44524454
"const responseJson = pm.response.json();",
44534455
"",
4454-
"pm.test(\"Status code is 400\", function () {",
4455-
" pm.response.to.have.status(400);",
4456+
"pm.test(\"Status code is 422\", function () {",
4457+
" pm.response.to.have.status(422);",
44564458
"});",
44574459
"",
44584460
"pm.test(\"Should have correct error response\", () => {",
@@ -4463,7 +4465,8 @@
44634465
" pm.expect(responseJson).to.eql(expectedResponseBody);",
44644466
"});"
44654467
],
4466-
"type": "text/javascript"
4468+
"type": "text/javascript",
4469+
"packages": {}
44674470
}
44684471
}
44694472
],
@@ -4518,8 +4521,8 @@
45184521
"",
45194522
"const responseJson = pm.response.json();",
45204523
"",
4521-
"pm.test(\"Status code is 400\", function () {",
4522-
" pm.response.to.have.status(400);",
4524+
"pm.test(\"Status code is 422\", function () {",
4525+
" pm.response.to.have.status(422);",
45234526
"});",
45244527
"",
45254528
"pm.test(\"Should have correct error response\", () => {",
@@ -4530,7 +4533,8 @@
45304533
" pm.expect(responseJson).to.eql(expectedResponseBody);",
45314534
"});"
45324535
],
4533-
"type": "text/javascript"
4536+
"type": "text/javascript",
4537+
"packages": {}
45344538
}
45354539
}
45364540
],
@@ -4615,6 +4619,73 @@
46154619
}
46164620
},
46174621
"response": []
4622+
},
4623+
{
4624+
"name": "GP Practice not found",
4625+
"event": [
4626+
{
4627+
"listen": "test",
4628+
"script": {
4629+
"exec": [
4630+
"const expectedResponseBody = {",
4631+
" \"issue\": [",
4632+
" {",
4633+
" \"code\": \"processing\",",
4634+
" \"details\": {",
4635+
" \"coding\": [",
4636+
" {",
4637+
" \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",",
4638+
" \"version\": \"1\",",
4639+
" \"code\": \"GP_PRACTICE_NOT_FOUND\",",
4640+
" \"display\": \"GP Practice could not be found - invalid resources cannot be retrieved\"",
4641+
" }",
4642+
" ]",
4643+
" },",
4644+
" \"severity\": \"error\"",
4645+
" }",
4646+
" ],",
4647+
" \"resourceType\": \"OperationOutcome\"",
4648+
"}",
4649+
"",
4650+
"const responseJson = pm.response.json();",
4651+
"",
4652+
"pm.test(\"Status code is 404\", function () {",
4653+
" pm.response.to.have.status(404);",
4654+
"});",
4655+
"",
4656+
"pm.test(\"Should have correct error response\", () => {",
4657+
" pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"GP_PRACTICE_NOT_FOUND\");",
4658+
"});",
4659+
"",
4660+
"pm.test(\"Should have correct response body\", () => {",
4661+
" pm.expect(responseJson).to.eql(expectedResponseBody);",
4662+
"});"
4663+
],
4664+
"type": "text/javascript",
4665+
"packages": {}
4666+
}
4667+
}
4668+
],
4669+
"request": {
4670+
"method": "GET",
4671+
"header": [],
4672+
"url": {
4673+
"raw": "{{api_base_url}}/Consent?performer:identifier=9000000012",
4674+
"host": [
4675+
"{{api_base_url}}"
4676+
],
4677+
"path": [
4678+
"Consent"
4679+
],
4680+
"query": [
4681+
{
4682+
"key": "performer:identifier",
4683+
"value": "9000000012"
4684+
}
4685+
]
4686+
}
4687+
},
4688+
"response": []
46184689
}
46194690
],
46204691
"description": "# Get proxy relationships (consent)\n\nThe GET /Consent is for retrieving confirmed proxy relationships via the Validated Relationships Service.\n\nThis folder contains requests covering different scenarios for users with different types of proxy relationship. Also includes error scenarios.\n\nFor more details please see the [OAS page for Validated Relationships Service consent on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#get-/Consent)"
@@ -5084,6 +5155,7 @@
50845155
"listen": "prerequest",
50855156
"script": {
50865157
"type": "text/javascript",
5158+
"packages": {},
50875159
"exec": [
50885160
""
50895161
]
@@ -5093,6 +5165,7 @@
50935165
"listen": "test",
50945166
"script": {
50955167
"type": "text/javascript",
5168+
"packages": {},
50965169
"exec": [
50975170
"pm.test(\"Response has FHIR content type\", () => {",
50985171
" pm.expect(pm.response.headers.get('Content-Type')).to.include('application/fhir+json');",
@@ -5108,4 +5181,4 @@
51085181
"type": "string"
51095182
}
51105183
]
5111-
}
5184+
}

specification/validated-relationships-service-api.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ info:
124124
* is open access, so does not allow you to test authorisation
125125
126126
127-
[<img src="https://run.pstmn.io/button.svg" alt="Run In Postman" style="width: 128px; height: 32px;">](https://app.getpostman.com/run-collection/21394218-ee3d65ab-78e5-4207-9820-2e7e053875d7?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D21394218-ee3d65ab-78e5-4207-9820-2e7e053875d7%26entityType%3Dcollection%26workspaceId%3D7d96322a-1b03-4ce1-9830-c36ecb0e4a05)
127+
[<img src="https://run.pstmn.io/button.svg" alt="Run In Postman" style="width: 128px; height: 32px;">](https://god.gw.postman.com/run-collection/34042403-d04a9e84-1e0e-4bc0-a172-9f860e79cc30?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D34042403-d04a9e84-1e0e-4bc0-a172-9f860e79cc30%26entityType%3Dcollection%26workspaceId%3Daf3ed9d7-876b-4756-a1c6-5d9ace4264d6)
128128
129129
### Integration testing
130130

0 commit comments

Comments
 (0)