Lots, serials, reservations, quarantine, and NCRs — answering “which units are affected and where are they” in minutes.
Traceability answers one question under pressure: a defect or recall exists — which units are
affected, and where is every one of them? The answer is only fast if identity was captured at
every handoff. This guide is the discipline, and the payoff.Two granularities:
Tracks
Use for
Lot
A batch (lot_2026_07_A)
Anything made or received together — consumables, food, cosmetics, components
Serial
One physical unit
Warrantied goods, electronics, anything an individual unit’s history matters for
Identity capture is all-or-nothing per SKU. A lot-tracked product with some untracked units has no
recall story — the untracked units are exactly the ones you cannot find. If you turn tracking on,
backfill or quarantine the untracked stock.
Reservations tie identity to demand before the goods move — an order, a work order:
curl -X POST https://api.stateset.com/api/v1/lots/{id}/reserve \ -H "Authorization: Bearer $STATESET_API_KEY" \ -H 'content-type: application/json' \ -d '{ "quantity": 24, "reference": "wo_1201" }'# release if the demand goes away:curl -X POST https://api.stateset.com/api/v1/lots/reservations/{reservation_id}/release \ -H "Authorization: Bearer $STATESET_API_KEY"
Consumption (POST /api/v1/lots/{id}/consume) records the lot into what it became — a
production batch records which
component lots went into which finished lot, which is the link a recall walks. Serials mirror the
moves: /{id}/ship on the way out, /{id}/return on the way back,
/{id}/scrap at end of life.
Run it weekly. Expiring stock found at 60 days is a promotion; found at 5 days it is a
write-off. Pickers consuming
oldest-first only works if lot dates were captured at receipt — see the warning above.
Quarantined stock is off sellable inventory immediately — picks stop finding it while you
investigate, not after. The investigation itself is a quality workflow: an inspection
(POST /api/v1/quality/inspections, then /start, /results, /complete) and an NCR
(POST /api/v1/quality/ncrs) whose disposition (/{id}/disposition) decides the lot’s fate —
release (POST /api/v1/lots/{id}/release-quarantine), rework, return to
vendor, or scrap.
When it’s real, the sequence is four reads and one write:
GET /api/v1/lots?lot_number=L2026-07-A — the lot, its remaining quantity
GET /api/v1/warehouse-locations/{id}/inventory — where the on-hand units sit
Shipped units — the lot’s consumption and shipment history names the orders, which names the
customers
POST /api/v1/lots/{id}/quarantine — stop further movement, then work the list
Run this drill on a fake defect once a quarter and time it. The gap between “minutes” and “days” is
entirely determined by capture discipline at receipt — and it is much cheaper to discover a hole in
the drill than in the recall.