Skip to main content
Version: v1

Pagination

Most of the endpoints return paginated results with this structure:

  • count: The total number of results
  • next: The url for getting the next page of results
  • previous: The url for getting the previous page of results
  • has_previous: A boolean stating if there is a url in previous field
  • has_next: A boolean stating if there is a url in next field
  • current_page: A number representing current state
  • page_range: A list of all numbers of available pages
  • results: The actual requested data
{
"count": 100,
"next": "https://bonkdo.com/api/vouchers/?page=2",
"previous": null,
"has_previous": false,
"has_next": true,
"current_page": 1,
"page_range": [1, 2, 3],
"results": [
...
]
}

You can use the next and previous fields to run multiple queries to fetch the different pages.