Skip to main content

Record one picked line arriving at the order's Rebin consolidation slot

POST 

/rebin/arrivals

A Rebin / put-wall associate (or automation signal) scans one picked line of an order into that order's consolidation slot. This is the pick -> pack handoff of ADR-0016: once every required line of the order has arrived, this call creates the order's PACK task (through the same CreateTask use case as POST /tasks, so it appears in GET /tasks?orderRef= and is claimable via task-claims with taskType: PACK) and raises OrderConsolidated. Every accepted arrival raises ItemArrivedAtRebin. Neither event is forwarded to Kafka today.

The first call for an orderRef fixes the required line set. The first arrival seen for an orderRef creates its consolidation tracker with that call's requiredLineIds as the full, fixed set. Every later call for the same orderRef must still send requiredLineIds (it is validated as required on every call, since only the caller knows whether an arrival is the first), but the value is ignored once the set exists — the caller is responsible for sending the same set each time. lineId must be a member of the fixed set, otherwise the call is rejected with 422 rebin-unknown-line (this includes a first call whose lineId is not in its own requiredLineIds).

Idempotent per (orderRef, lineId). Re-sending an arrival for a line that has already arrived is a no-op success (204), so a redelivered scan never errors and never double-counts.

The PACK task is created exactly once, by the arrival that completes the set; it takes packCpt, packRequiredCapabilities, packFragile and packGiftWrap from that completing call. Any later arrival for an already-consolidated order is a 204 no-op and creates no further PACK task. A single-line order (requiredLineIds of length 1, lineId equal to it) completes on its first arrival, creating the PACK task immediately.

No response body on success. Like every POST it requires an Idempotency-Key header (ADR-0028, ADR-0060): a retry with the same key and body replays the stored 204; the natural (orderRef, lineId) key additionally makes a re-send with a new key a no-op.

Request​

Responses​

Arrival recorded (or was already recorded — an idempotent redelivery). If this arrival completed the order's required line set, the order's PACK task has been created. No response body.

Response Headers
    Idempotency-Replayed

    Present, with the value true, ONLY when this answer is the stored replay of an earlier request that used the same Idempotency-Key (the handler did not run again). The first execution never carries it.