Why inventory_quantity is still writable in Product API PUT request?

Solved
Highlighted
New Member
2 0 0

Why inventory_quantity is still writable in REST Admin API Product PUT request? Also if I want to update product details and the inventory_quantity key is not passed in the request body then also it resets the Product Quantity on shopify. How can I solve this situation and update my product details through API without affected the quantity of the product? 

0 Likes

Success.

Shopify Staff
Shopify Staff
180 7 37

If you're using a private app, and the store only has one location, you can still edit the inventory_quantity on the variant (although it's deprecated behaviour). That being said, not passing the key does not reset the product quantity on Shopify, that's likely a bug in your application.

0 Likes
New Member
2 0 0
My application is not resetting the quantity but shopify's API does it as I
am not passing inventory_quantity in PUT request. Hence it resets the
quantity, but that should not be done as Quantity shouldn't get reset if
you are not passing the key in API. If its mandatory then they should
through exception error in response. This is BUG from Shopify PUT request.
0 Likes
Shopify Staff
Shopify Staff
180 7 37

If you PM me your request id, I can look at our logs to see if there's anything strange coming up — we haven't been able to replicate the behaviour that you're experiencing.

0 Likes