Get an accounting export
The exports.get operation: GET /api/v1/exports/{id} in the REST API and the exports_get tool in the MCP server.
GET
/api/v1/exports/{id}Returns an accounting export: its status, period, the general-ledger mapping version used, its files (name,
size, SHA-256, rows) and a summary (the journal's totals per currency, which must balance, and the accounts the
mapping doesn't map; the registers' counts and totals). A failed export says why. The files download from the
console for 30 days after the export is ready; then it is expired.
At a glance
- REST:
GET /api/v1/exports/{id} - MCP tool:
exports_get - Operation ID:
exports.get - Scope: Legal entity
- Permission:
ledger:read - Risk tier:
read - Dry run: Not supported
- Idempotency: Not needed (read only)
- Modes: Test and live
- Authentication: API key with the
ledger:readscope - Since: M8
Request
Path parameters
| Field | Type | Description |
|---|---|---|
id | exp_… ID | The export's ID (exp_…). |
Query parameters
This operation takes no query parameters.
Response
200 OK with a JSON object:
| Field | Type | Description |
|---|---|---|
id | exp_… ID | |
object | "data_export" | |
livemode | boolean | |
entityId | ent_… ID | |
kind | one of accounting, organization | |
status | one of queued, running, ready, expired, failed | queued, then running, then ready (files downloadable for 30 days, then expired) or failed. |
from | string | The first day covered, in the entity's time zone. |
to | string | The last day covered (included). |
timeZone | string | |
requestedBy | object | |
requestedBy.type | string | |
requestedBy.id | string | |
glMappingVersion | integer or null | The general-ledger mapping used (0: none was set). |
files | array of object | |
files[].part | one of journal, invoices, credit_notes | |
files[].fileId | file_… ID | |
files[].filename | string | |
files[].contentType | string | |
files[].size | integer | |
files[].sha256 | string | |
files[].rows | integer | Data rows (without the header). |
summary | object or null | |
failure | object or null | |
readyAt | date-time or null | |
expiresAt | date-time or null | |
createdAt | date-time | |
updatedAt | date-time | |
version | integer |
Examples
A ready export
HTTP
GET /api/v1/exports/exp_01m4tx5nj8emwbyf7y9vcf4aaa
Authorization: Bearer or_test_…
Response (200):
JSON
{
"id": "exp_01m4tx5nj8emwbyf7y9vcf4aaa",
"object": "data_export",
"livemode": false,
"entityId": "ent_01m4tx5nj8emwbyf7y9vcf47zm",
"kind": "accounting",
"status": "ready",
"from": "2026-07-01",
"to": "2026-09-30",
"timeZone": "Europe/Zagreb",
"requestedBy": {
"type": "user",
"id": "usr_01m4tx5nj8emwbyf7y9vcf47zk"
},
"glMappingVersion": 3,
"files": [
{
"part": "journal",
"fileId": "file_01m4tx5nj8emwbyf7y9vcf4aab",
"filename": "acme-hr-journal-2026-07-01-to-2026-09-30.csv",
"contentType": "text/csv; charset=utf-8",
"size": 421888,
"sha256": "9f2c1d5e7a3b4c6d8e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d",
"rows": 412
},
{
"part": "invoices",
"fileId": "file_01m4tx5nj8emwbyf7y9vcf4aac",
"filename": "acme-hr-invoice-register-2026-07-01-to-2026-09-30.csv",
"contentType": "text/csv; charset=utf-8",
"size": 98304,
"sha256": "9f2c1d5e7a3b4c6d8e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d",
"rows": 96
},
{
"part": "credit_notes",
"fileId": "file_01m4tx5nj8emwbyf7y9vcf4aad",
"filename": "acme-hr-credit-note-register-2026-07-01-to-2026-09-30.csv",
"contentType": "text/csv; charset=utf-8",
"size": 3072,
"sha256": "9f2c1d5e7a3b4c6d8e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d",
"rows": 3
}
],
"summary": {
"journal": {
"transactions": 180,
"rows": 412,
"totals": [
{
"currency": "EUR",
"debit": "48210000000",
"credit": "48210000000"
}
],
"unmappedAccounts": [],
"unmappedCount": 0
},
"invoices": {
"count": 96,
"totals": [
{
"currency": "EUR",
"net": "18400000000",
"tax": "4600000000",
"gross": "23000000000",
"count": 96
}
]
},
"creditNotes": {
"count": 3,
"totals": [
{
"currency": "EUR",
"net": "160000000",
"tax": "40000000",
"gross": "200000000",
"count": 3
}
]
}
},
"failure": null,
"readyAt": "2026-10-02T08:00:21.000Z",
"expiresAt": "2026-11-01T08:00:21.000Z",
"createdAt": "2026-10-02T08:00:00.000Z",
"updatedAt": "2026-10-02T08:00:21.000Z",
"version": 3
}
Errors
| Code | HTTP status | When | What to do |
|---|---|---|---|
validation_failed | 400 | id isn't an export ID (exp_…). | Fix the fields listed in details.issues and send the request again. |
resource_not_found | 404 | This entity has no such export in this mode. | Check the ID and that your credentials are scoped to the right organization, entity, brand and mode. |
scope_required | 400 | The request names no legal entity (an org key without Ownrecord-Entity, or a brand key: exports belong to the entity). | Call the operation with credentials or a target at its level: an organization, a legal entity, a brand or the platform (details.required_scope). |
permission_denied | 403 | You can't read this entity's ledger (ledger:read; brand-scoped members never see it). | Ask an organization owner or admin for a role or scope that allows this action. |
livemode_not_allowed | 403 | You have no live-mode access, so you can't use live exports. | Use test mode, or credentials for the target's mode. Developers need live access granted by an organization owner or admin. |
It can also return these common errors: api_version_unsupported, authentication_required, api_key_invalid, dry_run_not_supported, rate_limited, internal_error.