JSON API » incosts » incosts/update

Updates an existing inbound call cost.

Input parameters

Requires authentication and the commerce role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
idIntegerID of the cost.Yes
connectfeeDecimalA connect fee charged on answer.NoCurrent value.
costDecimalThe cost per minute after the included seconds are used.NoCurrent value.
descriptionStringDescription.NoCurrent value.
endIntegerThe Unix timestamp after which this cost no longer applies. -1 for never.NoCurrent value.
includedIntegerThe number of seconds included free with the connectfee.NoCurrent value.
incrementIntegerBilling increment in seconds.NoCurrent value.
messageDecimalThe cost to send a message.NoCurrent value.
minimumDecimalAn overall minimum cost for the call if answered.NoCurrent value.
priorityIntegerThe priority from 1 to 10.NoCurrent value.
startIntegerThe Unix timestamp from which this cost applies.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.
403Your rate plan does not allow this.
404The cost does not exist, or you do not have permission to update it.

Data returned

No data is returned.

Example: Updating the per-minute cost

http://enswitch.example.com/api/json/incosts/update/?auth_username=user;auth_password=password;id=123;cost=0.12

{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }

Change history

VersionChanges
3.13Function added.