JSON API » incosts » incosts/list
Gets inbound call costs for a rate plan.
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 | |
| plan | Integer | ID of rate plan. 1 for system plan. | Yes | |
| count | Integer | 1 to return a count, 0 to return full data. | No | 0 |
| descending | Integer | 1 to sort descending, 0 not to. | No | 0 |
| ingroup | Integer | ID of inbound group. 0 for all. | No | 0 |
| limit | Integer | The maximum results to return. 0 for all. | No | 0 |
| offset | Integer | The result to start at. 0 for the first. | No | 0 |
| pages | Integer | 1 to return a reduced set of data for generating the pages select box, 0 to return full data. | No | 0 |
| sort | String | Field to sort by. "connectfee", "cost", "end", "included", "increment", "ingroup_name", "ingroup_time_name", "minimum", "priority", or "start". | No | "ingroup_name" |
Responses
| Code | Description |
|---|---|
| 200 | Success. |
| 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. |
Data returned
An array of fields, one row for each cost. Costs are returned in the currency of the rate plan.
Example: With required parameters
http://enswitch.example.com/api/json/incosts/list/?auth_username=user;auth_password=password;plan=1{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ { "id":123, "ingroup_time":1, ... }, { "id":124, "ingroup_time":2, ... } ] }
Change history
| Version | Changes |
|---|---|
| 3.13 | Function added. |
