Skip to main content

cartUpdateItem

Update an existing item in the shopping cart.

Modifies cart item properties such as quantity, configuration, or custom pricing. Cart totals are automatically recalculated after the update.

Possible errors:

  • CART_NOT_FOUND_ERROR: Cart with the specified ID does not exist, or is not visible to the caller
  • CART_INVALID_STATUS_ERROR: Cart is not in an editable status
  • CART_INVALID_OWNER_ERROR: Cart is not owned by, or shared with, the requesting user
  • CART_ITEM_NOT_FOUND_ERROR: Cart item with the specified ID does not exist
  • CART_ITEM_NOT_UPDATABLE_ERROR: Cart item cannot be updated in its current state
  • ATTRIBUTE_VALIDATION_ERROR: One or more attributes are not valid for this tenant
  • ORDER_HELPER_VALIDATION_ERROR: order-helper rejected the order (e.g. invalid quantity, no price found)
  • ORDER_HELPER_UNAVAILABLE_ERROR: order-helper could not be reached
  • ORDER_HELPER_PAYLOAD_TOO_LARGE_ERROR: The recalculation request exceeded a size limit
  • ORDER_HELPER_ERROR: Cart totals could not be recalculated for an unclassified reason
  • CART_ITEM_UPDATE_ERROR: Unexpected failure while updating the cart item
cartUpdateItem(
id: String!
itemId: String!
input: CartUpdateItemInput!
): Cart!

Arguments​

cartUpdateItem.id ● String! non-null scalar​

Unique identifier of the cart containing the item.

Must be a valid UUID format representing an existing cart.

cartUpdateItem.itemId ● String! non-null scalar​

Unique identifier of the cart item to update.

Must be a valid UUID format representing an existing item in the specified cart.

cartUpdateItem.input ● CartUpdateItemInput! non-null input​

Updated item information.

Contains the item properties to update such as quantity, configuration, or pricing. Only provided fields will be changed.

Type​

Cart object​

Shopping cart entity for managing customer purchases.

Represents a shopping session containing products, customer information, addresses, payment preferences, and all data needed for order processing. Carts can be associated with different customer types and support various business models.