All list and search endpoints return paginated results. Learn how to control page size, navigate through pages, and handle total counts.
Endpoints which return a list of objects use offset-based pagination. Pagination allows an integration to request a part of the list, receiving an array of items, the pageNumber and totalPages. When totalPages > pageNumber or hasNextPage (more below), the next page can be fetched by incrementing the pageNumber. The first page starts at 1.
Requests
Each paginated endpoint accepts the following request parameters:
Parameter | Type | Description |
|---|---|---|
|
| The requested
|
|
| The number of items from the full list desired in the response.
The response may contain fewer items than this number of results. |
Parameter locationFor endpoints using the HTTP
GETmethod, these parameters are only accepted in the query string of the request. As of right now, the/api/.../searchendpoints are the only endpoints, using the HTTPPOSTmethod, where those query parameters are accepted as well.
Responses
Responses from paginated endpoints contain the following properties:
| Property | Type | Description |
|---|---|---|
items | T[] | The actual set of results, limited to PageSize from the request. Type T depends on the resource of the endpoint. |
pageNumber | int | The currently requested page. |
totalPages | int | The total count of pages. |
totalCount | int | The total count of items, not pages. Don't confuse with totalPages. |
hasPreviousPage | bool | Helper attribute, which indicates if there are results on a smaller than pageNumber. |
hasNextPage | bool | Helper attribute, which indicates if there are more results on a higher value than pageNumber. |
