Skip to main content
The notification rework endpoint lets you reset the state of an existing paper delivery request so that corrective delivery events can be applied. When a courier reports events that should supersede previously recorded ones, you call this endpoint first to invalidate the stale timeline entries, then forward the corrective events through the normal SQS flow.
Base path: /paper-channel-private/v1This is an internal API. It is not exposed publicly and requires network-level access to the private Paper Channel service.
This endpoint is irreversible. Once initialised, the previously recorded delivery events for the request are deleted and cannot be restored. Use it only when you have confirmed corrective events ready to be applied.

Initialise notification rework

PUT /paper-channel-private/v1/rework/{requestId}/init Updates the delivery request record and deletes its stored events, preparing the request to accept corrective delivery events from the courier. On success the service returns 204 No Content.

Use case: correcting a notification timeline

Delivery events are occasionally reported out of order or with incorrect data by the courier’s tracking system. When pn-delivery-push detects an inconsistency that must be corrected retroactively:
1

Identify the affected request

Locate the requestId for the delivery that contains the incorrect timeline entries.
2

Obtain a rework identifier

Generate or receive a reworkId that uniquely identifies this correction operation. This value is used for audit purposes and to correlate the rework with its trigger.
3

Call initNotificationRework

Submit a PUT request with the requestId and reworkId. Paper Channel deletes the existing delivery events and marks the request as ready to accept corrective ones.
4

Apply corrective events

Forward the corrective delivery events through the standard SQS/External Channel flow. Paper Channel processes them against the now-clean request record.

Path parameters

requestId
string
required
The identifier of the paper delivery request to rework.
  • Minimum length: 5
  • Maximum length: 100

Query parameters

reworkId
string
required
Unique identifier for this rework operation. Used for audit and correlation purposes.

Responses

StatusMeaning
204Rework initialised successfully. The request record has been updated and its events deleted.
400Syntactic validation error in the request parameters.
404No delivery request found for the given requestId.
500Internal server error.
This endpoint returns no response body on success.
curl --request PUT \
  --url 'https://api.paperchannel.pagopa.local/paper-channel-private/v1/rework/ABCD-HILM-YKWX-202202-1_rec0_try1/init?reworkId=RWK-20240315-001'
(empty body)

Build docs developers (and LLMs) love