Create special rate
POST/rates/special
rates.special.create
Request​
- application/json
Bodyrequired
Rate table ID.
Destination code name. The code name will be unfolded to the list of all respective codes under the hood.
Effective date.
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 profile ID.
End date. If not defined, the rate is active till the next effective date of the next rate with the same code.
null
Minimum billed volume. To be defined in the units of
rating_params_units_id
attribute of the respective service.
Possible values: >= 1
1
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
1
Setup fee. Charged when volume of the event is not zero.
0
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
0
Tag.
@
Maximum dst number length. If destination number does not match the length, the rate will not be applied.
Possible values: >= 1
null
Minimum dst number length. If destination number does not match the length, the rate will not be applied.
Possible values: >= 1
null
Notes.
null
Status.
Possible values: [active
, stashed
]
active
If True
, the rates with the same code for the future
will be set in stashed
status.
false
If True
, the notification will be sent after new
rate creation.
false
Responses​
- 200
- 400
- 401
- 404
- 422
- 500
List containing the special rate created and all corresponding regular rates objects as have been stored.
- application/json
- Schema
- Example (auto)
Schema
- Array [
- ]
[
{}
]
The request contains invalid arguments or is malformed
- application/json
- Schema
- Example (auto)
Schema
error object
{
"error": {
"message": "Invalid request",
"data": {
"name": "Empty value is not allowed",
"payment_terms_id": "Object \"payment_terms(123)\" was not found!"
}
}
}
Access is not authorized
- application/json
- Schema
- Example (auto)
Schema
error object
{
"error": {
"message": "utoken-auth-failed: Authentication Failed: IP 10.0.0.1 is not allowed",
"data": {
"code": "utoken-auth-failed",
"message": "Authentication Failed: IP 10.0.0.1 is not allowed"
}
}
}
Requested object was not found
- application/json
- Schema
- Example (auto)
Schema
error object
{
"error": {
"message": "not_found: Object \"clients(123)\" was not found!",
"data": {
"code": "not_found",
"message": "Object \"clients(123)\" was not found!",
"object_name": "clients",
"object_id": "123"
}
}
}
A logical error occurred, making the request unprocessable
- application/json
- Schema
- Example (auto)
Schema
error object
{
"error": {
"message": "invoices-zero-amount: Impossible to create an invoice with zero amount",
"data": {
"code": "invoices-zero-amount",
"message": "Impossible to create an invoice with zero amount"
}
}
}
An unexpected error occurred
- application/json
- Schema
- Example (auto)
Schema
error object
{
"error": {
"message": "An unexpected error occurred"
}
}
Authorization: X-Api-Key
name: X-Api-Keytype: apiKeyin: headerdescription: Token for API access
- curl
- python
- nodejs
- php
- CURL
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>'