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.
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
- 200
- 401
- 403
- 404
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.