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.

Enable or disable "Continue selling when out of stock" from the API

Solved

Enable or disable "Continue selling when out of stock" from the API

agustin_boleda
Shopify Partner
12 0 5

I would like to know how I can use the API to change this setting for some products.

The idea is that we will have a negative stock limit and when we reach it, we want to stop taking orders.

 

Accepted Solution (1)

MeganM
Shopify Staff (Retired)
2 1 2

This is an accepted solution.

Hey there - you can do this by updating the inventory_policy using the productVariantUpdate mutation.

Check out the docs for the mutation here, and the inventory_policy attribute here.

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

View solution in original post

Reply 1 (1)

MeganM
Shopify Staff (Retired)
2 1 2

This is an accepted solution.

Hey there - you can do this by updating the inventory_policy using the productVariantUpdate mutation.

Check out the docs for the mutation here, and the inventory_policy attribute here.

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