Match bank transactions with ledger lines
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
-
bankAccountIdstring · uuidrequired
Request body
application/json;charset=UTF-8
-
bankTransactionIdsarray of string · uuidrequiredIDs of unmatched bank transactions of this bank account
-
ledgerTransactionLineIdsarray of string · uuidrequiredIDs of unmatched ledger transaction lines posted to this bank account's ledger account, in its currency
-
deviationReasonstringLeave it out when the bank transactions and ledger lines net to zero.
BANK_FEESposts 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
-
idstring · uuidUnique identifier for the matching group
-
bankTransactionIdsarray of string · uuidIDs of the bank transactions in the match, now
MATCHED -
ledgerTransactionLineIdsarray of string · uuidIDs 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>onGET /v1/bank-accounts/{bankAccountId}/ledger-transaction-linesto find each bank payment'saccountingDocumentId.