Skip to main content

changeCustomerCart

Add, Update, or Remove Items from a Customer Cart or SavedForLater. If you are attempting to move an item from the cartItems to savedForLaterItems or vice versa, you must both add and remove the item in the same mutation, which is allowed.

Requires the publiccart/write scope and a valid customer authentication token.

changeCustomerCart(
addOrUpdateItems: CartAddOrUpdateItemsInput
customerToken: String!
removeItems: CartRemoveItemsInput
): Cart!

Arguments

changeCustomerCart.addOrUpdateItems ● CartAddOrUpdateItemsInput input

The items to add or update for the cart or savedForLater. Either addOrUpdateItems or removeItems must be provided, and both can be provided.

changeCustomerCart.customerToken ● String! non-null scalar

changeCustomerCart.removeItems ● CartRemoveItemsInput input

The items to add or update to savedForLater. Either addOrUpdateItems or removeItems must be provided, and both can be provided.

Type

Cart object

A cart is a temporary container for products that a customer or anonymous user wants to buy