According to the documentation;
If the exact quantity specified for one of the items can’t be added to the cart (for example, you are trying to add 9 items, 2 are already in the cart, and 10 are in stock), then no items are added the cart.
However, when I am adding in items from a list (in bulk), I am getting duplicates of the items showing up in my cart.
It seems that when the 422 response comes back (from an array items being added) all the items in that list are actually successfully added, just the quantities are adjusted to accomodate if a product is out of stock.
When the response is 404, then no items in the list are added.
This makes it quite difficult to reliably add items to the cart (without duplicating them). I also can’t submit items in one at a time, because then it overloads the Shopify site and I get locked out for 1 hour.
Is this a bug or normal behaviour? Sounds like a bug if we believe the documentation.