Run a reconciliation
Match a snapshot of external items against unreconciled
postings. Matching is per-currency, per-amount, with a default
24-hour value_date window. Optional account_id on each item
narrows the candidate pool.
The response surfaces three sets: matched, unmatched_external
(items we couldn’t pair), and unmatched_internal (postings in
the time window that no external item claimed; only populated
when from/to bound the query).
Idempotent: matched postings get marked once. Items are stored
as external transactions keyed by (source, external_id).
Re-running the same snapshot reports already-matched items in
matched with their original attribution; nothing is
double-marked.
Items may carry reference_rail, reference_kind, and
reference_value (all three or none). When the triple resolves
to a transaction external ref, that posting is matched first
with strategy external_ref (exact amount required).
Authorizations
Same flow; ledger:write is required for any mutation.
Body
Name the external system you're reconciling against.
"cobo"
Free-form pointer back to the snapshot in the external system.
"cobo:2026-05-14:eth"
Allowed |posting.value_date - item.at| in seconds.
Matching strategy. exact pairs an external row with at most one
posting (default, pre-existing behavior). sum_in_window pairs an
external row with a subset of up to five postings whose summed
amount equals the external amount within
auto_resolve_below_minor_units, with every posting in the subset
inside +/- window_seconds of the external row's at.
exact, sum_in_window Absolute minor-unit tolerance budget for auto-resolving small
breaks. Accepts a decimal string (recommended) or an integer on
write; returned as a string. A match whose |sum(postings) -
external_amount| residual is <= this value is treated as matched
and emits reconciliation.break_auto_resolved. Default "0" =
strictly equal.
^\d+$Response
Run executed
reconciliation_run running, ready, completed