For Product Variant identification, either the productId and variantId, or sku must be provided.

interface MyLineItemDraft {
    addedAt?: string;
    custom?: CustomFieldsDraft;
    distributionChannel?: ChannelResourceIdentifier;
    productId?: string;
    quantity?: number;
    shippingDetails?: ItemShippingDetailsDraft;
    sku?: string;
    supplyChannel?: ChannelResourceIdentifier;
    variantId?: number;
}

Properties

addedAt?: string

Date and time (UTC) the Product Variant is added to the Cart. If not set, it defaults to the current date and time.

Optional for backwards compatibility reasons.

Custom Fields for the Cart.

distributionChannel?: ChannelResourceIdentifier

Used to select a Product Price. The Channel must have the ProductDistribution ChannelRoleEnum.

If the Cart is bound to a [Store](ctp:api:type:Store) with `distributionChannels` set,
the Channel must match one of the Store's distribution channels.
productId?: string

id of the Product.

quantity?: number

Number of Product Variants to add to the Cart.

shippingDetails?: ItemShippingDetailsDraft

Container for Line Item-specific addresses.

sku?: string

sku of the ProductVariant.

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 provided, the Master Variant is used.

Generated using TypeDoc