Two limits, two kinds of error
The first limit is on the request. A list of more than 250 items in a mutation's input is refused before the mutation runs, so there is no cart and no userErrors, only a top-level error.
The second is on the cart. A cart reaches 500 lines in two mutations, and the next line is refused by the mutation itself.
What was sent, and what Shopify answered
| Step | Answer | Lines in the cart |
|---|---|---|
| 1. cartCreate with 250 lines | Accepted | 250 |
| 2. cartCreate with 251 lines | Refused in the response's top-level errorsMAX_INPUT_SIZE_EXCEEDED “The input array size of 251 is greater than the maximum allowed of 250.” | no cart |
| 3. cartLinesAdd of 250 more lines to the first cart | Accepted | 500 |
| 4. cartLinesAdd of one more line | Refused in the mutation's userErrorsINVALID “Lines must be less than or equal to 500” | 500 |
What that shows
- A cart of 250 lines was created in one mutation.
- A cartCreate with 251 lines was refused before any cart existed, in the response's top-level errors and not in userErrors, with the code MAX_INPUT_SIZE_EXCEEDED and the message “The input array size of 251 is greater than the maximum allowed of 250.” That is a limit on one mutation's input, not on the cart.
- A second mutation took the first cart to 500 lines.
- One more line was refused in userErrors, with the code INVALID and the message “Lines must be less than or equal to 500”. The cart kept its 500 lines.
Read both error lists
A client that reads only userErrors sees nothing wrong with the 251-line create: the reason is in the response's errors. A client that reads only those treats the 501st line as added.
After the refused add the cart still had its 500 lines. The refusal changed nothing, so the cart can go on to checkout as it was.
500 is a limit on lines, not on products or units
Every line in this run was one unit of the same product, kept apart by a line attribute. A build-your-own bundle or an order form that puts each pick on its own line is where a cart gets this long.
How this was verified
Every step on this page was sent to a Shopify Plus development store we keep for this, on API version 2026-10, and Shopify’s answer was recorded as it came back.
The carts were built through the Storefront API with cartCreate and cartLinesAdd. Every line was one unit of one product, each with a different line attribute, and the lines were counted by reading the cart back page by page after each step. No order was placed.
A suite sends these steps again. A statement that no longer matches the answer takes this page down until it is corrected, and no record stands for more than 90 days without being taken again. This is what one store answered on one API version: your store’s plan can change the result, so try it on a development store.
Seen something different on your store? Write to privacy@offersuite.io with the request and the answer and we’ll run it.