d
Topic
Kieran Shopify Employee
Posts:
19
2 months ago

Upcoming change to Order API line item quantity validation

On Thursday October 25th, Shopify will introduce validation to line item quantity which prevents the creation of line items with 0 quantity. This means that orders created via the Order API must have a line item quantity greater than or equal to 1.

If an app attempts to create a line item with a quantity of 0 the Order API will return a status of `422` with the error message `Quantity must be greater than or equal to 1`

We are making this change to ensure consistent behaviour across the platform as line items with a quantity of 0 can not be fulfilled within Shopify.

If you have any questions, concerns, or a specific use case that will be impacted by this change, don't hesitate to reply in the thread below.

i
Replies
Posts:
3851
2 months ago
g
2
upvotes

It boggles the mind that creating orders with quantity zero in the first place was ever a thing. Like getting orders with no customer, orders with no shipping address, these kinds of pseudo-conveniences have caused App developers like me to have to write countless lines of stupid guard code, guarding against complete nonsense orders breaking what should be a smooth working machine. Huzzah for finally enforcing logically correct numbers!

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com