Entities

CartItem

CartItem entity - components, queries, links, and related actions

Your storefront encounters the CartItem entity when rendering individual line items inside a Cart. Each CartItem represents a single entry: a product, a discount code, or a custom item. CartItems are always accessed through the CartItemsLink on a Cart; they have no standalone query.

Components

Base

CartItemBase

base
Item type, quantity, title, subtitle, brand, SKU code, detail page link, and cover image.
type
"product" | "discount-code" | "custom"required
quantity
numberrequired
title
stringrequired
subtitle
string

An optional short description of the item. Usually used for the variant-name of a product.

brand
string

An optional brand name of the item. Usually displayed above the title.

code
string

A sku, barcode or other code that identifies the item.

Cost

CartItemCost

cost
Per-unit price, strikethrough price, subtotal before discounts, and total after discounts.

Product Data

CartItemProductData

productData
Additional product-specific data such as unit pricing (e.g. price per 100 g).

Quantity Rule

CartItemQuantityRule

quantityRule
Minimum, maximum, and increment constraints for the item quantity, plus whether the customer can change it.
increment
numberrequired

The quantity increment between min and max. All valid quantities must be divisible by this value. Must be less than or equal to min and max.

max
number

If set, must be lower than or equal to the minimum. Must be a multiple of the increment.

min
numberrequired

Minimum quantity a user has to purchase. Must be a multiple of the increment.

canChange
booleanrequired

Availability

CartItemAvailability

availability
Stock status and available quantity for the item.
status
"inStock" | "outOfStock" | "backorder" | "preorder"required
quantity
numberrequired
  • CartItemProductVariantLink ProductVariant single - The product variant this line item represents. Nullable; only present when the item type is product.
  • Cart - The parent cart that contains this line item.
  • Product - The product this line item was added from.