Skip to main content

Containers

Sealed cases with an identity (ADR 0045, 0046). A Container is a case licence plate (LPN, the carton SSCC) created from inbound-receiving's ReceiptCartonReceived; it is stowed into a case bin, and broken (BreakCase) into loose eaches. The ledger stays in eaches. Quantity is booked once, by ReceiptLineReceived, never by a container.

📄️Stow a sealed case into a case bin

Scan the LPN, scan the location (ADR 0045). The bin must accept sealed cases (handling unit CASE or PALLET, as published by facility-layout); a bin whose handling unit is unknown or EACH is 409 `bin-handling-unit-mismatch` (fail closed). The first stow sets the container's site from the bin's site (a carton event carries no site) and creates the SEALED_CASE stock unit holding the case's eaches; moving a stowed container to another bin of the same site is allowed, to another site is 409 `container-not-at-site`. Stowing into the bin it is already in is a no-op.

📄️Break a sealed case into loose eaches

BreakCase (ADR 0045): the whole sealed case is opened and its eaches move to loose stock of the same owner in `looseBin`. Full-quantity and conserving: exactly `unitsPerPack` eaches leave the SEALED_CASE unit and arrive as loose stock, and the container goes SEALED, OPEN, EMPTY in one transaction, with `CaseBroken` and `ContainerEmptied` in the transactional outbox. A case that is reserved (a `cases` reservation) cannot be broken; a container that is not SEALED and stowed cannot either; `looseBin` must accept loose eaches and be in the container's site.

📄️List the containers stowed in a bin

The sealed or open containers stowed in the bin (ADR 0045), ordered by LPN (which is unique, so it is both the sort key and the id of the keyset cursor). Empty containers have no bin and are not listed. Keyset-paginated (REST guideline section 3): one page of `{items, nextCursor}`, `limit` (1-500, default 100) and the opaque `cursor` from the previous page's `nextCursor`; `nextCursor` is absent on the last page. Any other query parameter is 400 `unknown-query-parameter`. Side-effect-free.