Skip to content

Promotion

Type: schema

TypeScript Definition

typescript
Promotion: {(components["schemas"]["DiscountCouponPromotion"] | components["schemas"]["FreeGoodCouponPromotion"] | components["schemas"]["BuyXGetYCouponPromotion"] | components["schemas"]["VolumeBasedCouponPromotion"] | components["schemas"]["FreeShipingCouponPromotion"]) & {
            /** @enum {unknown} */
            promotion_type: "discount" | "free-goods" | "free-shipping" | "buy-x-get-y" | "volume-based"
}

Component References

ReferenceResolves To
components["schemas"]["DiscountCouponPromotion"]DiscountCouponPromotion
components["schemas"]["FreeGoodCouponPromotion"]FreeGoodCouponPromotion
components["schemas"]["BuyXGetYCouponPromotion"]BuyXGetYCouponPromotion
components["schemas"]["VolumeBasedCouponPromotion"]VolumeBasedCouponPromotion
components["schemas"]["FreeShipingCouponPromotion"]FreeShipingCouponPromotion

OpenAPI Schema

json
{
  "title": "Promotion",
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/storefront/schemas/Promotion",
    "description": "API reference for the Promotion schema"
  },
  "allOf": [
    {
      "oneOf": [
        {
          "$ref": "#/components/schemas/DiscountCouponPromotion"
        },
        {
          "$ref": "#/components/schemas/FreeGoodCouponPromotion"
        },
        {
          "$ref": "#/components/schemas/BuyXGetYCouponPromotion"
        },
        {
          "$ref": "#/components/schemas/VolumeBasedCouponPromotion"
        },
        {
          "$ref": "#/components/schemas/FreeShipingCouponPromotion"
        }
      ]
    },
    {
      "type": "object",
      "required": [
        "promotion_type",
        "can_be_used_with_other_promotion"
      ],
      "properties": {
        "promotion_type": {
          "enum": [
            "discount",
            "free-goods",
            "free-shipping",
            "buy-x-get-y",
            "volume-based"
          ]
        },
        "can_be_used_with_other_promotion": {
          "type": "boolean"
        }
      }
    }
  ]
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: