# Exports

> Export transactions, customers, and orders as Excel spreadsheets.

- **Category:** Guides
- HTML version: https://www.ondayzero.com/docs/guides/exports
- All guides: https://www.ondayzero.com/docs/guides/index.md
- Endpoint catalog: https://www.ondayzero.com/docs/reference/index.md

---

# Exports

DayZero provides Excel (`.xlsx`) and CSV export endpoints for downloading business data in bulk. Each returns the file directly — save the response body to disk.

> The `/api/v1/export/*` endpoints work with an API token but are not listed in the public API Reference. For paged JSON access to the same data use the entity endpoints (e.g. `GET /api/v1/transactions`); for financial statements use [Reports](/docs/guides/reports).

## Export Transactions

Download bank transactions as an Excel spreadsheet. The filters are the same as `GET /api/v1/transactions`, so the export contains exactly what a filtered list would:

```bash
curl "https://api.ondayzero.com/api/v1/export/transactions/excel?start_date=2026-01-01&end_date=2026-03-31" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID" \
  -o transactions.xlsx
```

### Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `id` | UUID, repeatable | Export specific transactions (repeat the parameter for several) |
| `start_date` / `end_date` | date | Date range (inclusive) |
| `ledger_id` | UUID, repeatable | Filter to specific bank or card ledgers |
| `opposing_ledger_id` | UUID | Filter by the category ledger the transactions were booked to |
| `source_account_id` | UUID, repeatable | Filter by the connected bank account |
| `tag_id` | UUID, repeatable | Only transactions carrying a tag |
| `journal_entry_id` | UUID | Transactions linked to one journal entry |
| `search` | string | Match description, counterparty or amount |
| `amount_direction` | string | `inflow` or `outflow` |
| `only_uncategorized` | boolean | Only transactions without a category |
| `missing_counterparty` | boolean | Only transactions without a counterparty |
| `review_status` | string | `reviewed` or `unreviewed` |
| `reconciled` | boolean | `true` only reconciled, `false` only unreconciled |
| `posted_status` | string | `posted` or `pending` |
| `rule_id` | UUID | Only transactions a bank rule categorized |
| `has_attachments` | boolean | `true` only transactions with a receipt attached, `false` only those missing one |
| `receipt_status` | string | `missing`, `requested`, `attached`, `exempt`, `not_required`, or a comma-separated combination |
| `card_holder` | string | One employee's card-program (Ramp) transactions, by cardholder name |
| `source` | string | `plaid`, `ramp`, `bulk_upload`, `manual`, `xero`, `quickbooks`, or a comma-separated combination |
| `sort_by` / `descending` | | Row ordering |
| `days` | integer | **Deprecated** — use `start_date` / `end_date` |

### Large exports

Building a very large workbook inside one request can time out. Queue it as a background job instead:

```bash
curl -X POST "https://api.ondayzero.com/api/v1/export/transactions/excel/jobs?start_date=2025-01-01&end_date=2025-12-31" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"
```

The `202` response carries a `task_id` and an initial `status` (`queued`, or `in_progress` when an identical export is already running, in which case you get that job's `task_id` back). Poll `GET /api/v1/tasks/task/{task_id}` every few seconds until `data.status` is terminal: `SUCCESS`, `FAILURE`, `CANCELLED`, `TERMINATED` or `TIMED_OUT`. While it runs, `data.status` is `pending` or `running` and `data.progress` reports how far along it is. `NOT_FOUND` (HTTP 200) can appear for a moment right after queueing, or if the task id is unknown or belongs to another business, so keep polling briefly before treating it as an error. On success `data.result.download_link` is a ready-to-use `GET /api/v1/reports/download?s3_key=…` URL (`data.result.s3_key` is the key itself). Call it with your normal API headers; it answers with a `307` redirect to a short-lived presigned S3 URL, so use `curl -L`. Same filters, same rows, same workbook as the synchronous endpoint.

## Export Chart of Accounts

```bash
curl "https://api.ondayzero.com/api/v1/export/ledgers/excel?status=active" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID" \
  -o chart-of-accounts.xlsx
```

Optional filters: `status` (`active` / `inactive`), `name` (contains), `ledger_type` (`asset`, `liability`, `equity`, `revenue`, `expense`). The workbook includes a full chart-of-accounts sheet plus an import-template sheet laid out for the dashboard's chart-of-accounts import. Via the API, ledgers are created one at a time with `POST /api/v1/ledgers` or as a whole chart with `POST /api/v1/ledgers/apply-coa` — see [Ledgers](/docs/guides/ledgers).

## Export Customers and Vendors

```bash
curl "https://api.ondayzero.com/api/v1/export/customers/excel" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID" \
  -o customers.xlsx
```

`GET /api/v1/export/vendors/excel` does the same for vendors. Each exports up to 5,000 records.

## Export Orders, Projects and Contracts

| Endpoint | Contents |
|----------|----------|
| `GET /api/v1/export/orders/excel` (or `/csv`) | Purchase orders (see [Inventory](/docs/guides/inventory)). Up to 5,000 |
| `GET /api/v1/export/o2c-orders/excel` | Order-to-Cash order forms. Up to 5,000 |
| `GET /api/v1/export/contracts/excel` (or `/csv`) | Order-to-Cash contracts. Up to 5,000 |
| `GET /api/v1/export/projects/excel` | Job-costing projects |
| `GET /api/v1/export/invoice-line-items/csv` | One row per invoice line item joined to its customer, project, contract and order — a single flat table to pivot instead of stitching several exports together. Up to 5,000 invoices |

## Financial Reports

For financial statements (P&L, balance sheet, trial balance, aging, etc.), use the [Reports API](/docs/guides/reports), which generates CSV, Excel and PDF output asynchronously.
