Retrieve tariff
GET
/show
Retrieve tariff by it's unique ID.
Path parameters
-
access_tokenstring
required
token to be passed as a header -
idinteger
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
-
typestring
type of the rating. -
grace_periodinteger
grace period of the rating. -
price1string
price1 of the rating. -
pricenstring
pricen of the rating. -
idinteger
The id of the tariffs. -
interval1integer
interval1 of the rating. -
call_prefixstring
call prefix of the rating. -
intervalninteger
intervaln of the rating. -
postcall_surchargestring
postcall surcharge of the rating. -
connect_feestring
connect fee of the rating. -
free_secondsinteger
free seconds of the rating.
Sample Response
{}
Destroy tariff
POST
/destroy
Destroy an tariff entry.
Path parameters
-
access_tokenstring
required
token to be passed as a header
Request body
application/json
-
idinteger
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_tokenstring
required
token to be passed as a header
Request body
application/json
-
typestring
required
type of the rating. -
connect_feenumber
required
connect fee of the rating. -
interval1integer
required
interval1 of the rating. -
grace_periodinteger
required
grace period of the rating. -
intervalninteger
required
intervaln of the rating. -
price1number
required
price1 of the rating. -
idinteger
required
The id of the tariffs. -
free_secondsinteger
required
free seconds of the rating. -
pricennumber
required
pricen of the rating. -
postcall_surchargenumber
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_tokenstring
required
token to be passed as a header
Request body
application/json
-
typestring
required
type of the rating. -
interval1integer
required
interval1 of the rating. -
grace_periodinteger
required
grace period of the rating. -
call_prefixstring
required
call prefix of the rating. -
intervalninteger
required
intervaln of the rating. -
price1number
required
price1 of the rating. -
free_secondsinteger
required
free seconds of the rating. -
connect_feenumber
required
connect fee of the rating. -
pricennumber
required
pricen of the rating. -
postcall_surchargenumber
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
-
idinteger
The id of the tariffs.
Sample Response
{
"id": 1234
}
Retrieve a collection of tariffs
GET
/list
Retrieve a collection of tariffs
Path parameters
-
access_tokenstring
required
token to be passed as a header -
paginationinteger
required
The pagination of paging. -
pagesizeinteger
required
The size of paging. -
sort_bystring
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
-
pagesizeinteger
-
countinteger
-
call_ratesarray
Show child attributes -
paginationinteger
-
sort_bystring
Sample Response
{
"pagesize": 10,
"count": 100,
"pagination": 8,
"sort_by": "DEFAULT"
}