---
title: "Export bookings as csv, xls or xlsx"
method: GET
path: "/bookings/export"
tags: ["Admin Sales: Bookings"]
---

# Export bookings as csv, xls or xlsx

`GET /bookings/export`

## Request

- Base URL: `http://localhost:8000/api/admin`
- URL: `http://localhost:8000/api/admin/bookings/export`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-admin-api/docs/bookings/export/get.ts> (a function with typed inputs; its response is checked against the schema)

Downloads the bookings datagrid as a csv, xls or xlsx file — the same data the admin Export button produces. Honours the same filters as the listing. Binary download, not JSON. Pick the file type with ?format=csv|xls|xlsx (default csv).

## Query parameters

- `format` 'csv' | 'xls' | 'xlsx'

## Response `200`

Export file downloaded as an attachment.

## Other responses

- `401`: Missing or invalid admin token.
- `403`: Admin role lacks the view permission.
- `404`: Not found
- `422`: Unsupported format (csv, xls and xlsx only).

---

[API](https://skmtc.dev/bagisto/apis/bagisto-admin-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-admin-api/revisions/3198f11be70f?raw)
