Skip to main content

List Line Match Suggestions

GET 

/api/ledger/reconciliation/bank-statements/:bankStatementImport/suggestions

For each parsed line in an import, candidate SKU ledger entries it could reconcile against. Money-in lines (Received) match AR documents (Sales Order Invoice, Vendor Credit); money-out lines (Spent) match AP documents (Bill, Purchase Order Invoice, Sales Credit). Candidates are entries of the matching type whose total is within $0.01 of the line amount and whose effective date is within 60 days of the statement date, ranked by date proximity then amount closeness. synced flags entries already pushed to the provider.

Authorization

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

Authentication: Requires Bearer token.

Candidate kinds: match_kind=entry is a single SKU document; match_kind=settlement is an Amazon settlement aggregate — matched on the settlement's recorded payout (amazon_financial_event_groups.ConvertedTotalCurrencyAmount), carrying every ledger entry it generated in entry_ids (sales invoices + fee bills + carved-out landed-cost bills linked via amazon_report_settlement_data). Confirming a settlement candidate POSTs all of entry_ids.

Settlement candidates carry settlement_id (the AmazonFinancialEventGroup id — links to /integrations/amazon/finance/bank-transaction/{id}), settlement_reference (the FinancialEventGroupId shown as the settlement #), and entries[] (each linked ledger entry: id, reference, entry_type_label, is_landed_cost) so the UI can deep-link every document.

Per-suggestion dismissed_count (integer): how many candidates the user has declared “not a match” on this line (via Dismiss Line Match Suggestion). Dismissed candidates are excluded from candidates and restorable as a set via Restore Dismissed Suggestions.

Group candidates (match_kind=group): several of one supplier's documents that together settle a money-out payment. When the line's memo names the supplier, combinations may also NET vendor credits against the invoices (payment = invoices − credits) — the label reads e.g. '2 invoices − 1 credit' and amount is the net. Each entries[] element carries its own entry_type, amount, counterparty_name and effective_at so the UI renders a signed calculation.

Request

Responses

OK

Response Headers
    Content-Type