API / Reference / Bank Accounts
Create bank transactions
POST
https://api.light.inc/v1/bank-accounts/{bankAccountId}/bank-transactions
Creates bank transactions in batch. Maximum 500 transactions per request. Duplicate transactions (same transactionId for the same bank account) are silently skipped.
dcSign is the reverse of the description. A bank account is an asset, so D is money in (increases the balance) and C is money out; this is what the bank feeds, the CSV import and both balance endpoints use. Sending D for outflows inverts every balance.
Duplicate handling is silent: a row whose transactionId already exists for this API on the account is skipped and simply missing from the response (a full retry returns []). Rows with transactionId: null are never de-duplicated, and a transaction already present from a bank feed or CSV import under the same id is not treated as a duplicate either. Over 500 rows is BANK_TRANSACTION_BATCH_SIZE_EXCEEDED, an empty list BANK_TRANSACTION_BATCH_EMPTY. Nothing is posted to the ledger: transactions land as UNMATCHED for bank reconciliation only. A negative amount is accepted and flips the arithmetic, so keep amounts positive and use dcSign.
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
-
transactionsarray of objectrequiredList of bank transactions to create. Maximum 500 per request.
-
datestring · daterequiredTransaction date
-
amountinteger · int64requiredTransaction amount in minor units (e.g. cents). Must be positive.
-
dcSignstringrequiredDebit/credit sign. DEBIT for money out, CREDIT for money in.
⚠️ This enum is not exhaustive; new values may be added in the future.
Dis money in (the balance goes up),Cis money out — the reverse of the description. A bank account is an asset, and every other way transactions reach Light uses this convention.One of
DC -
namestringTransaction name / payee
-
memostringTransaction memo / description
-
referencestringTransaction reference
-
transactionIdstringExternal transaction identifier. Used for idempotency — duplicate transactionIds for the same bank account are silently skipped.
The de-duplication key, among transactions created through this API only.
nulldisables it for the row, so retries insert it again.
-
Response
-
idstring · uuidUnique identifier for the bank transaction
-
bankAccountIdstring · uuidID of the bank account this transaction belongs to
-
datestring · dateTransaction date
-
amountinteger · int64Transaction amount in minor units (e.g. cents)
-
dcSignstringDebit/credit sign
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
DC -
reconciliationStatusstringReconciliation status
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
EXCLUDEDMATCHEDUNMATCHED -
namestringTransaction name / payee
-
memostringTransaction memo / description
-
referencestringTransaction reference
-
transactionIdstringExternal transaction identifier for idempotency
-
createdAtstring · date-timeTimestamp when the transaction was created