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

Responses

200
Successful operation
application/json
  • call_rates

    array

    Show child attributes
  • pagination

    integer

  • count

    integer

  • sort_by

    string

  • pagesize

    integer

Sample Response

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

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

    integer

    required

    grace period of the rating.
  • postcall_surcharge

    number

    required

    postcall surcharge of the rating.
  • free_seconds

    integer

    required

    free seconds of the rating.
  • type

    string

    required

    type of the rating.
  • connect_fee

    number

    required

    connect fee of the rating.
  • interval1

    integer

    required

    interval1 of the rating.
  • pricen

    number

    required

    pricen of the rating.
  • id

    integer

    required

    The userid of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.
  • price1

    number

    required

    price1 of the rating.
  • 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

                      
                      
                    

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 userid of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.

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

400
Invalid tariff ID supplied.
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.

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

    number

    postcall surcharge of the rating.
  • type

    string

    type of the rating.
  • pricen

    number

    pricen of the rating.
  • free_seconds

    integer

    free seconds of the rating.
  • price1

    number

    price1 of the rating.
  • grace_period

    integer

    grace period of the rating.
  • interval1

    integer

    interval1 of the rating.
  • id

    integer

    The userid of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.
  • call_prefix

    string

    call prefix of the rating.
  • connect_fee

    number

    connect fee of the rating.
  • intervaln

    integer

    intervaln of the rating.

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

    integer

    required

    grace period of the rating.
  • postcall_surcharge

    number

    required

    postcall surcharge of the rating.
  • free_seconds

    integer

    required

    free seconds of the rating.
  • type

    string

    required

    type of the rating.
  • connect_fee

    number

    required

    connect fee of the rating.
  • interval1

    integer

    required

    interval1 of the rating.
  • pricen

    number

    required

    pricen of the rating.
  • call_prefix

    string

    required

    call prefix of the rating.
  • price1

    number

    required

    price1 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 userid of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.

Sample Response

                      
{
    "id": 1234
}