{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cavuno-com/json-schema/cavuno-com-promotion-code-schema.json",
  "title": "PromotionCode",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cavuno-com-coupons-api-openapi.yml#/components/schemas/PromotionCode",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "object": {
      "type": "string",
      "enum": [
        "promotion_code"
      ]
    },
    "code": {
      "type": "string"
    },
    "couponId": {
      "type": "string"
    },
    "active": {
      "type": "boolean"
    },
    "created": {
      "type": "string"
    },
    "maxRedemptions": {
      "type": [
        "integer",
        "null"
      ],
      "description": "How many times the code can be redeemed in total, or null for no limit."
    },
    "timesRedeemed": {
      "type": "integer",
      "minimum": 0,
      "description": "How many times the code has been redeemed."
    },
    "expiresAt": {
      "type": [
        "string",
        "null"
      ],
      "description": "ISO-8601 time the code stops working, or null."
    }
  },
  "required": [
    "id",
    "object",
    "code",
    "couponId",
    "active",
    "created",
    "maxRedemptions",
    "timesRedeemed",
    "expiresAt"
  ]
}