Перейти к содержимому

List the rates of a tariff

Это содержимое пока не доступно на вашем языке.

getTariffRatesList returns the rates of one tariff, the same rows as the Rates screen of the tariff in the panel. Use it to export a price list or to compare it with your own system. Rates are ordered by prefix; page through a large tariff with offset and limit. To add or change rates, use the Rates screen or binary upload.

The method supports trusted mode with i_customer.

Name Type Required Description
i_tariff int yes ID of the tariff
offset int no Skip this many rates first
limit int no Return at most this many rates, 1 to 1000. Default 50
Name Type Description
result string OK
rates array One struct per rate, with the fields below
Name Type Description
i_rate int ID of the rate
prefix string Prefix of the destination
interval_1 int Int. 1, sec: length of the first billing interval
interval_n int Int. N, sec: length of each following interval
price_1 double Price 1: price per minute of the first interval, in the tariff currency
price_n double Price N: price per minute of each following interval
forbidden boolean The prefix is a Forbidden Destination. Not returned for an incoming tariff
grace_period_enable boolean Grace: the tariff’s grace period applies to this prefix
activation_date dateTime When the rate becomes active, UTC
expiration_date dateTime When the rate expires, UTC. None means never

For an outgoing tariff with local calling on, each rate also has:

Name Type Description
local_interval_1 int First interval of a local call, seconds
local_interval_n int Each following interval of a local call, seconds
local_price_1 double Price per minute of the first interval of a local call
local_price_n double Price per minute of each following interval of a local call
area_name string Area/State Name: the geographic area of the prefix
request
call("getTariffRatesList", {"i_tariff": 12, "offset": 0, "limit": 2})
response
{
"result": "OK",
"rates": [
{
"i_rate": 80311,
"prefix": "44",
"interval_1": 60,
"interval_n": 60,
"price_1": 0.012,
"price_n": 0.012,
"forbidden": False,
"grace_period_enable": False,
"activation_date": datetime(2026, 1, 15, 0, 0),
"expiration_date": None,
},
{
"i_rate": 80312,
"prefix": "447",
"interval_1": 60,
"interval_n": 60,
"price_1": 0.045,
"price_n": 0.045,
"forbidden": False,
"grace_period_enable": False,
"activation_date": datetime(2026, 1, 15, 0, 0),
"expiration_date": None,
},
],
}