JSON API » unlimited » unlimited/update
Updates an existing unlimited access account.
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 | |
| id | Integer | ID of unlimited access account to update. | Yes | |
| callerid_external | String | Callerid on external calls. Empty string for unknown. | No | Current value. |
| callerid_internal | String | Callerid on internal calls. Empty string for unknown. | No | Current value. |
| cos | Integer | ID of class of service. 0 for default. 1 for system COS that allows all calls. | No | Current value. |
| currency | String | Currency prices are in. | No | Current value. |
| days_week | String | Days of the week when active, separated by commas. Monday=1, Sunday=7. For example, "1,2,3,4,5" for week days. | No | Current value. |
| description | String | Description. | No | Current value. |
| dialplan | String | Dial plan for outbound calls. Empty string for default dial plan. | No | Current value. |
| endhour | Integer | End hour from 0 to 23. | No | Current value. |
| endminute | Integer | End minute from 0 to 59. | No | Current value. |
| endsecond | Integer | End second from 0 to 59 | No | Current value. |
| locked | Integer | 1 if account is locked, 0 if not. | No | Current value. |
| maximum_connectfee | Decimal | Maximum connect fee on outbound call to allow. -1 for no limit. | No | Current value. |
| maximum_cost | Decimal | Maximum cost per minute on outbound call to allow. -1 for no limit. | No | Current value. |
| maximum_seconds | Integer | Maximum seconds to let outbound call run for. -1 for no limited. | No | Current value. |
| minimum_percentage | Decimal | Minimum profit margin as a percentage to allow outbound call. | No | Current value. |
| minimum_profit | Decimal | Minimum profit per minute to allow outbound call. | No | Current value. |
| name | String | Name. | No | Current value. |
| panel | Integer | 1 to show in control panel, 0 not to. | No | Current value. |
| ring_after_answer | Integer | Seconds to play ringing for after answering. 0 to disable. | No | Current value. |
| starthour | Integer | Start hour from 0 to 23. | No | Current value. |
| startminute | Integer | Start minute from 0 to 59. | No | Current value. |
| startsecond | Integer | Start second from 0 to 59. | No | Current value. |
| validation | Integer | 1 to validate input then return, 0 for full action. | No | 0 |
Responses
| Code | Description |
|---|---|
| 201 | Input passed validation. Only returned if validation=1. |
| 204 | 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. |
| 404 | The unlimited access account does not exist, or you do not have permission to update it. |
Data returned
No data is returned.
Example: Changing the name
http://enswitch.example.com/api/json/unlimited/update/?auth_username=user;auth_password=password;id=123;name=example{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }
Change history
| Version | Changes |
|---|---|
| 3.14 | cos input parameter changed to allow 0 for default and 1 to allow all calls. |
| 3.13 | Function added. |
