GET/api/ordering/production/item-customers

What one item row expands into — the real order lines behind it

The rollups above answer how much. This answers for whom, and how do they take it — the individual lines, each with its own specs and note. Nothing is summed.

itemId is optional, and that is the point. The worksheet needs these lines twice: when a reader opens one item row, and for every row when it prints. Omitting itemId returns the whole day in one request, and both callers filter the same cached array — every line carries its own itemId for that bucketing. Requiring it would mean one request per row on screen and another per row on paper.

rawBaked narrows the expand to one half of the job, matching the row the reader actually opened.

3 parameters
datestringrequired
Montreal business day, `yyyy-mm-dd`. Required. Day-scoped endpoints filter on the **delivery** date (D-14).
itemIdintegeroptional
Narrow to one item. Omit for the whole day. Must be a positive integer — a value like `12abc` is rejected rather than silently coerced to 12.
rawBakedstringoptional
Narrow to one half of the job. A baked batch and a raw batch are different work, so the baked row must list only the customers taking it baked. Omitted means `all`; anything OTHER than `all`, `raw` or `baked` is a **400** — it is validated, not silently treated as `all`.
Allowed:allrawbakedDefault:all

4 status codes
200The matching order lines.
keystringoptional
The order-line id. Stable — the UI keys rows on it.
itemIdstringoptional
So a whole-day fetch can be bucketed per row without a second call.
customerIdstringoptional
customerNamestringoptional
orderIdstringoptional
The order this line came from — the worksheet links each expanded line to its detail page, which is keyed by id rather than by orderNumber.
orderNumberstringoptional
qtynumberoptional
rawBakedstringoptional
Allowed:rawbaked
loosePackedstringoptional
Allowed:loosepacked
slicedstringoptional
Allowed:slicednot_sliced
caseQtyintegeroptional
Units per case; null when ordered loose.
notestringoptional
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.