Using the API
Pagination
Fetch large collections safely and efficiently.
Why Pagination Matters
List endpoints can return many records. Pagination improves performance and reduces payload size.
Integration Guidance
- Request data in pages and iterate until complete.
- Persist cursors or page tokens between sync runs.
- Handle empty pages and partial syncs gracefully.
Pagination Behavior in This API
Many list endpoints use page-number pagination with:
page_sizedefault:25page_sizemax:100- Pagination applied when
pageis present in query params.
Paginated Response Example (?page=1)
{
"count": 245,
"next": "https://dev-rest.onboard.io/tasks/?page=3",
"previous": "https://dev-rest.onboard.io/tasks/?page=1",
"results": [
{
"id": 1024,
"name": "Collect onboarding documents"
},
{
"id": 1025,
"name": "Send welcome package"
}
]
}Non-Paginated Response Example (no page query param)
When page is not provided, these endpoints return a plain array response:
[
{
"id": 1024,
"name": "Collect onboarding documents"
},
{
"id": 1025,
"name": "Send welcome package"
}
]Pagination Loop Example (Paginated Endpoints)
let url: string | null = "https://dev-rest.onboard.io/tasks/?page=1";
const allResults: unknown[] = [];
while (url) {
const res = await fetch(url, {
headers: { Authorization: "Token YOUR_API_KEY" },
});
const data = await res.json();
allResults.push(...data.results);
url = data.next;
}How is this guide?