Have your say in Community Polls: What was/is your greatest motivation to start your own business?
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.

Cursor Pagination not working for orders API, no "Link" in headers

Solved

Cursor Pagination not working for orders API, no "Link" in headers

EngZen
Shopify Partner
9 1 2

Hello:

 

I am switching over to the cursor based pagination, and am having an issue with the orders API.  There is no Link returned for this API call.  I have successfully used the customers API call pagination, but can't get the orders pagination to work.   My X-Request_ID is 0136074c-4615-4d0e-90c8-933d7ce6e6f3, and my API call is: 

 

myshopify.com/admin/api/2020-01/orders.json?limit=100&created_at_min=2018-01-01T00:00:01-04:00

 

As I said, the same API call for customers works fine, and the link is in the header.  

 

Thank you,

Engineering

 

Accepted Solution (1)

Visely-Team
Shopify Partner
1843 210 488

This is an accepted solution.

Do you get any orders in the response, if so, are there really more than 100 orders matching the created_at_min constraint? Make sure you pass status=any to get all orders no matter their status (default is to return only open orders).

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog

View solution in original post

Replies 2 (2)

Visely-Team
Shopify Partner
1843 210 488

This is an accepted solution.

Do you get any orders in the response, if so, are there really more than 100 orders matching the created_at_min constraint? Make sure you pass status=any to get all orders no matter their status (default is to return only open orders).

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
EngZen
Shopify Partner
9 1 2

Yes, thank you.  That was the issue.