Retrieve the tariff list
GET
/tariff/list
Request
Placeholders
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.pagination
integer
required
The pagination of paging.pagesize
integer
optional
The pagesize of paging.sort_by
enum
optional
Values include "DEFAULT" and "Optional". Default value will be used when user does not specify value for this field.
Sample Request
https://example.com/api/tariff/list?access_token=196ACE20C6F34027895F7F95402BB164&pagesize=100&pagination=1&sort_by=DEFAULT
Response
Placeholders
pagination
integer
required
The pagination of paging.pagesize
integer
optional
The pagesize of paging.sort_by
enum
optional
Values include "DEFAULT" and "Optional". Default value will be used when user does not specify value for this field.page_count
integer
required
The total count of pages.count
integer
required
Current pagesize.call_rates
array
required
Show child attributesCollection of blacklisted numbers.
Sample Response
{
"pagination": 1,
"pagesize": 100,
"sort_by": "DEFAULT",
"page_count": 100,
"count": 100,
"call_rates": [
{
"call_prefix": "101",
"name": "xxxx",
"rate_in": "1.0",
"rate_out": "2.0",
"chronon": 60
},
{
"black_number": "102",
"name": "xxxx",
"rate_in": "1.0",
"rate_out": "2.0",
"chronon": 60
}
]
}
Retrieve the tariff
GET
/tariff/show
Request
Placeholders
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.call_prefix
string
required
Sample Request
https://example.com/api/tariff/show?access_token=196ACE20C6F34027895F7F95402BB164&call_prefix=101
Response
Placeholders
call_prefix
string
required
name
string
required
rate_in
string
required
rate_out
string
required
chronon
integer
required
Sample Response
{
"call_prefix": "101",
"name": "xxxx",
"rate_in": "1.0",
"rate_out": "2.0",
"chronon": 60
}
Add an tariff
POST
/tariff/create
Placeholders
Request
Placeholders
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.call_prefix
string
required
name
string
required
rate_in
string
required
rate_out
string
required
chronon
integer
required
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"call_prefix": "101",
"name": "xxxx",
"rate_in": "1.0",
"rate_out": "2.0",
"chronon": 60
}
Response
Placeholders
Sample Response
Add an tariff
POST
/tariff/update
Placeholders
Request
Placeholders
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.call_prefix
string
required
name
string
required
rate_in
string
required
rate_out
string
required
chronon
integer
required
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"call_prefix": "101",
"name": "xxxx",
"rate_in": "1.0",
"rate_out": "2.0",
"chronon": 60
}
Response
Placeholders
Sample Response
Remove an tariff
POST
/tariff/destroy
Placeholders
Request
Placeholders
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.call_prefix
string
required
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"call_prefix": "101"
}
Response
Placeholders
Sample Response
Remove all tariff
POST
/tariff/destroy/all
Placeholders
Request
Placeholders
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164"
}
Response
Placeholders