Sync Provider GL Journals
POST/api/ledger/reconciliation/inventory/sync-journals
Kick the background tracked job that pulls the provider's GL journals feed (Xero Journals) into the local cache — the metered half of the daily reconciliation. One paginated pull per run; resumes incrementally from the highest JournalNumber already cached. Once cached, Rebuild Inventory Daily Series reconstructs the daily provider balance from the cache with no further provider call. Returns the tracked job log id so the UI can follow it in the global progress tray.
Any valid API token can call this endpoint — no specific scope required. Manage tokens.
Authentication: Requires Bearer token + accounting.sync permission.
Request body:
connection_id(integer, required): accounting connection id (the provider's integration instance) whose journals are pulled.from(dateY-m-d, optional): lower-bounds the pull by journal date. Clamped up to the Inventory Start Date (the opening anchor replaces summing the ledger before it), so an earlier value is accepted but never lowers the window below the anchor. When omitted, the window starts at the Inventory Start Date.full(boolean, optional, defaultfalse): whentrue, re-pulls the entire ledger from JournalNumber 0 instead of resuming incrementally from the highest cached journal.
Side effect: makes metered API calls to the accounting provider (one page per ~100 journals), capped at the connection's remaining daily Xero API budget — a budget-out pauses the run cleanly and it auto-resumes once the budget refreshes.
Request
Responses
- 200
- 401
- 403
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Content
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.