Pagination
Most of the endpoints return paginated results with this structure:
count
: The total number of resultsnext
: The url for getting the next page of resultsprevious
: The url for getting the previous page of resultshas_previous
: Aboolean
stating if there is a url inprevious
fieldhas_next
: Aboolean
stating if there is a url innext
fieldcurrent_page
: A number representing current statepage_range
: A list of all numbers of available pagesresults
: 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.