Docs
Dashboard

CartLineItem

Object

Represents a line item in a cart, which includes details about the product, variant, and any associated discounts.

Each line item contains information such as the product name, variant details, total price, and any applicable discounts. This allows for detailed tracking of items within a cart, including their pricing and discount applications.

#

Fields


attributes
[LineItemAttribute!]!

Gets the attributes of the variant.

discountApplications
DiscountApplicationConnection!

Retrieves a paginated list of payments for a specific order.

id
ID!

The unique identifier of the line item

media
MediaConnection!

The variant media.

metadata
[MetadataItem!]!

Gets the metadata associated with the cart line item.

product
Product

This retrieves the product associated with a cart line item. If the product no longer exists—such as if it has been removed from the channel or deleted entirely—this will return null. In such cases, you can still use other properties like productName and productSlug to display information about the product. These fields are not directly tied to the product reference and remain available for display, even if the product itself is missing. Note that these properties are eventually consistent and may not always reflect the latest product state.

productId
ID!

The unique identifier of the product associated with the cart line item.

productName
String!

The name of the product

productSlug
String!

Retrieves the slug of the product associated with a cart line item. This is useful for generating URLs or displaying product information.

quantity
Int!

Retrieves the quantity of the cart line item.

sku
String!

Retrieves the SKU (Stock Keeping Unit) of the variant associated with a cart line item. The SKU is a unique identifier for the variant, often used for inventory management.

subtotal
Money!

The line items total excluding discounts and taxes.

taxBehavior
TaxBehavior!

Gets the tax behavior of the cart line item, which indicates how taxes are applied to the item.

Possible enum values
  • EXCLUSIVE

    Exclusive tax is added on top of the price. For example, a product has the price defined as 5.00 USD. The tax charged on this product could be 10% and would result in a final price of 5.50 USD. (Tax rates might differ—this is only an explanatory example.)

  • INCLUSIVE

    Inclusive tax is already included in the price. For example, a product has the price defined as 5.00 USD. The final price the customer pays is 5.00 USD.

taxRate
TaxRate

Retrieves the tax rate applied to the cart line item. This may be null if the line item does not have a tax rate defined.

taxedPrice
TaxedPrice

Gets the taxed price of the cart line item. This may be null if the cart does not yet have a taxed price.

total
Money!

Gets the total price of the cart line item after discounts and taxes.

type
LineItemType!

Indicates whether the line item is managed by the catalog or supplied as a custom item.

Possible enum values
  • CUSTOM

    The line item was entered independently of a catalog product variant.

  • MANAGED

    The line item references a product variant managed in the catalog.

unitPrice
UnitPrice!

Retrieves the unit price of the cart line item.

variant
ProductVariant

This retrieves the variant associated with a cart line item. If the variant no longer exists—such as if it has been removed from the channel or deleted entirely—this will return null. In such cases, you can still use other properties like variantName and variantSku to display information about the variant. These fields are not directly tied to the variant reference and remain available for display, even if the variant itself is missing. Note that these properties are eventually consistent and may not always reflect the latest variant state.

variantId
ID!

The unique identifier of the variant associated with the cart line item.

variantName
String!

Retrieves the name of the variant associated with a cart line item. This is useful for displaying the specific variant details to the user.