Retrieve tariff
GET
/show
Retrieve tariff by it's unique ID.
Path parameters
-
access_token
string
required
token to be passed as a header -
id
integer
required
The unique ID of tariff.
Sample Request
curl -v -X GET http://127.0.0.1:8990/api/tariff/show \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
Responses
200
Successful operation
application/json
-
type
string
type of the rating. -
grace_period
integer
grace period of the rating. -
price1
string
price1 of the rating. -
pricen
string
pricen of the rating. -
id
integer
The id of the tariffs. -
interval1
integer
interval1 of the rating. -
call_prefix
string
call prefix of the rating. -
intervaln
integer
intervaln of the rating. -
postcall_surcharge
string
postcall surcharge of the rating. -
connect_fee
string
connect fee of the rating. -
free_seconds
integer
free seconds of the rating.
Sample Response
{}
Destroy tariff
POST
/destroy
Destroy an tariff entry.
Path parameters
-
access_token
string
required
token to be passed as a header
Request body
application/json
-
id
integer
required
The id of the tariffs.
Sample Request
curl -v -X POST http://127.0.0.1:8990/api/tariff/destroy \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
-d '{
"id": 1234
}'
Responses
200
Successful operation
400
Invalid tariff ID supplied.
Sample Response
Update tariff
POST
/update
Update tariff
Path parameters
-
access_token
string
required
token to be passed as a header
Request body
application/json
-
type
string
required
type of the rating. -
connect_fee
number
required
connect fee of the rating. -
interval1
integer
required
interval1 of the rating. -
grace_period
integer
required
grace period of the rating. -
intervaln
integer
required
intervaln of the rating. -
price1
number
required
price1 of the rating. -
id
integer
required
The id of the tariffs. -
free_seconds
integer
required
free seconds of the rating. -
pricen
number
required
pricen of the rating. -
postcall_surcharge
number
required
postcall surcharge of the rating.
Sample Request
curl -v -X POST http://127.0.0.1:8990/api/tariff/update \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
-d '{
"id": 1234
}'
Responses
200
Successful operation
Sample Response
Create an tariff entry.
POST
/create
Add a new tariff entry into system.
Path parameters
-
access_token
string
required
token to be passed as a header
Request body
application/json
-
type
string
required
type of the rating. -
interval1
integer
required
interval1 of the rating. -
grace_period
integer
required
grace period of the rating. -
call_prefix
string
required
call prefix of the rating. -
intervaln
integer
required
intervaln of the rating. -
price1
number
required
price1 of the rating. -
free_seconds
integer
required
free seconds of the rating. -
connect_fee
number
required
connect fee of the rating. -
pricen
number
required
pricen of the rating. -
postcall_surcharge
number
required
postcall surcharge of the rating.
Sample Request
curl -v -X POST http://127.0.0.1:8990/api/tariff/create \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
-d '{}'
Responses
200
Created tariff
application/json
-
id
integer
The id of the tariffs.
Sample Response
{
"id": 1234
}
Retrieve a collection of tariffs
GET
/list
Retrieve a collection of tariffs
Path parameters
-
access_token
string
required
token to be passed as a header -
pagination
integer
required
The pagination of paging. -
pagesize
integer
required
The size of paging. -
sort_by
string
optional
Values include "DEFAULT" and "Optional". Default value will be used when user does not specify value for this field.
Sample Request
curl -v -X GET http://127.0.0.1:8990/api/tariff/list \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
Responses
200
Successful operation
application/json
-
pagesize
integer
-
count
integer
-
call_rates
array
-
pagination
integer
-
sort_by
string
Sample Response
{
"pagesize": 10,
"count": 100,
"pagination": 8,
"sort_by": "DEFAULT"
}