You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/collections/_consumers/acceptance.md
+33-34Lines changed: 33 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,7 +100,7 @@ You can receive the full list of allocated letters each day, ready for print pro
100
100
101
101
**Endpoints:**
102
102
103
-
- GET /letters - Retrieve allocated letters list.
103
+
- GET /letters - Retrieve allocated letters list
104
104
105
105
**Objectives:**
106
106
@@ -131,7 +131,7 @@ Your system safely retrieves the daily list of allocated letters more than once
131
131
132
132
**Endpoints:**
133
133
134
-
- GET /letters - retrieve allocated list of letters that are ready to be printed.
134
+
- GET /letters - retrieve allocated list of letters that are ready to be printed
135
135
136
136
**Objectives:**
137
137
@@ -144,7 +144,7 @@ Demonstrate that your system can:
144
144
145
145
| Criteria | Description |
146
146
|---|---|
147
-
|**Steps**| 1. Call GET /letters?limit=2500 to retrieve the full list of allocated letters<br>3. Call GET /letters again immediately to retrieve the same list of letters<br>4. Compare the second list to the first<br>5. Confirm that:<br> a) The same 2,500 unique IDs are returned.<br> b) No new processing jobs are triggered for already seen letters<br> c) Your system ignores duplicates. |
147
+
|**Steps**| 1. Call GET /letters?limit=2500 to retrieve the full list of allocated letters<br>2. Call GET /letters again immediately to retrieve the same list of letters<br>3. Compare the second list to the first<br>4. Confirm that:<br> a) The same 2,500 unique IDs are returned.<br> b) No new processing jobs are triggered for already seen letters<br> c) Your system ignores duplicates. |
148
148
|**Acceptance**| - Each letter is processed once.<br>- Duplicate retrievals do not cause re-printing, re-queuing, or duplicate API updates. |
149
149
|**Evidence**| - Retrieval logs showing both API calls and ID comparisons<br>- Processing logs showing no duplicate triggers<br>- Summary of total unique IDs vs. total retrieved records. |
150
150
|**Business value**| Confirms your system can safely retry or re-fetch letter lists without duplicate processing, ensuring data integrity and resilience to transient network or API errors. |
@@ -192,7 +192,7 @@ Letters that were ACCEPTED are successfully printed and reported as PRINTED, pro
192
192
193
193
**Endpoints:**
194
194
195
-
- PATCH /letters/{id}/ to update the status of the letter
195
+
- PATCH /letters/{id} to update the status of the letter
196
196
- POST /letters for bulk status updates
197
197
- GET /letters/{id} to verify that the status updated
198
198
@@ -201,7 +201,7 @@ Prove your system records the point of physical print completion.
201
201
202
202
| Criteria | Description |
203
203
|---|---|
204
-
|**Steps**| 1. Identify letters with status ACCEPTED<br>2. Send a PATCH /letters/{id}/ request to update targeted letters to PRINTED or send a POST /letters for a bulk update<br>3. Verify via GET /letters/{id} that status updated to PRINTED. |
204
+
|**Steps**| 1. Identify letters with status ACCEPTED<br>2. Send a PATCH /letters/{id} request to update targeted letters to PRINTED or send a POST /letters for a bulk update<br>3. Verify via GET /letters/{id} that status updated to PRINTED. |
205
205
|**Acceptance**| - Only letters currently ACCEPTED are targeted<br>- All targeted letters are updated to PRINTED (no skips, no duplicates)<br>- API returns successful responses. |
206
206
|**Evidence**| API responses and before/after samples show correct transition. |
@@ -220,11 +220,11 @@ Letters that have been successfully printed and enclosed in envelopes are report
220
220
- Letters retrieved via GET /letters
221
221
-**Eligible statuses:**
222
222
- ACCEPTED
223
-
- PRINTED.
223
+
- PRINTED
224
224
225
225
**Endpoints:**
226
226
227
-
- PATCH /letters/{id}/ to update the status of the letter
227
+
- PATCH /letters/{id} to update the status of the letter
228
228
- POST /letters for bulk status updates
229
229
- GET /letters/{id} to verify that the status updated
230
230
@@ -233,7 +233,7 @@ Demonstrate that your system can record the completion of envelope-insertion and
233
233
234
234
| Criteria | Description |
235
235
|---|---|
236
-
|**Steps**| 1. Identify letters with status ACCEPTED or PRINTED<br>2. Send a PATCH /letters/{id}/ request to update targeted letters to ENCLOSED or send a POST /letters for a bulk update<br>3. Verify via GET /letters/{id} that status updated to ENCLOSED. |
236
+
|**Steps**| 1. Identify letters with status ACCEPTED or PRINTED<br>2. Send a PATCH /letters/{id} request to update targeted letters to ENCLOSED or send a POST /letters for a bulk update<br>3. Verify via GET /letters/{id} that status updated to ENCLOSED. |
237
237
|**Acceptance**| - Only letters currently in ACCEPTED or PRINTED are targeted<br>- All targeted letters are updated to ENCLOSED<br>- API returns successful response. |
238
238
|**Evidence**| API responses and before/after samples show correct transition. |
239
239
|**Business value**| Ensures enclosures are tracked prior to dispatch. |
@@ -255,7 +255,7 @@ Your system records the postal hand-off of each letter.
255
255
256
256
**Endpoints:**
257
257
258
-
- PATCH /letters/{id}/ to update the status of the letter
258
+
- PATCH /letters/{id} to update the status of the letter
259
259
- POST /letters for bulk status updates
260
260
- GET /letters/{id} to verify that the status updated
261
261
@@ -264,7 +264,7 @@ Validate that your system promptly reports all dispatched letters by updating th
264
264
265
265
| Criteria | Description |
266
266
|---|---|
267
-
|**Steps**| 1. Identify letters with status 'ACCEPTED', 'PRINTED', 'ENCLOSED' <br>2. Send a PATCH /letters/{id}/ request to update targeted letters to DISPATCHED or send a POST /letters for a bulk update <br>3. Verify via GET /letters/{id} that status updated to DISPATCHED. |
267
+
|**Steps**| 1. Identify letters with status 'ACCEPTED', 'PRINTED', 'ENCLOSED' <br>2. Send a PATCH /letters/{id} request to update targeted letters to DISPATCHED or send a POST /letters for a bulk update <br>3. Verify via GET /letters/{id} that status updated to DISPATCHED. |
268
268
|**Acceptance**| - Only letters currently in ACCEPTED, PRINTED, or ENCLOSED state are targeted<br>- All targeted letters are updated to DISPATCHED<br>- API returns a successful response. |
269
269
|**Evidence**| API responses and before/after samples show correct transition. |
270
270
|**Business value**| Demonstrates postal hand-off tracking. |
@@ -289,7 +289,7 @@ Letters that have completed postal delivery are updated to DELIVERED, confirming
289
289
290
290
**Endpoints:**
291
291
292
-
- PATCH /letters/{id}/ to update the status of the letter
292
+
- PATCH /letters/{id} to update the status of the letter
293
293
- POST /letters for bulk status updates
294
294
- GET /letters/{id} to verify that the status updated
295
295
@@ -298,7 +298,7 @@ Show that the printed letters have been delivered to patients
298
298
299
299
| Criteria | Description |
300
300
|---|---|
301
-
|**Steps**| 1. Identify letters with status ACCEPTED, PRINTED, ENCLOSED, or DISPATCHED<br>2. Send a PATCH /letters/{id}/ request to update targeted letters to DELIVERED or send a POST /letters for a bulk update<br>3. Verify via GET /letters/{id} that status updated to DELIVERED. |
301
+
|**Steps**| 1. Identify letters with status ACCEPTED, PRINTED, ENCLOSED, or DISPATCHED<br>2. Send a PATCH /letters/{id} request to update targeted letters to DELIVERED or send a POST /letters for a bulk update<br>3. Verify via GET /letters/{id} that status updated to DELIVERED. |
302
302
|**Acceptance**| - Only letters currently in ACCEPTED, PRINTED, ENCLOSED, or DISPATCHED state are targeted<br>- All targeted letters are updated to DELIVERED<br>- API returns a successful response. |
303
303
|**Evidence**| API responses and before/after samples show correct transition. |
304
304
|**Business value**| Ensures that letters are delivered to patients. |
@@ -318,15 +318,15 @@ Letters that cannot be delivered in their standard format are forwarded to a spe
318
318
319
319
**Endpoints:**
320
320
321
-
- PATCH /letters/{id}/ to update the status of the letter
321
+
- PATCH /letters/{id} to update the status of the letter
322
322
- POST /letters for bulk status updates
323
323
- GET /letters/{id} to verify that the status updated
324
324
325
325
**Objectives:**
326
326
327
327
Prove that your system can correctly:
328
328
329
-
- Identify letters that require forwarding.
329
+
- Identify letters that require forwarding
330
330
- Update their status to FORWARDED including specifying the reason why the letter was forwarded
331
331
- Stop further local processing or dispatch
332
332
@@ -354,7 +354,7 @@ This enables accurate reconciliation, improves address data quality, and support
354
354
355
355
**Endpoints:**
356
356
357
-
- PATCH /letters/{id}/ to update the status of the letter
357
+
- PATCH /letters/{id} to update the status of the letter
358
358
- POST /letters for bulk status updates
359
359
- GET /letters/{id} to verify that the status updated
360
360
@@ -380,7 +380,7 @@ Demonstrate that returned mail is correctly:
380
380
381
381
| Criteria | Description |
382
382
|---|---|
383
-
|**Steps**| 1. Identify letters with status DELIVERED OR DISPATCHED <br>2. Send a PATCH /letters/{id}/ request to update targeted letters to RETURNED or send a POST / letters for a bulk update<br>3. Verify via GET /letters/{id} that status updated to RETURNED. |
383
+
|**Steps**| 1. Identify letters with status DELIVERED OR DISPATCHED <br>2. Send a PATCH /letters/{id} request to update targeted letters to RETURNED or send a POST / letters for a bulk update<br>3. Verify via GET /letters/{id} that status updated to RETURNED. |
384
384
|**Acceptance**| - All targeted letters are successfully updated to RETURNED<br>- API returns a successful response. |
385
385
|**Evidence**| API logs showing state transitions, timestamps. |
@@ -396,7 +396,7 @@ Your system successfully handles cancellation notifications, removes the affecte
396
396
397
397
-**Input data:**
398
398
- A list of letter IDs provided externally by NHS Notify for cancellation
399
-
- Requests are not received via API (e.g., via email, or manual instruction).
399
+
- Requests are not received via API (e.g., via email, or manual instruction)
400
400
-**Eligible statuses:**
401
401
- ACCEPTED
402
402
- FORWARDED
@@ -405,7 +405,7 @@ Your system successfully handles cancellation notifications, removes the affecte
405
405
406
406
**Endpoints:**
407
407
408
-
- PATCH /letters/{id}/ to update the status of the letter
408
+
- PATCH /letters/{id} to update the status of the letter
409
409
- POST /letters for bulk status updates
410
410
- GET /letters/{id} to verify that the status updated
411
411
@@ -414,12 +414,12 @@ Your system successfully handles cancellation notifications, removes the affecte
414
414
Demonstrate that your system:
415
415
416
416
- Receives and validates external cancellation requests
417
-
- Updates affected letters to CANCELLED status
417
+
- Updates affected letters to CANCELLED status, including a code and a reason for cancellation
418
418
- Prevents any further production, printing, or dispatch of those letters
419
419
420
420
| Criteria | Description |
421
421
|---|---|
422
-
|**Steps**| 1. Get the letter that needs to be cancelled (list provided by NHS Notify)<br>2. Send a PATCH /letters/{id}/ request to update targeted letters to CANCELLED or send a POST /letters for a bulk update<br>3. Verify via GET /letters/{id} that status updated to CANCELLED. |
422
+
|**Steps**| 1. Get the letter that needs to be cancelled (list provided by NHS Notify)<br>2. Send a PATCH /letters/{id} request to update targeted letters to CANCELLED or send a POST /letters for a bulk update<br>3. Verify via GET /letters/{id} that status updated to CANCELLED. |
423
423
|**Acceptance**| - Only letters not yet dispatched or delivered may be cancelled<br>- All targeted letters are successfully updated to CANCELLED<br>- API returns a successful response. |
424
424
|**Evidence**| API audit trail and before/after validation samples. |
425
425
|**Business value**| Prevents unnecessary printing and protects data integrity. |
@@ -436,17 +436,16 @@ This ensures that Notify is aware of any items that could not be completed and c
- PATCH /letters/{id}/ to update the status of the letter
448
+
- PATCH /letters/{id} to update the status of the letter
450
449
- POST /letters for bulk status updates
451
450
- GET /letters/{id} to verify that the status updated
452
451
@@ -455,18 +454,18 @@ This ensures that Notify is aware of any items that could not be completed and c
455
454
Demonstrate that your system:
456
455
457
456
- Detects and logs production failures
458
-
- Updates affected letters to FAILED
457
+
- Updates affected letters to FAILED, including a code and a reason for failure
459
458
- Records failure codes and reasons consistently
460
459
- Communicates these to NHS Notify for transparency and incident reporting
461
460
462
461
| Criteria | Description |
463
462
|---|---|
464
-
|**Steps**| 1. Identify the letters that failed production requirements<br>2. Send a PATCH /letters/{id}/ request to update targeted letters to FAILED or send a POST /letters for a bulk update<br>3. Verify via GET /letters/{id} that status updated to FAILED. |
463
+
|**Steps**| 1. Identify the letters that failed production requirements<br>2. Send a PATCH /letters/{id} request to update targeted letters to FAILED or send a POST /letters for a bulk update<br>3. Verify via GET /letters/{id} that status updated to FAILED. |
465
464
|**Acceptance**| - All targeted letters are successfully updated to FAILED<br>- API response confirms successful updates<br>- Failure code and failure reason are updated. |
466
465
|**Evidence**| API logs showing state transitions, timestamps. |
467
466
|**Business value**| Provides transparent incident reporting by informing of the reason why the letter cannot be processed. |
468
467
469
-
### AT13 – Reject Invalid Letters
468
+
### AT13 – Reject invalid letters
470
469
471
470
This test verifies that your system can detect and reject malformed letters (i.e: unrecognised specification id, missing PDFs etc) before they reach production by updating their status to REJECTED and providing appropriate reason codes and audit details.
472
471
@@ -480,11 +479,11 @@ The rejection is logged with detailed diagnostic information and reported to NHS
480
479
- Found in PENDING status before the letters are accepted by you
- PATCH /letters/{id}/ to update the status of the letter
486
+
- PATCH /letters/{id} to update the status of the letter
488
487
- POST /letters for bulk status updates
489
488
- GET /letters/{id} to verify that the status updated
490
489
@@ -493,13 +492,13 @@ The rejection is logged with detailed diagnostic information and reported to NHS
493
492
Demonstrate that your system correctly:
494
493
495
494
- Identifies non-compliant or invalid letters
496
-
- Updates their status to REJECTED
495
+
- Updates their status to REJECTED, including a code and a reason for rejection
497
496
- Records the reason and reason code
498
497
- Ensures NHS Notify is informed when a rejection occurs due to quota or compliance limits
499
498
500
499
| Criteria | Description |
501
500
|---|---|
502
-
|**Steps**| 1. Identify bad letter requests<br>2. Send a PATCH /letters/{id}/ request to update targeted letters to REJECTED or send a POST /letters for a bulk update<br>3. Verify via GET /letters/{id} that status updated to REJECTED. |
501
+
|**Steps**| 1. Identify bad letter requests<br>2. Send a PATCH /letters/{id} request to update targeted letters to REJECTED or send a POST /letters for a bulk update<br>3. Verify via GET /letters/{id} that status updated to REJECTED. |
503
502
|**Acceptance**| - All targeted letters are successfully updated to REJECTED<br>- API response confirms successful updates<br>- Rejected code and rejected reason are updated. |
504
503
|**Evidence**| API logs showing state transitions, timestamps. |
505
504
|**Business value**| Ensures non-compliant inputs don't enter production.<br>Ensure NHS Notify is informed when supplier quotas are exhausted |
@@ -579,10 +578,10 @@ Possible Scenarios and Applicable Letter Statuses
579
578
580
579
| Scenario | Description | Typical Status flow |
581
580
|---|---|---|
582
-
| Standard print and delivery | Letter specification successfully provided, letter printed, dispatch and delivered to patient | a) PENDING → ACCEPTED → PRINTED → ENCLOSED → DISPATCHED → DELIVERED<br>b) PENDING → ACCEPTED → PRINTED → DISPATCHED → DELIVERED<br>c) PENDING → ACCEPTED → ENCLOSED → DISPATCHED → DELIVERED<br>d) PENDING → ACCEPTED → DISPATCHED |
583
-
| Letter rejected by letter Supplier | Letter fails validation before acceptance by the letter supplier | PENDING → REJECTED |
584
-
| Cancelled by client | Client cancels production before dispatched | a) PENDING → ACCEPTED → CANCELLED<br>b) PENDING → ACCEPTED → PRINTED → CANCELLED<br>c) PENDING → ACCEPTED → PRINTED → ENCLOSED → CANCELLED |
585
-
| Production failure | Technical or system error events during the processing cycle | a) PENDING → ACCEPTED → FAILED<br>b) PENDING → ACCEPTED → PRINTED → FAILED<br>c) PENDING → ACCEPTED → PRINTED → ENCLOSED → FAILED |
581
+
| Standard print and delivery | Letter specification successfully provided, letter printed, dispatch and delivered to patient.| a) PENDING → ACCEPTED → PRINTED → ENCLOSED → DISPATCHED → DELIVERED<br>b) PENDING → ACCEPTED → PRINTED → DISPATCHED → DELIVERED<br>c) PENDING → ACCEPTED → ENCLOSED → DISPATCHED → DELIVERED<br>d) PENDING → ACCEPTED → DISPATCHED |
582
+
| Letter rejected by letter Supplier | Letter fails validation before acceptance by the letter supplier.| PENDING → REJECTED |
583
+
| Cancelled by client | Client cancels production before dispatched.| a) PENDING → ACCEPTED → CANCELLED<br>b) PENDING → ACCEPTED → PRINTED → CANCELLED<br>c) PENDING → ACCEPTED → PRINTED → ENCLOSED → CANCELLED |
584
+
| Production failure | Technical or system error events during the processing cycle.| a) PENDING → ACCEPTED → FAILED<br>b) PENDING → ACCEPTED → PRINTED → FAILED<br>c) PENDING → ACCEPTED → PRINTED → ENCLOSED → FAILED |
586
585
| Forward for accessible format | Letter sent to an alternative supplier (e.g., RNIB) for accessible format such as braille or large print. | PENDING → ACCEPTED → FORWARDED |
587
586
| Returned to production facility | Letter dispatched but returned by the postal partner. | a) PENDING → ACCEPTED → PRINTED → ENCLOSED → DISPATCHED → RETURNED (letter undeliverable)<br>b) PENDING → ACCEPTED → PRINTED → ENCLOSED → DISPATCHED → DELIVERED → RETURNED |
0 commit comments