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
- 204
- 400
- 409
- 422
- 500
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
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.
The Idempotency-Key header is missing (idempotency-key-required) or not 1-128 printable ASCII characters (idempotency-key-invalid) on a POST, or the request body could not be read or contains a NUL character (malformed-request-body), or the request body is malformed JSON, a required field is missing or empty, or a field value is invalid (e.g. a task type outside the TaskType enum). instance is omitted: this is a bare collection-create endpoint with no path segment identifying a specific resource.
The Idempotency-Key was already used with a different method, path or body (idempotency-key-reused). Use a new key for a genuinely different request. Distinguished from a business conflict by the problem type.
lineId is not part of this order's required consolidation set — the set fixed by the first arrival seen for orderRef. Also invalid-deadline when packCpt is present but the zero time (0001-01-01T00:00:00Z): a valid date-time, but no task can be due at the zero instant. An absent packCpt is a 400.
An unexpected server-side failure (e.g. a repository or event-publisher error).