Retrieve inventory level for more than 250 for the same location

Raju5
Tourist
12 0 1

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

0 Likes
Greg_Kujawa
Shopify Partner
965 80 204

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.

0 Likes
HunkyBill
Shopify Expert
4372 36 467

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.

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com