GET/api/ordering/production/customers

The same day, grouped by customer

The third way the worksheet slices a day — section, item, customer — and the one that prints one customer per page. Added 2026-08-12 with the production-report merge. Customers sort A→Z, items biggest job first, matching the other groupings.

Its totals must equal /sections totals for the same day. Three groupings are three views of one number; a difference between them is a bug, not a nuance, and there is a test asserting it.

Grouping by ITEM deliberately has no endpoint of its own: it is /sections flattened. A third server-side definition of the day's totals is a third thing that can disagree with the other two.

This is the one rollup not aggregated in the database. A groupBy can sum quantities but cannot also collect each customer's order numbers, which the page heading needs — and this view is an office action on one day, not the polled dashboard the section totals feed.

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

4 status codes
200One entry per customer.
customerIdstringoptional
customerNamestringoptional
orderNumbersarray<string>optional
Every order from this customer contributing to the day. Shown under the heading.
totalnumberoptional
bakednumberoptional
rawnumberoptional
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.