Stock
Receiving and stowing physical stock. ReceiveStock stages inbound goods (item-scan only); StowStock durably records the item at a bin (item-scan + location-scan), which is the only way a StockUnit aggregate comes into existence. RelocateStock moves usable stock of one SKU between two bins of the same site (ADR 0039).
Acknowledge inbound stock for a SKU
Stages a quantity of a SKU as received into the building (publishes StockReceived) without assigning it to a bin yet. This does NOT create a StockUnit aggregate: a StockUnit requires both an item-scan and a location-scan by construction (the stow-requires-both invariant), and a staged receipt has no bin yet. The durable, addressable record only starts at StowStock — that is why this operation returns 202 Accepted rather than 201 Created: there is no resource here to hand back a Location for. Superseded by the inbound-receiving handover (K24, ADR 0037: inbound-receiving publishes `com.warehouse.wms.inbound-receiving.receipt.ReceiptLineReceived`, whose Good lines are booked as staged stock through the same ReceiveStock use case); this endpoint stays as the documented manual fallback; removal planned with the next breaking window.
Stow received stock into a bin
Places a quantity of a SKU into a specific bin, requiring BOTH an item-scan (sku) and a location-scan (binId) — this is the only path that creates a StockUnit aggregate, and skipping either scan is precisely how inventory gets lost, so both are mandatory. Respects the bin's capacity: a stow that would exceed sum(occupied) <= capacity is rejected with 409. Chaotic storage means any SKU may be stowed into any free bin — there is no fixed product-to-bin mapping.
Move stock of one SKU between two bins of the same site
Records an intra-site relocation (ADR 0039; slotting-optimization ADR 0010): quantity units of sku leave fromBin and arrive in toBin, both bins of siteCode. Only the usable (unreserved) quantity of the SKU in fromBin can move. Both bins' occupancy, every touched StockUnit, a new StockUnit in toBin, the relocation record and the `StockRelocated` event (transactional outbox) commit in one transaction; a concurrent change to either bin or a touched unit is a 409 concurrent-modification and nothing moves.
Read one relocation
The applied relocation record (ADR 0039), with its source legs and destination StockUnit.