Call rates

List call rates

get

Retrieve a collection of call rates

Authorizations
Query parameters
filterstringOptional

Use the filter query parameter to retrieve just a subset of a collection.

searchstringOptional

Use the search query parameter to restrict the results of a request to match a search criterion.

orderbystringOptional

Use the orderby query parameter to specify the sort order of the items returned from server.
The default order is ascending order.

skipinteger · int32Optional

Use the skip query parameter to set the number of items to skip at the start of a collection.

Default: 0
topinteger · int32 · min: 1 · max: 100Optional

Use the top query parameter to specify the page size of the result set.

Default: 100
Responses
200
OK
application/json
get
GET /api/call_rates HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "count": 100,
  "items": [
    {
      "id": "NzAwNTUxOTA5NzczMTQ4MTYw",
      "prefix": "text",
      "type": "LOCAL",
      "free_seconds": 1,
      "grace_period": 1,
      "interval_1": 1,
      "interval_n": 1,
      "postcall_surcharge": 1,
      "price_1": 1,
      "price_n": 1,
      "description": "text"
    }
  ]
}

Create a call rate

post

Add a new call rate into system.

Authorizations
Body
prefixstring · min: 1 · max: 64Required

The call prefix of the rating.

typestring · enumRequired

The type of the rating:
Can be either:

  • LOCAL:
  • NATIONAL:
  • INTERNATIONAL:
  • MOBILE:
Default: LOCALPossible values:
free_secondsinteger · int32Required

Free seconds of the rating.

grace_periodinteger · int32Required

Grace period of the rating.

interval_1integer · int32 · min: 1Required

The first interval of the rating.

interval_ninteger · int32 · min: 1Required

The subsequent interval of the rating after the first one.

connect_feenumber · doubleRequired

Connect fee of the rating. Precision is five digits.

postcall_surchargenumber · doubleRequired

Postcall surcharge of the rating. Precision is five digits.

price_1number · doubleRequired

The price of the first interval. Precision is five digits.

price_nnumber · doubleRequired

The price of the subsequent interval after the first one. Precision is five digits.

descriptionstring · max: 1024Optional

The description text for this rule.

Responses
200
OK
application/json
post
POST /api/call_rates HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 180

{
  "prefix": "text",
  "type": "LOCAL",
  "free_seconds": 1,
  "grace_period": 1,
  "interval_1": 1,
  "interval_n": 1,
  "connect_fee": 1,
  "postcall_surcharge": 1,
  "price_1": 1,
  "price_n": 1,
  "description": "text"
}
{
  "id": "NzAwNTUxOTA5NzczMTQ4MTYw"
}

Retrieve a call rate

get

Retrieve call rate by it's unique ID.

Authorizations
Path parameters
idall ofRequired

The unique ID of billing.

stringOptional

The unique ID of the resource.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
200
OK
application/json
get
GET /api/call_rates/{id} HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "NzAwNTUxOTA5NzczMTQ4MTYw",
  "prefix": "text",
  "type": "LOCAL",
  "free_seconds": 1,
  "grace_period": 1,
  "interval_1": 1,
  "interval_n": 1,
  "connect_fee": 1,
  "postcall_surcharge": 1,
  "price_1": 1,
  "price_n": 1,
  "description": "text"
}

Update a call rate

post

Update call rate.

Authorizations
Path parameters
idall ofRequired

The unique ID of billing.

stringOptional

The unique ID of the resource.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
Body
prefixstring · min: 1 · max: 64Optional

The call prefix of the rating.

typestring · enumOptional

The type of the rating:
Can be either:

  • LOCAL:
  • NATIONAL:
  • INTERNATIONAL:
  • MOBILE:
Default: LOCALPossible values:
free_secondsinteger · int32Optional

Free seconds of the rating.

grace_periodinteger · int32Optional

Grace period of the rating.

interval_1integer · int32 · min: 1Optional

The first interval of the rating.

interval_ninteger · int32 · min: 1Optional

The subsequent interval of the rating after the first one.

connect_feenumber · doubleOptional

Connect fee of the rating. Precision is five digits.

postcall_surchargenumber · doubleOptional

Postcall surcharge of the rating. Precision is five digits.

price_1number · doubleOptional

The price of the first interval. Precision is five digits.

price_nnumber · doubleOptional

The price of the subsequent interval after the first one. Precision is five digits.

descriptionstring · max: 1024Optional

The description text for this rule.

Responses
200
OK
post
POST /api/call_rates/{id} HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 180

{
  "prefix": "text",
  "type": "LOCAL",
  "free_seconds": 1,
  "grace_period": 1,
  "interval_1": 1,
  "interval_n": 1,
  "connect_fee": 1,
  "postcall_surcharge": 1,
  "price_1": 1,
  "price_n": 1,
  "description": "text"
}

No content