JSON API » unlimited » unlimited/create
Creates a new 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 | |
name | String | Name. | Yes | |
callerid_external | String | Callerid on external calls. Empty string for unknown. | No | Empty string. |
callerid_internal | String | Callerid on internal calls. Empty string for unknown. | No | Empty string. |
cos | Integer | Class of service. 1 for system COS that allows all calls. | No | 1 |
currency | String | Currency prices are in. | No | System currency. |
customer | Integer | ID of customer to create in. | No | Customer of authentication user. |
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 | "1,2,3,4,5,6,7" |
description | String | Description. | No | Empty string. |
dialplan | String | Dial plan for outbound calls. Empty string for default dial plan. | No | Empty string. |
endhour | Integer | End hour from 0 to 23. | No | 23 |
endminute | Integer | End minute from 0 to 59. | No | 59 |
endsecond | Integer | End second from 0 to 59 | No | 59 |
locked | Integer | 1 if account is locked, 0 if not. | No | 0 |
maximum_connectfee | Decimal | Maximum connect fee on outbound call to allow. -1 for no limit. | No | -1 |
maximum_cost | Decimal | Maximum cost per minute on outbound call to allow. -1 for no limit. | No | -1 |
maximum_seconds | Integer | Maximum seconds to let outbound call run for. -1 for no limited. | No | -1 |
minimum_percentage | Decimal | Minimum profit margin as a percentage to allow outbound call. | No | 0.0 |
minimum_profit | Decimal | Minimum profit per minute to allow outbound call. | No | 0.00 |
panel | Integer | 1 to show in control panel, 0 not to. | No | 0 |
ring_after_answer | Integer | Seconds to play ringing for after answering. 0 to disable. | No | 0 |
starthour | Integer | Start hour from 0 to 23. | No | 0 |
startminute | Integer | Start minute from 0 to 59. | No | 0 |
startsecond | Integer | Start second from 0 to 59. | No | 0 |
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. |
Data returned
The ID of the created unlimited access account.
Example: With required parameters
http://enswitch.example.com/api/json/unlimited/create/?auth_username=user;auth_password=password;name=example{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "id":123 } }
Change history
Version | Changes |
---|---|
3.13 | Function added. |