ProductPromotion
Type: schema
TypeScript Definition
typescript
ProductPromotion: {{
id: string;
/** Format: date-time */
starts_at: string;
/** Format: date-time */
expires_at: string | null;
details: components["schemas"]["DiscountBasedPromotion"] | components["schemas"]["FixedPricePromotion"] | components["schemas"]["VolumeBasedPromotion"] | components["schemas"]["FreeGoodsPromotion"];
} | null;
/** ProductReview */
}Component References
| Reference | Resolves To |
|---|---|
components["schemas"]["DiscountBasedPromotion"] | DiscountBasedPromotion |
components["schemas"]["FixedPricePromotion"] | FixedPricePromotion |
components["schemas"]["VolumeBasedPromotion"] | VolumeBasedPromotion |
components["schemas"]["FreeGoodsPromotion"] | FreeGoodsPromotion |
OpenAPI Schema
json
{
"title": "ProductPromotion",
"type": [
"object",
"null"
],
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/schemas/ProductPromotion",
"description": "API reference for the ProductPromotion schema"
},
"required": [
"id",
"starts_at",
"expires_at",
"details"
],
"properties": {
"id": {
"type": "string"
},
"starts_at": {
"type": "string",
"format": "date-time"
},
"expires_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"details": {
"discriminator": {
"propertyName": "promotion_type",
"mapping": {
"discount": "#/components/schemas/DiscountBasedPromotion",
"fixed-price": "#/components/schemas/FixedPricePromotion",
"volume-based": "#/components/schemas/VolumeBasedPromotion",
"free-goods": "#/components/schemas/FreeGoodsPromotion"
}
},
"oneOf": [
{
"$ref": "#/components/schemas/DiscountBasedPromotion"
},
{
"$ref": "#/components/schemas/FixedPricePromotion"
},
{
"$ref": "#/components/schemas/VolumeBasedPromotion"
},
{
"$ref": "#/components/schemas/FreeGoodsPromotion"
}
]
}
}
}Auto-generated from OpenAPI spec and TypeScript definitions