JSON API » outcosts » outcosts/customer/list

Gets outbound call costs to a customer.

Input parameters

Requires authentication and the administrator or reports role privileges.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
customerIntegerID of customer to get costs for.NoCustomer of authentication user.
destinationStringGet costs for this called number. Empty string for none.NoEmpty string.
planIntegerID of rate plan.NoPlan customer is on.
searchStringOnly return results for outbound groups containing this string. Empty string for any.NoEmpty string.
countInteger1 to return a count, 0 to return full data.No0
limitIntegerThe maximum results to return. 0 for all.No0
offsetIntegerThe result to start at. 0 for the first.No0
pagesInteger1 to return a reduced set of data for generating the pages select box, 0 to return full data.No0
taxesInteger1 to include taxes, 0 not to.No0

destination cannot be used with search.

Responses

CodeDescription
200Success.
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.
404There is no route to this destination.

Data returned

An array of fields, one row for each cost. Costs are returned in the currency of the authentication user.

Example: With required parameters

http://enswitch.example.com/api/json/outcosts/customer/list/?auth_username=user;auth_password=password

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ { "id":123, "outgroup_time":1, ... }, { "id":124, "outgroup_time":2, ... } ] }

Change history

VersionChanges
3.14taxes input parameter added.
3.13Function added.