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

    number

    required

    pricen of the rating.

    format : double

  • interval1

    integer

    required

    interval1 of the rating.
  • connect_fee

    number

    required

    connect fee of the rating.

    format : double

  • price1

    number

    required

    price1 of the rating.

    format : double

  • grace_period

    integer

    required

    grace period of the rating.
  • postcall_surcharge

    number

    required

    postcall surcharge of the rating.

    format : double

  • type

    string

    required

    type of the rating.

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

  • free_seconds

    integer

    required

    free seconds of the rating.
  • id

    integer

    required

    The id of the tariffs.

    format : int64

  • intervaln

    integer

    required

    intervaln of the rating.

Sample Request

                      curl -v -X POST http://127.0.0.1:8990/api/tariffs/update \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{
    "id": 1234
}'
                      
                    

Responses

200
Successful operation

Sample Response

                      
                      
                    

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/tariffs/show \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                      
                    

Responses

200
Successful operation
application/json
  • id

    integer

    The id of the tariffs.

    format : int64

  • call_prefix

    string

    call prefix of the rating.
  • postcall_surcharge

    number

    postcall surcharge of the rating.

    format : double

  • connect_fee

    number

    connect fee of the rating.

    format : double

  • free_seconds

    integer

    free seconds of the rating.
  • pricen

    number

    pricen of the rating.

    format : double

  • interval1

    integer

    interval1 of the rating.
  • grace_period

    integer

    grace period of the rating.
  • price1

    number

    price1 of the rating.

    format : double

  • type

    string

    type of the rating.

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

  • intervaln

    integer

    intervaln of the rating.

Sample Response

                      
{}
                      
                    

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/tariffs/list \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                      
                    

Responses

200
Successful operation
application/json
  • sort_by

    string

  • pagesize

    integer

  • pagination

    integer

  • call_rates

    array

    Show child attributes
  • count

    integer

Sample Response

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

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/tariffs/destroy \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{
    "id": 1234
}'
                      
                    

Responses

200
Successful operation
400
Invalid tariff ID supplied.

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

    number

    required

    pricen of the rating.

    format : double

  • interval1

    integer

    required

    interval1 of the rating.
  • connect_fee

    number

    required

    connect fee of the rating.

    format : double

  • price1

    number

    required

    price1 of the rating.

    format : double

  • call_prefix

    string

    required

    call prefix of the rating.
  • grace_period

    integer

    required

    grace period of the rating.
  • postcall_surcharge

    number

    required

    postcall surcharge of the rating.

    format : double

  • type

    string

    required

    type of the rating.

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

  • free_seconds

    integer

    required

    free seconds of the rating.
  • intervaln

    integer

    required

    intervaln of the rating.

Sample Request

                      curl -v -X POST http://127.0.0.1:8990/api/tariffs/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
}