Get Inventory Reconciliation Chain
GET/api/ledger/reconciliation/inventory/chain
The cumulative reconciliation CHAIN for one earmarked inventory control account, since the baseline: SKU inventory moved (physical) -> SKU ledger moved (SKU's own accounting books) -> provider (Xero) moved (actual GL). Two checkpoints fall out of it: check_a = ledger - inventory (does SKU's ledger reflect its inventory? an internal booking discrepancy) and check_b = provider - ledger (did the ledger reach the provider? sync status plus any direct-in-Xero or synced-then-deleted residual). divergence = provider - inventory = check_a + check_b. The ledger split (synced/stale/awaiting/excluded) shows how much of Check B is just pending sync: ledger_moved (and therefore both checks) counts synced + stale + awaiting, where ledger_stale is content synced once but restated since and not yet re-pushed. ledger_excluded is an internal-only lane - postings that never reach the provider by design (e.g. write-off entries) - reported as its own labeled reconciling item and counted into neither check; the divergence identity is unaffected. rows give the per-transaction-type detail behind each. Done cumulatively so the monthly batch-sync lag washes out. Authenticate with a Personal Access Token. Reads cached data only. Every measure above is a MOVEMENT since the baseline; the balance fields are the absolute closing positions those movements land on — what inventory is actually worth in SKU (sku_balance) against what the provider's account says (provider_balance), and the resulting balance_difference = provider_balance - sku_balance. The opening trio (opening_sku_balance, opening_provider_balance, opening_difference) states the same three at the baseline. Because divergence only measures how much the gap GREW since the baseline, the total gap on the books is balance_difference = opening_difference + divergence — the two coincide only when the baseline opened reconciled.
This endpoint currently requires session authentication; Personal Access Token scope support is in progress.
The inventory side is stated on the accounting calendar, so a lock date that pushed a posting past the day its stock moved cannot break check_a — the value is held back on both sides until the GL recognises it. displaced_close is how much is being held back at as_of_date, displaced_open is how much was held back at the baseline, and displaced_moved is the difference (displaced_close − displaced_open) — how much the held-back amount grew since the baseline. inventory_moved + displaced_moved is the raw inventory movement before that restatement. All three are 0 on books with no displacement.
Request
Responses
- 200
- 401
- 403
- 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.
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.