All top level resources have support to bulk fetch objects through the "list" API. It uses HTTP POST. For e.g., you can list customers, list transactions, list accounts. These list API's share a common structure and accept, at a minimum below parameters:
Parameter
Description
criteria.filter
Allows you to filter the data based on multiple criteria supported by each resource; most importantly, based on audit fields like createdOn, lastUpdateOn. The response displays entity records that meet the defined filter criteria in the request.
The request contains three important parameters - key, operator, value
key: Key for a resource can be any attribute for the resource.
operator: Supported Values to the filter the data include:
eq: exact value passed.
ne: not matching the value passed.
lt: value less than the filtered value for the stated field. Applicable to fields with type: date, timestamp, big Decimal, integer, long.
gt: value greater than the filtered value for the stated field. Applicable to fields with type: date, timestamp, big Decimal, integer, long.
lte: value less than the filtered value for the stated field. Applicable to fields with type date, timestamp, big Decimal, integer, long
gte: value greater than the filtered value for the stated field. Applicable to fields with type date, timestamp, big Decimal, integer, long.
in: value equal to one of the strings passed in the stated field.
like: result should be consistent with the value passed. For field type string, it allows partial search along with full search.
values: User is required to provide the filtered value(s) for the field. In case of multiple values, each value should be separated by a comma (,)
limit
Specifies a limit on the number of objects to return, ranging between 1 and 100.
Optional
Note: If pageNumberis passed, it take precedence on list response over limit field.
sortOptions
Define the sorting parameters by passing
sortBy: Field name to sort on.
sortOrder: to specify sorting direction -ASC or DESC.
Note: Optional Defaults to DESC sort on lastUpdatedOn if no sort criteria are provided.
offset
A resource ID of the last record returned in the previous call. Requires sorting by IDfield.
Optional
pageNumber
Specifies which “page” of results to return. This is recommended for application list pagination.
Optional Default: 1
pageSize
Number of records per page. This is recommended for application list pagination.
OptionalDefault: 1000.
getTotalCount
Set as true to return the totalCount of records matching the filter criteria.
Optional Default: false
List Response Format
Parameter
Description
totalCount
Returns the total count of records matching the filter criteria
returnedCount
Returns the count of records returned in the available set. returnedCount will always be less than or equal to totalCount
offset
ID of the last record returned in the previous call.
hasMore
Specifies whether or not there are more records available after this set. If false, this data set comprises the end of the list.
pageNumber
Returns the pageNumber of the set.
resources
An array of data containing actual response records, paginated by request parameters
Note: All the list APIs have a data lag of 30 minutes from the time of creation.