Skip to main content

CartAddItemInput

Input for adding a product item to a shopping cart.

Contains all necessary information to add a product to the cart including quantity, pricing overrides, and configuration options for complex products like clusters.

input CartAddItemInput {
quantity: Int = 1
notes: String
requestDate: String
attributes: [AttributeBulkCreateInput!]
productId: Int!
clusterId: Int
price: Float
childItems: [CartChildItemInput!]
}

Fields

CartAddItemInput.quantity ● Int scalar

Number of units to add to the cart.

Must be a positive integer. Defaults to 1 if not specified.

CartAddItemInput.notes ● String scalar

Additional notes or special instructions for this item.

Maximum length of 255 characters. HTML tags will be automatically removed for security.

CartAddItemInput.requestDate ● String scalar

Preferred delivery date for this specific item.

Must be provided in ISO 8601 date format (YYYY-MM-DD). Used for items that require specific delivery scheduling.

CartAddItemInput.attributes ● [AttributeBulkCreateInput!] list input

Custom attributes for this cart item, captured on the item and forwarded to the order item on processing.

Additive: attributes you do not mention are always kept. An entry whose description is already stored overwrites its value; a new description is appended. To remove a single attribute, send it with a null value. An omitted array changes nothing.

An EMPTY array depends on the operation. On the update path (cartUpdateItem) it removes every attribute on this item in one call. On the add paths (cartAddItem, cartAddBundle) it is a no-op, so re-adding the same product never wipes the attributes already captured on the line.

CartAddItemInput.productId ● Int! non-null scalar

Unique identifier of the product to add to the cart.

Must reference a valid product that is available for purchase and matches the cart's shop and channel configuration.

CartAddItemInput.clusterId ● Int scalar

Cluster identifier for configurable product groups.

When adding items that are part of a product cluster (configurable products with multiple components), this identifies the cluster configuration. All child items must belong to this cluster.

CartAddItemInput.price ● Float scalar

Override price per unit for external pricing systems.

When specified, overrides the calculated price with a custom value. Should only be used when integrating with external pricing systems. Maximum 5 decimal places allowed.

CartAddItemInput.childItems ● [CartChildItemInput!] list input

Child items for configurable product clusters.

Used when adding complex products that consist of multiple components. Each child item represents a component of the main product and must be part of the specified cluster configuration.

Member Of

cartAddItem mutation