JSON API » incosts » incosts/create
Creates a new inbound call cost.
Input parameters
Requires authentication and the commerce role privilege.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
ingroup_time | Integer | ID of the ingroup_time. | Yes | |
plan | Integer | ID of the rate plan. 1 for system plan. | Yes | |
connectfee | Decimal | A connect fee charged on answer. | No | 0.00 |
cost | Decimal | The cost per minute after the included seconds are used. | No | 0.00 |
description | String | Description. | No | Empty string. |
end | Integer | The Unix timestamp after which this cost no longer applies. -1 for never. | No | -1 |
included | Integer | The number of seconds included free with the connectfee. | No | 0 |
increment | Integer | Billing increment in seconds. | No | 1 |
message | Decimal | The cost to send a message. | No | 0.00 |
minimum | Decimal | An overall minimum cost for the call if answered. | No | 0.00 |
priority | Integer | The priority from 1 to 10. | No | 1 |
start | Integer | The Unix timestamp from which this cost applies. | No | -1 |
validation | Integer | 1 to validate input then return, 0 for full action. | No | 0 |
Responses
Code | Description |
---|---|
200 | Success. |
201 | Input passed validation. Only returned if validation=1. |
400 | Invalid input parameters specified. Check the key and message fields for more details. |
401 | The authentication details provided are invalid. |
402 | Your role does not allow this. |
403 | Your rate plan not allow this. |
Data returned
No data is returned.
Example: With required parameters
http://enswitch.example.com/api/json/incosts/create/?auth_username=user;auth_password=password;ingroup_time=123;plan=1{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }
Change history
Version | Changes |
---|---|
3.13 | Function added. |