{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/cm-com/main/json-schema/cm-com-handler-create-discount-response-schema.json",
  "title": "handler.createDiscountResponse",
  "x-generated": "2026-10-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cm-com-live-event-ticketing-v1-openapi.yml#/components/schemas/handler.createDiscountResponse",
  "properties": {
    "currency_id": {
      "type": "string"
    },
    "discount_campaign_products": {
      "description": "Only present for PRODUCT campaigns.",
      "items": {
        "$ref": "#/$defs/handler.createDiscountResponseProduct"
      },
      "type": "array",
      "uniqueItems": false
    },
    "discount_code": {
      "description": "The code customers enter at checkout. For ORDER campaigns this is the code you\nsupplied; for PRODUCT campaigns it is generated for you.",
      "type": "string"
    },
    "discount_type": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "max_usage": {
      "type": "integer"
    },
    "name": {
      "type": "string"
    },
    "online_from": {
      "type": "string"
    },
    "online_till": {
      "type": "string"
    },
    "rate": {
      "description": "Only present for ORDER campaigns.",
      "type": "number"
    },
    "rate_type": {
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "handler.createDiscountResponseProduct": {
      "properties": {
        "currency_id": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "max_usage": {
          "type": "integer"
        },
        "product_uuid": {
          "type": "string"
        },
        "rate": {
          "type": "number"
        },
        "rate_type": {
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}