Inventory & Storage API
The WMS-tier authoritative record of what is held where, and what portion of it is usable, for the warehouse-systems platform. This bounded context implements chaotic (random) stow: there is no fixed product location — an inbound item may be stowed into any free bin, and this service records the exact bin it landed in. It supplies "stock reality" to the Work Planning bounded context and makes allocation a revocable reservation, so a failed physical pick or delivery never strands an order: a reservation can always be revoked and re-satisfied from a different physical holding.
Its aggregates are StockUnit (a quantity of a SKU at a specific bin — every physical item has exactly one known bin, or is flagged Unlocated), Bin/Location (a coded slot with fixed capacity; any SKU may occupy any free bin, chaotic-storage style), and Reservation (a revocable binding of quantity to demand, with a timeout). "Usable" inventory — on-hand minus active reservations minus held/unlocated stock — is what constrains what this service will let you reserve, not raw on-hand quantity.
Out of this service's boundary: it does not pick, pack, ship, route associates, or manage stations/tasks/labor (that is Work Planning / fulfillment-execution); and it does not decide what to receive or forecast demand. Bins are registered declaratively by inventory control via PUT /bins/{binId} (ADR 0025); every reservation allocation names the bin to pick from (allocations[].binId). Error responses across this API use RFC 7807 (application/problem+json) Problem Details.
This API follows the fleet REST API guideline (ADR 0049): URLs name things (commands are noun sub-resources such as POST /stowages or POST /reservations/{id}/pick-confirmations), EVERY POST is behind the Idempotency-Key middleware (a retry replays the stored answer with the response header Idempotency-Replayed: true when that answer is final for the request: a success, a validation error, or a refusal that committed state; a refusal that depends on state that can change, such as concurrent-modification or bin-not-found, is NOT stored and the same key executes again, ADR 0053; the same key with a different method, path or body is 409 idempotency-key-reused; a missing key is 400 idempotency-key-required), and every collection GET is keyset-paginated as {items, nextCursor} with limit and cursor.
Cross-cutting behaviour that applies to every operation: a NUL character (U+0000) in the query string or a JSON body is 400 malformed-request-body, and in the path it is 404 not-found; a request that matches no route (for example a container lpn outside [A-Za-z0-9._-]) is 404 route-not-found, as application/problem+json.
Contact Inventory & Storage (Core Bounded Context):