Pagination
Our List API endpoints (e.g. GET /construction/projects
) return a limited number of results each request.
By default, we return 50 results per page. You can change the number of results returned to any number between 1 and 200 with the ?per_page
query parameter, e.g. GET /field-service/jobs?per_page=20
.
You can also page through the results using the page
query parameter (e.g.
GET /field-service/jobs?page=2
).
You can also use these parameters together (e.g. GET /field-service/jobs?per_page=20&page=2
).
At the end of a response object for a List API endpoint, a meta
property including pagination information is returned.
{
"data": [
{
"id": "15baed1e-7eff-52f4-8fef-3851b4a509d6",
"source_id": "1120",
"name": "Job 1120",
"status": "Completed",
"description": "Call customer before arrival.",
},
{
"id": "1e9df19c-161f-5b18-96ee-21a19c14ff28",
"source_id": "2172",
"name": "Job 2172",
"status": "Completed",
"description": "Call customer before arrival.",
}
],
"meta": {
"current_page": 1,
"results_per_page": 50,
"total_results": 2, // integer or null
"has_more_results": false // true, false, or null
}
}
Certain Source Systems may return a value of null
for total_results
and has_more_results
because they do not return these values.