Skip to main content

Move stock of one SKU between two bins of the same site

POST 

/relocations

Records an intra-site relocation (ADR 0039; slotting-optimization ADR 0010): quantity units of sku leave fromBin and arrive in toBin, both bins of siteCode. Only the usable (unreserved) quantity of the SKU in fromBin can move. Both bins' occupancy, every touched StockUnit, a new StockUnit in toBin, the relocation record and the StockRelocated event (transactional outbox) commit in one transaction; a concurrent change to either bin or a touched unit is a 409 concurrent-modification and nothing moves.

Behind the Idempotency-Key middleware like the other creating POSTs (ADR 0018): a replay with the same key and body returns the original 201 without moving stock again; the same key with a different body is 409 idempotency-key-reused.

Request​

Responses​

The stock moved; the body is the relocation record.

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.

    Location

    /relocations/{id} of the new relocation.