Light APIv1.0.0

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

  • bankAccountId string · uuidrequired

Request body

application/json;charset=UTF-8

  • transactions array of objectrequired

    List of bank transactions to create. Maximum 500 per request.

    • date string · daterequired

      Transaction date

    • amount integer · int64required

      Transaction amount in minor units (e.g. cents). Must be positive.

    • dcSign stringrequired

      Debit/credit sign. DEBIT for money out, CREDIT for money in.

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

      D is money in (the balance goes up), C is 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 D C

    • name string

      Transaction name / payee

    • memo string

      Transaction memo / description

    • reference string

      Transaction reference

    • transactionId string

      External 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. null disables it for the row, so retries insert it again.

Response

  • id string · uuid

    Unique identifier for the bank transaction

  • bankAccountId string · uuid

    ID of the bank account this transaction belongs to

  • date string · date

    Transaction date

  • amount integer · int64

    Transaction amount in minor units (e.g. cents)

  • dcSign string

    Debit/credit sign

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

    One of D C

  • reconciliationStatus string

    Reconciliation status

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

    One of EXCLUDED MATCHED UNMATCHED

  • name string

    Transaction name / payee

  • memo string

    Transaction memo / description

  • reference string

    Transaction reference

  • transactionId string

    External transaction identifier for idempotency

  • createdAt string · date-time

    Timestamp when the transaction was created