cartAddItem
Add a product item to the shopping cart.
Adds a single product to the cart with specified quantity and configuration. Supports simple products, configurable products with clusters, and custom pricing. Cart totals are automatically recalculated.
Possible errors:
- CART_NOT_FOUND_ERROR: Cart with the specified ID does not exist
- CART_ITEM_ADD_ERROR: Failed to add the item to the cart
- PRODUCT_NOT_FOUND_ERROR: Specified product does not exist
- PRODUCT_INVALID_ERROR: Product is not valid or available for purchase
- CLUSTER_INVALID_CONFIGURATION_ERROR: Invalid cluster configuration for configurable products
cartAddItem(
id: String!
input: CartAddItemInput!
): Cart!
Arguments
cartAddItem.id
● String!
non-null scalar
Unique identifier of the cart to add the item to.
Must be a valid UUID format representing an existing cart.
cartAddItem.input
● CartAddItemInput!
non-null input
Product item information to add to the cart.
Contains product ID, quantity, pricing overrides, and configuration options for complex products.
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.