JSON API » incosts » incosts/create

Creates a new inbound call cost.

Input parameters

Requires authentication and the commerce role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
ingroup_timeIntegerID of the ingroup_time.Yes
planIntegerID of the rate plan. 1 for system plan.Yes
connectfeeDecimalA connect fee charged on answer.No0.00
costDecimalThe cost per minute after the included seconds are used.No0.00
descriptionStringDescription.NoEmpty string.
endIntegerThe Unix timestamp after which this cost no longer applies. -1 for never.No-1
includedIntegerThe number of seconds included free with the connectfee.No0
incrementIntegerBilling increment in seconds.No1
messageDecimalThe cost to send a message.No0.00
minimumDecimalAn overall minimum cost for the call if answered.No0.00
priorityIntegerThe priority from 1 to 10.No1
startIntegerThe Unix timestamp from which this cost applies.No-1
validationInteger1 to validate input then return, 0 for full action.No0

Responses

CodeDescription
200Success.
201Input passed validation. Only returned if validation=1.
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 not allow this.

Data returned

No data is returned.

Example: With required parameters

http://enswitch.example.com/api/json/incosts/create/?auth_username=user;auth_password=password;ingroup_time=123;plan=1

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

Change history

VersionChanges
3.13Function added.