Development discussions around Shopify APIs
Hello,
How can we retrieve inventory level data for more than 250 items for the same location?
API- https://xxxxxxx.myshopify.com/admin/api/2020-01/inventory_levels.json?location_ids=xxxxxxxx
Thanks
Raj
You can either utilize cursor-based pagination in the REST API client (https://www.shopify.com/partners/blog/relative-pagination) or else use a bulk operations query in the GraphQL client (https://shopify.dev/tutorials/perform-bulk-operations-with-admin-api). Personally I prefer the latter if there are a good amount of pages that will be iterated. For speed and efficiency's sake.
I have a client that needs a daily download of inventory from Shopify, and one part of the inventory (a specific vendor) results in the Bulk Download query taking 1.5 hours on average to build and produce the JSONL file for downloading. My point is that, try and replicate that with paging and successive API calls and see how fun it is dealing with gateway timeouts and other exceptions and failures.
Go Bulk or Go Home! One call rulez them all.
User | RANK |
---|---|
49 | |
11 | |
5 | |
5 | |
5 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023