# 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 |
|-----------|------|-------------|
| `start_date` / `end_date` | date | Date range (inclusive) |
| `ledger_id` | UUID | Filter to a specific bank or card ledger |
| `opposing_ledger_id` | UUID | Filter by the category ledger the transactions were booked to |
| `source_account_id` | UUID | Filter by the connected bank account |
| `tag_id` | UUID | 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` |
| `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`. Poll `GET /api/v1/tasks/task/{task_id}` until `data.status` leaves `running` — `SUCCESS` or `FAILURE` (`data.progress` reports how far along it is; `NOT_FOUND` comes back with HTTP 200 if the task id is unknown). On success `data.result.download_link` is a ready-to-use `GET /api/v1/reports/download?s3_key=…` URL that streams the workbook with your normal API headers. 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.

## Export Orders, Projects and Contracts

| Endpoint | Contents |
|----------|----------|
| `GET /api/v1/export/orders/excel` (or `/csv`) | Purchase orders (see [Inventory](/docs/guides/inventory)) |
| `GET /api/v1/export/o2c-orders/excel` | Order-to-Cash order forms |
| `GET /api/v1/export/contracts/excel` (or `/csv`) | Order-to-Cash contracts |
| `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 |

## 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.
