Light APIv1.0.0

API / Reference / Bank Accounts

Upsert bank account balance

PUT https://api.light.inc/v1/bank-accounts/{bankAccountId}/balance

Creates or updates the opening balance for a bank account. Only one balance per bank account is allowed — subsequent calls update the existing balance.

This stores a closing (end-of-day) balance, not an opening one. balanceAt is normalised to 23:59:59 UTC of its day, and transactions dated on or before that day are treated as already included in the balance; only later transactions are added on top. So give the statement balance at the end of that day, and load transactions dated after it. A second call replaces both balance and balanceAt for the account.

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

  • balanceAt string · date-time

    Timestamp of the balance (opening balance date). Defaults to current timestamp if not provided.

    A closing (end-of-day) point: the time of day is discarded and transactions dated that day or earlier count as already included in balance.

  • balance integer · int64required

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

Response

  • id string · uuid

    Unique identifier for the bank account balance

  • bankAccountId string · uuid

    ID of the bank account

  • balanceAt string · date-time

    Timestamp of the balance (opening balance date)

  • balance integer · int64

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