All endpoints that return collections are paginated. The API uses the authenticated user's pagination setting, with API-specific limits:
The current account setting is returned by /profile as default_pagination. The effective API limit can therefore be inferred from the response's meta.per_page value.
Use the page query parameter or follow the links.next URL until it is null. Do not assume that the last page has the same number of records as the first page.
{
"data": [
// up to 45 or 100 locations
],
"links": {
"first": "https://api.kanka.io/1.0/campaigns/123/locations?page=1",
"last": "https://api.kanka.io/1.0/campaigns/123/locations?page=5",
"prev": null,
"next": "https://api.kanka.io/1.0/campaigns/123/locations?page=2"
},
"meta": {
"current_page": 1,
"last_page": 5,
"per_page": 45,
"total": 201
}
}
Pagination applies to recovery lists and most related-resource collections as well. The response's meta object is authoritative for the page size returned by that request.