Skip to content

Get rates of an account

getAccountRates returns the rates an account is charged: the rates of the tariff in its service plan. Use it to show a price list on your website or in the user’s app.

Name Type Required Description
i_account int yes ID of the account
prefix string no Return only the rates matching this prefix
offset int no Number of rates to skip
limit int no Maximum number of rates to return
Name Type Description
result string OK
currency string Currency of the rates, ISO 4217
rates array One struct per rate, see below

Each struct in rates:

Name Type Description
prefix string Destination prefix
country string Country of the destination
description string Description of the destination
rate double Price per minute
local_rate double Price per minute of a local call, when the tariff has local calling enabled
request
call("getAccountRates", {"i_account": 3092, "prefix": "4420", "limit": 50})
response
{
"result": "OK",
"currency": "USD",
"rates": [
{"prefix": "4420", "country": "United Kingdom",
"description": "UK - London", "rate": 0.012, "local_rate": 0.012},
{"prefix": "44207", "country": "United Kingdom",
"description": "UK - London Central", "rate": 0.011, "local_rate": 0.011},
],
}