Pagination
How responses are formatted and how pagination works
The Whippy Public Open API uses pagination to manage the retrieval of large data sets. This ensures that the API remains performant and that your applications can handle the data in manageable chunks.
When you make a request that returns a list of items (for example, retrieving a list of contacts), the response will include a subset of the items and metadata about the total number of items.
Pagination Parameters
You can control pagination by including the following parameters in your request:
- offset: The starting point from which to retrieve data. For example, an offset of 10 would start from the 11th item in the dataset.
- limit: The maximum number of items to return in a single request.
Pagination Response
The response will include the following:
- data: An array of items for the current page.
- total: The total number of items across all pages.
Here's an example of what a paginated response might look like:
{
"data": [
{
"color": "#ffeb3b",
"created_at": "2021-06-22T10:36:07Z",
"id": "6c510dfc-97a6-44a8-a966-e5b37ff1e9c5",
"name": "contact-list-name",
"organization_id": "38f41b71-c138-4fe2-a77e-14a6c6153087",
"state": "active",
"updated_at": "2021-06-22T10:36:07Z"
}
],
"total": 1
}
Updated about 1 year ago