GET /v2/reports/orders for bulk exports, finance workflows, and reporting. It is not the best resource for a live order view.
The endpoint requires the reports:read scope and returns one report row for each order. Read the order resource when you need the complete current state of one order.
Select report rows
Usecreated_from and created_to to select a creation-time range. Send RFC 3339 timestamps with an offset.
Use page_size to select a page size. The allowed range is 1 to 100.
Read every page
Processdata, then read has_more.
When has_more is true, send the returned next_cursor in the next request. Use the cursor without modification.
Stop when has_more is false. Do not set an arbitrary client-side page limit for a complete export.
This Node.js example writes one JSON row per line. Set BAHN_ACCESS_TOKEN to a token with reports:read and redirect standard output to a file when needed.
/v2/orders, using that endpoint’s filters and the orders:read scope. Order summaries and report rows have different fields.
Use report fields
Each row groups these fields:
The
ordered_for value identifies the business an ordering channel ordered for. It is null when the order belongs to the credential’s own account.
The ordered_by value identifies the API credential for a Customer API order.
Treat a missing optional value as unavailable.