Skip to main content

Create special rate

POST 

/rates/special

JSON-RPC

rates.special.create

Request​

Bodyrequired

    rate_tables_idintegerrequired

    Rate table ID.

    code_namestringrequired

    Destination code name. The code name will be unfolded to the list of all respective codes under the hood.

    effective_fromdate-timerequired

    Effective date.

    valuedecimalrequired

    Rate for a single unit of the event. The unit is defined by rating_units_id attribute of the respective service.

    Possible values: >= -999999999 and <= 999999999

    time_profiles_idintegerrequired

    Time profile ID.

    end_datedate-timenullable

    End date. If not defined, the rate is active till the next effective date of the next rate with the same code.

    Default value: null
    min_volumeinteger

    Minimum billed volume. To be defined in the units of rating_params_units_id attribute of the respective service.

    Possible values: >= 1

    Default value: 1
    pay_intervalinteger

    Payment interval. Applied when volume of the event is greater than min_volume. To be defined in the units of rating_params_units_id attribute of the respective service.

    Possible values: >= 1

    Default value: 1
    pay_setupdecimal

    Setup fee. Charged when volume of the event is not zero.

    Default value: 0
    grace_volumeinteger

    Volume below which events will not be billed. To be defined in the units of rating_params_units_id attribute of the respective service.

    Possible values: >= 0

    Default value: 0
    tagstring

    Tag.

    Default value: @
    num_length_maxinteger | nullnullable

    Maximum dst number length. If destination number does not match the length, the rate will not be applied.

    Possible values: >= 1

    Default value: null
    num_length_mininteger | nullnullable

    Minimum dst number length. If destination number does not match the length, the rate will not be applied.

    Possible values: >= 1

    Default value: null
    notesstring | nullnullable

    Notes.

    Default value: null
    statusstring

    Status.

    Possible values: [active, stashed]

    Default value: active
    stash_futureboolean

    If True, the rates with the same code for the future will be set in stashed status.

    Default value: false
    force_notificationboolean

    If True, the notification will be sent after new rate creation.

    Default value: false

Responses​

List containing the special rate created and all corresponding regular rates objects as have been stored.

Schema
  • Array [
  • object
  • ]

Authorization: X-Api-Key

name: X-Api-Keytype: apiKeyin: headerdescription: Token for API access
curl -L -X POST 'https://docs.jerasoft.net/rates/special' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Api-Key: <X-Api-Key>'
Request Collapse all
Auth
Body required
{
  "rate_tables_id": 0,
  "code_name": "string",
  "effective_from": "2024-07-29T15:51:28.071Z",
  "value": 0,
  "time_profiles_id": 0,
  "min_volume": 1,
  "pay_interval": 1,
  "pay_setup": 0,
  "grace_volume": 0,
  "tag": "@",
  "status": "active",
  "stash_future": false,
  "force_notification": false
}