Totes
Reusable license-plated containers the WCS moves (ADR 0054)
Register a tote by its license plate
Commission a reusable tote (ADR 0054): its license plate is its permanent label, printed once (pre-printed by the tote supplier, or by the floor client from the LPN as CODE128); this service mints no LPN and prints no label. Idempotent by method: the first call creates the tote in no bin and answers 201, a repeat answers 200 with the tote as it is now. One license-plate namespace with the sealed cases (ADR 0045): a plate that already names a sealed case is 409 `license-plate-taken`. Raises `ToteRegistered` when the tote is created.
Read one tote and its contents
The tote (ADR 0054) with this license plate: its site and bin (its logical location; absent until its first stow) and its contents, one entry per stock unit in the tote, ordered by SKU then stock unit id (empty, never null, for an empty tote). Side-effect-free.
Fill a tote with loose eaches at its current bin
Scan the item, scan the tote (ADR 0054): the same semantics, placement checks and events as `POST /stowages`, at the bin the tote is in (the decant station). Creates one stock unit of the SKU in the tote, raises `ItemStowed`, `LocationRecorded`, `BinStockLevelChanged` and `ToteFilled`. A tote in no bin is 409 `tote-not-placed`: stow it first.
Stow a tote and all its contents into a bin
Scan the tote, scan the location (ADR 0054): the bin becomes the tote's logical location. In one transaction the destination is occupied by the contents' eaches, the source bin released, every stock unit of the tote moved, `LocationRecorded` raised per unit, `BinStockLevelChanged` for both bins and `ToteStowed` published. The first stow of a new tote only places it. Into the bin it is already in, nothing changes. A tote holding reserved stock is 409 `tote-reserved`: each allocation names its pick bin (ADR 0025). An `AutomatedStorage` bin accepts a tote: it holds container stock only.
List the totes stowed in a bin
The totes whose logical location is the bin (ADR 0054), ordered by LPN (which is unique, so it is both the sort key and the id of the keyset cursor). 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.