The data representation for a Discount Code to be imported that is persisted as a Discount Code in the Project.

interface DiscountCodeImport {
    cartDiscounts: CartDiscountKeyReference[];
    cartPredicate?: string;
    code: string;
    custom?: Custom;
    description?: LocalizedString;
    groups?: string[];
    isActive: boolean;
    key: string;
    maxApplications?: number;
    maxApplicationsPerCustomer?: number;
    name?: LocalizedString;
    validFrom?: string;
    validUntil?: string;
}

Hierarchy (view full)

Properties

cartDiscounts: CartDiscountKeyReference[]

Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied.

cartPredicate?: string

DiscountCode can only be applied to Carts that match this predicate.

code: string

User-defined unique identifier of the DiscountCode that is used by the customer to apply the discount.

custom?: Custom

Custom Fields of the DiscountCode.

description?: LocalizedString

Maps to DiscountCode.description.

groups?: string[]

Groups to which the DiscountCode belongs.

isActive: boolean

Indicates if the DiscountCode is active and can be applied to the Cart.

key: string

User-defined unique identifier. If a Discount Code with this key exists, it will be updated with the imported data.

maxApplications?: number

Number of times the DiscountCode can be applied. DiscountCode application is counted at the time of Order creation or update. However, Order cancellation or deletion does not decrement the count.

maxApplicationsPerCustomer?: number

Number of times the DiscountCode can be applied per Customer (anonymous Carts are not supported). DiscountCode application is counted at the time of Order creation or update. However, Order cancellation or deletion does not decrement the count.

Maps to DiscountCode.name.

validFrom?: string

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

validUntil?: string

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