Pagination
We offer pagination for most of our API’s list endpoints.
With all of our GET endpoints, we offer offset-based pagination. The parameters that control this type of pagination are page and pageSize, indicating the desired offset and the number of items to be returned per page.
page | Pagination starts. If omitted, the default value is 1. |
pageSize | The number of items shown per page. If not provided, a maximum of 500 items will be returned. |
Example request for the GET /v1/contacts/search endpoint:
https://api.gettrail.com/api/v1/contacts/search?searchString=Duy&page=1&pageSize=500
If more items can be fetched, the page and pageSize fields, which can be used for specifying the next offset pointer, will also be returned.
Note
The maximum pageSize value is 500.
Example response:
{
"status": "Success",
"data": {
"items": [
// Contact data
],
"totalItems": 20, // Total number of contacts
"page": 1, // Current page
"pageSize": 10, // Current page size
"totalPages": 2 // Total pages of contacts
}
}