Coupon
Type: schema
TypeScript Definition
typescript
Coupon: {(components["schemas"]["DiscountCouponPromotion"] | components["schemas"]["FreeGoodCouponPromotion"] | components["schemas"]["FixedPriceCouponPromotion"] | components["schemas"]["BuyXGetYCouponPromotion"] | components["schemas"]["VolumeBasedCouponPromotion"] | components["schemas"]["FreeShipingCouponPromotion"] | components["schemas"]["AcceleratedRewardCouponPromotion"]) & {
/** @enum {unknown} */
coupon_type: "discount" | "free-goods" | "fixed-price" | "free-shipping" | "buy-x-get-y" | "volume-based" | "accelerated-rewards"
}Component References
| Reference | Resolves To |
|---|---|
components["schemas"]["DiscountCouponPromotion"] | DiscountCouponPromotion |
components["schemas"]["FreeGoodCouponPromotion"] | FreeGoodCouponPromotion |
components["schemas"]["FixedPriceCouponPromotion"] | FixedPriceCouponPromotion |
components["schemas"]["BuyXGetYCouponPromotion"] | BuyXGetYCouponPromotion |
components["schemas"]["VolumeBasedCouponPromotion"] | VolumeBasedCouponPromotion |
components["schemas"]["FreeShipingCouponPromotion"] | FreeShipingCouponPromotion |
components["schemas"]["AcceleratedRewardCouponPromotion"] | AcceleratedRewardCouponPromotion |
OpenAPI Schema
json
{
"title": "Coupon",
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/schemas/Coupon",
"description": "API reference for the Coupon schema"
},
"allOf": [
{
"oneOf": [
{
"$ref": "#/components/schemas/DiscountCouponPromotion"
},
{
"$ref": "#/components/schemas/FreeGoodCouponPromotion"
},
{
"$ref": "#/components/schemas/FixedPriceCouponPromotion"
},
{
"$ref": "#/components/schemas/BuyXGetYCouponPromotion"
},
{
"$ref": "#/components/schemas/VolumeBasedCouponPromotion"
},
{
"$ref": "#/components/schemas/FreeShipingCouponPromotion"
},
{
"$ref": "#/components/schemas/AcceleratedRewardCouponPromotion"
}
]
},
{
"type": "object",
"required": [
"coupon_type",
"coupon_code",
"application_rules",
"can_be_used_with_promotion"
],
"properties": {
"coupon_type": {
"enum": [
"discount",
"free-goods",
"fixed-price",
"free-shipping",
"buy-x-get-y",
"volume-based",
"accelerated-rewards"
]
},
"coupon_code": {
"type": "array",
"items": {
"type": "string"
}
},
"application_rules": {
"type": [
"object",
"null"
],
"properties": {
"max_applicable_items": {
"type": "integer"
},
"application_priority": {
"enum": [
"cheapest_first",
"most_expensive_first",
"first_added"
]
}
},
"required": [
"max_applicable_items",
"application_priority"
]
},
"can_be_used_with_promotion": {
"type": "boolean"
}
}
}
]
}Auto-generated from OpenAPI spec and TypeScript definitions