Skip to main content

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.

Authorization

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 (date Y-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, default false): when true, 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

OK

Response Headers
    Content-Type