|
1 | 1 | { |
2 | 2 | "info": { |
3 | | - "_postman_id": "298358e5-ad8f-4875-a8e3-acb4600712f0", |
4 | | - "name": "Validated Relationship Service Sandbox 03/09/25", |
| 3 | + "_postman_id": "66c6bd03-3fda-4ff7-9be9-bace275b60cf", |
| 4 | + "name": "Validated Relationship Service Sandbox 08/09/25", |
5 | 5 | "description": "This Postman collection includes example scenarios for each of the Validated Relationship Service (VRS) API endpoints, covering both valid and invalid request scenarios.\n\nThe collection is pointed towards the VRS sandbox environment, which will return a specific example response based on the request sent. All data shown in the requests or responses is test data.\n\nOur sandbox environment only covers the scenarios listed in the Postman collection and is open access. It does not allow you to test authorisation or any scenarios beyond the ones documented.\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)", |
6 | 6 | "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", |
7 | | - "_exporter_id": "34042403", |
8 | | - "_collection_link": "https://www.postman.com/jackplowman2/workspace/validate-relationship-service-sandbox-03-09-25/collection/34042403-298358e5-ad8f-4875-a8e3-acb4600712f0?action=share&source=collection_link&creator=34042403" |
| 7 | + "_exporter_id": "45653607", |
| 8 | + "_collection_link": "https://www.postman.com/lukeelliott-8674106/workspace/validated-relationship-service-sandbox-08-11-2025/collection/45653607-66c6bd03-3fda-4ff7-9be9-bace275b60cf?action=share&source=collection_link&creator=45653607" |
9 | 9 | }, |
10 | 10 | "item": [ |
11 | 11 | { |
|
22 | 22 | " \"resourceType\": \"QuestionnaireResponse\",", |
23 | 23 | " \"status\": \"completed\",", |
24 | 24 | " \"authored\": \"2024-07-15T09:43:03.280Z\",", |
| 25 | + " \"id\": \"156e1560-e532-4e2a-85ad-5aeff03dc43e\",", |
| 26 | + " \"identifier\": {", |
| 27 | + " \"value\": \"19318ZGLAB\"", |
| 28 | + " },", |
25 | 29 | " \"source\": {", |
26 | 30 | " \"type\": \"RelatedPerson\",", |
27 | 31 | " \"identifier\": {", |
|
250 | 254 | "response": [] |
251 | 255 | }, |
252 | 256 | { |
253 | | - "name": "Missing Reference Code", |
| 257 | + "name": "Missing Access Request UUID", |
254 | 258 | "event": [ |
255 | 259 | { |
256 | 260 | "listen": "test", |
|
318 | 322 | "response": [] |
319 | 323 | }, |
320 | 324 | { |
321 | | - "name": "Invalid Reference Code", |
| 325 | + "name": "Invalid Access Request UUID", |
322 | 326 | "event": [ |
323 | 327 | { |
324 | 328 | "listen": "test", |
325 | 329 | "script": { |
326 | 330 | "exec": [ |
327 | 331 | "const expectedResponseBody = {", |
328 | | - " \"resourceType\": \"OperationOutcome\",", |
329 | | - " \"issue\": [", |
330 | | - " {", |
331 | | - " \"severity\": \"error\",", |
332 | | - " \"code\": \"required\",", |
333 | | - " \"details\": {", |
334 | | - " \"coding\": [", |
335 | | - " {", |
336 | | - " \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1\",", |
337 | | - " \"code\": \"BAD_REQUEST\",", |
338 | | - " \"display\": \"Bad request\"", |
339 | | - " }", |
340 | | - " ]", |
341 | | - " },", |
342 | | - " \"diagnostics\": \"The access request ID parameter is required but was not provided.\"", |
343 | | - " }", |
344 | | - " ]", |
345 | | - "};", |
| 332 | + " \"resourceType\": \"OperationOutcome\",", |
| 333 | + " \"issue\": [", |
| 334 | + " {", |
| 335 | + " \"severity\": \"error\",", |
| 336 | + " \"code\": \"invalid\",", |
| 337 | + " \"details\": {", |
| 338 | + " \"coding\": [", |
| 339 | + " {", |
| 340 | + " \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1\",", |
| 341 | + " \"code\": \"INVALID_IDENTIFIER_VALUE\",", |
| 342 | + " \"display\": \"Invalid identifier value\",", |
| 343 | + " }", |
| 344 | + " ]", |
| 345 | + " },", |
| 346 | + " \"diagnostics\": \"The specified access request ID is invalid. Access request IDs must be a valid UUID.\",", |
| 347 | + " }", |
| 348 | + " ],", |
| 349 | + " };", |
346 | 350 | "", |
347 | 351 | "pm.test(\"Status code is 400\", function () {", |
348 | 352 | " pm.response.to.have.status(400);", |
|
373 | 377 | } |
374 | 378 | ], |
375 | 379 | "url": { |
376 | | - "raw": "{{api_base_url}}/QuestionnaireResponse?referenceCode=INVALID", |
| 380 | + "raw": "{{api_base_url}}/QuestionnaireResponse?ID=INVALID", |
377 | 381 | "host": [ |
378 | 382 | "{{api_base_url}}" |
379 | 383 | ], |
|
382 | 386 | ], |
383 | 387 | "query": [ |
384 | 388 | { |
385 | | - "key": "referenceCode", |
| 389 | + "key": "ID", |
386 | 390 | "value": "INVALID" |
387 | 391 | } |
388 | 392 | ] |
|
392 | 396 | "response": [] |
393 | 397 | }, |
394 | 398 | { |
395 | | - "name": "Reference Code Not Found", |
| 399 | + "name": "Access Request UUID Not Found", |
396 | 400 | "event": [ |
397 | 401 | { |
398 | 402 | "listen": "test", |
|
487 | 491 | " \"details\": {", |
488 | 492 | " \"coding\": [", |
489 | 493 | " {", |
490 | | - " \"code\": \"156e1560-e532-4e2a-85ad-5aeff03dc43e\",", |
491 | | - " \"display\": \"156e1560-e532-4e2a-85ad-5aeff03dc43e\"", |
| 494 | + " \"code\": \"19318ZGLAB\",", |
| 495 | + " \"display\": \"19318ZGLAB\"", |
492 | 496 | " }", |
493 | 497 | " ]", |
494 | 498 | " }", |
|
503 | 507 | "pm.test(\"Response has the correct body\", () => {", |
504 | 508 | " const responseJson = pm.response.json();", |
505 | 509 | " pm.expect(responseJson).to.eql(expectedResponseBody);", |
506 | | - "});" |
| 510 | + "});", |
| 511 | + "", |
| 512 | + "pm.test(\"Location header is returned\", () => {", |
| 513 | + " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", |
| 514 | + "})" |
507 | 515 | ], |
508 | 516 | "type": "text/javascript", |
509 | 517 | "packages": {} |
|
567 | 575 | " \"details\": {", |
568 | 576 | " \"coding\": [", |
569 | 577 | " {", |
570 | | - " \"code\": \"156e1560-e532-4e2a-85ad-5aeff03dc43e\",", |
571 | | - " \"display\": \"156e1560-e532-4e2a-85ad-5aeff03dc43e\"", |
| 578 | + " \"code\": \"19318ZGLAB\",", |
| 579 | + " \"display\": \"19318ZGLAB\"", |
572 | 580 | " }", |
573 | 581 | " ]", |
574 | 582 | " }", |
|
583 | 591 | "pm.test(\"Response has the correct body\", () => {", |
584 | 592 | " const responseJson = pm.response.json();", |
585 | 593 | " pm.expect(responseJson).to.eql(expectedResponseBody);", |
586 | | - "});" |
| 594 | + "});", |
| 595 | + "", |
| 596 | + "pm.test(\"Location header is returned\", () => {", |
| 597 | + " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", |
| 598 | + "})" |
587 | 599 | ], |
588 | 600 | "type": "text/javascript", |
589 | 601 | "packages": {} |
|
713 | 725 | " \"details\": {", |
714 | 726 | " \"coding\": [", |
715 | 727 | " {", |
716 | | - " \"code\": \"156e1560-e532-4e2a-85ad-5aeff03dc43e\",", |
717 | | - " \"display\": \"156e1560-e532-4e2a-85ad-5aeff03dc43e\"", |
| 728 | + " \"code\": \"19318ZGLAB\",", |
| 729 | + " \"display\": \"19318ZGLAB\"", |
718 | 730 | " }", |
719 | 731 | " ]", |
720 | 732 | " }", |
|
729 | 741 | "pm.test(\"Response has the correct body\", () => {", |
730 | 742 | " const responseJson = pm.response.json();", |
731 | 743 | " pm.expect(responseJson).to.eql(expectedResponseBody);", |
732 | | - "});" |
| 744 | + "});", |
| 745 | + "", |
| 746 | + "pm.test(\"Location header is returned\", () => {", |
| 747 | + " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", |
| 748 | + "})" |
733 | 749 | ], |
734 | 750 | "type": "text/javascript", |
735 | 751 | "packages": {} |
|
792 | 808 | " \"details\": {", |
793 | 809 | " \"coding\": [", |
794 | 810 | " {", |
795 | | - " \"code\": \"156e1560-e532-4e2a-85ad-5aeff03dc43e\",", |
796 | | - " \"display\": \"156e1560-e532-4e2a-85ad-5aeff03dc43e\"", |
| 811 | + " \"code\": \"19318ZGLAB\",", |
| 812 | + " \"display\": \"19318ZGLAB\"", |
797 | 813 | " }", |
798 | 814 | " ]", |
799 | 815 | " }", |
|
808 | 824 | "pm.test(\"Response has the correct body\", () => {", |
809 | 825 | " const responseJson = pm.response.json();", |
810 | 826 | " pm.expect(responseJson).to.eql(expectedResponseBody);", |
811 | | - "});" |
| 827 | + "});", |
| 828 | + "", |
| 829 | + "pm.test(\"Location header is returned\", () => {", |
| 830 | + " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", |
| 831 | + "})" |
812 | 832 | ], |
813 | 833 | "type": "text/javascript", |
814 | 834 | "packages": {} |
|
0 commit comments