Skip to content

Export Orders ​

Downloads the orders datagrid as a csv, xls or xlsx file — the same data the admin Sales → Orders "Export" button produces. The response is a binary file attachment, not JSON. Requires the sales.orders.view permission.

Endpoint ​

EndpointMethod
/api/admin/orders/exportGET

Columns ​

The export carries the eight datagrid columns, in order:

HeaderValue
IDOrder number.
StatusThe order status (e.g. processing, completed).
Grand TotalThe order's total, in the store's base currency, formatted (e.g. $554.00).
Payment MethodThe payment method used (e.g. Money Transfer).
ChannelThe channel the order was placed on.
CustomerThe customer's name.
EmailThe customer's email.
Order DateWhen the order was placed.

Query parameters ​

format selects the export format — csv (the default), xls or xlsx; any other value returns 422. Send an Accept header matching the format: text/csv, application/vnd.ms-excel or application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.

The export honours the same filters as the listing, so you export exactly the rows you're viewing: order_id, status, grand_total (plus the grand_total_from / _to range), channel, customer, email, plus the date presets (today, yesterday, this_week, this_month, last_month, last_three_months, last_six_months, this_year) and custom date_from / date_to. (Pagination does not apply — the export returns every matching row.)

Permission ​

sales.orders.view

Released under the MIT License.