Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Orders API pagination cursor skipping a page and not providing "next" link

Orders API pagination cursor skipping a page and not providing "next" link

uidoctor
Shopify Partner
1 0 0
We've noticed a bug with Shopify's cursors, about number orders not being sent out to our app. 
We've traced the problem to a possible issue with Shopify's cursors.
For example, when we make the following call:

https://*****************/admin/api/2020-10/orders.json?limit=250&created_at_min=2022-07-04T00:00:00+02:00&created_at_max=2022-07-04T23:59:59+02:00&financial_status=paid
 
We get a list of 250 orders, as expected. It gives us the following as the next link in the response headers:
 
https://***************/admin/api/2020-10/orders.json?limit=250&page_info=eAERTrthTYJJuZXh0...
 
Then on this next page, the API returns only 40 orders, whereas we're sure we had 600+ orders in that time range, and should've printed out another set of 250 and a "next" link to the last page, which that too, it doesn't do.
 
 
 
Replies 0 (0)