We use cursor-based pagination. Here is a step-by-step example workflow of how you can skip through pages:
- Request an initial page of all offers e.g. call ListOffers
- Get records back, where e.g. the last record has offer_id: 980 and at the end of the return object field
has_moreistrue - In order to get the next page use the offer_id: 980 as cursor, i.e.
ListOffers{"pagination":{"starting_after":980}} - Get other records back, where the last record has offer_id: 1204 and check if
has_morefield is stilltrue - To continue paginating forward go to step 3. but now set offer_id: 1204 as cursor value
- End if
has_moreisfalse
Use starting_after to navigate forward and ending_before to navigate backward. Never use both starting_after and ending_before together.