{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bol-com/json-schema/bol-com-promotion-schema.json",
  "title": "Promotion",
  "description": "A single promotion.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bol-com-promotions-api-openapi.yml#/components/schemas/Promotion",
  "required": [
    "countries",
    "endDateTime",
    "promotionId",
    "promotionType",
    "retailerSpecificPromotion",
    "startDateTime",
    "title"
  ],
  "type": "object",
  "properties": {
    "promotionId": {
      "type": "string",
      "description": "The identifier of the promotion."
    },
    "title": {
      "type": "string",
      "description": "The title of the promotion."
    },
    "startDateTime": {
      "type": "string",
      "description": "The starting date and time of the promotion.",
      "format": "date-time"
    },
    "endDateTime": {
      "type": "string",
      "description": "The ending date and time of the promotion.",
      "format": "date-time"
    },
    "countries": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PromotionCountryCode"
      }
    },
    "promotionType": {
      "type": "string",
      "description": "The type of the promotion.",
      "enum": [
        "AWARENESS",
        "PRICE_OFF"
      ]
    },
    "retailerSpecificPromotion": {
      "type": "boolean",
      "description": "Indicates whether the promotion is retailer specific or open to the platform."
    },
    "campaign": {
      "allOf": [
        {
          "$ref": "#/$defs/Campaign"
        }
      ]
    }
  },
  "$defs": {
    "Campaign": {
      "required": [
        "name",
        "startDateTime"
      ],
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the campaign under which the promotion had been created."
        },
        "startDateTime": {
          "type": "string",
          "description": "The starting date and time of the campaign.",
          "format": "date-time"
        },
        "endDateTime": {
          "type": [
            "string",
            "null"
          ],
          "description": "The ending date and time of the campaign.",
          "format": "date-time"
        }
      }
    },
    "PromotionCountryCode": {
      "required": [
        "countryCode"
      ],
      "type": "object",
      "properties": {
        "countryCode": {
          "type": "string",
          "description": "The country code of the country in which the promotion is active.",
          "enum": [
            "NL",
            "BE"
          ]
        }
      }
    }
  }
}