Skip to main content

Confirm one scan of an each or case GTIN against a PICK task

POST 

/tasks/:id/scans

The station holding the claim on a PICK task scans a GTIN (ADR 0054). The GTIN is resolved against the local copy of product-master's pack levels (no synchronous call): it must identify the task's SKU and, for a task planned in eaches, an EACH level; for a task planned in cases, a CASE level. count packs are added (default 1) and the answer reports the eaches confirmed so far. Quantities are always in eaches; POST /tasks/{id}/completions and TaskCompleted are unchanged. A rejected scan changes nothing.

Idempotent per Idempotency-Key (ADR-0055, ADR-0066). Send a fresh Idempotency-Key for each physical scan and reuse it only when retrying that scan after a lost response. A retry with the same key and the same body on the same path replays the stored answer verbatim (same status and body) and does not count the scan again; two scans with different keys both count. A rejected scan whose cause is state that can change (pick-over-quantity, unknown-gtin, scan-sku-mismatch, scan-level-mismatch, no-pick-plan, pick-incomplete) is NOT stored: the key is released and a retry under the same key executes again, so a scan refused before its facts were known can succeed once they are. Only a FINAL refusal (invalid-scanned-gtin, invalid-scan-count) is stored and replayed. Reusing a key with a different body or on another task is 409 idempotency-key-reused; omitting the header is 400 idempotency-key-required.

Request​

Responses​

The scan is accepted (or, on a retry with a repeated Idempotency-Key and identical body, the original answer replayed without counting the scan again).

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.