A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hi, I'm looking to develop an app to automatically update variants inventory to "not stock" when quantity is "0" for specific Shopify locations that only use POS, therefore the out of stock product won't pollute the POS screen. I'm searching the REST Inventory API documentation as well as the GraphQL documentation but can't find anywhere where it's specified what query I should do. Anyone have an idea?
Solved! Go to the solution
This is an accepted solution.
Apologies, I misunderstood your question.
With REST, you can DELETE an inventory level at a specific location, which is the equivalent of unchecking the box to stock that inventory at said location:
https://help.shopify.com/en/api/reference/inventory/inventorylevel#destroy
With GraphQL, there's an inventoryLevelDeactivate mutation you can leverage:
https://help.shopify.com/en/api/graphql-admin-api/reference/mutation/inventorydeactivate
Hope that helps!
Alex | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
You can access the "tracked" property on the inventory_item for both GraphQL and REST:
Alex | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
This is an accepted solution.
Apologies, I misunderstood your question.
With REST, you can DELETE an inventory level at a specific location, which is the equivalent of unchecking the box to stock that inventory at said location:
https://help.shopify.com/en/api/reference/inventory/inventorylevel#destroy
With GraphQL, there's an inventoryLevelDeactivate mutation you can leverage:
https://help.shopify.com/en/api/graphql-admin-api/reference/mutation/inventorydeactivate
Hope that helps!
Alex | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi Alex, when using inventoryDeactivate mutation on graphql, how/where do I get the inventoryLevelId?
When querying the inventoryLevels, it doesnt return the inventoryLevel ID