Export Invoices
Downloads the invoices datagrid as a CSV file — the same data the admin Sales → Invoices "Export" button produces. The response is a binary text/csv attachment, not JSON. Requires the sales.invoices.view permission.
Endpoint
| Endpoint | Method |
|---|---|
/api/admin/invoices/export | GET |
Columns
The CSV carries the five datagrid columns, in order:
| Header | Value |
|---|---|
ID | Invoice number. |
Order ID | The parent order's number. |
Status | The invoice state (e.g. paid, pending). |
Grand Total | The invoice's total, in the store's base currency, formatted (e.g. $554.00). |
Invoice Date | When the invoice was created. |
Query parameters
format selects the export format — only csv is supported (the default); any other value returns 422.
The export honours the same filters as the listing, so you export exactly the rows you're viewing: id, order_id, state, base_grand_total_from / _to, created_at_from / _to. (Pagination does not apply — the export returns every matching row.)
Permission
sales.invoices.view

