Browse the extensions reference

Preview Reconciliations

post/extensions/roboledger/{graph_id}/operations/preview-reconciliations

Part of RoboLedger: Ledger & Events.

Compare the ledger at a period end with something outside it, without recording anything. method picks the check. source_ledger (the default) reads QuickBooks' own trial balance for the period end and sets it beside the ledger's, account by account: balance-sheet accounts cumulatively, income and expense accounts from the start of the fiscal year. A difference there means the ledger's copy of the books has drifted from the source (a transaction deleted or back-dated there after it was synced, or activity not yet synced), so run it before trusting any other figure on a synced ledger; it needs a connected QuickBooks ledger. schedule_register compares each asset account a schedule carries a balance on (a prepaid, accumulated depreciation, a fixed-asset cost account) with what its schedules say it holds, and lists the schedules behind each figure. A difference there is a balance with no schedule behind it, or a scheduled amount the ledger does not hold. Each row carries both balances, the difference, and whether the account ties.

Idempotency: supply an Idempotency-Key header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

Authentication

Authenticate in any one of these ways — not all of them:

  • API key in the X-API-Key header.
  • Bearer token in the Authorization header.

Path parameters

NameTypeDescription
graph_idrequiredstringGraph Id

Constraints: matches ^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$

Header parameters

NameTypeDescription
Idempotency-KeyoptionalstringIdempotency-Key

Request body

Required, application/json.

FieldTypeDescription
periodrequiredstring

Period to compare at its last day, as YYYY-MM.

methodoptionalstring

Which check to preview. source_ledger compares every account with the synced accounting system's own trial balance. schedule_register compares each asset account a schedule carries a balance on with what its schedules say it holds. statement compares each account that has a statement balance recorded in the period with that balance.

One of: source_ledger, schedule_register, statement

Default: source_ledger

include_tiedoptionalboolean

Also return the accounts that tie. Off by default: the differences are the work, and the counts cover the rest.

Default: false

Example request

curl
curl -X POST "https://api.robosystems.ai/extensions/roboledger/{graph_id}/operations/preview-reconciliations" \
  -H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
  -H "Idempotency-Key: <Idempotency-Key>" \
  -H "Content-Type: application/json" \
  -d '{
  "period": "2026-08"
}'

Responses

200 Successful Response

FieldTypeDescription
operationrequiredstring

Kebab-case operation name

operationIdrequiredstring

op_-prefixed ULID for audit and SSE correlation

statusrequiredstring

Operation lifecycle state

One of: completed, pending, failed

resultoptionalReconciliationPreviewResponse

Command-specific result payload

ReconciliationPreviewResponse fields
FieldTypeDescription
periodrequiredstring
as_ofrequiredstring (date)

The period's last day.

fiscal_year_startrequiredstring (date)

Income-statement accounts are compared from this date to as_of.

methodrequiredstring

One of: source_ledger, schedule_register, statement

sourcerequiredstring

The system the independent side was read from.

report_basisoptionalstring

Accounting basis the source reported on.

last_sync_atoptionalstring (date-time)

When the source was last synced. A difference on a sync older than the period end may be activity not yet synced, not a fault in the mirror.

accounts_comparedrequiredinteger

Accounts with a balance on either side; zero on both is left out.

accounts_tiedrequiredinteger
accounts_differentrequiredinteger

Every account that does not tie, whatever the reason.

total_differencerequirednumber

Sum of the absolute differences across accounts, not a net figure: one missing transaction counts on each account it touches.

rowsrequiredReconciliationRow[]

Accounts that do not tie, largest difference first; tied accounts follow when include_tied is set.

ReconciliationRow fields
FieldTypeDescription
element_idoptionalstring

The chart account; null when the ledger has none for it.

account_codeoptionalstring

The chart account's code.

account_namerequiredstring

The account's name in the ledger, else in the source.

source_account_idoptionalstring

The account's id in the source system, when it has one.

statementoptionalstring

balance_sheet or income_statement. Balance-sheet accounts are compared cumulatively to the period end; income-statement accounts from the start of the fiscal year. Null when the ledger has no account.

ledger_balancerequirednumber

What the ledger holds. For source_ledger, landed entries only. For schedule_register, the balance as the period's close will leave it: landed entries, drafts awaiting the close, and schedule entries not yet drafted.

independent_balancerequirednumber

What the independent source says.

differencerequirednumber

Ledger minus independent.

statusrequiredstring

tied: both sides agree to the cent. different: both know the account and disagree. not_in_ledger: the source reports an account the ledger has none for. not_in_source: the ledger holds a balance on an account the source does not have.

as_ofoptionalstring (date)

The date both balances are stated at, when it is not the period's last day: a statement that ends mid-period is compared with the ledger at the statement's own date.

componentsoptionalReconciliationComponent[]

Account-scope methods only: what makes up the independent balance. One entry per schedule for schedule_register; the recorded statement for statement.

notesoptionalstring[]

How the comparison was made, and anything that qualifies it.

atrequiredstring

ISO-8601 UTC timestamp

createdByoptionalstring

User ID that initiated the operation

idempotentReplayoptionalboolean

True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.

Default: false

StatusMeaning
400Invalid request
401Authentication required
403Access denied
404Resource not found
409Idempotency-Key conflict — key reused with different body
422Validation error
429Rate limit exceeded
500Internal server error