Skip to main content

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​

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
    Idempotency-Replayed

    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.