Hi, we're trying to use the /cart/update.js endpoint to change item quantities in the cart, however, this call is allowing users to add items to the cart even if there's no inventory, without returning a 422 error message as the documentation states. Item tracking is enabled for the product.
Conversely, when using the /cart/add.js endpoint, to initially add items, this will return the 422 error if adding more quantity than is available, but /cart/update.js does not do this.
The documentation states it should return a 422, but does not:
Any Shopify Experts able to look into this? I emailed support, but of course they say they don't support the API.
Thanks for your response. /change.js seems to work, but doesn't return any error, just stop the limit at the available quantity, then the returned cart is capped/limited with the available numbers. That works, but leaves the user kind of confused. I suppose as a sort of hack I could check if the submitted quantity update differs from the returned number in the cart and suggest that the inventory is maxed out. Still think Shopify should fix /cart/update.js to work as the documentation describes!