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

    Interface MyCartAddDiscountCodeAction

    Adds a DiscountCode to the Cart to activate the related CartDiscounts. Adding a Discount Code is only possible if no DirectDiscount has been applied to the Cart. Discount Codes can be added to frozen Carts, but their DiscountCodeState is then DoesNotMatchCart.

    The maximum number of Discount Codes in a Cart is restricted by a [limit](/../api/limits#carts).
    
    Specific Error Code: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
    
    interface MyCartAddDiscountCodeAction {
        action: "addDiscountCode";
        code: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    Properties

    action: "addDiscountCode"
    code: string

    code of a DiscountCode.