interface CartDiscountDraft {
    cartPredicate: string;
    custom?: CustomFieldsDraft;
    description?: LocalizedString;
    isActive?: boolean;
    key?: string;
    name: LocalizedString;
    requiresDiscountCode?: boolean;
    sortOrder: string;
    stackingMode?: string;
    stores?: StoreResourceIdentifier[];
    target?: CartDiscountTarget;
    validFrom?: string;
    validUntil?: string;
    value: CartDiscountValueDraft;
}

Properties

cartPredicate: string

Custom Fields of the CartDiscount.

description?: LocalizedString

Description of the CartDiscount.

isActive?: boolean

Only active Discounts can be applied to the Cart. If the limit for active Cart Discounts is reached, a MaxCartDiscountsReached error is returned.

key?: string

User-defined unique identifier for the CartDiscount.

Name of the CartDiscount.

requiresDiscountCode?: boolean

States whether the Discount can only be used in a connection with a DiscountCode.

sortOrder: string

Value between 0 and 1. A Discount with a higher sortOrder is prioritized. The sort order must be unambiguous among all CartDiscounts.

stackingMode?: string

Specifies whether the application of this discount causes the following discounts to be ignored.

  • If defined, the Cart Discount applies on Carts having a Store matching any Store defined for this field.

    • If not defined, the Cart Discount applies on all Carts, irrespective of a Store.

    If the referenced Stores exceed the limit, a MaxStoreReferencesReached error is returned.

    If the referenced Stores exceed the limit for Cart Discounts that do not require a Discount Code, a StoreCartDiscountsLimitReached error is returned.

Segment of the Cart that will be discounted.

Must not be set if the `value` is `giftLineItem`.
validFrom?: string

Date and time (UTC) from which the Discount is effective.

validUntil?: string

Date and time (UTC) until which the Discount is effective.

Effect of the CartDiscount on the target.