Retrieve inventory level for more than 250 for the same location

Raju5
Tourist
12 0 2

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

Replies 2 (2)
Gregarican
Shopify Partner
1030 86 276

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.

HunkyBill
Shopify Expert
4838 60 590

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