Stow a staged transfer receipt into destination bins
POST/transfers/:transferLineId/stowages
Places a STAGED transfer receipt's goods into destination-site bins (ADR 0031) — the ONLY path that raises the destination site's usable stock for a transfer, exactly once per transfer_line_id. Every requested bin must be registered at the receipt's destination site (the site-custody fact fails closed: another site's bin or a legacy site-less bin is a 409), and the bin quantities must sum EXACTLY to the receipt's receivedQuantity. One StockUnit per bin leg is created AT the destination site, the receipt moves STAGED -> STOWED, and TransferStockStowed is published through the same transactional outbox.
Idempotent at the database level: a replayed stow for an already-STOWED receipt answers 200 with the ORIGINAL outcome (replay: true, the original allocations), creates NO second StockUnit and publishes nothing new. Stowing a line with no staged receipt (stow-before-stage) is a 409 receipt-not-staged.
Request
Responses
- 200
- 400
- 409
- 500
The receipt is STOWED; the destination site's usable stock rose by exactly receivedQuantity, once. allocations names the StockUnits created and the bin each went into.
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.
Malformed JSON body, bins missing/empty, a binId missing or empty, a quantity not positive, or the Idempotency-Key header absent (ADR 0018).
No STAGED receipt for this line (stow-before-stage, or the line is unknown), a bin outside the destination site's custody, a bin quantity sum mismatch, or the receipt already has a DIFFERENT staged scan, 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).
An unexpected internal error occurred.