Light APIv1.0.0

API / Reference / Card Balance Accounts

Get total spend for a card balance account

GET https://api.light.inc/v1/card-balance-accounts/{accountId}/total-spend

Returns the total spend for a card balance account within a date range

to is exclusive, contrary to the description: it is taken as the start of that UTC day, so to=2026-01-31 excludes 31 January. Omit to to count up to now. from is inclusive from 00:00 UTC. The total counts transactions in AUTHORIZED, CAPTURED, POSTED and REFUNDED, adding DEBIT amounts and subtracting CREDIT ones, so refunds reduce it and it can be negative. DECLINED and VOIDED are ignored. The response echoes from and to as the resolved instants.

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

  • accountId string · uuidrequired

Query parameters

  • from string · date

    Start of the spend window, inclusive. A UTC calendar date in YYYY-MM-DD format.

  • to string · date

    End of the spend window, inclusive. A UTC calendar date in YYYY-MM-DD format. Defaults to now if omitted.

Response

  • currency string

  • total integer · int64

  • from string · date-time

  • to string · date-time