JSON API » transactions » transactions/list

Gets the fields of transactions in the given customer.

Input parameters

Requires authentication and the reports role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
startIntegerStart Unix timestamp.Recommended0
endIntegerEnd Unix timestamp.RecommendedNow.
archiveInteger1 to include archived transactions, 0 not to.No0
customerIntegerID of customer to get transactions for.NoCustomer of authentication user.
invoiceIntegerID of invoice to return transactions for. 0 for all.No0
sortStringField to sort by. "amount", "description", "id", "person", "reference", "time", or "type".No"time"
descendingInteger1 to sort descending, 0 not to.No0

Failure to specify the start and end may put a heavy load on the database.

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.
403Your rate plan does not allow this.

Data returned

An array of fields, corresponding to the rows of the transactions table in the database.

Example: With required and recommended parameters

http://enswitch.example.com/api/json/transactions/list/?auth_username=user;auth_password=password;start=1230000000;end=1240000000

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ { "id":1, "amount":"1.00", ... }, { "id":2, "amount":"2.00", ... } ] }

Change history

VersionChanges
4.0archive input parameter added.
3.14end input parameter changed to return data < value instead of <= value.
3.13Function added.