Development discussions around Shopify APIs
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 |
---|---|
10 | |
4 | |
3 | |
3 | |
3 |
As a business owner, have you ever wondered when your customer's first impression of yo...
By Skye Jun 6, 2023We're excited to announce improvements to the threaded messaging experience in our communi...
By TyW May 31, 2023Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023