Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Update multiple inventory items in one POST query using REST

Update multiple inventory items in one POST query using REST

Ash_Johnson
Visitor
2 0 0

I was wondering if there was an efficient way to update multiple inventory items in one POST query? I am currently using the endpoint /admin/api/2021-07/inventory_levels/set.json but it seems very inefficient to update each variant individually when doing a stock check when it could easily done by sending through a larger dataset to the POST query.

Does anyone have any idea how I can do this. The documentation doesn't seem to cover it. 

Reply 1 (1)

GrahamS
Shopify Staff (Retired)
193 37 55

Hey @Ash_Johnson ,

This might not be the answer you are looking for, but this is one of the situations where we tend to strongly recommend taking advantage of GraphQL over REST. The greater flexibility in call structure as well as the possibilities offered through our bulk query operations allow for you to do this much more easily than you would otherwise be able to via REST

Some more info HERE

If you are set on sticking with REST, then that's understandable - hopefully some other forum posters will be able to offer insight in that regard!

Best,

Graham

To learn more visit the Shopify Help Center or the Community Blog.