Skip to content

Export Bookings ​

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

Endpoint ​

EndpointMethod
/api/admin/bookings/exportGET

Columns ​

The export carries the six datagrid columns, in order:

HeaderValue
IDBooking id.
Order IDThe parent order's number.
QtyQuantity booked.
FromThe slot's start, formatted (empty for non-time-based booking types).
ToThe slot's end, formatted (empty for non-time-based booking types).
Booking DateWhen the booking was created.

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: id, order_id, qty, product_id, from_from / from_to, to_from / to_to, created_at_from / _to. (Pagination does not apply — the export returns every matching row.)

Permission ​

sales.bookings.view

Released under the MIT License.