Skip to main content

Record a physical cycle count for a bin

POST 

/bins/:binId/cycle-counts

Verifies a bin's physical contents against system records. If the counted quantity matches system quantity, records a clean CycleCountCompleted. A shortfall (counted < system) marks whichever StockUnits cover the difference fully Unlocated (not split into located/lost sub-quantities — kept simple by design) and publishes ItemUnlocated per unit touched. An overage (counted > system) is reported as a DiscrepancyDetected/CycleCountCompleted(discrepancy=true) pair for a separate receiving/audit process to reconcile — this endpoint does not itself create the extra stock. Each call with a new Idempotency-Key represents a new physical count event and is intentionally repeatable (recounting a bin is a normal operational action); a retry with the SAME Idempotency-Key replays the first answer and counts nothing again (a first answer of 409 concurrent-modification is not stored: that retry executes).

Request​

Responses​

Cycle count recorded and reconciled (discrepancy indicates whether counted quantity differed from system quantity).

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.