> ## Documentation Index
> Fetch the complete documentation index at: https://docs.centsless.org/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /export — Export transactions as CSV

> Export transaction data as a CSV file for regulatory reporting. Standard mode includes 53 fields. Filter by date range, payment method, and compliance status.

Use this endpoint to export your transaction history as a downloadable CSV file for regulatory submissions, internal audits, or integration with your compliance reporting pipeline. You can filter the export by date range, payment method, and compliance status, and choose from three output modes depending on how much detail you need.

## Endpoint

```
POST https://api.centsless.org/api/v1/export
```

## Authentication

All requests require an `x-api-key` header.

## Request body

<ParamField body="export_mode" type="string">
  Controls how many fields are included in the output. Defaults to `standard`. See the table below for details.
</ParamField>

<ParamField body="start_date" type="string">
  The start of the date range to export, in ISO 8601 datetime format. Example: `2026-01-01T00:00:00Z`
</ParamField>

<ParamField body="end_date" type="string">
  The end of the date range to export, in ISO 8601 datetime format. Example: `2026-03-31T23:59:59Z`
</ParamField>

<ParamField body="payment_method" type="string">
  Filter by payment method. Matches the `payment_method` field on transactions (e.g., `cash`, `card`, `ebt`, `mobile`).
</ParamField>

<ParamField body="compliance_status" type="string">
  Filter by compliance status. One of: `PASS`, `WARN`, `FAIL`
</ParamField>

## Export modes

| Mode       | Fields included      | Use case                                     |
| ---------- | -------------------- | -------------------------------------------- |
| `standard` | 53 fields            | Regulatory submissions and compliance audits |
| `full`     | All available fields | Complete data export for internal analysis   |
| `summary`  | Key fields only      | Quick overview or executive reporting        |

## Code example

```bash theme={null}
curl -X POST https://api.centsless.org/api/v1/export \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "export_mode": "standard",
    "start_date": "2026-01-01T00:00:00Z",
    "end_date": "2026-03-31T23:59:59Z",
    "compliance_status": "PASS"
  }' \
  --output transactions.csv
```

## Response

The response body is a `text/csv` file download. The `Content-Type` header will be `text/csv`. Use `--output` in curl or the appropriate stream handler in your HTTP client to write the file to disk.
