About List
List operation retrieve instances of an entity. The result contains objects that match the request, including all fields. The data can be paginated, filtered and sorted.
Entities
Following objects can be retrieved using List API:
Object | Object URL |
---|---|
ApprovalPolicy | ApprovalPolicy |
ApprovalPolicyApprover | ApprovalPolicyApprover |
Bill | Bill |
Bill Id | BillPay |
Bill Payment | SentPay |
Chart of Account | ChartOfAccount |
Class | ActgClass |
Customer | Customer |
Contact | CustomerContact |
Department | Department |
Employee | Employee |
Invoice | Invoice |
Invoice Payment | ReceivedPay |
Item | Item |
Job | Job |
Location | Location |
Money Movement | MoneyMovement |
Payment Terms | PaymentTerm |
Profile / User Role | Profile |
User | User |
Vendor | Vendor |
Vendor Bank Account (Special Permissions) | VendorBankAccount |
Vendor Credit | VendorCredit |
To see the object fields and properties, review the API description.
Example
Request
<API_URL_EndPoint>/List/<Object Name>.json
data={
"nested": true,
"start" : 0,
"max" : 999,
"showAudit" : true,
"filters" : [{"field":"", "op":"", "value":""}],
"sort" : [{"field":"", "asc":""}]
}
Pagination
Use start
and max
for pagination. The max number of records returned for each query is 999.
On the first return of 999 records, to ask for the next "page", set the values as follows and repeat as needed.
Example:
"start" : 999,
"max" : 999
Generally, smaller batches are more easily managed. For example, retrieve "start": 0, "max": 100, then "start": 100, "max": 100.
Sorting
Any field can be used as the sort field.
- To sort ascending, pass the field name and
"asc": 1
or"asc": "true"
- To sort descending, pass the field name and
"asc": 0
or"asc": "false"
Show audit log
In your request, set showAudit
as true
to retrieve the user that performed the operation.
Note: showAudit
is available only for /List/Bill.json
and /List/SentPay.json
.
For example, in your /List/Bill.json
request, set showAudit
as true
to retrieve additional information about the user that created a bill in the query result. In the response, the createdBy
value is the ID of the user that created the bill. The ID begins with 006
.
Filter
To narrow results, you can filter by one or more expressions. If more than one expression is specified, the result includes objects that match all the expressions. Each filter is composed of three elements: field, operator, and value.
You can filter any field within an object, with one of these date types:
- ID (Nested object's IDs are not filtered)
- Enum
- Date
- DateTime (except = and != operations):
Format (createdTime, updatedTime) isYYYY-MM-DDThh:mm:ss.sss±hhmm
(ISO 8601 format with time offset from UTC). For example,2021-06-30T07:00:00.000+0000
is 12 AM Pacific Time (7 AM UTC) on June 30, 2021.Information: If your API testing tool does not support URL encoding, replace the
+
sign in the time filter with%2B
. - Name (only = operation supported, can filter by exact match). Available for most objects (vendor, customer, department, etc) and it is case insensitive.
Filter can use the following operators:
Operator | Operation | Example |
---|---|---|
= | equals |
|
< (<) | less than |
|
> (>) | greater than |
|
<= | less than or equal to |
|
>= | greater than or equal to |
|
!= | not equal to |
|
in | value is in enum list (only for enum fields, like status) |
|
nin | value is not in enum list (only for enum fields, like status) |
|
Request
<API_URL_EndPoint>/List/SentPay.json
data={
"nested" : true,
"start" : 0,
"max" : 999,
"showAudit" : true,
"filters" : [{
"field":"updatedTime",
"op":">",
"value":"2016-11-16T02:02:00.000+0000"
},
{
"field":"updatedTime",
"op":"<=",
"value":"2016-12-13T20:32:27.000+0000"
}],
"sort" : [{
"field":"createdTime",
"asc":1
}]
}
Response
{
"response_status" : 0,
"response_message" : "Success",
"response_data" : [{
"entity" : "SentPay",
"id" : "stp01AUXGYKCBGFMaqlc",
"processDate" : "2016-11-28",
"amount" : 1212.00,
"status" : "2",
"description" : "Inv #2342",
"txnNumber" : "CPZNYFRECCXRWGBYMAMQ",
"name" : "P12092701 - 0501023",
"vendorId" : "00901JBDVPAPJQQRffhd",
"isOnline" : true,
"fasterPayment": false,
"paymentType": "1",
"deliveryTypeRequested": "0",
"paymentType" : "0",
"chartOfAccountId" : "0ca01OUABGVXJKGT53j6",
"syncReference" : "432",
"toPrintCheck" : false,
"createdTime": "2021-09-29T23:41:18.452+0000",
"updatedTime": "2021-10-05T23:04:44.000+0000",
"createdBy": "00601TUCJWIHMHXY2b8r",
// Other SentPay response values
"billPays" : [{
"entity" : "BillPay",
"id" : "blp01AUXGYKCBGFMaqlc",
"billId" : "00n01EBFFYCOCATMbno7",
"name" : "P12092701 - 0501023",
"paymentStatus" : "2",
"amount" : 1212.00,
"description" : "Inv #2342",
"processDate" : "2016-11-28",
"createdTime" : "2016-11-27T18:30:49.000+0000",
"updatedTime" : "2016-11-27T18:30:56.000+0000",
"paymentType" : "1",
"syncReference" : "432",
"toPrintCheck" : false,
"chartOfAccountId" : "0ca01OUABGVXJKGT53j6"
}],
"billCredits" : []
},
// Other SentPay responses that match the query filters
}]
}
Parameters
The data fields use the following parameters.
Field Name | Description | Required? |
---|---|---|
nested | Include nested related data, such as BillLineItems in a Bill. | No |
start | The start field for pagination. For the first listing, pass start as 0. Subsequent listings will use max+1 from the previous list API call. |
Yes |
max | The maximum number of objects that need to be returned from the starting index. | Yes |
filters | Filters results that match the criteria. Filters are described above. | No |
sort | Sort results by fields. | No |