Accounts
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.
get/v2/accounts/{account_id}/balance
Path parameters
account_idstring required
LedgerUp account identifier.
Example:account_0194f4e3a2b77c6aa91c4f6b4db2a980
Resource identifier.
Query parameters
metric_idstring
LedgerUp metric identifier.
Example:metric_0194f4e3a2b77c6aa91c4f6b4db2a980
Metric whose usage is subtracted from the account grants. Exactly one of metric_id or currency is required.
currencystring
Example:usd
Currency whose usage is subtracted from currency grants. Exactly one of metric_id or currency is required.
Response
Account balance for the requested metric or currency.
Example response
{
"account_id": "account_0194f4e3a2b77c6aa91c4f6b4db2a980",
"metric_id": "metric_0194f4e3a2b77c6aa91c4f6b4db2a980",
"currency": "usd",
"grant_total": "1000",
"usage_total": "275.5",
"balance": "724.5"
}Changes
No recorded changes to this endpoint across all 1 revision of this API.