/api/packing/reports/packing-lists.jsonThe 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.
Montreal business day, yyyy-mm-dd. Required. Day-scoped endpoints filter on the delivery date (D-14).
One entry per order, each carrying its own lines — which is what removes the per-customer N+1.
error string says what was wrong.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.