Skip to main content
Version: Next

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

FieldTypeDefaultMeaning
dateFromdate30 days agoIssue date from (YYYY-MM-DD)
dateTodatetodayIssue date to
directionstringpurchasepurchase = purchase
fetchDetailsbooleantruetrue = 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
}
statusMeaning
queuedWaiting to be processed
runningSyncing invoices
succeededCompleted
failedFailed (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).