{"openapi":"3.0.0","info":{"contact":{"email":"api.management@nhs.net","name":"Elective Waiting List API Support","url":"https://digital.nhs.uk/developer/help-and-support"},"description":"\n<div class=\"nhsd-m-emphasis-box nhsd-m-emphasis-box--emphasis nhsd-!t-margin-bottom-6\" aria-label=\"Highlighted Information\">\n    <div class=\"nhsd-a-box nhsd-a-box--border-blue\">\n        <div class=\"nhsd-m-emphasis-box__image-box\">\n            <figure class=\"nhsd-a-image\">\n                <picture class=\"nhsd-a-image__picture\">\n                    <img src=\"http://digital.nhs.uk/binaries/content/gallery/icons/info.svg?colour=231f20\" alt=\"\" style=\"object-fit:fill\">\n                </picture>\n            </figure>\n        </div>\n        <div class=\"nhsd-m-emphasis-box__content-box\">\n            <div data-uipath=\"website.contentblock.emphasis.content\" class=\"nhsd-t-word-break\"><p class=\"nhsd-t-body\">This API is <a href=\"https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses\">in production but internal</a>, meaning the API is not currently available for integration by external third parties. If you want to use it, <a href=\"https://digital.nhs.uk/developer/help-and-support\">contact us</a> and we'll look at making it available.</p></div>            \n        </div>\n    </div>\n</div>\n\n## Overview \n\nUse this API to access the Waiting List Minimum Data Set (WLMDS) – The national electronic database of NHS patient waiting list details such as date of birth, a patient's care pathway and the date they began waiting.\n\nYou can:    \n-  Search for patients\n-   get patient details\n-   view when a patient began waiting for a procedure\n-   view the care pathway a patient is on\n-   view the trust/organisation their care pathway is with\n\nYou can view:\n-   patient waiting date\n-   patient pathway identifier\n-   treatment function code\n-   organisation providing the care pathway\n-   census date\n\n\n## Who can use this API \nCurrently, this API is for internal use only - the only API consumer is the NHS App.\n\nIf you are interested in using this API in another context, [contact us](https://digital.nhs.uk/developer/help-and-support).\n\n## API status and roadmap\nThis API is [in production](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses).\n\nTo see our roadmap, or to suggest, comment or vote on features for this API, see our [interactive product backlog](https://nhs-digital-api-management.featureupvote.com/suggestions/444642/nhs-app-api-elective-waiting-list). \n\n## Service level \nThis API is a silver plus service, meaning it is operational 24 hours a day, 365 days a year.\n\nFor more details, see [service levels](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#service-levels). \n\n## Technology \nThis API is a [REST API](http://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#basic-rest).\n\n## Network access\nThis API is available on the internet and, indirectly, on the Health and Social Care Network ([HSCN](https://digital.nhs.uk/services/health-and-social-care-network)). \n\nFor more details see [Network access for APIs](https://digital.nhs.uk/developer/guides-and-documentation/network-access-for-apis). \n\n## Security and authorisation \n \nThis access mode is [application-restricted](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#application-restricted-apis), meaning we authenticate the calling application but not the end user.\n\nThe end user could be:\n\n  -  a patient - in which case you must ensure they are authenticated locally\n\n  -  not present at all - for example as part of a back end process to check waiting lists for an NHS number\n  \nTo use [application-restricted](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#application-restricted-apis) mode, use the following security pattern:\n\n  -  [Application-restricted RESTful API - signed JWT authentication](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/application-restricted-restful-apis-signed-jwt-authentication)\n\n## Errors\nWe use standard HTTP status codes to show whether an API request succeeded or not. They are usually in the range:\n\n* 200 to 299 if it succeeded\n* 400 to 499 if it failed because of a client error by your application\n* 500 to 599 if it failed because of an error on our server\n\nErrors specific to each API are shown in the Endpoints section, under Response. See our [reference guide](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#http-status-codes) for more on errors.\n\n\n## Environments and testing \n\n| Environment                         | Base URL                                                               |\n| ------------------------------------| ---------------------------------------------------------------------- |\n| Sanbox                              | Not available                                                          |\n| Dev                                 | `https://internal-dev.api.service.nhs.uk/elective-waiting-list`        |\n| Integration                         | `https://int.api.service.nhs.uk/elective-waiting-list`                 |\n| Production                          | `https://api.service.nhs.uk/elective-waiting-list`                     |\n\n### Dev testing\n\nOur [dev environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#sandbox-testing):\n\n-  is for developer testing\n\n### Integration testing\n\nOur [integration test environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing):\n\n-  is for integration testing\n\nFor more details, see [integration testing with our RESTful APIs](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing-with-our-restful-apis).\n\n## Onboarding \nYou must get your software [onboarded](https://digital.nhs.uk/developer/guides-and-documentation/onboarding-process) before it can go live. The onboarding process can sometimes be quite long, so it’s worth planning well ahead.\n\nTo onboard for this API, follow the [Supplier Conformance Assessment List (SCAL) process](https://digital.nhs.uk/developer/guides-and-documentation/onboarding-process#onboard-using-the-supplier-conformance-assessment-list-scal-process) after contacting us at [necsu.wayfinder@nhs.net](necsu.wayfinder@nhs.net).\n","title":"Elective Waiting List (Producer) – REST API","version":"Computed and injected at build time by `scripts/set_version.py`"},"servers":[{"description":"Dev environment.","url":"https://internal-dev.api.service.nhs.uk/elective-waiting-list"},{"description":"Integration environment.","url":"https://int.api.service.nhs.uk/elective-waiting-list"},{"description":"Production environment.","url":"https://api.service.nhs.uk/elective-waiting-list"}],"paths":{"/elective-waiting-list/{patient.identifier}":{"get":{"description":"## Overview\nUse this endpoint to get a list of waiting lists for a provided patient identifier. Patient ID is NHS number of the patient. An example call is:\n\n`https://api.service.nhs.uk/elective-waiting-list/patient?patient.identifier=https://fhir.nhs.uk/Id/nhs-number|1234567890`\n","operationId":"waiting-lists","parameters":[{"description":"Bearer token/API Key allocated by us","explode":false,"in":"header","name":"Authorization","required":true,"schema":{"example":"Bearer 6b882ddf-82f5-4611-9390-71ca6a045a60","type":"string"},"style":"simple"},{"description":"id of patient","explode":false,"in":"path","name":"patient.identifier","required":true,"schema":{"type":"string"},"style":"simple"}],"responses":{"200":{"content":{"application/json":{"example":{"PATIENT_PATHWAY_IDENTIFIER":"EBY23435667509,","ACTIVITY_TREATMENT_FUNCTION_CODE":"314,","REFERRAL_TO_TREATMENT_PERIOD_START_DATE":"2020-04-04T00:00:00,","ReportingOrganisation":"RXE,","derWeekEnding":"2023-03-05T00:00:00"},"schema":{"$ref":"#/components/schemas/waiting_lists_200_response"}}},"description":"OK"},"4XX":{"content":{"application/json":{"example":{"status":"400,","message":"bad request,","error":"The request is invalid"},"schema":{"$ref":"#/components/schemas/waiting_lists_4XX_response"}}},"description":"An error occurred as follows:\n\n| HTTP status | Error code                 | Description |\n| ----------- | -------------------------- | --------------------------------------------- |\n| 400         | `error.bad-request`        | The request is invalid                        |\n| 401         | `error.unauthorized`       | Invalid token provided                        |\n| 403         | `error.forbidden`          | Access to the requested resource is forbidden |\n"}},"security":[{"bearerAuth":[]}],"summary":"Get waiting lists by patient identifier"}}},"components":{"schemas":{"waiting_lists_200_response":{"properties":{"result":{"enum":["success"],"type":"string"}},"type":"object"},"waiting_lists_4XX_response":{"properties":{"code":{"enum":["error.bad-request","error.unauthorized"],"type":"string"},"data":{"example":"clientId mismatch","type":"string"}},"type":"object"}},"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}}},"x-spec-publication":{"try-this-api":{"disabled":true}}}