JSON API » unlimited » unlimited/update

Updates an existing unlimited access account.

Input parameters

Requires authentication and the commerce role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
idIntegerID of unlimited access account to update.Yes
callerid_externalStringCallerid on external calls. Empty string for unknown.NoCurrent value.
callerid_internalStringCallerid on internal calls. Empty string for unknown.NoCurrent value.
cosIntegerID of class of service. 0 for default. 1 for system COS that allows all calls.NoCurrent value.
currencyStringCurrency prices are in.NoCurrent value.
days_weekStringDays of the week when active, separated by commas. Monday=1, Sunday=7. For example, "1,2,3,4,5" for week days.NoCurrent value.
descriptionStringDescription.NoCurrent value.
dialplanStringDial plan for outbound calls. Empty string for default dial plan.NoCurrent value.
endhourIntegerEnd hour from 0 to 23.NoCurrent value.
endminuteIntegerEnd minute from 0 to 59.NoCurrent value.
endsecondIntegerEnd second from 0 to 59NoCurrent value.
lockedInteger1 if account is locked, 0 if not.NoCurrent value.
maximum_connectfeeDecimalMaximum connect fee on outbound call to allow. -1 for no limit.NoCurrent value.
maximum_costDecimalMaximum cost per minute on outbound call to allow. -1 for no limit.NoCurrent value.
maximum_secondsIntegerMaximum seconds to let outbound call run for. -1 for no limited.NoCurrent value.
minimum_percentageDecimalMinimum profit margin as a percentage to allow outbound call.NoCurrent value.
minimum_profitDecimalMinimum profit per minute to allow outbound call.NoCurrent value.
nameStringName.NoCurrent value.
panelInteger1 to show in control panel, 0 not to.NoCurrent value.
ring_after_answerIntegerSeconds to play ringing for after answering. 0 to disable.NoCurrent value.
starthourIntegerStart hour from 0 to 23.NoCurrent value.
startminuteIntegerStart minute from 0 to 59.NoCurrent value.
startsecondIntegerStart second from 0 to 59.NoCurrent value.
validationInteger1 to validate input then return, 0 for full action.No0

Responses

CodeDescription
201Input passed validation. Only returned if validation=1.
204Success.
400Invalid input parameters specified. Check the key and message fields for more details.
401The authentication details provided are invalid.
402Your role does not allow this.
404The 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

VersionChanges
3.14cos input parameter changed to allow 0 for default and 1 to allow all calls.
3.13Function added.