{
  "openapi": "3.1.0",
  "info": {
    "title": "Events - Events campaign",
    "version": "2024-01-01",
    "description": ""
  },
  "paths": {},
  "components": {
    "schemas": {
      "EventCampaignCreatedData": {
        "title": "Event Campaign Created",
        "type": "object",
        "description": "Event data object schema for `campaign.created`.",
        "properties": {
          "campaign": {
            "nullable": true,
            "$ref": "#/components/schemas/Campaign"
          },
          "created_at": {
            "type": "string",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the campaign was created in the ISO 8601 format.",
            "format": "date-time"
          }
        }
      },
      "EventCampaignVouchersGenerationCompletedData": {
        "title": "Event Campaign Vouchers Generation Completed",
        "type": "object",
        "description": "Event data object schema for `campaign.vouchers.generation.completed`.",
        "properties": {
          "campaign": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "count": {
            "type": "integer",
            "description": "Number of generated vouchers."
          },
          "completed_at": {
            "type": "string",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the generation of the campaign vouchers was completed in the ISO 8601 format.",
            "format": "date-time"
          }
        }
      },
      "EventCampaignDisabledData": {
        "title": "Event Campaign Disabled",
        "type": "object",
        "description": "Event data object schema for `campaign.disabled`.",
        "properties": {
          "campaign": {
            "nullable": true,
            "$ref": "#/components/schemas/Campaign"
          }
        }
      },
      "EventCampaignEnabledData": {
        "title": "Event Campaign Enabled",
        "type": "object",
        "description": "Event data object schema for `campaign.enabled`.",
        "properties": {
          "campaign": {
            "nullable": true,
            "$ref": "#/components/schemas/Campaign"
          }
        }
      },
      "EventCampaignUpdatedData": {
        "title": "Event Campaign Updated",
        "type": "object",
        "description": "Event data object schema for `campaign.updated`.",
        "properties": {
          "campaign": {
            "nullable": true,
            "$ref": "#/components/schemas/Campaign"
          }
        }
      },
      "EventCampaignDeletedData": {
        "title": "Event Campaign Deleted",
        "type": "object",
        "description": "Event data object schema for `campaign.deleted`.",
        "properties": {
          "campaign": {
            "nullable": true,
            "$ref": "#/components/schemas/Campaign"
          },
          "deleted_at": {
            "type": "string",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the campaign was deleted in the ISO 8601 format.",
            "format": "date-time"
          }
        }
      },
      "EventCampaignLoyaltyTierCreatedData": {
        "type": "object",
        "title": "Loyalty Tier Created",
        "description": "Event data object schema for a created loyalty tier.",
        "properties": {
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "loyalty_tier": {
            "$ref": "#/components/schemas/LoyaltyTier"
          }
        }
      },
      "EventCampaignLoyaltyTierDeletedData": {
        "type": "object",
        "title": "Loyalty Tier Deleted",
        "description": "Event data object schema for a deleted loyalty tier.",
        "properties": {
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "loyalty_tier": {
            "$ref": "#/components/schemas/LoyaltyTier"
          }
        }
      },
      "EventCampaignLoyaltyTierUpdatedData": {
        "type": "object",
        "title": "Loyalty Tier Updated",
        "description": "Event data object schema for an updated loyalty tier.",
        "properties": {
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "loyalty_tier": {
            "$ref": "#/components/schemas/LoyaltyTier"
          }
        }
      },
      "EventCampaignPromotionTierCreatedData": {
        "type": "object",
        "title": "Event Campaign Promotion Tier Created",
        "description": "Event data object schema for `campaign.promotion_tier.created`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCampaignPromotionTier"
          }
        ]
      },
      "EventCampaignPromotionTierDisabledData": {
        "type": "object",
        "title": "Event Campaign Promotion Tier Disabled",
        "description": "Event data object schema for `campaign.promotion_tier.disabled`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCampaignPromotionTier"
          }
        ]
      },
      "EventCampaignPromotionTierEnabledData": {
        "type": "object",
        "title": "Event Campaign Promotion Tier Enabled",
        "description": "Event data object schema for `campaign.promotion_tier.enabled`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCampaignPromotionTier"
          }
        ]
      },
      "EventCampaignPromotionTierUpdatedData": {
        "type": "object",
        "title": "Event Campaign Promotion Tier Updated",
        "description": "Event data object schema for `campaign.promotion_tier.updated`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCampaignPromotionTier"
          }
        ]
      },
      "EventCampaignPromotionTierDeletedData": {
        "type": "object",
        "title": "Event Campaign Promotion Tier Deleted",
        "description": "Event data object schema for `campaign.promotion_tier.deleted`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCampaignPromotionTier"
          }
        ]
      },
      "Campaign": {
        "title": "Campaign",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignBase"
          },
          {
            "title": "Campaign Additional Data",
            "type": "object",
            "properties": {
              "promotion": {
                "$ref": "#/components/schemas/PromotionTiersList"
              },
              "validation_rules_assignments": {
                "$ref": "#/components/schemas/ValidationRulesAssignmentsList"
              },
              "access_settings_assignments": {
                "$ref": "#/components/schemas/AccessSettingsAssignmentsList"
              }
            }
          }
        ]
      },
      "SimpleCampaign": {
        "title": "Simple Campaign",
        "type": "object",
        "description": "Simplified campaign data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Campaign ID."
          },
          "name": {
            "type": "string",
            "description": "Campaign name."
          },
          "campaign_type": {
            "type": "string",
            "description": "Type of campaign."
          },
          "type": {
            "type": "string",
            "description": "Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers.\n\n- `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria\n-  `STATIC`: vouchers need to be manually published\n- `STANDALONE`: campaign for single vouchers",
            "enum": [
              "AUTO_UPDATE",
              "STATIC",
              "STANDALONE"
            ]
          },
          "is_referral_code": {
            "type": "boolean",
            "description": "Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`."
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleCampaignVoucher"
          },
          "referral_program": {
            "$ref": "#/components/schemas/ReferralProgram"
          },
          "auto_join": {
            "type": "boolean",
            "description": "Indicates whether customers will be able to auto-join the campaign if any earning rule is fulfilled."
          },
          "join_once": {
            "type": "boolean",
            "description": "If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them. It is always `true` for loyalty campaigns."
          },
          "active": {
            "type": "boolean",
            "description": "Indicates whether the campaign is active."
          },
          "category_id": {
            "nullable": true,
            "type": "string",
            "description": "The unique category ID that this campaign belongs to."
          },
          "category": {
            "type": "string",
            "description": "Unique category name."
          },
          "categories": {
            "type": "array",
            "description": "Contains details about the category.",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a campaign. The metadata object stores all custom attributes assigned to the campaign."
          },
          "start_date": {
            "type": "string",
            "format": "date-time",
            "description": "Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive *before* this date. ",
            "example": "2022-09-20T00:00:00.000Z"
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "description": "Expiration timestamp defines when the campaign expires in ISO 8601 format.  Campaign is inactive *after* this date.",
            "example": "2022-09-30T00:00:00.000Z"
          },
          "description": {
            "type": "string",
            "description": "An optional field to keep extra textual information about the campaign such as a campaign description and details."
          },
          "created_at": {
            "type": "string",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the campaign was updated in the ISO 8601 format.",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "default": "campaign",
            "enum": [
              "campaign"
            ],
            "description": "The type of the object represented by JSON. This object stores information about the campaign."
          }
        }
      },
      "LoyaltyTier": {
        "title": "Loyalty Tier",
        "description": "Loyalty tier data.",
        "allOf": [
          {
            "$ref": "#/components/schemas/LoyaltyTierBase"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique loyalty tier ID."
              },
              "campaign_id": {
                "type": "string",
                "description": "Unique parent campaign ID."
              },
              "metadata": {
                "type": "object",
                "nullable": true,
                "description": "The metadata object stores all custom attributes assigned to the loyalty tier. A set of key/value pairs that can be attached to a loyalty tier object."
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp representing the date and time when the loyalty tier was created in the ISO 8601 format."
              },
              "updated_at": {
                "type": "string",
                "nullable": true,
                "format": "date-time",
                "description": "Timestamp representing the date and time when the loyalty tier was updated in the ISO 8601 format."
              },
              "config": {
                "type": "object",
                "description": "Defines loyalty tier range in points.",
                "required": [
                  "points"
                ],
                "properties": {
                  "points": {
                    "type": "object",
                    "description": "Defines range of loyalty tier in points.",
                    "properties": {
                      "from": {
                        "type": "integer",
                        "description": "Bottom points threshold value."
                      },
                      "to": {
                        "type": "integer",
                        "description": "Top points threshold value."
                      }
                    }
                  }
                }
              },
              "expiration": {
                "$ref": "#/components/schemas/LoyaltyTierExpiration"
              },
              "object": {
                "type": "string",
                "default": "loyalty_tier",
                "enum": [
                  "loyalty_tier"
                ],
                "description": "The type of the object represented by JSON. This object stores information about the loyalty."
              }
            },
            "required": [
              "id",
              "campaign_id",
              "metadata",
              "created_at",
              "config",
              "object"
            ]
          }
        ]
      },
      "EventCampaignPromotionTier": {
        "type": "object",
        "title": "Promotion Tier",
        "description": "Event data object schema for activities related to campaign promotion tiers.",
        "properties": {
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "promotion_tier": {
            "$ref": "#/components/schemas/PromotionTier"
          }
        }
      },
      "CampaignBase": {
        "type": "object",
        "title": "Campaign Base",
        "description": "Object representing a campaign.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique campaign ID, assigned by Voucherify.",
            "example": "camp_f7fBbQxUuTN7dI7tGOo5XMDA"
          },
          "name": {
            "type": "string",
            "description": "Campaign name."
          },
          "description": {
            "type": "string",
            "description": "An optional field to keep extra textual information about the campaign such as a campaign description and details."
          },
          "campaign_type": {
            "type": "string",
            "enum": [
              "LOYALTY_PROGRAM",
              "GIFT_VOUCHERS",
              "DISCOUNT_COUPONS",
              "PROMOTION",
              "REFERRAL_PROGRAM"
            ],
            "description": "Type of campaign."
          },
          "type": {
            "type": "string",
            "description": "Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers.\n\n- `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria\n-  `STATIC`: vouchers need to be manually published\n- `STANDALONE`: campaign for single vouchers",
            "enum": [
              "AUTO_UPDATE",
              "STATIC",
              "STANDALONE"
            ]
          },
          "voucher": {
            "$ref": "#/components/schemas/CampaignVoucher"
          },
          "auto_join": {
            "type": "boolean",
            "description": "If set to `true`, customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled."
          },
          "join_once": {
            "type": "boolean",
            "description": "If set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them. It is always `true` for loyalty campaigns."
          },
          "use_voucher_metadata_schema": {
            "type": "boolean",
            "description": "Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema."
          },
          "validity_timeframe": {
            "type": "object",
            "description": "Indicates recurrent time periods when the campaign is valid.",
            "properties": {
              "interval": {
                "type": "string",
                "description": "Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day."
              },
              "duration": {
                "type": "string",
                "description": "Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day."
              }
            }
          },
          "validity_day_of_week": {
            "type": "array",
            "description": "Integer array corresponding to the particular days of the week in which the campaign is valid.\n\n- `0` Sunday\n- `1` Monday\n- `2` Tuesday\n- `3` Wednesday\n- `4` Thursday\n- `5` Friday\n- `6` Saturday",
            "items": {
              "type": "integer",
              "enum": [
                0,
                1,
                2,
                3,
                4,
                5,
                6
              ]
            }
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "activity_duration_after_publishing": {
            "type": "string",
            "description": "Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days."
          },
          "vouchers_count": {
            "type": "integer",
            "description": "Total number of unique vouchers in campaign."
          },
          "start_date": {
            "type": "string",
            "format": "date-time",
            "description": "Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive *before* this date. ",
            "example": "2022-09-20T00:00:00.000Z"
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "description": "Expiration timestamp defines when the campaign expires in ISO 8601 format.  Campaign is inactive *after* this date.",
            "example": "2022-09-30T00:00:00.000Z"
          },
          "active": {
            "type": "boolean",
            "description": "Indicates if the campaign is active."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2021-12-01T08:00:50.038Z",
            "description": "Timestamp representing the date and time when the campaign was created in ISO 8601 format."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-09-20T09:18:19.623Z",
            "description": "Timestamp representing the date and time when the campaign was updated in ISO 8601 format."
          },
          "category": {
            "type": "string",
            "description": "Unique category name."
          },
          "creation_status": {
            "type": "string",
            "enum": [
              "DONE",
              "IN_PROGRESS",
              "FAILED",
              "DRAFT",
              "MODIFYING"
            ],
            "description": "Indicates the status of the campaign creation."
          },
          "vouchers_generation_status": {
            "type": "string",
            "description": "Indicates the status of the campaign's voucher generation.",
            "enum": [
              "DONE",
              "IN_PROGRESS",
              "FAILED",
              "DRAFT",
              "MODIFYING"
            ]
          },
          "protected": {
            "type": "boolean",
            "description": "Indicates whether the resource can be deleted."
          },
          "category_id": {
            "type": "string",
            "nullable": true,
            "description": "Unique category ID that this campaign belongs to.",
            "example": "cat_0b688929a2476386a7"
          },
          "categories": {
            "type": "array",
            "description": "Contains details about the category.",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          },
          "object": {
            "type": "string",
            "default": "campaign",
            "description": "The type of the object represented by JSON. This object stores information about the campaign."
          },
          "referral_program": {
            "$ref": "#/components/schemas/ReferralProgram"
          },
          "loyalty_tiers_expiration": {
            "$ref": "#/components/schemas/LoyaltyTiersExpirationAll"
          }
        },
        "required": [
          "id",
          "name",
          "campaign_type",
          "type",
          "auto_join",
          "join_once",
          "use_voucher_metadata_schema",
          "created_at",
          "creation_status",
          "vouchers_generation_status",
          "protected",
          "category_id",
          "categories",
          "object"
        ]
      },
      "PromotionTiersList": {
        "type": "object",
        "description": "Promotion Tiers",
        "title": "Promotion Tiers",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about promotion tiers in a dictionary."
          },
          "data_ref": {
            "type": "string",
            "default": "tiers",
            "description": "Identifies the name of the attribute that contains the array of promotion tier objects."
          },
          "tiers": {
            "type": "array",
            "description": "Contains array of promotion tier objects.",
            "items": {
              "$ref": "#/components/schemas/PromotionTier"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of promotion tiers."
          },
          "has_more": {
            "type": "boolean",
            "description": "As query results are always limited (by the limit parameter), the `has_more` flag indicates whether there are more records for given filter parameters. This lets you know if you are able to run another request (with a different page or a different start date filter) to get more records returned in the results."
          }
        }
      },
      "ValidationRulesAssignmentsList": {
        "title": "Validation Rules Assignments List",
        "description": "List of Validation Rules Assignments",
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "enum": [
              "list"
            ],
            "description": "The type of the object represented by JSON. This object stores information about validation rules assignments."
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "enum": [
              "data"
            ],
            "description": "Identifies the name of the attribute that contains the array of validation rules assignments."
          },
          "data": {
            "type": "array",
            "description": "Contains array of validation rules assignments.",
            "items": {
              "$ref": "#/components/schemas/BusValRuleAssignment"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "description": "Total number of validation rules assignments."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "AccessSettingsAssignmentsList": {
        "title": "Access Settings Assignments List",
        "type": "object",
        "description": "Lists all assignments of the campaign to areas and stores if the Areas and Stores feature is enabled (Enterprise feature).",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. Default is `list`. This object stores information about campaign assignments to areas and stores",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of campaign assignments.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Contains an array of campaign assignments.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique identifier of the campaign assignment.",
                  "example": "arsca_0ef5ee192117ae2416"
                },
                "area_id": {
                  "type": "string",
                  "description": "Unique identifier of the area to which the campaign is assigned.",
                  "example": "ar_0ea6cd7b781b8f857f"
                },
                "all_stores": {
                  "type": "boolean",
                  "description": "Determines if the campaign is assigned to all of the stores in the area."
                },
                "area_store_id": {
                  "type": "string",
                  "description": "Unique identifier of the store to which the campaign is assigned.",
                  "example": "ars_0ec347e2016bed85f4"
                },
                "created_at": {
                  "type": "string",
                  "description": "Date and time when the assignment was made. The value is shown in the ISO 8601 format.",
                  "format": "date-time",
                  "example": "2024-06-25T19:04:16.260Z"
                },
                "object": {
                  "type": "string",
                  "description": "The type of the object represented by JSON. This object stores information about the campaign assignment to areas or stores.",
                  "example": "area_store_campaign_assignment"
                }
              },
              "required": [
                "id",
                "area_id",
                "created_at",
                "object"
              ]
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of areas and stores to which the campaign is assigned.",
            "min": 0
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "SimpleCampaignVoucher": {
        "type": "object",
        "description": "Simplified campaign voucher data.",
        "title": "Simple Campaign Voucher",
        "properties": {
          "type": {
            "type": "string",
            "description": "Type of the voucher.",
            "enum": [
              "DISCOUNT_VOUCHER",
              "LOYALTY_CARD",
              "GIFT_VOUCHER"
            ]
          },
          "discount": {
            "description": "Defines the voucher discount type and details. It will not be returned at all or it will return a `null` for `LOYALTY_CARD`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Discount"
              }
            ]
          },
          "gift": {
            "description": "Defines the voucher gift details. It will not be returned at all or it will return a `null` for `LOYALTY_CARD`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Gift"
              }
            ]
          },
          "loyalty_card": {
            "description": "Defines the voucher loyalty card details.  It will not be returned at all or it will return a `null` for `DISCOUNT_VOUCHER` or `GIFT_CARD`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/CampaignLoyaltyCard"
              }
            ]
          },
          "redemption": {
            "type": "object",
            "description": "Defines the redemption limits on vouchers.",
            "properties": {
              "quantity": {
                "type": "integer",
                "nullable": true,
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              },
              "redeemed_quantity": {
                "type": "integer",
                "example": 1,
                "description": "How many times a voucher has already been redeemed."
              }
            },
            "required": [
              "quantity",
              "redeemed_quantity"
            ]
          },
          "code_config": {
            "$ref": "#/components/schemas/CodeConfigRequiredLengthCharsetPattern"
          }
        },
        "required": [
          "type",
          "redemption",
          "code_config"
        ]
      },
      "ReferralProgram": {
        "title": "Referral Program",
        "description": "Defines the referee reward and the way a referral is triggered. Context: `REFERRAL_PROGRAM`.",
        "type": "object",
        "properties": {
          "conversion_event_type": {
            "type": "string",
            "enum": [
              "redemption",
              "custom_event"
            ],
            "description": "Defines how a referral is triggered."
          },
          "custom_event": {
            "type": "object",
            "description": "Contains details about the custom event.",
            "properties": {
              "id": {
                "type": "string",
                "example": "ms_Ll9enAm2BCN0M1s4VxWobLFM",
                "description": "Unique custom event ID."
              },
              "name": {
                "type": "string",
                "description": "Custom event name."
              }
            }
          },
          "referee_reward": {
            "type": "object",
            "description": "Defines the referee reward.",
            "properties": {
              "related_object_parent": {
                "type": "object",
                "description": "Details of the resource from which the reward originates.",
                "properties": {
                  "id": {
                    "type": "string",
                    "example": "camp_kdxp3vf1clQ9CFs1jpqv3tZe",
                    "description": "Unique identifier of the reward source."
                  },
                  "name": {
                    "type": "string",
                    "description": "Name of the reward source."
                  },
                  "object": {
                    "type": "string",
                    "default": "CAMPAIGN",
                    "enum": [
                      "CAMPAIGN"
                    ],
                    "description": "Type of resource represented by the source of the reward."
                  }
                }
              },
              "type": {
                "type": "string",
                "enum": [
                  "DISCOUNT_VOUCHER",
                  "LOYALTY_CARD",
                  "GIFT_VOUCHER"
                ],
                "description": "Type of reward."
              },
              "amount": {
                "type": "string",
                "description": "Define the number of `points` to add to a loyalty card or `credits` to the balance on a gift card. In case of the gift card, the value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000."
              }
            }
          }
        }
      },
      "Category": {
        "title": "Category",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique category ID assigned by Voucherify."
          },
          "name": {
            "type": "string",
            "description": "Category name."
          },
          "hierarchy": {
            "type": "integer",
            "description": "Category hierarchy."
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the category was created in the ISO 8601 format.",
            "example": "2024-01-01T11:11:11.111Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the category was updated in the ISO 8601 format.",
            "example": "2024-01-01T11:11:11.111Z",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "default": "category",
            "enum": [
              "category"
            ],
            "description": "The type of the object represented by the JSON. This object stores information about the category."
          },
          "stacking_rules_type": {
            "type": "string",
            "description": "The type of the stacking rule eligibility.",
            "enum": [
              "JOINT",
              "EXCLUSIVE"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "hierarchy",
          "created_at",
          "object"
        ]
      },
      "LoyaltyTierBase": {
        "title": "Loyalty Tier Base",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Loyalty Tier name."
          },
          "earning_rules": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/MappingPoints"
            },
            "description": "Contains a list of earning rule IDs and their points mapping for the given earning rule."
          },
          "rewards": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/MappingPoints"
            },
            "description": "Contains a list of reward IDs and their points mapping for the given reward."
          },
          "points": {
            "type": "object",
            "description": "Defines range of loyalty tier in points.",
            "properties": {
              "from": {
                "type": "integer",
                "description": "Bottom points threshold value."
              },
              "to": {
                "type": "integer",
                "description": "Top points threshold value."
              }
            }
          }
        },
        "required": [
          "name",
          "points",
          "earning_rules",
          "rewards"
        ]
      },
      "LoyaltyTierExpiration": {
        "title": "Loyalty Tier Expiration",
        "description": "Defines loyalty tier expiration date.",
        "type": "object",
        "properties": {
          "customer_id": {
            "type": "string",
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.",
            "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
          },
          "campaign_id": {
            "type": "string",
            "description": "Unique identifier of the campaign.",
            "example": "camp_rRsfatlwN7unSeUIJDCYedal"
          },
          "tier_id": {
            "type": "string",
            "description": "Unique identifier of the tier."
          },
          "start_date": {
            "type": "string",
            "description": "Activation timestamp defines when the loyalty tier starts to be active in the ISO 8601 format. Loyalty tier is inactive before this date."
          },
          "expiration_date": {
            "type": "string",
            "description": "Expiration timestamp defines when the loyalty tier expires in the ISO 8601 format. Loyalty tier is inactive after this date."
          },
          "created_at": {
            "type": "string",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the loyalty tier was created in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the loyalty tier was updated in the ISO 8601 format.",
            "format": "date-time"
          }
        },
        "required": [
          "customer_id",
          "campaign_id",
          "tier_id",
          "created_at"
        ]
      },
      "PromotionTier": {
        "type": "object",
        "description": "Object representing a promotion tier. Promotion tiers are always assigned to a campaign and cannot be used standalone.",
        "title": "Promotion Tier",
        "properties": {
          "id": {
            "type": "string",
            "example": "promo_63fYCt81Aw0h7lzyRkrGZh9p",
            "description": "Unique promotion tier ID."
          },
          "created_at": {
            "type": "string",
            "example": "2021-12-15T11:34:01.333Z",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the promotion tier was created in the ISO 8601 format."
          },
          "updated_at": {
            "type": "string",
            "example": "2022-02-09T09:20:05.603Z",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the promotion tier was updated in the ISO 8601 format."
          },
          "name": {
            "type": "string",
            "description": "Name of the promotion tier."
          },
          "banner": {
            "type": "string",
            "description": "Text to be displayed to your customers on your website."
          },
          "action": {
            "type": "object",
            "description": "Contains details about the discount applied by the promotion tier.",
            "properties": {
              "discount": {
                "$ref": "#/components/schemas/Discount"
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format."
          },
          "hierarchy": {
            "type": "integer",
            "description": "The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy."
          },
          "promotion_id": {
            "type": "string",
            "description": "Promotion unique ID."
          },
          "campaign": {
            "type": "object",
            "description": "Contains details about promotion tier's parent campaign.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique campaign ID."
              },
              "start_date": {
                "type": "string",
                "description": "Activation timestamp defines when the campaign starts to be active in the ISO 8601 format. Campaign is *inactive before* this date. ",
                "format": "date-time",
                "example": "2022-09-22T00:00:00.000Z"
              },
              "expiration_date": {
                "type": "string",
                "format": "date-time",
                "description": "Expiration timestamp defines when the campaign expires in the ISO 8601 format.  Campaign is *inactive after* this date.",
                "example": "2022-09-30T00:00:00.000Z"
              },
              "validity_timeframe": {
                "type": "object",
                "description": "Recurrent time periods when the campaign is valid. For example, valid for 1 hour every other day.",
                "properties": {
                  "interval": {
                    "type": "string",
                    "description": "Defines the intervening time between two time points in the ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day."
                  },
                  "duration": {
                    "type": "string",
                    "description": "Defines the amount of time the campaign will be active in the ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day."
                  }
                }
              },
              "validity_day_of_week": {
                "type": "array",
                "description": "Integer array corresponding to the particular days of the week in which the campaign is valid.\n\n- `0` Sunday\n- `1` Monday\n- `2` Tuesday\n- `3` Wednesday\n- `4` Thursday\n- `5` Friday\n- `6` Saturday",
                "items": {
                  "type": "integer",
                  "enum": [
                    0,
                    1,
                    2,
                    3,
                    4,
                    5,
                    6
                  ]
                }
              },
              "validity_hours": {
                "$ref": "#/components/schemas/ValidityHours"
              },
              "active": {
                "type": "boolean",
                "description": "A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the `start_date` and `expiration_date` using the [Disable Campaign](ref:disable-campaign) endpoint.  \n\n- `true` indicates an *active* campaign\n- `false` indicates an *inactive* campaign"
              },
              "category_id": {
                "type": "string",
                "example": "cat_0b688929a2476386a6",
                "description": "Unique category ID that this campaign belongs to."
              },
              "object": {
                "type": "string",
                "description": "The type of the object represented by the campaign object. This object stores information about the campaign.",
                "default": "campaign"
              }
            }
          },
          "campaign_id": {
            "type": "string",
            "description": "Promotion tier's parent campaign's unique ID."
          },
          "active": {
            "type": "boolean",
            "description": "A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`.  \n\n- `true` indicates an *active* promotion tier\n- `false` indicates an *inactive* promotion tier"
          },
          "start_date": {
            "type": "string",
            "description": "Activation timestamp defines when the promotion tier starts to be active in the ISO 8601 format. Promotion tier is *inactive before* this date. ",
            "format": "date-time",
            "example": "2022-09-23T00:00:00.000Z"
          },
          "expiration_date": {
            "type": "string",
            "description": "Activation timestamp defines when the promotion tier expires in the ISO 8601 format. Promotion tier is *inactive after* this date. ",
            "format": "date-time",
            "example": "2022-09-26T00:00:00.000Z"
          },
          "validity_timeframe": {
            "type": "object",
            "description": "Set recurrent time periods when the promotion tier is valid. For example, valid for 1 hour every other day. `start_date` **required** when including the `validity_timeframe`.",
            "properties": {
              "interval": {
                "type": "string",
                "description": "Defines the intervening time between two time points in the ISO 8601 format, expressed as a duration. For example, a promotion tier with an `interval` of `P2D` will be active every other day."
              },
              "duration": {
                "type": "string",
                "description": "Defines the amount of time the promotion tier will be active in the ISO 8601 format. For example, a promotion tier with a `duration` of `P1D` will be valid for a duration of one day."
              }
            }
          },
          "validity_day_of_week": {
            "type": "array",
            "description": "Integer array corresponding to the particular days of the week in which the promotion tier is valid.\n\n- `0` Sunday\n- `1` Monday\n- `2` Tuesday\n- `3` Wednesday\n- `4` Thursday\n- `5` Friday\n- `6` Saturday",
            "items": {
              "type": "integer",
              "enum": [
                0,
                1,
                2,
                3,
                4,
                5,
                6
              ]
            }
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "summary": {
            "type": "object",
            "description": "Contains statistics about promotion tier redemptions and orders.",
            "properties": {
              "redemptions": {
                "type": "object",
                "description": "Contains statistics about promotion tier redemptions.",
                "properties": {
                  "total_redeemed": {
                    "type": "integer",
                    "description": "Number of times the promotion tier was redeemed."
                  }
                }
              },
              "orders": {
                "type": "object",
                "description": "Contains statistics about orders related to the promotion tier.",
                "properties": {
                  "total_amount": {
                    "type": "integer",
                    "description": "Sum of order totals."
                  },
                  "total_discount_amount": {
                    "type": "integer",
                    "description": "Sum of total discount applied using the promotion tier."
                  }
                }
              }
            }
          },
          "object": {
            "type": "string",
            "default": "promotion_tier",
            "description": "The type of the object represented by JSON. This object stores information about the promotion tier."
          },
          "validation_rule_assignments": {
            "$ref": "#/components/schemas/ValidationRuleAssignmentsList"
          },
          "category_id": {
            "type": "string",
            "description": "Promotion tier category ID.",
            "example": "cat_0c9da30e7116ba6bba"
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          }
        }
      },
      "CampaignVoucher": {
        "type": "object",
        "description": "Schema model for a campaign voucher.",
        "title": "Campaign Voucher",
        "properties": {
          "type": {
            "type": "string",
            "default": "DISCOUNT_VOUCHER",
            "description": "Type of voucher."
          },
          "discount": {
            "description": "Defines the voucher discount type and details.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Discount"
              }
            ]
          },
          "gift": {
            "description": "Defines the voucher gift details.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Gift"
              }
            ]
          },
          "loyalty_card": {
            "description": "Defines the voucher loyalty card details.",
            "allOf": [
              {
                "$ref": "#/components/schemas/CampaignLoyaltyCard"
              }
            ]
          },
          "redemption": {
            "type": "object",
            "description": "Defines the redemption limits on vouchers.",
            "properties": {
              "quantity": {
                "type": "integer",
                "nullable": true,
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              }
            },
            "required": [
              "quantity"
            ]
          },
          "code_config": {
            "$ref": "#/components/schemas/CodeConfigRequiredLengthCharsetPattern"
          },
          "is_referral_code": {
            "type": "boolean",
            "description": "Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`."
          },
          "start_date": {
            "type": "string",
            "format": "date-time",
            "description": "Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. ",
            "example": "2022-09-20T00:00:00.000Z"
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "description": "Expiration timestamp defines when the campaign expires in ISO 8601 format.  Campaign is *inactive after* this date.",
            "example": "2022-09-30T00:00:00.000Z"
          },
          "validity_timeframe": {
            "type": "object",
            "description": "Set recurrent time periods when the campaign is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.",
            "properties": {
              "interval": {
                "type": "string",
                "description": "Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day."
              },
              "duration": {
                "type": "string",
                "description": "Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day."
              }
            }
          },
          "validity_day_of_week": {
            "type": "array",
            "description": "Integer array corresponding to the particular days of the week in which the voucher is valid.\n\n- `0` Sunday\n- `1` Monday\n- `2` Tuesday\n- `3` Wednesday\n- `4` Thursday\n- `5` Friday\n- `6` Saturday",
            "items": {
              "type": "integer",
              "enum": [
                0,
                1,
                2,
                3,
                4,
                5,
                6
              ]
            }
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          }
        },
        "required": [
          "type",
          "redemption",
          "code_config",
          "is_referral_code"
        ]
      },
      "ValidityHours": {
        "title": "Validity Hours",
        "type": "object",
        "description": "Allows to create Happy Hours scenario.",
        "properties": {
          "daily": {
            "type": "array",
            "description": "Defines the reccuring period/s of time when the happy hour promotion will be active.",
            "items": {
              "title": "Daily",
              "type": "object",
              "description": "Defines the reccuring period/s of time when the happy hour promotion will be active.",
              "properties": {
                "start_time": {
                  "type": "string",
                  "format": "time",
                  "description": "Defines the starting hour for the happy hours promotion in HH:mm format. Happy hours are *inactive before* this time.",
                  "example": "12:00"
                },
                "days_of_week": {
                  "type": "array",
                  "description": "Integer array corresponding to the particular days of the week in which the campaign is valid.\n\n- `0`  Sunday  \n- `1`  Monday  \n- `2`  Tuesday  \n- `3`  Wednesday  \n- `4`  Thursday  \n- `5`  Friday  \n- `6`  Saturday"
                },
                "expiration_time": {
                  "type": "string",
                  "format": "time",
                  "description": "Defines the ending hour for the happy hours promotion in HH:mm format. Happy hours are *inactive after* this time.",
                  "example": "14:00"
                }
              }
            }
          }
        }
      },
      "LoyaltyTiersExpirationAll": {
        "title": "Loyalty Tiers Expiration",
        "type": "object",
        "description": "Defines the Loyalty Tiers Expiration.",
        "properties": {
          "qualification_type": {
            "type": "string",
            "enum": [
              "BALANCE",
              "POINTS_IN_PERIOD"
            ],
            "description": "Tier qualification.   \n\n`BALANCE`: Points balance is based on the customer's current points balance. Customers qualify for the tier if their points balance is in the points range of the tier. \n `POINTS_IN_PERIOD`: A customer qualifies for the tier only if the sum of the accumulated points in a **defined time interval** reaches the tier threshold."
          },
          "qualification_period": {
            "type": "string",
            "description": "Customers qualify for the tier if they collected enough points in a given time period.",
            "enum": [
              "MONTH",
              "QUARTER",
              "HALF_YEAR",
              "YEAR"
            ]
          },
          "start_date": {
            "type": "object",
            "description": "Defines the conditions for the start date of the tier.",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "IMMEDIATE",
                  "NEXT_PERIOD"
                ],
                "description": "What triggers the tier to be valid for a customer.    \n`IMMEDIATE`: After reaching the minimum required points. \n`NEXT_PERIOD`: When the next qualification period starts."
              }
            },
            "required": [
              "type"
            ]
          },
          "expiration_date": {
            "type": "object",
            "description": "Defines the conditions for the expiration date of a tier.",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "END_OF_PERIOD",
                  "END_OF_NEXT_PERIOD",
                  "BALANCE_DROP",
                  "CUSTOM"
                ],
                "description": "What triggers the tier to expire for a customer.    \n`END_OF_PERIOD`: Expire tier at the end of the period.    \n`END_OF_NEXT_PERIOD`:  Expire tier at the end of the next period. \n `BALANCE_DROP`: Tier expires when the points balance drops below the required range of the tier. \n `CUSTOM`: Tier expires after a certain time period passes following the instance the points balance drops below the required range of the tier."
              },
              "extend": {
                "type": "string",
                "description": "Extend the expiration by adding extra months or days in ISO 8601 format. The tier will remain active even though it reaches its expiration time period. For example, a tier with a duration of `P3M` will be valid for an additional duration of 3 months and a tier with a duration of `P1D` will be valid for an additional duration of 1 day."
              },
              "rounding": {
                "description": "Defines the rounding mechanism for the tier expiration.",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "MONTH",
                      "QUARTER",
                      "HALF_YEAR",
                      "YEAR",
                      "CUSTOM"
                    ],
                    "description": "Describes a custom rounding for the expiration date."
                  },
                  "strategy": {
                    "type": "string",
                    "enum": [
                      "START",
                      "END"
                    ],
                    "description": "Describes a rounding strategy for the expiration date."
                  },
                  "unit": {
                    "type": "string",
                    "description": "Defines the type of unit of time in which the rounding period is counted.",
                    "default": "MONTH",
                    "enum": [
                      "MONTH"
                    ]
                  },
                  "value": {
                    "type": "integer",
                    "description": "Value for the unit of time that the rounding applies to. Units for this parameter are defined by the `rounding.unit` parameter.    \n- `0`: January\n- `1`: February\n- `2`: March\n- `3`: April\n- `4`: May\n- `5`: June\n- `6`: July\n- `7`: August\n- `8`: September\n- `9`: October\n- `10`: November\n- `11`: December"
                  }
                }
              }
            },
            "required": [
              "type",
              "extend"
            ]
          }
        },
        "required": [
          "qualification_type",
          "start_date",
          "expiration_date"
        ]
      },
      "BusValRuleAssignment": {
        "title": "Business Validation Rule Assignment",
        "description": "Assignments of a business validation rule",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier for an assignment."
          },
          "rule_id": {
            "type": "string",
            "description": "The unique identifier for a rule."
          },
          "related_object_id": {
            "type": "string",
            "description": "The unique identifier for a related object."
          },
          "related_object_type": {
            "type": "string",
            "description": "The type of a related object.",
            "enum": [
              "campaign",
              "voucher",
              "earning_rule"
            ]
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the object was created in the ISO 8601 format.",
            "example": "2024-01-01T11:11:11.111Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the object was last updated in the ISO 8601 format.",
            "example": "2024-01-01T11:11:11.111Z",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "validation_rules_assignment",
            "enum": [
              "validation_rules_assignment"
            ]
          },
          "validation_status": {
            "type": "string",
            "description": "The validation status of the assignment.",
            "enum": [
              "VALID",
              "PARTIALLY_VALID",
              "INVALID"
            ]
          },
          "validation_omitted_rules": {
            "type": "array",
            "description": "The list of omitted rules.",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "rule_id",
          "related_object_id",
          "related_object_type",
          "object",
          "validation_status",
          "validation_omitted_rules"
        ]
      },
      "Discount": {
        "title": "Discount",
        "type": "object",
        "description": "Contains information about discount.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/DiscountAmount"
          },
          {
            "$ref": "#/components/schemas/DiscountUnit"
          },
          {
            "$ref": "#/components/schemas/DiscountUnitMultiple"
          },
          {
            "$ref": "#/components/schemas/DiscountPercent"
          },
          {
            "$ref": "#/components/schemas/DiscountFixed"
          }
        ]
      },
      "Gift": {
        "title": "Gift",
        "type": "object",
        "additionalProperties": false,
        "description": "Contains current gift card balance information.",
        "properties": {
          "amount": {
            "type": "number",
            "description": "Total gift card income over the lifetime of the card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $10 amount is written as 1000."
          },
          "balance": {
            "type": "number",
            "description": "Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $10 amount is written as 1000."
          },
          "effect": {
            "type": "string",
            "description": "Defines how the credits are applied to the customer's order.",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS"
            ]
          }
        },
        "required": [
          "amount",
          "balance"
        ]
      },
      "CampaignLoyaltyCard": {
        "title": "Campaign Loyalty Card",
        "type": "object",
        "description": "Schema model for a campaign loyalty card.",
        "properties": {
          "points": {
            "type": "integer",
            "description": "The initial number of points to assign to the loyalty card. This is the current loyalty card score i.e. the number of loyalty points on the card."
          },
          "expiration_rules": {
            "type": "object",
            "description": "Defines the loyalty point expiration rule. This expiration rule applies when there are no `expiration_rules` defined for an earning rule.",
            "properties": {
              "period_type": {
                "type": "string",
                "description": "Type of period. Can be set for `MONTH` or `FIXED_DAY_OF_YEAR`. `MONTH` requires the `period_value` field. `FIXED_DAY_OF_YEAR` requires the `fixed_month` and `fixed_day` fields.",
                "enum": [
                  "FIXED_DAY_OF_YEAR",
                  "MONTH"
                ]
              },
              "period_value": {
                "type": "integer",
                "description": "Value of the period. Required for the `period_type: MONTH`."
              },
              "rounding_type": {
                "type": "string",
                "description": "Type of rounding of the expiration period. Optional  for the `period_type: MONTH`.",
                "enum": [
                  "END_OF_MONTH",
                  "END_OF_QUARTER",
                  "END_OF_HALF_YEAR",
                  "END_OF_YEAR",
                  "PARTICULAR_MONTH"
                ]
              },
              "rounding_value": {
                "type": "integer",
                "description": "Value of rounding of the expiration period. Required for the `rounding_type`."
              },
              "fixed_month": {
                "type": "integer",
                "description": "Determines the month when the points expire; `1` is January, `2` is February, and so on. Required for the `period_type: FIXED_DAY_OF_YEAR`.",
                "minimum": 1,
                "maximum": 12
              },
              "fixed_day": {
                "type": "integer",
                "description": "Determines the day of the month when the points expire. Required for the `period_type: FIXED_DAY_OF_YEAR`.",
                "minimum": 1,
                "maximum": 31
              }
            },
            "required": [
              "period_type"
            ]
          }
        },
        "required": [
          "points"
        ]
      },
      "CodeConfigRequiredLengthCharsetPattern": {
        "title": "Code Config Settings",
        "allOf": [
          {
            "$ref": "#/components/schemas/CodeConfig"
          }
        ],
        "required": [
          "length",
          "prefix",
          "charset",
          "pattern",
          "postfix"
        ]
      },
      "MappingPoints": {
        "title": "MappingPoints",
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/MappingMultiply"
          },
          {
            "$ref": "#/components/schemas/MappingFixed"
          }
        ]
      },
      "ValidationRuleAssignmentsList": {
        "type": "object",
        "description": "Validation Rule Assignments List",
        "title": "Validation Rule Assignments List",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about validation rule assignments.",
            "default": "list"
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the JSON property that contains the array of validation rule assignments.",
            "default": "data"
          },
          "data": {
            "type": "array",
            "description": "A dictionary that contains an array of validation rule assignments.",
            "items": {
              "$ref": "#/components/schemas/ValidationRuleAssignment"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of validation rule assignments."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "DiscountAmount": {
        "type": "object",
        "title": "Amount",
        "properties": {
          "type": {
            "type": "string",
            "default": "AMOUNT",
            "enum": [
              "AMOUNT"
            ],
            "description": "Defines the type of the voucher."
          },
          "amount_off": {
            "type": "number",
            "description": "Amount taken off the subtotal of a price. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000."
          },
          "amount_off_formula": {
            "type": "string"
          },
          "aggregated_amount_limit": {
            "type": "integer",
            "description": "Maximum discount amount per order."
          },
          "effect": {
            "description": "Defines how the discount is applied to the customer's order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DiscountAmountVouchersEffectTypes"
              }
            ]
          },
          "is_dynamic": {
            "type": "boolean",
            "description": "Flag indicating whether the discount was calculated using a formula."
          }
        },
        "required": [
          "type",
          "amount_off"
        ]
      },
      "DiscountUnit": {
        "type": "object",
        "title": "Unit",
        "properties": {
          "type": {
            "type": "string",
            "default": "UNIT",
            "enum": [
              "UNIT"
            ],
            "description": "Discount type."
          },
          "unit_off": {
            "type": "integer",
            "description": "Number of units granted a full value discount."
          },
          "unit_off_formula": {
            "type": "string"
          },
          "effect": {
            "description": "Defines how the unit is added to the customer's order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DiscountUnitVouchersEffectTypes"
              }
            ]
          },
          "unit_type": {
            "type": "string",
            "description": "The product deemed as free, chosen from product inventory (e.g. time, items)."
          },
          "product": {
            "description": "Contains information about the product.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleProductDiscountUnit"
              }
            ]
          },
          "sku": {
            "$ref": "#/components/schemas/SimpleSkuDiscountUnit"
          },
          "is_dynamic": {
            "type": "boolean",
            "description": "Flag indicating whether the discount was calculated using a formula."
          }
        },
        "required": [
          "type",
          "unit_type"
        ]
      },
      "DiscountUnitMultiple": {
        "type": "object",
        "title": "Unit Multiple",
        "properties": {
          "type": {
            "type": "string",
            "default": "UNIT",
            "enum": [
              "UNIT"
            ],
            "description": "Discount type."
          },
          "effect": {
            "type": "string",
            "default": "ADD_MANY_ITEMS",
            "enum": [
              "ADD_MANY_ITEMS"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          },
          "units": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiscountUnitMultipleOneUnit"
            }
          }
        },
        "required": [
          "type",
          "units"
        ]
      },
      "DiscountPercent": {
        "type": "object",
        "title": "Percent",
        "properties": {
          "type": {
            "type": "string",
            "default": "PERCENT",
            "enum": [
              "PERCENT"
            ],
            "description": "Defines the type of the voucher."
          },
          "percent_off": {
            "type": "number",
            "description": "The percent discount that the customer will receive."
          },
          "percent_off_formula": {
            "type": "string"
          },
          "amount_limit": {
            "type": "number",
            "description": "Upper limit allowed to be applied as a discount. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600."
          },
          "aggregated_amount_limit": {
            "type": "integer",
            "description": "Maximum discount amount per order."
          },
          "effect": {
            "description": "Defines how the discount is applied to the customer's order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DiscountPercentVouchersEffectTypes"
              }
            ]
          },
          "is_dynamic": {
            "type": "boolean",
            "description": "Flag indicating whether the discount was calculated using a formula."
          }
        },
        "required": [
          "type",
          "percent_off"
        ]
      },
      "DiscountFixed": {
        "title": "Fixed",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "FIXED",
            "enum": [
              "FIXED"
            ],
            "description": "Defines the type of the voucher."
          },
          "fixed_amount": {
            "type": "number",
            "description": "Sets a fixed value for an order total or the item price. The value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000. If the fixed amount is calculated by the formula, i.e. the `fixed_amount_formula` parameter is present in the fixed amount definition, this value becomes the **fallback value**. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value."
          },
          "fixed_amount_formula": {
            "type": "string"
          },
          "effect": {
            "description": "Defines how the discount is applied to the customer's order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DiscountFixedVouchersEffectTypes"
              }
            ]
          },
          "is_dynamic": {
            "type": "boolean",
            "description": "Flag indicating whether the discount was calculated using a formula."
          }
        },
        "required": [
          "type",
          "fixed_amount"
        ]
      },
      "CodeConfig": {
        "title": "Code Config",
        "type": "object",
        "description": "Schema containing information about config used for voucher. Defines the code pattern (prefix, suffix, length, charset, etc).",
        "properties": {
          "length": {
            "type": "number",
            "description": "Number of characters in a generated code (excluding prefix and postfix)."
          },
          "charset": {
            "type": "string",
            "description": "Characters that can appear in the code."
          },
          "prefix": {
            "type": "string",
            "description": "A text appended before the code."
          },
          "postfix": {
            "type": "string",
            "description": "A text appended after the code."
          },
          "pattern": {
            "type": "string",
            "description": "A pattern for codes where hashes (#) will be replaced with random characters. Overrides `length`."
          },
          "initial_count": {
            "type": "integer",
            "description": "The initial count."
          }
        }
      },
      "MappingMultiply": {
        "title": "MappingMultiply",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "MULTIPLY",
            "enum": [
              "MULTIPLY"
            ],
            "description": "Type of calculation."
          },
          "multiplier": {
            "type": "number",
            "description": "Multiplication factor used to multiply the points to obtain the mapped points."
          }
        }
      },
      "MappingFixed": {
        "title": "MappingFixed",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "CUSTOM",
            "enum": [
              "CUSTOM"
            ],
            "description": "Type of calculation."
          },
          "points": {
            "type": "integer",
            "description": "Fixed number of points to be applied."
          }
        }
      },
      "ValidationRuleAssignment": {
        "title": "Validation Rule Assignment",
        "type": "object",
        "description": "Object representing a validation rule assignment.",
        "properties": {
          "id": {
            "type": "string",
            "example": "asgm_74F7QZoYbUoljwQO",
            "description": "Validation rule assignment ID."
          },
          "rule_id": {
            "type": "string",
            "example": "val_4j7DCRm2IS59",
            "description": "Validation rule ID."
          },
          "related_object_id": {
            "type": "string",
            "example": "v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT",
            "description": "The resource ID to which the validation rule was assigned."
          },
          "related_object_type": {
            "type": "string",
            "description": "The type of resource to which the validation rule was assigned.",
            "enum": [
              "voucher",
              "campaign",
              "earning_rule",
              "reward_assignment",
              "promotion_tier",
              "distribution"
            ]
          },
          "created_at": {
            "type": "string",
            "example": "2022-02-17T08:18:15.085Z",
            "description": "Timestamp representing the date and time when the validation rule assignment was created in the ISO 8601 format.",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "default": "validation_rules_assignment",
            "description": "The type of the object represented by the ID.",
            "enum": [
              "validation_rules_assignment"
            ]
          }
        },
        "required": [
          "id",
          "rule_id",
          "related_object_id",
          "related_object_type",
          "created_at",
          "object"
        ]
      },
      "DiscountAmountVouchersEffectTypes": {
        "title": "Discount Amount Vouchers Effect Types",
        "enum": [
          "APPLY_TO_ORDER",
          "APPLY_TO_ITEMS",
          "APPLY_TO_ITEMS_PROPORTIONALLY",
          "APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY",
          "APPLY_TO_ITEMS_BY_QUANTITY"
        ],
        "type": "string"
      },
      "DiscountUnitVouchersEffectTypes": {
        "title": "Discount Unit Vouchers Effect Types",
        "enum": [
          "ADD_MISSING_ITEMS",
          "ADD_NEW_ITEMS",
          "ADD_MANY_ITEMS"
        ],
        "type": "string"
      },
      "SimpleProductDiscountUnit": {
        "type": "object",
        "title": "Simple Product Discount Unit",
        "description": "Simplified product discount unit data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique product ID, assigned by Voucherify."
          },
          "source_id": {
            "type": "string",
            "description": "Product's source ID."
          },
          "name": {
            "type": "string",
            "description": "Product name."
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "SimpleSkuDiscountUnit": {
        "type": "object",
        "title": "Simple SKU Discount Unit",
        "description": "Simplified SKU discount unit data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique SKU ID, assigned by Voucherify."
          },
          "source_id": {
            "type": "string",
            "description": "Product variant's source ID."
          },
          "name": {
            "type": "string",
            "description": "SKU name."
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "DiscountUnitMultipleOneUnit": {
        "type": "object",
        "title": "One Unit",
        "properties": {
          "unit_off": {
            "type": "number",
            "description": "Number of units granted a full value discount."
          },
          "unit_off_formula": {
            "type": "string"
          },
          "effect": {
            "type": "string",
            "enum": [
              "ADD_NEW_ITEMS",
              "ADD_MISSING_ITEMS"
            ],
            "description": "Defines how the unit is added to the customer's order."
          },
          "unit_type": {
            "type": "string",
            "description": "The product deemed as free, chosen from product inventory (e.g. time, items)."
          },
          "product": {
            "description": "Contains information about the product.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleProductDiscountUnit"
              }
            ]
          },
          "sku": {
            "description": "Contains information about the sku.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleSkuDiscountUnit"
              }
            ]
          }
        },
        "required": [
          "effect",
          "unit_type"
        ]
      },
      "DiscountPercentVouchersEffectTypes": {
        "title": "Discount Percent Vouchers Effect Types",
        "enum": [
          "APPLY_TO_ORDER",
          "APPLY_TO_ITEMS"
        ],
        "type": "string"
      },
      "DiscountFixedVouchersEffectTypes": {
        "title": "Discount Fixed Vouchers Effect Types",
        "enum": [
          "APPLY_TO_ORDER",
          "APPLY_TO_ITEMS"
        ],
        "type": "string"
      }
    }
  },
  "webhooks": {
    "EVENTS.CAMPAIGN.CREATED": {
      "post": {
        "operationId": "events-campaign-created",
        "summary": "Created",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCampaignCreatedData"
              },
              "examples": {
                "campaign.created": {
                  "value": {
                    "campaign": {
                      "id": "camp_iRMdcq07g9W4dOSRXuTovupi",
                      "name": "Spring Discounts",
                      "type": "AUTO_UPDATE",
                      "active": true,
                      "object": "campaign",
                      "voucher": {
                        "type": "DISCOUNT_VOUCHER",
                        "discount": {
                          "type": "PERCENT",
                          "effect": "APPLY_TO_ORDER",
                          "percent_off": 10,
                          "amount_limit": 3000,
                          "percent_off_formula": "IF(ORDER_AMOUNT > 150;15;10)"
                        },
                        "redemption": {
                          "quantity": 1
                        },
                        "start_date": "2024-03-01T00:00:00.000Z",
                        "code_config": {
                          "length": 3,
                          "prefix": "SPRING-2024-",
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "pattern": "###"
                        },
                        "expiration_date": "2024-03-31T00:00:00.000Z",
                        "is_referral_code": false
                      },
                      "category": "Star Platinum",
                      "metadata": {},
                      "auto_join": false,
                      "join_once": false,
                      "protected": false,
                      "categories": [
                        {
                          "id": "cat_0e156dab8f2e43873a",
                          "name": "Star Platinum",
                          "object": "category",
                          "hierarchy": 10,
                          "created_at": "2024-01-03T10:03:24.092Z"
                        }
                      ],
                      "created_at": "2024-02-21T10:01:24.102Z",
                      "start_date": "2024-03-01T00:00:00.000Z",
                      "category_id": "cat_0e156dab8f2e43873a",
                      "description": "Spring 2024 discount",
                      "campaign_type": "DISCOUNT_COUPONS",
                      "vouchers_count": 0,
                      "creation_status": "IN_PROGRESS",
                      "expiration_date": "2024-03-31T00:00:00.000Z",
                      "validity_day_of_week": [
                        5,
                        6,
                        0
                      ],
                      "vouchers_generation_status": "IN_PROGRESS",
                      "use_voucher_metadata_schema": true
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CAMPAIGN.VOUCHERS.GENERATION.COMPLETED": {
      "post": {
        "operationId": "events-campaign-vouchers-generation-completed",
        "summary": "Vouchers generation completed",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCampaignVouchersGenerationCompletedData"
              },
              "examples": {
                "campaign.created": {
                  "value": {
                    "count": 5,
                    "campaign": {
                      "id": "camp_18NCNUkQIaXnqbHqhtQnt355",
                      "name": "Test-campaign-applicable-to",
                      "type": "AUTO_UPDATE",
                      "active": true,
                      "object": "campaign",
                      "voucher": {
                        "gift": null,
                        "type": "DISCOUNT_VOUCHER",
                        "discount": {
                          "type": "PERCENT",
                          "units": null,
                          "effect": "APPLY_TO_ITEMS",
                          "percent_off": 5,
                          "amount_limit": 15000,
                          "aggregated_amount_limit": 30000
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "code_config": {
                          "length": 1,
                          "prefix": "Test-applicable-",
                          "charset": "0123456789",
                          "pattern": "#",
                          "postfix": ""
                        },
                        "loyalty_card": null
                      },
                      "metadata": {},
                      "auto_join": false,
                      "join_once": false,
                      "created_at": "2024-02-09T10:16:04.352Z",
                      "category_id": null,
                      "campaign_type": "DISCOUNT_COUPONS",
                      "is_referral_code": false
                    },
                    "completed_at": "2024-02-09T10:16:04.787Z"
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CAMPAIGN.DISABLED": {
      "post": {
        "operationId": "events-campaign-disabled",
        "summary": "Disabled",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCampaignDisabledData"
              },
              "examples": {
                "campaign.disabled": {
                  "value": {
                    "campaign": {
                      "id": "camp_s2tD4F3yQhGTKuXjKasSNeP6",
                      "name": "Promotion Spring 2024",
                      "type": "STATIC",
                      "active": false,
                      "object": "campaign",
                      "metadata": {
                        "region": "EMEA"
                      },
                      "auto_join": false,
                      "join_once": false,
                      "protected": false,
                      "categories": [],
                      "created_at": "2024-02-21T12:34:04.667Z",
                      "updated_at": "2024-02-21T14:15:02.111Z",
                      "category_id": "cat_0e156dab8f2e43873a",
                      "campaign_type": "PROMOTION",
                      "creation_status": "DONE",
                      "expiration_date": "2024-02-29T00:00:00.000Z",
                      "vouchers_generation_status": "DONE",
                      "use_voucher_metadata_schema": false
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CAMPAIGN.ENABLED": {
      "post": {
        "operationId": "events-campaign-enabled",
        "summary": "Enabled",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCampaignEnabledData"
              },
              "examples": {
                "campaign.enabled": {
                  "value": {
                    "campaign": {
                      "id": "camp_s2tD4F3yQhGTKuXjKasSNeP6",
                      "name": "Promotion Spring 2024",
                      "type": "STATIC",
                      "active": true,
                      "object": "campaign",
                      "metadata": {
                        "region": "EMEA"
                      },
                      "auto_join": false,
                      "join_once": false,
                      "protected": false,
                      "categories": [],
                      "created_at": "2024-02-21T12:34:04.667Z",
                      "updated_at": "2024-02-21T15:09:57.706Z",
                      "category_id": "cat_0e156dab8f2e43873a",
                      "campaign_type": "PROMOTION",
                      "creation_status": "DONE",
                      "expiration_date": "2024-02-29T00:00:00.000Z",
                      "vouchers_generation_status": "DONE",
                      "use_voucher_metadata_schema": false
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CAMPAIGN.UPDATED": {
      "post": {
        "operationId": "events-campaign-updated",
        "summary": "Updated",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCampaignUpdatedData"
              },
              "examples": {
                "campaign.updated": {
                  "value": {
                    "campaign": {
                      "id": "camp_s2tD4F3yQhGTKuXjKasSNeP6",
                      "name": "Promotion Spring 2024",
                      "type": "STATIC",
                      "active": true,
                      "object": "campaign",
                      "metadata": {
                        "region": "EMEA"
                      },
                      "auto_join": false,
                      "join_once": false,
                      "protected": false,
                      "categories": [],
                      "created_at": "2024-02-21T12:34:04.667Z",
                      "updated_at": "2024-02-21T13:10:09.727Z",
                      "category_id": "cat_0e156dab8f2e43873a",
                      "campaign_type": "PROMOTION",
                      "creation_status": "DONE",
                      "expiration_date": "2024-02-29T00:00:00.000Z",
                      "vouchers_generation_status": "DONE",
                      "use_voucher_metadata_schema": false
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CAMPAIGN.DELETED": {
      "post": {
        "operationId": "events-campaign-deleted",
        "summary": "Deleted",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCampaignDeletedData"
              },
              "examples": {
                "campaign.deleted": {
                  "value": {
                    "campaign": {
                      "id": "camp_duuYvm09BNsf274eQVp1ZO43",
                      "name": "Loyalty Spring",
                      "type": "AUTO_UPDATE",
                      "active": true,
                      "object": "campaign",
                      "voucher": {
                        "type": "LOYALTY_CARD",
                        "redemption": {
                          "quantity": null
                        },
                        "start_date": "2024-02-29T00:00:00.000Z",
                        "code_config": {
                          "length": 5,
                          "prefix": "Loyal-To-Spring",
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "pattern": "#####"
                        },
                        "loyalty_card": {
                          "points": 0,
                          "expiration_rules": {
                            "period_type": "MONTH",
                            "period_value": 2,
                            "rounding_type": "END_OF_QUARTER"
                          }
                        },
                        "expiration_date": "2024-03-31T00:00:00.000Z",
                        "is_referral_code": false
                      },
                      "metadata": {},
                      "auto_join": false,
                      "join_once": true,
                      "protected": false,
                      "categories": [],
                      "created_at": "2024-02-21T11:35:17.510Z",
                      "start_date": "2024-02-29T00:00:00.000Z",
                      "updated_at": "2024-02-21T12:16:13.271Z",
                      "category_id": "cat_0e156dab8f2e43873a",
                      "campaign_type": "LOYALTY_PROGRAM",
                      "vouchers_count": 1,
                      "creation_status": "DONE",
                      "expiration_date": "2024-03-31T00:00:00.000Z",
                      "validity_day_of_week": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "loyalty_tiers_expiration": {
                        "start_date": {
                          "type": "IMMEDIATE"
                        },
                        "expiration_date": {
                          "type": "CUSTOM",
                          "extend": "P2M",
                          "rounding": {
                            "type": "MONTH",
                            "strategy": "END"
                          }
                        },
                        "qualification_type": "BALANCE"
                      },
                      "vouchers_generation_status": "DONE",
                      "use_voucher_metadata_schema": true
                    },
                    "deleted_at": "2024-02-21T15:29:30.663Z"
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CAMPAIGN.LOYALTY_TIER.CREATED": {
      "post": {
        "operationId": "events-campaign-loyalty_tier-created",
        "summary": "Loyalty_tier created",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCampaignLoyaltyTierCreatedData"
              },
              "examples": {
                "campaign.loyalty_tier.created": {
                  "value": {
                    "campaign": {
                      "id": "camp_il5QS3YhzAMyd45UNXT7euX7",
                      "name": "Loyalty 2025",
                      "campaign_type": "LOYALTY_PROGRAM",
                      "type": "AUTO_UPDATE",
                      "is_referral_code": false,
                      "voucher": {
                        "type": "LOYALTY_CARD",
                        "discount": null,
                        "gift": null,
                        "loyalty_card": {
                          "points": 0,
                          "expiration_rules": {
                            "period_type": "MONTH",
                            "period_value": 1
                          }
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "code_config": {
                          "pattern": "#",
                          "length": 1,
                          "charset": "0123456789",
                          "prefix": "loyal-",
                          "postfix": ""
                        }
                      },
                      "auto_join": false,
                      "join_once": true,
                      "active": true,
                      "category_id": null,
                      "category": null,
                      "metadata": {},
                      "start_date": null,
                      "expiration_date": null,
                      "description": null,
                      "created_at": "2023-10-16T09:54:56.394Z",
                      "updated_at": "2024-01-22T13:37:57.586Z",
                      "object": "campaign"
                    },
                    "loyalty_tier": {
                      "id": "ltr_10445f698e4abcf607",
                      "name": "Loyalty-tier-03",
                      "campaign_id": "camp_il5QS3YhzAMyd45UNXT7euX7",
                      "metadata": {},
                      "created_at": "2025-03-12T13:32:01.465Z",
                      "updated_at": null,
                      "earning_rules": {
                        "ern_6SR1DBtjFql71aXr71TaJfrq": {
                          "type": "MULTIPLY",
                          "multiplier": 1
                        }
                      },
                      "rewards": {
                        "rewa_mcn5Lp8texqmbgQbadLMqSoQ": {
                          "type": "MULTIPLY",
                          "multiplier": 1
                        }
                      },
                      "config": {
                        "points": {
                          "from": 200,
                          "to": 299
                        }
                      },
                      "points": {
                        "from": 200,
                        "to": 299
                      },
                      "object": "loyalty_tier"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CAMPAIGN.LOYALTY_TIER.DELETED": {
      "post": {
        "operationId": "events-campaign-loyalty_tier-deleted",
        "summary": "Loyalty_tier deleted",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCampaignLoyaltyTierDeletedData"
              },
              "examples": {
                "campaign.loyalty_tier.deleted": {
                  "value": {
                    "campaign": {
                      "id": "camp_il5QS3YhzAMyd45UNXT7euX7",
                      "name": "Loyalty 2025",
                      "campaign_type": "LOYALTY_PROGRAM",
                      "type": "AUTO_UPDATE",
                      "is_referral_code": false,
                      "voucher": {
                        "type": "LOYALTY_CARD",
                        "discount": null,
                        "gift": null,
                        "loyalty_card": {
                          "points": 0,
                          "expiration_rules": {
                            "period_type": "MONTH",
                            "period_value": 1
                          }
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "code_config": {
                          "pattern": "#",
                          "length": 1,
                          "charset": "0123456789",
                          "prefix": "loyal-",
                          "postfix": ""
                        }
                      },
                      "auto_join": false,
                      "join_once": true,
                      "active": true,
                      "category_id": null,
                      "category": null,
                      "metadata": {},
                      "start_date": null,
                      "expiration_date": null,
                      "description": null,
                      "created_at": "2023-10-16T09:54:56.394Z",
                      "updated_at": "2024-01-22T13:37:57.586Z",
                      "object": "campaign"
                    },
                    "loyalty_tier": {
                      "id": "ltr_10445a39f9c148a9d8",
                      "name": "Loyalty-tier-03",
                      "campaign_id": "camp_il5QS3YhzAMyd45UNXT7euX7",
                      "metadata": {},
                      "created_at": "2025-03-12T13:09:22.023Z",
                      "updated_at": null,
                      "earning_rules": {},
                      "rewards": {},
                      "config": {
                        "points": {
                          "from": 200
                        }
                      },
                      "points": {
                        "from": 200
                      },
                      "object": "loyalty_tier"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CAMPAIGN.LOYALTY_TIER.UPDATED": {
      "post": {
        "operationId": "events-campaign-loyalty_tier-updated",
        "summary": "Loyalty_tier updated",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCampaignLoyaltyTierUpdatedData"
              },
              "examples": {
                "campaign.loyalty_tier.updated": {
                  "value": {
                    "campaign": {
                      "id": "camp_il5QS3YhzAMyd45UNXT7euX7",
                      "name": "Loyalty 2025",
                      "campaign_type": "LOYALTY_PROGRAM",
                      "type": "AUTO_UPDATE",
                      "is_referral_code": false,
                      "voucher": {
                        "type": "LOYALTY_CARD",
                        "discount": null,
                        "gift": null,
                        "loyalty_card": {
                          "points": 0,
                          "expiration_rules": {
                            "period_type": "MONTH",
                            "period_value": 1
                          }
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "code_config": {
                          "pattern": "#",
                          "length": 1,
                          "charset": "0123456789",
                          "prefix": "loyal-",
                          "postfix": ""
                        }
                      },
                      "auto_join": false,
                      "join_once": true,
                      "active": true,
                      "category_id": null,
                      "category": null,
                      "metadata": {},
                      "start_date": null,
                      "expiration_date": null,
                      "description": null,
                      "created_at": "2023-10-16T09:54:56.394Z",
                      "updated_at": "2024-01-22T13:37:57.586Z",
                      "object": "campaign"
                    },
                    "loyalty_tier": {
                      "id": "ltr_10445a39f9c148a9d6",
                      "name": "Loyalty-tier-01",
                      "campaign_id": "camp_il5QS3YhzAMyd45UNXT7euX7",
                      "metadata": {
                        "region": "EMEA"
                      },
                      "created_at": "2025-03-12T13:09:22.023Z",
                      "updated_at": "2025-03-12T13:10:19.880Z",
                      "earning_rules": {},
                      "rewards": {},
                      "config": {
                        "points": {
                          "from": 0,
                          "to": 99
                        }
                      },
                      "points": {
                        "from": 0,
                        "to": 99
                      },
                      "object": "loyalty_tier"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CAMPAIGN.PROMOTION_TIER.CREATED": {
      "post": {
        "operationId": "events-campaign-promotion_tier-created",
        "summary": "Promotion_tier created",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCampaignPromotionTierCreatedData"
              },
              "examples": {
                "campaign.promotion_tier.created": {
                  "value": {
                    "campaign": {
                      "id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                      "name": "Promo tier",
                      "type": "STATIC",
                      "active": true,
                      "object": "campaign",
                      "category": null,
                      "metadata": {},
                      "auto_join": false,
                      "join_once": false,
                      "created_at": "2024-05-22T11:53:41.984Z",
                      "start_date": null,
                      "category_id": null,
                      "description": null,
                      "campaign_type": "PROMOTION",
                      "expiration_date": null,
                      "is_referral_code": false
                    },
                    "promotion_tier": {
                      "id": "promo_ngk5uklWrv3rEzatxoJmE36d",
                      "name": "Webhook tier",
                      "action": {
                        "discount": {
                          "type": "AMOUNT",
                          "effect": "APPLY_TO_ORDER",
                          "amount_off": 2000
                        }
                      },
                      "active": true,
                      "banner": null,
                      "object": "promotion_tier",
                      "summary": {
                        "orders": {
                          "total_amount": 0,
                          "total_discount_amount": 0
                        },
                        "redemptions": {
                          "total_redeemed": 0
                        }
                      },
                      "campaign": {
                        "id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                        "active": true,
                        "object": "campaign",
                        "start_date": null,
                        "expiration_date": null
                      },
                      "metadata": {},
                      "hierarchy": 1,
                      "categories": [],
                      "created_at": "2024-05-22T11:53:42.153Z",
                      "campaign_id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                      "category_id": null,
                      "validation_rule_assignments": null
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CAMPAIGN.PROMOTION_TIER.DISABLED": {
      "post": {
        "operationId": "events-campaign-promotion_tier-disabled",
        "summary": "Promotion_tier disabled",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCampaignPromotionTierDisabledData"
              },
              "examples": {
                "campaign.promotion_tier.disabled": {
                  "value": {
                    "campaign": {
                      "id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                      "name": "Promo tier",
                      "type": "STATIC",
                      "active": true,
                      "object": "campaign",
                      "category": null,
                      "metadata": {},
                      "auto_join": false,
                      "join_once": false,
                      "created_at": "2024-05-22T11:53:41.984Z",
                      "start_date": null,
                      "category_id": null,
                      "description": null,
                      "campaign_type": "PROMOTION",
                      "expiration_date": null,
                      "is_referral_code": false
                    },
                    "promotion_tier": {
                      "id": "promo_ngk5uklWrv3rEzatxoJmE36d",
                      "name": "Webhook tier",
                      "action": {
                        "discount": {
                          "type": "AMOUNT",
                          "effect": "APPLY_TO_ORDER",
                          "amount_off": 2000
                        }
                      },
                      "active": false,
                      "banner": null,
                      "object": "promotion_tier",
                      "summary": {
                        "orders": {
                          "total_amount": 0,
                          "total_discount_amount": 0
                        },
                        "redemptions": {
                          "total_redeemed": 0
                        }
                      },
                      "campaign": {
                        "id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                        "active": true,
                        "object": "campaign",
                        "start_date": null,
                        "expiration_date": null
                      },
                      "metadata": {},
                      "hierarchy": 1,
                      "categories": [],
                      "created_at": "2024-05-22T11:53:42.153Z",
                      "updated_at": "2024-05-22T11:54:14.825Z",
                      "campaign_id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                      "category_id": null,
                      "validation_rule_assignments": null
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CAMPAIGN.PROMOTION_TIER.ENABLED": {
      "post": {
        "operationId": "events-campaign-promotion_tier-enabled",
        "summary": "Promotion_tier enabled",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCampaignPromotionTierEnabledData"
              },
              "examples": {
                "campaign.promotion_tier.enabled": {
                  "value": {
                    "campaign": {
                      "id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                      "name": "Promo tier",
                      "type": "STATIC",
                      "active": true,
                      "object": "campaign",
                      "category": null,
                      "metadata": {},
                      "auto_join": false,
                      "join_once": false,
                      "created_at": "2024-05-22T11:53:41.984Z",
                      "start_date": null,
                      "category_id": null,
                      "description": null,
                      "campaign_type": "PROMOTION",
                      "expiration_date": null,
                      "is_referral_code": false
                    },
                    "promotion_tier": {
                      "id": "promo_ngk5uklWrv3rEzatxoJmE36d",
                      "name": "Webhook tier",
                      "action": {
                        "discount": {
                          "type": "AMOUNT",
                          "effect": "APPLY_TO_ORDER",
                          "amount_off": 2000
                        }
                      },
                      "active": true,
                      "banner": null,
                      "object": "promotion_tier",
                      "summary": {
                        "orders": {
                          "total_amount": 0,
                          "total_discount_amount": 0
                        },
                        "redemptions": {
                          "total_redeemed": 0
                        }
                      },
                      "campaign": {
                        "id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                        "active": true,
                        "object": "campaign",
                        "start_date": null,
                        "expiration_date": null
                      },
                      "metadata": {},
                      "hierarchy": 1,
                      "categories": [],
                      "created_at": "2024-05-22T11:53:42.153Z",
                      "updated_at": "2024-05-22T11:54:19.754Z",
                      "campaign_id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                      "category_id": null,
                      "validation_rule_assignments": null
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CAMPAIGN.PROMOTION_TIER.UPDATED": {
      "post": {
        "operationId": "events-campaign-promotion_tier-updated",
        "summary": "Promotion_tier updated",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCampaignPromotionTierUpdatedData"
              },
              "examples": {
                "campaign.promotion_tier.updated": {
                  "value": {
                    "campaign": {
                      "id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                      "name": "Promo tier",
                      "campaign_type": "PROMOTION",
                      "type": "STATIC",
                      "is_referral_code": false,
                      "auto_join": false,
                      "join_once": false,
                      "active": true,
                      "category_id": null,
                      "category": null,
                      "metadata": {},
                      "start_date": null,
                      "expiration_date": null,
                      "description": null,
                      "created_at": "2024-05-22T11:53:41.984Z",
                      "object": "campaign"
                    },
                    "promotion_tier": {
                      "id": "promo_ngk5uklWrv3rEzatxoJmE36d",
                      "created_at": "2024-05-22T11:53:42.153Z",
                      "updated_at": "2024-05-22T15:32:16.659Z",
                      "name": "Webhook tier",
                      "banner": null,
                      "action": {
                        "discount": {
                          "type": "AMOUNT",
                          "amount_off": 2000,
                          "effect": "APPLY_TO_ORDER"
                        }
                      },
                      "metadata": {},
                      "hierarchy": 1,
                      "campaign": {
                        "id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                        "start_date": null,
                        "expiration_date": null,
                        "active": true,
                        "object": "campaign"
                      },
                      "campaign_id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                      "active": true,
                      "summary": {
                        "redemptions": {
                          "total_redeemed": 0
                        },
                        "orders": {
                          "total_amount": 0,
                          "total_discount_amount": 0
                        }
                      },
                      "object": "promotion_tier",
                      "validation_rule_assignments": null,
                      "category_id": "cat_0d8549688e92d8e643",
                      "categories": []
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CAMPAIGN.PROMOTION_TIER.DELETED": {
      "post": {
        "operationId": "events-campaign-promotion_tier-deleted",
        "summary": "Promotion_tier deleted",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCampaignPromotionTierDeletedData"
              },
              "examples": {
                "campaign.promotion_tier.deleted": {
                  "value": {
                    "campaign": {
                      "id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                      "name": "Promo tier",
                      "campaign_type": "PROMOTION",
                      "type": "STATIC",
                      "is_referral_code": false,
                      "auto_join": false,
                      "join_once": false,
                      "active": true,
                      "category_id": null,
                      "category": null,
                      "metadata": {},
                      "start_date": null,
                      "expiration_date": null,
                      "description": null,
                      "created_at": "2024-05-22T11:53:41.984Z",
                      "object": "campaign"
                    },
                    "promotion_tier": {
                      "id": "promo_ngk5uklWrv3rEzatxoJmE36d",
                      "created_at": "2024-05-22T11:53:42.153Z",
                      "updated_at": "2024-05-22T15:32:16.659Z",
                      "name": "Webhook tier",
                      "banner": null,
                      "action": {
                        "discount": {
                          "type": "AMOUNT",
                          "amount_off": 2000,
                          "effect": "APPLY_TO_ORDER"
                        }
                      },
                      "metadata": {},
                      "hierarchy": 1,
                      "active": true,
                      "summary": {
                        "redemptions": {
                          "total_redeemed": 0
                        },
                        "orders": {
                          "total_amount": 0,
                          "total_discount_amount": 0
                        }
                      },
                      "object": "promotion_tier",
                      "validation_rule_assignments": null,
                      "category_id": "cat_0d8549688e92d8e643",
                      "categories": []
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}