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 |
---|---|
10 | |
5 | |
3 | |
3 | |
3 |
Photo by Marco Verch Sales channels on Shopify are various platforms where you can sell...
By Ollie May 25, 2023Summary of EventsBeginning in January of 2023, some merchants reported seeing a large amo...
By Trevor May 15, 2023With 2-Factor Authentication being required to use Shopify Payments, we’re here to help yo...
By Imogen Apr 26, 2023