GET/api/packing/reports/packing-lists.json

The day's packing lists as JSON

The same data the packing-lists PDF is built from, in one call.

The screen version was costing an N+1 — one request per customer — because the only server-side source was the PDF route. ordersForPrint(day) already assembles every order for the day, with its lines and notes, in a single query.

Deliberately the same function the PDF uses rather than a parallel query: paper and screen must not be able to disagree about what a customer is owed. An integration test asserts the two return the same orders.

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 orders, ready to render.
datestringoptional
orderCountintegeroptional
ordersarray<object>optional
One entry per order, each carrying its own lines — which is what removes the per-customer N+1.
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.