Retrieve tariff

GET /show
Retrieve tariff by it's unique ID.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

  • id

    integer

    required

    The unique ID of tariff.

    format : int64

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.

    enum : ['NONE', 'INCOMING', 'OUTGOING']

  • grace_period

    integer

    grace period of the rating.
  • price1

    string

    price1 of the rating.

    format : double

  • pricen

    string

    pricen of the rating.

    format : double

  • id

    integer

    The id of the tariffs.

    format : int64

  • 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.

    format : double

  • connect_fee

    string

    connect fee of the rating.

    format : double

  • 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

    minLength: 64

    maxLength: 64

Request body
application/json
  • id

    integer

    required

    The id of the tariffs.

    format : int64

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

    minLength: 64

    maxLength: 64

Request body
application/json
  • type

    string

    required

    type of the rating.

    enum : ['NONE', 'INCOMING', 'OUTGOING']

  • connect_fee

    number

    required

    connect fee of the rating.

    format : double

  • 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.

    format : double

  • id

    integer

    required

    The id of the tariffs.

    format : int64

  • free_seconds

    integer

    required

    free seconds of the rating.
  • pricen

    number

    required

    pricen of the rating.

    format : double

  • postcall_surcharge

    number

    required

    postcall surcharge of the rating.

    format : double

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

    minLength: 64

    maxLength: 64

Request body
application/json
  • type

    string

    required

    type of the rating.

    enum : ['NONE', 'INCOMING', 'OUTGOING']

  • 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.

    format : double

  • free_seconds

    integer

    required

    free seconds of the rating.
  • connect_fee

    number

    required

    connect fee of the rating.

    format : double

  • pricen

    number

    required

    pricen of the rating.

    format : double

  • postcall_surcharge

    number

    required

    postcall surcharge of the rating.

    format : double

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.

    format : int64

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

    minLength: 64

    maxLength: 64

  • pagination

    integer

    required

    The pagination of paging.

    format : int32

  • 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.

    enum : ['DEFAULT', 'OPTIONAL']

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

    Show child attributes
  • pagination

    integer

  • sort_by

    string

Sample Response

                      
{
    "pagesize": 10,
    "count": 100,
    "pagination": 8,
    "sort_by": "DEFAULT"
}