@gradientedge/commercetools-utils
    Preparing search index...

    Interface LineItem

    The representation of a Line Item in a Cart or in an Order.

    Index

    Properties

    addedAt?: string

    Date and time (UTC) the Line Item was added to the Cart.

    custom?: CustomFields

    Custom Fields of the Line Item.

    discountedPricePerQuantity: DiscountedLineItemPriceForQuantity[]

    Discounted price of a single quantity of the Line Item.

    distributionChannel?: ChannelReference

    Used to select a Product Price. The referenced Channel has the ProductDistribution ChannelRoleEnum.

    id: string

    Unique identifier of the LineItem.

    inventoryMode?: InventoryMode

    Inventory mode specific to this Line Item only, and valid for the entire quantity of the Line Item. Only present if the inventory mode is different from the inventoryMode specified on the Cart.

    key?: string

    User-defined unique identifier of the LineItem.

    lastModifiedAt?: string

    Date and time (UTC) the Line Item was last updated.

    lineItemMode: LineItemMode

    Indicates how the Line Item is added to the Cart.

    Name of the Product.

    perMethodTaxRate: MethodTaxRate[]

    Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

    price: Price

    Price of a Line Item selected from the Product Variant according to the Product priceMode. If the priceMode is Embedded ProductPriceMode and the variant field hasn't been updated, the price may not correspond to a price in variant.prices.

    Indicates how the Price for the Line Item is set.

    productId: string

    id of the Product the Line Item is based on.

    productKey?: string

    key of the Product.

    This field is only present on:
    
    - Line Items in a [Cart](ctp:api:type:Cart) when the `key` is available on that specific Product at the time the LineItem was created or updated on the Cart.
    - Line Items in an [Order](ctp:api:type:Order) when the `key` is available on the specific Product at the time the Order was created from the Cart.
    
    Present on resources created or updated after 3 December 2021.
    
    productSlug?: LocalizedString

    slug of the current version of the Product. Updated automatically if the slug changes. Empty if the Product has been deleted. The productSlug field of LineItem is not expanded when using Reference Expansion.

    Product Type of the Product.

    quantity: number

    Number of Line Items of the given Product Variant present in the Cart or Order.

    recurrenceInfo?: LineItemRecurrenceInfo

    Recurring Order and frequency data.

    shippingDetails?: ItemShippingDetails

    Container for Line Item-specific addresses.

    state: ItemState[]

    Tracks specific quantities of the Line Item within a given State. When a Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Line Items are managed on the Order.

    supplyChannel?: ChannelReference

    Identifies Inventory entries that are reserved. The referenced Channel has the InventorySupply ChannelRoleEnum.

    taxedPrice?: TaxedItemPrice

    Automatically set after taxRate is set.

    taxedPricePortions: MethodTaxedPrice[]

    Total taxed prices based on the quantity of Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

    taxRate?: TaxRate
    • For a Cart with Platform TaxMode, the taxRate of Line Items is set automatically once a shipping address is set. The rate is based on the TaxCategory that applies for the shipping address.
      • For a Cart with External TaxMode, the taxRate of Line Items can be set using ExternalTaxRateDraft.
    totalPrice: CentPrecisionMoney

    Total price of this Line Item equalling price multiplied by quantity. If the Line Item is discounted, the total price is the discountedPricePerQuantity multiplied by quantity. Includes taxes if the TaxRate includedInPrice is true.

    If `ExternalPrice` [LineItemPriceMode](#ctp:api:type:LineItemPriceMode) is used with high-precision money, then the total price is rounded by using the `HalfEven` rounding mode.
    

    Holds the data of the Product Variant added to the Cart.

    The data is saved at the time the Product Variant is added to the Cart and is not updated automatically when Product Variant data changes.
    Must be updated using the [Recalculate](ctp:api:type:CartRecalculateAction) update action.