Reconciliations

Group: Banking

Open in the interactive reference

Bank and credit-card account reconciliations: start one for an account, adjust its statement figures, submit it once it is done (submit does not check that it balances), and reopen it when it has to be revisited.

A reconciliation ties one bank or credit-card account to one accounting period, and its job is to prove that what the bank says happened and what the ledger says happened are the same thing. It is the resource here, addressed by its own id; the (account, period) pair that identifies it internally is not part of the contract.

The lifecycle is four routes. POST banking/reconciliations starts one for an account — the period is derived, so a caller does not pick it. That call resumes rather than duplicates: if the account already has a reconciliation that is not complete, its id is returned and nothing is created. PATCH banking/reconciliations/{id} sets the statement figures the bank sends. POST banking/reconciliations/{id}/submit closes it and stamps who reconciled it and when. POST banking/reconciliations/{id}/reopen reverses that.

Two routes read. GET banking/reconciliations is the worklist, with filters, ordering and cursor pagination in the query string. GET banking/reconciliations/{id} is one reconciliation, and it carries a nested balances object the worklist cannot — the balance roll-forward that shows how the statement and the ledger reach their respective ending balances, and what remains between them. The scalar fields are named and typed identically in both.

Submit is ordered: a period cannot be submitted while the account's previous period is still open. Reopen cascades forward — reopening a period also reopens every later completed one for that account, because their beginning balances descend from it.

One thing to know before writing error handling: a business failure such as NOT_FOUND arrives under HTTP 400, not 404, because a route cannot yet declare a status per diagnostic code. Branch on the code in the error body.

Endpoints