Skip to content

Pagination

All general GET requests are paginated. We strongly recommend that you respect this pagination and implement it correctly on the client side.

Pagination prevents your applications from being overloaded when receiving data from Koibox. By default, requests that list results return 20 per page, with the option to request up to 50 results in a single request.

All requests with pagination are structured as follows, with the pagination lines marked.

{
"count": 100, // Number of results
"next": null, // Next page
"previous": null, // Previous page
"results": [] // Results
}

You can choose how many results to receive per page and also from which result you want them to be returned. The parameters to use in the query are as follows:

  • limit (Number of results, up to a maximum of 50)
  • offset (Starting from which result)

We can make a request where we want 30 results starting from the fifth. For this example we will use the appointment listing endpoint.

https://api.koibox.cloud/api/agenda/?limit=30&offset=5

The response will be as follows:

{
"count": 7788,
"next": "https://api.koibox.cloud/api/agenda/?limit=30&offset=35",
"previous": "https://api.koibox.cloud/api/agenda/?limit=30",
"results": []
}

We can observe that next and previous are defined and inform us of the previous and next page of results. These links must be used programmatically for pagination to work correctly.