Data Warehouse Export
Bulk export accounting data for external BI tools and data pipelines. Requires the data_export feature (Professional plan and above).
Export Data
GET /api/exports/data-warehouse?entityId=...&bookId=...Query Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
entityId | Yes | uuid | Entity to export |
bookId | Yes | uuid | Book to export from |
format | No | string | json (default) or csv |
tables | No | string | Comma-separated table names. Omit to export all tables. |
fromDate | No | string | ISO 8601 start date filter |
toDate | No | string | ISO 8601 end date filter |
Available Tables
| Table | Description |
|---|---|
accounts | Chart of accounts with codes, names, and types |
journal_entries | Posted journal entry headers |
journal_lines | Individual debit and credit lines |
events | Financial events with type and status |
bills | Accounts payable bills |
invoices | Accounts receivable invoices |
trial_balance | Current trial balance by account |
Example: Export All Data as JSON
GET /api/exports/data-warehouse?entityId=abc&bookId=xyzExample: Export Specific Tables as CSV
GET /api/exports/data-warehouse?entityId=abc&bookId=xyz&format=csv&tables=accounts,journal_entries,journal_linesExample: Date-Filtered Export
GET /api/exports/data-warehouse?entityId=abc&bookId=xyz&fromDate=2025-01-01&toDate=2025-12-31&tables=journal_entries,journal_linesJSON Response Format
{
"accounts": [
{
"id": "uuid",
"code": "1000",
"name": "Cash",
"type": "ASSET"
}
],
"journal_entries": [
{
"id": "uuid",
"date": "2025-03-15",
"memo": "Payroll March"
}
],
"journal_lines": [
{
"id": "uuid",
"journalEntryId": "uuid",
"accountId": "uuid",
"debit": "5000.00",
"credit": "0.00",
"currency": "USD"
}
]
}Response headers:
Content-Type: application/jsonContent-Disposition: attachment; filename="export-{entityId}-{date}.json"
CSV Response Format
The CSV output contains one section per table, each preceded by a header row with column names. Sections are separated by blank lines.
Response headers:
Content-Type: text/csvContent-Disposition: attachment; filename="export-{entityId}-{date}.csv"
Authentication
Pass your API key as a Bearer token:
Authorization: Bearer your-api-key