VolumeBasedPromotion
Type: schema
TypeScript Definition
typescript
VolumeBasedPromotion: {{
/**
* @description discriminator enum property added by openapi-typescript
* @enum {string}
*/
promotion_type: "volume-based";
slabs: {
quantity: number;
/**
* @description `less-or-equal` and `less` make the tier "up to" `quantity`; `greater-or-equal` and `greater` make it "from" `quantity`. A line gets the highest "from" tier its quantity reaches; below the first, the "up to" tier that covers it; otherwise the product's price. A promotion has at most one "up to" tier, ending below its first "from" tier, and no two tiers starting from the same quantity.
* @enum {unknown}
*/
quantity_condition: "less" | "less-or-equal" | "greater" | "greater-or-equal";
discount_percent: number;
}[];
};
/** VolumeBasedRule */
}OpenAPI Schema
json
{
"title": "VolumeBasedPromotion",
"type": "object",
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/schemas/VolumeBasedPromotion",
"description": "API reference for the VolumeBasedPromotion schema"
},
"required": [
"promotion_type",
"slabs"
],
"properties": {
"promotion_type": {
"type": "string",
"const": "volume-based"
},
"slabs": {
"type": "array",
"items": {
"type": "object",
"required": [
"quantity",
"quantity_condition",
"discount_percent"
],
"properties": {
"quantity": {
"type": "integer"
},
"quantity_condition": {
"description": "`less-or-equal` and `less` make the tier \"up to\" `quantity`; `greater-or-equal` and `greater` make it \"from\" `quantity`. A line gets the highest \"from\" tier its quantity reaches; below the first, the \"up to\" tier that covers it; otherwise the product's price. A promotion has at most one \"up to\" tier, ending below its first \"from\" tier, and no two tiers starting from the same quantity.",
"enum": [
"less",
"less-or-equal",
"greater",
"greater-or-equal"
]
},
"discount_percent": {
"type": "number"
}
}
}
}
}
}Auto-generated from OpenAPI spec and TypeScript definitions