Stow received stock into a bin
POST/stowages
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.
Request
Responses
- 201
- 400
- 404
- 409
- 422
- 500
Stock unit created and stowed at the given bin.
Response Headers
Present, with the value true, ONLY when this response is a replay of the stored answer for the request's Idempotency-Key (the handler did not run again). The first execution of a key never carries it, and neither does a retry of a refusal that was not stored (ADR 0053: concurrent-modification and every refusal that depends on state that can change): that retry executes again.
URI of the newly created StockUnit.
Malformed JSON body, or SKU/binId missing (either scan absent, including the domain-level stow-requires-both invariant). A missing or malformed Idempotency-Key header is also a 400 (idempotency-key-required / idempotency-key-invalid).
The target bin does not exist.
The bin does not have enough free capacity for this quantity, or the SKU is Hazmat/TemperatureSensitive-classified (ADR 0009) and the target bin's zone fails the placement check (not hazmat-rated, or a temperature-class mismatch), or the facility-layout classification lookup was unavailable for a classified, rule-relevant SKU, or the SKU carries a DOT hazard class (ADR 0010) that is incompatible with another SKU already occupying the target bin (same-bin DOT segregation), or the bin is an AutomatedStorage location, which holds container stock only (automated-storage-requires-container, ADR 0054). The same Idempotency-Key reused with a different method, path or body is also a 409 (idempotency-key-reused).
Quantity present but not a positive number.
An unexpected internal error occurred.