This is a task that would be better managed by GraphQL over REST. We wrote a blog post with some great info on this topic around the time that GraphQL was introduced on the platform: BLOG POST
My company currently doesn’t use GraphQL. I understand the advantages. Without GraphQL is it possible to update inventory levels for multiple inventory_item_ids in one call or no?
+1 I need an answer on this as well please. Can this be done without the need for GraphQL. It seems odd that we cannot supply multiple IDs in one transaction.
EDIT: Unfortunately, this is something chargeable. It is the responsibility of Shopify Developers to fix this issue which is causing a detrimentally high volume of transaction traffic against their own servers. No matter what the app is or where it comes from, it would still be constrained by the limitations of the REST ADMIN API service.
Hey, I have been working myself on getting this working and created a solution on Shopify Flow if you still need it?
What I needed from this was to iterate through every product and check that it had a metafield filled out (in my case it was key="web_enabled_inventory). In that metafield is that item’s stock level, which is synced daily by our PIM. This was a limitation of our PIM not being able to directly sync with Shopify’s Inventory Levels system so instead they had to be housed in a metafield. So then I’m overwriting the “available” number stored in that product with the number that is housed in the metafield since that is the accurate inventory level from our warehouse (accounts for lost/damaged goods, returns, etc.).
Above is my workflow in Shopify Flow with the {store name} crossed out. You would enter your store’s name there. And below is the body of my HTTP request with some varibles you would replace bolded:
{% for metafields_item in productsForeachitem.metafields %}{% if metafields_item.key == ‘web_available_inventory’ %}{% for variants_item in productsForeachitem.variants %}{“location_id”: [your location_id here],“inventory_item_id”: {{variants_item.inventoryItem.id | split: “/” | last}},“available”:{{metafields_item.value}}}{% endfor %}{% endif %}{% endfor %}
Hope this information helps in any way, should you still need this!