Development discussions around Shopify APIs
To continue receiving payouts, you need to secure your account by turning on two-step authentication. If two-step authentication is not turned on your payouts will be paused. Learn more
Hey Folks,
First time poster here, apologies if my post doesn't adhere to good standards - I'm a new developer. I seem to have found a bit of strange behaviour with the new cursor-based pagination while I have been updating an old private app.
On making my initial call to the API, without page_info, I don't get the "Link" property in the response header if I provide a limit above 156 in my request. It works with all equal to or below 156 (<=156) but nothing above it (>156). Examples:
GET https://@{shop}.myshopify.com/admin/api/2020-04/products.json?
Returns "Link" in the response header
GET https://@{shop}.myshopify.com/admin/api/2020-04/products.json?limit=156
Returns "Link" in the response header
GET https://@{shop}.myshopify.com/admin/api/2020-04/products.json?limit=157
Doesn't return "Link" in the response header
This behaviour is weird because I want to be able to use the maximum limit (250) on each request that I make including the initial request. Interestingly, "Link" is returned in the header when I use limit=250 AND a given page_info from a response header. For example:
GEThttps://@{shop}.myshopify.com/admin/api/2020-04/products.json?page_info={page_info}&limit=250'
Returns "Link" in the response header
The behaviour seems like a bug but it's possible that I'm missing something. It would be nice to be able to get 250 results even on the initial request.
User | RANK |
---|---|
6 | |
5 | |
5 | |
5 | |
4 |
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022