CartLineItem
ObjectRepresents 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
- [LineItemAttribute!]!
attributes Gets the attributes of the variant.
- DiscountApplicationConnection!
discountApplications Retrieves a paginated list of payments for a specific order.
- ID!
id The unique identifier of the line item
- MediaConnection!
media The variant media.
- [MetadataItem!]!
metadata 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.- ID!
productId The unique identifier of the product associated with the cart line item.
- String!
productName The name of the product
- String!
productSlug Retrieves the slug of the product associated with a cart line item. This is useful for generating URLs or displaying product information.
- Int!
quantity Retrieves the quantity of the cart line item.
- String!
sku 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.
- Money!
subtotal 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 valuesEXCLUSIVEExclusive 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.)
INCLUSIVEInclusive 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.
- Money!
total Gets the total price of the cart line item after discounts and taxes.
- LineItemType!
type Indicates whether the line item is managed by the catalog or supplied as a custom item.
Possible enum valuesCUSTOMThe line item was entered independently of a catalog product variant.
MANAGEDThe line item references a product variant managed in the catalog.
- UnitPrice!
unitPrice Retrieves the unit price of the cart line item.
- ProductVariant
variant 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 likevariantNameandvariantSkuto 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.- ID!
variantId The unique identifier of the variant associated with the cart line item.
- String!
variantName Retrieves the name of the variant associated with a cart line item. This is useful for displaying the specific variant details to the user.