Retrieve an account balance for a usage source.
Returns active, effective, non-expired grants for the requested metric or currency minus corrected all-time usage for that source.
Authorizations
LedgerUp API Key.
Path Parameters
Resource identifier. LedgerUp account identifier.
^account_[0-9a-f]{32}$"account_0194f4e3a2b77c6aa91c4f6b4db2a980"
Query Parameters
Metric whose usage is subtracted from the account grants. Exactly one of metric_id or currency is required. LedgerUp metric identifier.
^metric_[0-9a-f]{32}$"metric_0194f4e3a2b77c6aa91c4f6b4db2a980"
Currency whose usage is subtracted from currency grants. Exactly one of metric_id or currency is required.
^[A-Za-z]{3}$"usd"
Response
Account balance for the requested metric or currency.
LedgerUp account identifier.
^account_[0-9a-f]{32}$"account_0194f4e3a2b77c6aa91c4f6b4db2a980"
LedgerUp metric identifier. Null for a currency balance.
^metric_[0-9a-f]{32}$"metric_0194f4e3a2b77c6aa91c4f6b4db2a980"
Lowercase currency code. Null for a metric balance.
^[a-z]{3}$"usd"
Sum of all grants for the account, serialized as a string.
^-?\d+(\.\d+)?$"1000"
Sum of corrected usage events for the metric, serialized as a string.
^-?\d+(\.\d+)?$"275.5"
grant_total minus usage_total, serialized as a string.
^-?\d+(\.\d+)?$"724.5"