-
Notifications
You must be signed in to change notification settings - Fork 2
Initial Descriptions and ptl config #185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
sandbox/data/examples/patchLetter/requests/patchLetter_CANCELLED.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
sandbox/data/examples/patchLetter/requests/patchLetter_FAILED.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
sandbox/data/examples/patchLetter/requests/patchLetter_REJECTED.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
sandbox/data/examples/patchLetter/requests/patchLetter_RETURNED.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
sandbox/data/examples/patchLetter/responses/patchLetter_CANCELLED.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
sandbox/data/examples/patchLetter/responses/patchLetter_FAILED.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
sandbox/data/examples/patchLetter/responses/patchLetter_REJECTED.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
sandbox/data/examples/patchLetter/responses/patchLetter_RETURNED.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,3 +9,6 @@ MD024: | |
|
|
||
| # https://github.com/DavidAnson/markdownlint/blob/main/doc/md033.md | ||
| MD033: false | ||
|
|
||
| MD041: | ||
| level: 2 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,7 @@ Jira | |
| Makefile | ||
| OAuth | ||
| Octokit | ||
| onboarding | ||
| [Oo]nboarding | ||
| Podman | ||
| pre | ||
| Python | ||
|
|
||
120 changes: 120 additions & 0 deletions
120
specification/api/components/documentation/APIDescription.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,120 @@ | ||
| ## Overview | ||
|
|
||
| API for letter suppliers to integrate with NHS Notify. | ||
|
|
||
| This API lets you: | ||
|
|
||
| * Get lists of letters allocated to you | ||
| * Download letter PDFs and metadata | ||
| * Update and manage letter statuses | ||
| * Submit and retrieve management information (MI) | ||
|
|
||
| This specification represents the in-development 'next' version of the API schema | ||
| and should be treated as unstable | ||
|
|
||
| Use this API to retrieve letters to be printed | ||
|
|
||
| ## Who can use this API | ||
|
|
||
| The NHS Notify Supplier API is designed for approved print service suppliers who support the delivery of physical letters through the [NHS Notify](https://digital.nhs.uk/services/nhs-notify) platform. | ||
|
|
||
| ## Related APIs | ||
|
|
||
| The [NHS Notify API](https://digital.nhs.uk/developer/api-catalogue/nhs-notify) is used to send messages to citizens via NHS App, email, text message or letter. | ||
|
|
||
| ## API status and roadmap | ||
|
|
||
| This API is [in production, beta](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses). We are onboarding partners to use it. | ||
|
|
||
| We may make additive non-breaking changes to the API without notice, for example the addition of fields to a response or callback, or new optional fields to a request. | ||
|
|
||
| ## Service Level | ||
|
|
||
| This service is a [silver](https://digital.nhs.uk/services/reference-guide#service-levels) service, meaning it is available 24 hours a day, 365 days a year and supported from 8am to 6pm, Monday to Friday excluding bank holidays. | ||
| For more details, see [service levels](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#service-levels). | ||
|
|
||
| ## Technology | ||
|
|
||
| This API is a [REST-based](https://digital.nhs.uk/developer/guides-and-documentation/our-api-technologies#basic-rest) API. | ||
|
|
||
| We follow the [JSON:API](https://jsonapi.org/) standard for our request and response schemas. | ||
|
|
||
| ### Response content types | ||
|
|
||
| This API can generate responses in the following format: | ||
|
|
||
| * `application/vnd.api+json` - see [JSON:API specification](https://jsonapi.org/format/#introduction) | ||
|
|
||
| ### Request content types | ||
|
|
||
| This API will accept request payloads of the following types: | ||
|
|
||
| * `application/vnd.api+json` - see [JSON:API specification](https://jsonapi.org/format/#introduction) | ||
| * `application/json` | ||
|
|
||
| The `Content-Type` header may optionally include a `charset` attribute. If included, it **must** be set to `charset=utf-8` Any other `charset` value will result in a `406` error response. If omitted then `utf-8` is assumed. | ||
|
|
||
| If you attempt to send a payload without the `Content-Type` header set to either of these values then the API will respond with a `415 Unsupported Media Type` response. | ||
|
|
||
| ## Network access | ||
|
|
||
| This 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). | ||
|
|
||
| For more details see [Network access for APIs](https://digital.nhs.uk/developer/guides-and-documentation/network-access-for-apis). | ||
|
|
||
| ## Security and authorisation | ||
|
|
||
| This API 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. | ||
|
|
||
| Authentication and authorisation of end users is the responsibility of your application. | ||
|
|
||
| To access this API, use the following security pattern: | ||
|
|
||
| * [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) | ||
|
|
||
| ## Environments and testing | ||
|
|
||
| | Environment | Base URL | | ||
| |------------ | -------- | | ||
| | Sandbox | `https://sandbox.api.service.nhs.uk/nhs-notify-supplier` | | ||
| | Integration test | `https://int.api.service.nhs.uk/nhs-notify-supplier` | | ||
| | Production | `https://api.service.nhs.uk/nhs-notify-supplier` | | ||
|
|
||
| ### Sandbox testing | ||
|
|
||
| Our [sandbox environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#sandbox-testing): | ||
|
|
||
| * is for early developer testing | ||
| * only covers a limited set of scenarios | ||
| * is stateless, so does not actually persist any updates | ||
| * is open access, so does not allow you to test authorisation | ||
|
|
||
| For details of sandbox test scenarios, or to try out sandbox using our 'Try this API' feature, see the documentation for each endpoint. | ||
|
|
||
| Alternatively, you can try out the sandbox using our Postman collection | ||
|
|
||
| You can find our postman collection source in our [public repository on github](https://github.com/NHSDigital/nhs-notify-supplier-api/tree/main/postman). | ||
|
|
||
| ### Integration testing | ||
|
|
||
| Our integration test environment: | ||
|
|
||
| * is for formal integration sandbox-testing | ||
| * is stateful, so persists updates | ||
| * includes authorisation via [signed JWT authentication](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/application-restricted-restful-apis-signed-jwt-authentication) | ||
|
|
||
| You need to get your software approved by us before it can go live with this API. | ||
|
|
||
| You will also need to follow our steps to - TBD | ||
|
|
||
| ### Production smoke testing | ||
|
|
||
| Before go-live, you must complete a smoke test in the NHS Notify production environment. | ||
| The smoke test confirms that your live credentials, connectivity, and print workflow operate correctly end-to-end. It will be carried out in coordination with the NHS Notify Supplier API team. | ||
| You will retrieve and print one or more live test letters through the production API, send the printed output to the address provided, and submit a Management Information (MI) update for verification. | ||
| The NHS Notify team will configure your production access, review your results, and confirm that your output meets NHS Notify print specifications. | ||
|
|
||
| ### Onboarding | ||
|
|
||
| You need to get your software approved by us before it can go live with this API. | ||
| You will also need to be an approved NHS letter supplier under the framework agreement (ADD link) and nominate your technical and operational contacts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| ## Overview | ||
|
|
||
| Use this endpoint to send management or operational metrics relating to letter processing and print fulfilment | ||
|
|
||
| When you submit a create management information request, the endpoint will respond with a c201 (Created) response code along with the created data including a unique id for the record or an unsuccessful (4xx/5xx) response | ||
|
|
||
| Rate limiting applies. On excess requests, you may receive **429 Too Many Requests** (example error code(s): `NOTIFY_QUOTA`). Back off and retry later | ||
|
|
||
| ## Sandbox test scenarios | ||
|
|
||
| You can test the following scenarios in our sandbox environment. | ||
|
|
||
| |Scenario|Request|Response| | ||
| |--------|-------|--------| | ||
| |Success|Request for successful MI record Creation| 201 (Created) with the created management information in the response| | ||
| |Invalid Request|Invalid Request for MI record Creation| 400 (Bad Request) with the error details in the body| | ||
| |Unknown specification|Request for MI record Creation for unknown spec|404 (Not Found) with the error details in the body| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| ## Overview | ||
|
|
||
| Use this endpoint to get letter data, including downloading the letter's print-ready PDF file. | ||
|
|
||
| Rate limiting applies. On excess requests, you may receive **429 Too Many Requests** (example error code(s): `NOTIFY_QUOTA`). Back off and retry later | ||
|
|
||
| ## Sandbox test scenarios | ||
|
|
||
| You can test the following scenarios in our sandbox environment. | ||
|
|
||
| |Scenario|Request ID|Response| | ||
| |--------|-------|--------| | ||
| |Success | 2AL5eYSWGzCHlGmzNxuqVusPxDg | Returns 303 (See Other) and URL to [http://example.com](http://example.com) in the Location header | | ||
| |Not Found |2WL5eYSWGzCHlGmzNxuqVusPxDg | Returns 404 Not found and error details in the response | | ||
22 changes: 22 additions & 0 deletions
22
specification/api/components/documentation/getLetterStatus.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| ## Overview | ||
|
|
||
| Use this endpoint to get the current status of a single letter by its ID. | ||
|
|
||
| Rate limiting applies. On excess requests, you may receive **429 Too Many Requests** (example error code(s): `NOTIFY_QUOTA`). Back off and retry later | ||
|
|
||
| ## Sandbox test scenarios | ||
|
|
||
| You can test the following scenarios in our sandbox environment | ||
|
|
||
| | Scenario | Letter Id | | ||
| | ----------------------------------------| ---------------------------- | | ||
| | Retrieve a PENDING letter status | `24L5eYSWGzCHlGmzNxuqVusPxDg`| | ||
| | Retrieve a ACCEPTED letter status | `2AL5eYSWGzCHlGmzNxuqVusPxDg`| | ||
| | Retrieve a PRINTED letter status | `2BL5eYSWGzCHlGmzNxuqVusPxDg`| | ||
| | Retrieve a ENCLOSED letter status | `2CL5eYSWGzCHlGmzNxuqVusPxDg`| | ||
| | Retrieve a DISPATCHED letter status | `2DL5eYSWGzCHlGmzNxuqVusPxDg`| | ||
| | Retrieve a DELIVERED letter status | `2EL5eYSWGzCHlGmzNxuqVusPxDg`| | ||
| | Retrieve a REJECTED letter status | `2WL5eYSWGzCHlGmzNxuqVusPxDg`| | ||
| | Retrieve a CANCELLED letter status | `2XL5eYSWGzCHlGmzNxuqVusPxDg`| | ||
| | Retrieve a FAILED letter status | `2YL5eYSWGzCHlGmzNxuqVusPxDg`| | ||
| | Retrieve a RETURNED letter status | `2ZL5eYSWGzCHlGmzNxuqVusPxDg`| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| ## Overview | ||
|
|
||
| Use this endpoint to check for the existence of letter data. This is useful for verifying readiness before performing retrieval or print operations. | ||
|
|
||
| ## Sandbox test scenarios | ||
|
|
||
| You can test the following scenarios in our sandbox environment. | ||
|
|
||
| |Scenario|Request ID|Response| | ||
| |--------|-------|--------| | ||
| |Success | 2AL5eYSWGzCHlGmzNxuqVusPxDg | Returns 200 (OK)| | ||
| |Not Found |2WL5eYSWGzCHlGmzNxuqVusPxDg | Returns 404 (Not found) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| ## Overview | ||
|
|
||
| Use this endpoint to poll letters which are ready to be printed. | ||
|
|
||
| Returns letters whose `status` is **PENDING**. | ||
| Use `limit` to control list size (max 2500). | ||
|
|
||
| Rate limiting applies. On excess requests, you may receive **429 Too Many Requests** (example error code(s): `NOTIFY_QUOTA`). Back off and retry later |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| ## Overview | ||
|
|
||
| Use this endpoint to update the status of a letter by submitting the new status in the request body, optionally providing a reason code and text. | ||
|
|
||
| When you make a PATCH request with your application, the endpoint will respond with a successful (200) response code, along with the updated patient resource or an unsuccessful (4xx/5xx) response. | ||
|
|
||
| Rate limiting applies. On excess requests, you may receive **429 Too Many Requests** (example error code(s): `NOTIFY_QUOTA`). Back off and retry later. | ||
|
|
||
| ### Statuses | ||
|
|
||
| Allowed `status` values that can be used to are: | ||
|
|
||
| - `ACCEPTED` | ||
| - `CANCELLED` | ||
| - `DELIVERED` | ||
| - `DESTROYED` | ||
| - `DISPATCHED` | ||
| - `ENCLOSED` | ||
| - `FAILED` | ||
| - `FORWARDED` | ||
| - `PRINTED` | ||
| - `REJECTED` | ||
| - `RETURNED` | ||
|
|
||
| It is not possible to update a letter to status of `PENDING`. | ||
|
|
||
| Optionally a `reasonCode` and `reasonText` explaining the status (for example, validation failures) can be included in the request body. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.