GET/api/packing/inventory

K5 — what is on the shelves for the day

Production output plus the night bake log, rolled up per item and split by where it went.

Three numbers, not one. produced is what was made; picked is what packers have already taken for the day's orders; remaining is the difference — and remaining is what the K2 on-hand chip shows. A chip reading the produced figure while 45 are already packed sends a packer to a shelf that holds 75. It floors at zero per item, so an over-supply of one can never mask another's shortfall.

⚠️ Not a stock level. picked counts this day's order lines only — anything leaving the shelf another way (retail, waste, a transfer) is invisible, because this module has no stock-take. The screen must say what the number is derived from rather than let it read as authoritative.

fromProduction / fromBakeLog split the source so the floor can see which one fed the number. An item baked but never ordered still appears — this bakery bakes speculatively, before the orders exist.

⚠️ productionLive is false when the day has neither a production record nor a logged bake — which today is always, since the platform has no recipes and no productions. The screen then renders an honest empty state saying why, never a confident zero: a packer who reads "0 on hand" stops looking on the shelf (PK-4).

1 parameter
datestringrequired
Montreal business day, `yyyy-mm-dd`. Required. Day-scoped endpoints filter on the **delivery** date (D-14).

4 status codes
200The day's shelves.
datestringoptional
productionLivebooleanoptional
False when the day has neither a production record nor a logged bake. Drives the honest empty state — never render a confident zero (PK-4).
totalsobjectoptional
itemsarray<object>optional
400Invalid input — the `error` string says what was wrong.
errorstringrequired
401Not authenticated. Sign in first (see the Auth tag).
errorstringrequired
500Unexpected server error.
errorstringrequired

Error handling

A 400 is returned: Invalid input — the error string says what was wrong. A 401 is returned: Not authenticated. Sign in first (see the Auth tag). A 500 is returned: Unexpected server error.