Skip to main content

Scan contents and seal a Package for a Pack task's order

POST 

/tasks/:id/package-seals

The Pack-path counterpart to complete: the station holding the active claim on a Pack task scans the order's contents and seals them into a brand-new Package resource (created by this call, not pre-existing — see the Location header). The task itself is left claimed; a separate POST /tasks/{id}/completions call finishes the Pack task once the package is sealed. Requires at least one scanned item — an empty contents array is a domain invariant violation (422), not a malformed request (400), since the array is present and well-formed, just semantically insufficient to seal.

Ship in own container (opt-in, ADR-0056). With shipInOwnContainer: true and the order line's lineQuantity (in eaches), a line that is exactly one full active CASE of its SKU (lineQuantity equal to the unitsPerPack of the SKU's active CASE level in the local pack-level copy of product-master's events) is sealed in the case itself: the package carries containerSource: CASE and the case's GTIN, dimensions and weight in container, with no cartonisation. contents must then name exactly one SKU. Anything else is refused with 422 and nothing is sealed: not exactly one line (ship-in-own-container-not-single-line), a quantity other than one full case (ship-in-own-container-quantity-mismatch), no CASE level for the SKU (ship-in-own-container-no-case-level), a retired CASE level (ship-in-own-container-case-retired), or a case declared without dimensions and weight (ship-in-own-container-case-dimensions-unknown). Without the new fields the request and the response are exactly as before.

Request​

Responses​

Package sealed.

Response Headers
    Idempotency-Replayed

    Present, with the value true, ONLY when this answer is the stored replay of an earlier request that used the same Idempotency-Key (the handler did not run again). The first execution never carries it.

    Location

    Path of the newly created package, e.g. /packages/{id}.