Cancel or edit an in-progress reconciliation session
accounting:writeTwo operations on an in_progress statement session:
1. Cancel ({"status": "cancelled"}): fully unwinds the session —
every items-based match is reverted (journal_entry_lines.reconciled_at
cleared, bank transactions flipped back to unreconciled, deposit-level
clears reverted through the canonical deposit-lifecycle helper),
reconciliation_items are deleted, and any lingering
bank_transactions.reconciliation_id pointers are cleared. FK-based
matches (AP payment / printed check / marketplace payout / customer
payment) survive cancel: they are session-independent payment-level
links; only their session pointer is cleared. Cancelled sessions never
block starting a new session and never seed opening balances. When
status is present, edit fields are ignored. Idempotent: re-cancelling
a cancelled session returns 200 with already_cancelled: true.
2. Edit (no status field): update opening_balance,
statement_ending_balance, statement_date (re-runs the closed-period
guard), and/or notes while the session is in_progress.
A completed session returns 409 (reconciliation_not_in_progress).
No GL postings occur (cancel only reverts reconciled_at flips).
Authorizations
API key issued per entity via Settings > Developers > API Keys.
Each key carries scopes (e.g. orders:read, products:write).
Bearer token format: Authorization: Bearer ark_live_ent_Test keys use ark_test_ent_. Both are issued per entity
via Settings > Developers > API Keys.
Path Parameters
Reconciliation session UUID.
Body
The only settable status; completion goes through POST /accounting/reconciliations/{id}/complete (Cognito surface).
cancelled YYYY-MM-DD; must fall in an open accounting period.
5000Response
The updated (or cancelled) session row; cancel responses add matches_reverted + gl_lines_unreconciled counts

