Typescript SDK Type Docs
    Preparing search index...

    Interface MergeCartDraft

    Used for merging an anonymous Cart with a Customer Cart with the Merge Cart and Merge Cart in Store endpoints. Either anonymousCart or anonymousId is required.

    interface MergeCartDraft {
        anonymousCart?: CartResourceIdentifier;
        anonymousId?: string;
        mergeMode?: CartMergeMode;
        updateProductData?: boolean;
    }
    Index

    Properties

    anonymousCart?: CartResourceIdentifier

    ResourceIdentifier to the anonymous Cart to be merged. Required if anonymousId is not provided.

    anonymousId?: string

    Assigns the Customer to the Carts that have the same anonymousId. Required if anonymousCart is not provided. If both anonymousCart and anonymousId are provided, this value must match the anonymousId of the anonymous Cart otherwise, an InvalidOperation error is returned.

    mergeMode?: CartMergeMode

    Determines how to merge the anonymous Cart with the existing Customer Cart.

    updateProductData?: boolean
    • If true, the LineItem Product data (name, variant, and productType) of the returned Cart will be updated.
      • If false, only the prices, discounts, and tax rates will be updated.