The following is a description of functions to access account data using the REST API.
Get the residual credit of the account
GET https://apiserver/ws/rest/api/v19/account/residualcredit/{channel}
Allowed values for "channel": email, sms.
Result: number representing the residual credit.
- If credit is 1000, it returns a value approximated to the nearest thousand rounding down.
- If credit is 0 or negative, it returns 0.
- For the account with 'flat' plan, it returns residual credit plus automatic credit.
- For the account with 'final balance' plan, it returns always -1.
Response example:
{ "creditamount": 0 }