Skip to content

Export Refunds

Downloads the refunds datagrid as a CSV file — the same data the admin Sales → Refunds "Export" button produces. The response is a binary text/csv attachment, not JSON. Requires the sales.refunds.view permission.

Endpoint

EndpointMethod
/api/admin/refunds/exportGET

Columns

The CSV carries the five datagrid columns, in order:

HeaderValue
IDRefund id.
Order IDThe parent order's number.
Refunded AmountThe total amount refunded, in the store's base currency, formatted (e.g. $4,233.00) — this is the refund's grand total, not just the line-items subtotal.
Billed ToName on the order's billing address.
Refund DateWhen the refund 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, billed_to, created_at_from / _to. (Pagination does not apply — the export returns every matching row.)

Permission

sales.refunds.view

Released under the MIT License.