Pagination error in rest api "get orders" if fillment_status other than "any" is used

Grodas
Shopify Partner
2 0 2

I use
fetch('https://grodas-alex-store.myshopify.com/admin/api/2023-01/orders.json?financial_status=all&fulfillme...',

{headers: {"X-Shopify-Access-Token": "{access_token}"}});
to get orders from my store
app not get permision read_all_orders.


i gets in the answer all my 2 orders from last 60 days
and the pagination link rel="next"
https://grodas-alex-store.myshopify.com/admin/api/2023-01/orders.json?limit=4&page_info=eyJmaW5hbmNp...

if i check this pagination link then i get empty answer

i check many parameters, version of API and figured out: in calculate pagination use all orders (more 60 days ago) if fillment_status other than "any"

Replies 2 (2)

Grodas
Shopify Partner
2 0 2

Has anyone tried to reproduce this problem?

 

Now I use hotfix tohide this problem: I checking if there is information on the next page before showing the pagination.
This doubles the number of requests to the REST api but allows you not to deceive the user about the availability of additional orders on next page

ShopifyDevSup
Shopify Staff
1310 214 454

Hey @Grodas - this is definitely odd. I've tried to replicate the issue on my own test store, but haven't been able to encounter the error myself. Based on our docs here, "all" isn't a supported filter value for the financial_status parameter. Can you try using this filter instead and letting us know if it resolves the issue:

https://yourstore.myshopify.com/admin/api/2023-01/orders.json?financial_status=any&fulfillment_statu...

 


I can't say for sure if this will resolve the issue, so if it continues to persist, just let us know and we'll look into this more deeply. I have seen something similar occur in the past where unexpected pagination might occur if filter parameters weren't set properly. If you could share the full body of a response where you're seeing the pagination cursor included, that would be helpful as well (with any sensitive/auth information removed). 

Hope this helps - let us know if we can clarify anything on our end. 

 

Al | Shopify Developer Support 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog