Invoice sync request
Create a sync request to fetch purchase invoices by date range. The request runs asynchronously; the partner polls the status and then retrieves the results.
POST /tax-accounts/{accountId}/sync
Request body
| Field | Type | Default | Meaning |
|---|---|---|---|
dateFrom | date | 30 days ago | Issue date from (YYYY-MM-DD) |
dateTo | date | today | Issue date to |
direction | string | purchase | purchase = purchase |
fetchDetails | boolean | true | true = include line items; false = header only (cheaper) |
Example request
{ "dateFrom": "2025-03-01", "dateTo": "2025-03-31", "fetchDetails": true }
Example response (202)
{ "id": "b6bf6a2a-9082-4882-b798-b35fc5985894", "status": "queued", "priority": 0 }
Date range constraint
The tax portal limits each query to ~31 days. Longer ranges are automatically split by the system into multiple windows of ≤31 days.
Track progress
GET /sync-jobs/{jobId}
Example response
{
"id": "b6bf6a2a-9082-4882-b798-b35fc5985894",
"status": "succeeded",
"totalFound": 12,
"totalSaved": 12,
"errorCode": null
}
status | Meaning |
|---|---|
queued | Waiting to be processed |
running | Syncing invoices |
succeeded | Completed |
failed | Failed (see errorCode, errorMessage) |
Common errorCode values: INVALID_CREDENTIALS (wrong password → password needs to be updated), SYNC_FAILED (captcha/network).
Poll GET /sync-jobs/{jobId} every 1–2 seconds until status ∈ {succeeded, failed}, then call Invoice list.
Sync request list
GET /sync-jobs?accountId=&status=&page=&limit= — lists sync requests (used for tracking/operations).