Bins
Bin registration and inspection (declarative, idempotent PUT /bins/{binId} and GET /bins/{binId}, ADR 0025), and cycle counting: verifying a bin's physical contents against system records and reconciling discrepancies (shortfall marks stock Unlocated; overage is flagged for a separate receiving/audit process).
Register a bin, or converge an existing bin to a capacity
Declarative, idempotent bin registration by inventory control (ADR 0025). The body states the desired capacity and the bin converges to it. An absent bin is created empty (201). A present bin with the same capacity is left untouched (200, nothing written). A present bin with a different capacity is resized (200), as long as the new capacity is not below what the bin already holds — shrinking below occupancy is rejected (409 capacity-below-occupancy) because that stock is physically in the slot. Occupancy is never changed by this call; it moves only through stow and pick. A resize racing a concurrent stow can surface as 409 concurrent-modification (re-fetch and retry).
Get a bin's capacity and occupancy
Returns the bin's capacity, how much of it is occupied, and how much is still available for stow. Side-effect-free. An unknown bin is a 404 (there is no meaningful empty bin to return).
Record a physical cycle count for a bin
Verifies a bin's physical contents against system records. If the counted quantity matches system quantity, records a clean CycleCountCompleted. A shortfall (counted < system) marks whichever StockUnits cover the difference fully Unlocated (not split into located/lost sub-quantities — kept simple by design) and publishes ItemUnlocated per unit touched. An overage (counted > system) is reported as a DiscrepancyDetected/CycleCountCompleted(discrepancy=true) pair for a separate receiving/audit process to reconcile — this endpoint does not itself create the extra stock. Each call with a new Idempotency-Key represents a new physical count event and is intentionally repeatable (recounting a bin is a normal operational action); a retry with the SAME Idempotency-Key replays the first answer and counts nothing again (a first answer of 409 `concurrent-modification` is not stored: that retry executes).