Pagination / Ordering
Pagination
The API doesn't support full pagination where the total records are returned in the request. There is no way to determine how many pages exist. However, when pulling results, you may limit the results and move to the next page.
Limiting Results
When retrieving items from the API, every requests supports the use of a limitparameter that tells the maximum number of records is pulled. Whether this parameter is included or not, the API will limit the results to a maximum of 1500 items.
Offset
Passing an offset property will cause the results to skip from the beginning of the returned date to the offset before returning the results. Using both limit and offset will allow for paging through results.
Count
Some endpoints also support the use of count to obtain the number of total records that will be returned based upon the supplied filters. The API reference will indicate when this is available for a given endpoint.
Sort Order
Many API endpoints will also allow sorting the results by one of the properties on the associated object. The default sort typically is by the primary identifier for the data. To order the results, include a comma separated list of properties in an order_by property with the request. In addition, the sort direction can be included whether asc or desc appropriately. An example: contact_last_name desc, contact_first_name. Additionally, if only one property is passed, the sort direction can be included in sort_dir parameter in the request.
Updated 12 months ago