Skip to content

Commit 413c520

Browse files
CCM-12523 - Updates after APIM Review
1 parent 3bca7ed commit 413c520

File tree

13 files changed

+329
-105
lines changed

13 files changed

+329
-105
lines changed

sandbox/HealthcheckEndpoint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"description": "Service is healthy"
99
}
1010
},
11-
"summary": "Health check endpoint"
11+
"summary": "Health check"
1212
}
1313
}
1414
}

sandbox/api/openapi.yaml

Lines changed: 254 additions & 63 deletions
Large diffs are not rendered by default.

sandbox/utils/ResponseProvider.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ async function patchLetterResponse(request) {
9494

9595
async function postLettersResponse(request) {
9696
const patchLetterFileMap = {
97-
'data/examples/postLetter/requests/postLetters.json': {responsePath: 'data/examples/postLetter/responses/postLetters.json', responseCode: 200},
97+
'data/examples/postLetter/requests/postLetters.json': {responsePath: 'data/examples/postLetter/responses/postLetters.json', responseCode: 202},
9898
};
9999
return await mapExampleResponse(request, patchLetterFileMap);
100100
}
@@ -110,7 +110,7 @@ async function postMIResponse(request) {
110110

111111
async function getLetterDataResponse(id) {
112112
const getLetterDataFileMap = {
113-
'2AL5eYSWGzCHlGmzNxuqVusPxDg' : {responsePath: 'http://example.com', responseCode: 303},
113+
'2AL5eYSWGzCHlGmzNxuqVusPxDg' : {responsePath: 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf', responseCode: 303},
114114
'2WL5eYSWGzCHlGmzNxuqVusPxDg' : {responsePath: 'data/examples/errors/responses/resourceNotFound.json', responseCode: 404},
115115
};
116116
return mapExampleGetResponse(id, getLetterDataFileMap);

specification/api/components/documentation/APIDescription.md

Lines changed: 59 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,52 @@
11
## Overview
22

3-
API for letter suppliers to integrate with NHS Notify.
3+
Use this API to retrieve letters to be printed.
44

55
This API lets you:
66

7-
* Get lists of letters allocated to you
8-
* Download letter PDFs and metadata
9-
* Update and manage letter statuses
10-
* Submit and retrieve management information (MI)
7+
* get lists of letters allocated to you
8+
* download letter PDFs and metadata
9+
* update and manage letter statuses
10+
* submit and retrieve management information (MI)
1111

1212
This specification represents the in-development 'next' version of the API schema
13-
and should be treated as unstable
14-
15-
Use this API to retrieve letters to be printed
13+
and should be treated as unstable.
1614

1715
## Who can use this API
1816

19-
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.
17+
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.
2018

21-
## Related APIs
19+
## Access Modes
2220

23-
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.
21+
This API has one access mode. It is:
22+
23+
* restricted access
24+
25+
### Restricted access
26+
27+
This access mode is [application-restricted](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#application-restricted-apis), meaning we authenticate and authorise the calling application but not the end user.
28+
29+
Authentication and authorisation of end users is the responsibility of your application.
30+
31+
To use this access mode, use this security pattern:
32+
33+
* [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)
2434

2535
## API status and roadmap
2636

2737
This API is [in production, beta](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses). We are onboarding partners to use it.
2838

2939
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.
3040

31-
## Service Level
41+
## Service level
3242

3343
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.
3444
For more details, see [service levels](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#service-levels).
3545

46+
## Rate limits
47+
48+
The default rate limit is 300TPS (Transactions Per Second), per app. If you require a higher rate limit please [contact us](https://digital.nhs.uk/developer/help-and-support). or raise this during the onboarding process.
49+
3650
## Technology
3751

3852
This API is a [REST-based](https://digital.nhs.uk/developer/guides-and-documentation/our-api-technologies#basic-rest) API.
@@ -62,15 +76,25 @@ This API is available on the internet and, indirectly on the [Health and Social
6276

6377
For more details see [Network access for APIs](https://digital.nhs.uk/developer/guides-and-documentation/network-access-for-apis).
6478

65-
## Security and authorisation
79+
## Errors
6680

67-
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.
81+
We use standard HTTP status codes to show whether an API request succeeded or not. They are usually in the range:
6882

69-
Authentication and authorisation of end users is the responsibility of your application.
83+
* 200 to 299 if it succeeded, including code 202 if it was accepted by an API that needs to wait for further action
84+
* 400 to 499 if it failed because of a client error by your application
85+
* 500 to 599 if it failed because of an error on our server
7086

71-
To access this API, use the following security pattern:
87+
Errors 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.
7288

73-
* [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)
89+
Your API-calling application should have a mechanism to automatically try again, for example by giving status information to your end user, before giving up. See our [reference guide](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#error-handling) for more information about error handling.
90+
91+
## Open source
92+
93+
You might find the following [open source](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#open-source) resources useful:
94+
95+
| Resource | Description | Links |
96+
|---------------------------|----------------------------------------------------------------------|--------------------------------------------------------------------------------|
97+
| Notify Supplier API | Source code for the API proxy, sandbox and specification. | [GitHub repo](https://github.com/NHSDigital/notify-supplier-api) |
7498

7599
## Environments and testing
76100

@@ -91,7 +115,7 @@ Our [sandbox environment](https://digital.nhs.uk/developer/guides-and-documentat
91115

92116
For details of sandbox test scenarios, or to try out sandbox using our 'Try this API' feature, see the documentation for each endpoint.
93117

94-
Alternatively, you can try out the sandbox using our Postman collection
118+
Alternatively, you can try out the sandbox using our Postman collection.
95119

96120
You can find our postman collection source in our [public repository on github](https://github.com/NHSDigital/nhs-notify-supplier-api/tree/main/postman).
97121

@@ -105,16 +129,28 @@ Our integration test environment:
105129

106130
You need to get your software approved by us before it can go live with this API.
107131

108-
You will also need to follow our steps to - TBD
109-
110132
### Production smoke testing
111133

112134
Before go-live, you must complete a smoke test in the NHS Notify production environment.
113135
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.
114-
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.
136+
137+
The process is as follows:
138+
139+
* retrieve and print one or more live test letters through the production API.
140+
* send the printed output to the address provided.
141+
* submit a Management Information (MI) update for verification.
142+
115143
The NHS Notify team will configure your production access, review your results, and confirm that your output meets NHS Notify print specifications.
116144

117-
### Onboarding
145+
## Onboarding
118146

119147
You need to get your software approved by us before it can go live with this API.
120-
You will also need to be an approved NHS letter supplier under the framework agreement (ADD link) and nominate your technical and operational contacts
148+
You will also need to be an approved NHS letter supplier under the framework agreement and nominate your technical and operational contacts
149+
150+
## Related APIs
151+
152+
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.
153+
154+
## Contact us
155+
156+
For help and support connecting to our APIs and to join our developer community, see [Help and support building healthcare software](https://digital.nhs.uk/developer/help-and-support).

specification/api/components/documentation/createMI.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## Overview
22

3-
Use this endpoint to send management or operational metrics relating to letter processing and print fulfilment
3+
Use this endpoint to send management or operational metrics relating to letter processing and print fulfilment.
44

5-
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
5+
When you submit a create management information request, the endpoint will respond with a 201 (Created) response code along with the created data including a unique id for the record or an unsuccessful (4xx/5xx) response.
66

7-
Rate limiting applies. On excess requests, you may receive **429 Too Many Requests** (example error code(s): `NOTIFY_QUOTA`). Back off and retry later
7+
Rate limiting applies. On excess requests, you may receive **429 Too Many Requests** (example error code(s): `NOTIFY_QUOTA`). Back off and retry later.
88

99
## Sandbox test scenarios
1010

specification/api/components/documentation/getDataId.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
Use this endpoint to get letter data, including downloading the letter's print-ready PDF file.
44

5-
Rate limiting applies. On excess requests, you may receive **429 Too Many Requests** (example error code(s): `NOTIFY_QUOTA`). Back off and retry later
5+
Rate limiting applies. On excess requests, you may receive **429 Too Many Requests** (example error code(s): `NOTIFY_QUOTA`). Back off and retry later.
66

77
## Sandbox test scenarios
88

99
You can test the following scenarios in our sandbox environment.
1010

1111
|Scenario|Request ID|Response|
1212
|--------|-------|--------|
13-
|Success | 2AL5eYSWGzCHlGmzNxuqVusPxDg | Returns 303 (See Other) and URL to [http://example.com](http://example.com) in the Location header |
14-
|Not Found |2WL5eYSWGzCHlGmzNxuqVusPxDg | Returns 404 Not found and error details in the response |
13+
|Success | 2AL5eYSWGzCHlGmzNxuqVusPxDg | Returns 303 (See Other) and URL to an example PDF in the Location header |
14+
|Not found |2WL5eYSWGzCHlGmzNxuqVusPxDg | Returns 404 Not found and error details in the response |

specification/api/components/documentation/getLetterStatus.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Use this endpoint to get the current status of a single letter by its ID.
44

5-
Rate limiting applies. On excess requests, you may receive **429 Too Many Requests** (example error code(s): `NOTIFY_QUOTA`). Back off and retry later
5+
Rate limiting applies. On excess requests, you may receive **429 Too Many Requests** (example error code(s): `NOTIFY_QUOTA`). Back off and retry later.
66

77
## Sandbox test scenarios
88

specification/api/components/documentation/headDataId.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ You can test the following scenarios in our sandbox environment.
99
|Scenario|Request ID|Response|
1010
|--------|-------|--------|
1111
|Success | 2AL5eYSWGzCHlGmzNxuqVusPxDg | Returns 200 (OK)|
12-
|Not Found |2WL5eYSWGzCHlGmzNxuqVusPxDg | Returns 404 (Not found) |
12+
|Not found |2WL5eYSWGzCHlGmzNxuqVusPxDg | Returns 404 (Not found) |

specification/api/components/documentation/listLetters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ Use this endpoint to poll letters which are ready to be printed.
55
Returns letters whose `status` is **PENDING**.
66
Use `limit` to control list size (max 2500).
77

8-
Rate limiting applies. On excess requests, you may receive **429 Too Many Requests** (example error code(s): `NOTIFY_QUOTA`). Back off and retry later
8+
Rate limiting applies. On excess requests, you may receive **429 Too Many Requests** (example error code(s): `NOTIFY_QUOTA`). Back off and retry later.

specification/api/components/documentation/patchLetter.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Allowed `status` values that can be used to are:
1313
- `ACCEPTED`
1414
- `CANCELLED`
1515
- `DELIVERED`
16-
- `DESTROYED`
1716
- `DISPATCHED`
1817
- `ENCLOSED`
1918
- `FAILED`

0 commit comments

Comments
 (0)