Skip to content

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:read scope
  • Since: M8

Request

Path parameters

FieldTypeDescription
idexp_… IDThe export's ID (exp_…).

Query parameters

This operation takes no query parameters.

Response

200 OK with a JSON object:

FieldTypeDescription
idexp_… ID
object"data_export"
livemodeboolean
entityIdent_… ID
kindone of accounting, organization
statusone of queued, running, ready, expired, failedqueued, then running, then ready (files downloadable for 30 days, then expired) or failed.
fromstringThe first day covered, in the entity's time zone.
tostringThe last day covered (included).
timeZonestring
requestedByobject
requestedBy.typestring
requestedBy.idstring
glMappingVersioninteger or nullThe general-ledger mapping used (0: none was set).
filesarray of object
files[].partone of journal, invoices, credit_notes
files[].fileIdfile_… ID
files[].filenamestring
files[].contentTypestring
files[].sizeinteger
files[].sha256string
files[].rowsintegerData rows (without the header).
summaryobject or null
failureobject or null
readyAtdate-time or null
expiresAtdate-time or null
createdAtdate-time
updatedAtdate-time
versioninteger

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

CodeHTTP statusWhenWhat to do
validation_failed400id isn't an export ID (exp_…).Fix the fields listed in details.issues and send the request again.
resource_not_found404This 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_required400The 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_denied403You 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_allowed403You 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.