Skip to main content

Pagination

Collection endpoints that support pagination accept itemsPerPage and pageIndex as query parameters. Page numbering starts at 1. For the company timetable, itemsPerPage defaults to 1000 and accepts values from 1 to 1000. For example, request the first page of up to 100 shifts with:

GET /api/v2/company/timetable?itemsPerPage=100&pageIndex=1 HTTP/1.1
Host: api.bedrijfsrooster.nl
Authorization: Bearer <access_token>

Items are returned in data.items. Pagination information is returned alongside them in data:

FieldMeaning
itemsPerPageMaximum number of items per page.
pageIndexCurrent page number, starting at 1.
currentItemCountNumber of items returned in this page's items array.
startIndexReported starting position of this page within the collection.
totalItemsTotal number of items matching the request filters.
totalPagesTotal number of pages for the selected itemsPerPage.

Fetch the next page by increasing pageIndex by 1, keeping the filters and itemsPerPage unchanged. Continue until pageIndex reaches totalPages; totalItems: 0 indicates an empty result.

The timetable's optional disablePaging=true optimizes requests whose entire result is expected to fit on the first page. It retains the page-size limit; leave it unset when fetching multiple pages.