Skip to main content

Close a receipt

POST 

/receipts/:receiptId/closures

Ends receiving, computes the discrepancies per line (Short, Over, Damaged) and completes the ASN. Publishes ReceiptClosed. It no longer completes the appointment nor raises DockAppointmentCompleted (ADR 0019: the door release recorded by yard-management does, through dock-scheduling). Closing a receipt that is already Closed is 409 receipt-closed. A line nothing was received for is Short.

With a receiving policy declared for the ASN's (owner, supplier) (ADR 0026), the close judges every line's variance against it: inside the tolerance band the variance is accepted and raises no finding; between the band and its hard stop the close needs overrideReason (409 tolerance-override-required without a valid one, 400 invalid-override-reason for a code outside the list) and the line closes with an OverTolerance or UnderTolerance finding carrying that code; at or beyond the hard stop the close is 409 tolerance-blocked and the receipt stays open. The body is optional: without a policy it is ignored.

Request​

Responses​

The closed receipt with its final discrepancies.

Response Headers
    Idempotency-Replayed

    Present, with the value true, only when this response is the replay of a stored answer for the same Idempotency-Key.

    ETag

    Strong entity tag of the resource: the quoted version, for example "3".