Skip to main content

Confirm Line Match

POST 

/api/ledger/reconciliation/bank-statements/lines/:bankStatementLine/match

Confirm one or more ledger entries as the match for a line. Persists a denormalized snapshot of each match (so it survives ledger rebuilds) and marks the line matched. Idempotent — re-matching the same entry is a no-op.

Authorization

Any valid API token can call this endpoint — no specific scope required. Manage tokens.

Body: entry_ids (required array of ledger_journal_entry ids). Authentication: Requires Bearer token.

sync_block (on each line): pre-push sync verdict for the line's matched document(s) — null when every document will sync, otherwise { blocked: true, enableable: bool, reasons: string[], blocked_entry_ids: int[], enableable_entry_ids: int[] }. Surfaced so the UI can warn (and offer Enable sync) BEFORE a push that would otherwise silently not reach Xero.

Optional Amazon-settlement context (omit for a single-document match): match_kind ('entry' | 'settlement'), settlement_id (required when match_kind=settlement), settlement_reference, settlement_payout (the net payout the bank line matched on). When present, every persisted match row records the settlement so the UI labels it an 'Amazon Settlement · {payout}' regardless of how many SKU documents it touched.

Request

Responses

OK

Response Headers
    Content-Type