New Light partners with Greenstep to bring agentic finance to the NordicsLight partners with Greenstep Read the announcement

Match bank transactions with ledger lines

POST
https://api.light.inc/v1/bank-accounts/{bankAccountId}/reconcile-transactions

Matches unmatched bank transactions of this bank account with ledger transaction lines already posted to its ledger account, and marks the bank transactions MATCHED. The signed amounts must net to zero unless deviationReason is BANK_FEES. Many-to-many matches are allowed; both lists need at least one ID. Fails with 400 when a list is empty, a bank transaction or ledger line is already matched or excluded, a ledger line is reversed or is a reversal, a ledger line is on another account or in another currency, or the amounts don't net to zero. An unknown ledger line fails with LEDGER_TRANSACTIONS_NOT_FOUND. A refused request posts nothing, so retrying a match that already succeeded returns BANK_RECONCILIATION_TRANSACTIONS_NOT_VALID. A match can't be undone through the API yet; undo it in the app.

Authorization

Send one of these on every request. See Authentication for how to get credentials.

  • API key

    Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.

  • Bearer token

Path parameters

  • bankAccountId string · uuidrequired

Request body

application/json;charset=UTF-8

  • bankTransactionIds array of string · uuidrequired

    IDs of unmatched bank transactions of this bank account

  • ledgerTransactionLineIds array of string · uuidrequired

    IDs of unmatched ledger transaction lines posted to this bank account's ledger account, in its currency

  • deviationReason string

    Leave it out when the bank transactions and ledger lines net to zero. BANK_FEES posts the difference as a bank fees journal entry, dated on the latest bank transaction, and matches it too.

    ⚠️ This enum is not exhaustive; new values may be added in the future.

    One of BANK_FEES

Response

  • id string · uuid

    Unique identifier for the matching group

  • bankTransactionIds array of string · uuid

    IDs of the bank transactions in the match, now MATCHED

  • ledgerTransactionLineIds array of string · uuid

    IDs of the ledger transaction lines in the match. When documents were cleared, these are the lines of the bank payments the clearing created; list them with matchingGroupId:eq:<id> on GET /v1/bank-accounts/{bankAccountId}/ledger-transaction-lines to find each bank payment's accountingDocumentId.