Skip to content

Get a sub-account's balance

GET
/v1/Accounts/{auth_id}/Balances/{tenant_auth_id}
curl --request GET \
--url https://api.siprtc.io/v1/Accounts/example/Balances/example \
--header 'Authorization: Basic <credentials>'

Vendor accounts only. Returns the prepaid balance, in US dollars, of one of the vendor’s own sub-accounts (an account whose parent is the vendor in the path). The account in the path must be of type vendor; any other account type gets 412. A sub-account of another account, or an Auth ID that does not exist, gets 404.

auth_id
required
string

Auth ID of the vendor account

tenant_auth_id
required
string

Auth ID of the vendor’s sub-account

The sub-account and its balance

Media type application/json
object
auth_id
required

Auth ID of the account the balance belongs to.

string
balance
required

Prepaid balance in US dollars. Negative when usage has exceeded the credit.

number

Example

{
"auth_id": "AC000000000000000000",
"balance": 42.75
}

Missing or wrong credentials (body: "Authentication failed")

Media type application/json
string

Example generated

example

The sub-account does not exist or is not this vendor’s (body: "record not found")

Media type application/json
string

Example generated

example

The path account is not a vendor (body: "Vendor AuthID is not valid vendor")

Media type application/json
string

Example generated

example