Skip to main content
If quantity is set to zero than the product will be removed from the cart. Negative quantity is not allowed and will result in error.

Arguments

input
required
The input object contains the unique identifier (ID) for the cart and the items with their quantities that need to be updated.

Returns

CartResponse.*
Any requested field from the CartResponse object.

Example - request

Query arguments
GraphQL

Example - response

Response

Errors

If the cart is not found then a corresponding error is returned
JSON
If the cart is expired (older than 10 days) then a corresponding error is returned
JSON
If the provided product/variant quantity is then zero then UPDATE_PRODUCTS_FAILED error is returned
JSON
If the cart is already submitted then CART_MODIFICATION_FORBIDDEN error is returned If products are not present in the cart then UPDATE_PRODUCTS_FAILED error is returned
JSON