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

    Interface MyCartAddLineItemAction

    If the Cart contains a LineItem for a Product Variant with the same LineItemMode, Custom Fields, supply and distribution channel, then only the quantity of the existing Line Item is increased. If LineItem shippingDetails is set, it is merged. All addresses will be present afterwards and, for address keys present in both shipping details, the quantity will be summed up. The LineItem price is set as described in Line Item price selection.

    If the Tax Rate is not set, a [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError) error is returned.
    
    If the Line Items do not have a Price according to the [Product](ctp:api:type:Product) `priceMode` value for a selected currency and/or country, Customer Group, or Channel, a [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) error is returned.
    
    interface MyCartAddLineItemAction {
        action: "addLineItem";
        addedAt?: string;
        custom?: CustomFieldsDraft;
        distributionChannel?: ChannelResourceIdentifier;
        key?: string;
        productId?: string;
        quantity?: number;
        recurrenceInfo?: LineItemRecurrenceInfoDraft;
        shippingDetails?: ItemShippingDetailsDraft;
        sku?: string;
        supplyChannel?: ChannelResourceIdentifier;
        variantId?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    action: "addLineItem"
    addedAt?: string

    Date and time (UTC) the Line Item was added to the Cart. If not set, it defaults to the current date and time.

    Optional for backwards compatibility reasons.
    

    Custom Fields for the Line Item.

    distributionChannel?: ChannelResourceIdentifier

    Used to select a Product Price. The Channel must have the ProductDistribution ChannelRoleEnum. If the Cart is bound to a Store with distributionChannels set, the Channel must match one of the Store's distribution channels.

    key?: string

    User-defined unique identifier of the LineItem.

    productId?: string

    id of the Product.

    Either the `productId` and `variantId`, or `sku` must be provided.
    
    quantity?: number

    Number of Line Items to add to the Cart.

    Recurring Order and frequency data.

    shippingDetails?: ItemShippingDetailsDraft

    Container for Line Item-specific addresses.

    sku?: string

    sku of the ProductVariant.

    Either the `productId` and `variantId`, or `sku` must be provided.
    

    Used to identify Inventory entries that must be reserved. The Channel must have the InventorySupply ChannelRoleEnum.

    variantId?: number

    id of the ProductVariant in the Product.

    If not given, the Master Variant is used.
    
    Either the `productId` and `variantId`, or `sku` must be provided.