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

# Export transactions as csv, xls or xlsx

`GET /transactions/export`

## Request

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

Downloads the transactions 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)
