{
  "openapi": "3.1.0",
  "info": {
    "title": "Events - Events voucher",
    "version": "2024-01-01",
    "description": ""
  },
  "paths": {},
  "components": {
    "schemas": {
      "EventVoucherCreatedData": {
        "title": "Event Voucher Created",
        "type": "object",
        "description": "Event data object schema for `voucher.created`.",
        "properties": {
          "voucher": {
            "type": [
              "object",
              "null"
            ],
            "$ref": "#/components/schemas/Voucher"
          },
          "campaign": {
            "type": [
              "object",
              "null"
            ],
            "$ref": "#/components/schemas/SimpleCampaign"
          }
        }
      },
      "EventVoucherDisabledData": {
        "title": "Event Voucher Disabled",
        "description": "Event data object schema for `voucher.disabled`.",
        "type": "object",
        "properties": {
          "voucher": {
            "type": [
              "object",
              "null"
            ],
            "$ref": "#/components/schemas/Voucher"
          },
          "campaign": {
            "type": [
              "object",
              "null"
            ],
            "$ref": "#/components/schemas/SimpleCampaign"
          }
        }
      },
      "EventVoucherEnabledData": {
        "title": "Event Voucher Enabled",
        "description": "Event data object schema for `voucher.enabled`.",
        "type": "object",
        "properties": {
          "voucher": {
            "type": [
              "object",
              "null"
            ],
            "$ref": "#/components/schemas/Voucher"
          },
          "campaign": {
            "type": [
              "object",
              "null"
            ],
            "$ref": "#/components/schemas/SimpleCampaign"
          }
        }
      },
      "EventVoucherUpdatedData": {
        "title": "Event Voucher Updated",
        "type": "object",
        "description": "Event data object schema for `voucher.updated`.",
        "properties": {
          "voucher": {
            "type": [
              "object",
              "null"
            ],
            "$ref": "#/components/schemas/Voucher"
          },
          "campaign": {
            "type": [
              "object",
              "null"
            ],
            "$ref": "#/components/schemas/SimpleCampaign"
          }
        }
      },
      "EventVoucherPublishedData": {
        "title": "Event Voucher Published",
        "type": "object",
        "description": "Event data object schema for `voucher.published`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventPublicationBase"
          },
          {
            "type": "object",
            "properties": {
              "created_at": {
                "type": "string",
                "example": "2024-01-01T11:11:11.111Z",
                "description": "Timestamp representing the date and time when the redemption succeeded in the ISO 8601 format.",
                "format": "date-time"
              }
            }
          }
        ]
      },
      "EventVoucherLoyaltyCardTransactionCreatedData": {
        "title": "Event Voucher Loyalty Card Transaction Created",
        "type": "object",
        "description": "Event data object schema for `voucher.loyalty_card.transaction.created`.",
        "properties": {
          "transaction": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebhookVoucherTransaction"
              },
              {
                "type": "null"
              }
            ]
          },
          "voucher": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Voucher"
              },
              {
                "type": "null"
              }
            ]
          },
          "campaign": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimpleCampaign"
              },
              {
                "type": "null"
              }
            ]
          },
          "holder": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "description": "Details about the redeemable holder.",
                    "$ref": "#/components/schemas/SimpleCustomer"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "holder_loyalty_tier": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "description": "Card holder's current loyalty tier.",
                    "$ref": "#/components/schemas/LoyaltyTier"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "balance": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebhookLoyaltiesMembersBalanceUpdateResponseBody"
              },
              {
                "type": "null"
              }
            ]
          },
          "order": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimpleOrder"
              },
              {
                "type": "null"
              }
            ]
          },
          "event": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimpleEvent"
              },
              {
                "type": "null"
              }
            ]
          },
          "earning_rule": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimpleEarningRule"
              },
              {
                "type": "null"
              }
            ]
          },
          "segment": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimpleSegment"
              },
              {
                "type": "null"
              }
            ]
          },
          "loyalty_tier": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "description": "The loyalty tier which is used to calculate points if custom mapping is made. It can be the same as `holder_loyalty_tier`.",
                    "$ref": "#/components/schemas/LoyaltyTier"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "redemption": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimpleRedemption"
              },
              {
                "type": "null"
              }
            ]
          },
          "rollback": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "description": "Details about the redemption rollback.",
                    "$ref": "#/components/schemas/SimpleRedemption"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "reward": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Reward"
              },
              {
                "type": "null"
              }
            ]
          },
          "custom_event": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomEvent"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_voucher": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "description": "Designates the voucher for the `IN` transfer type.",
                    "$ref": "#/components/schemas/SimpleVoucher"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "destination_voucher": {
            "anyOf": [
              {
                "type": "object",
                "allOf": [
                  {
                    "description": "Designates the voucher for the `OUT` transfer type.",
                    "$ref": "#/components/schemas/SimpleVoucher"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "transaction",
          "voucher",
          "campaign",
          "holder",
          "holder_loyalty_tier",
          "balance",
          "order",
          "event",
          "earning_rule",
          "segment",
          "loyalty_tier",
          "redemption",
          "rollback",
          "reward",
          "custom_event",
          "source_voucher",
          "destination_voucher"
        ]
      },
      "EventVoucherLoyaltyCardPendingPointsActivatedData": {
        "title": "Event Voucher Loyalty Card Pending Points Activated",
        "description": "Event data object schema for `voucher.loyalty_card.pending_points.activated`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "balance": {
            "$ref": "#/components/schemas/VoucherBalance"
          },
          "order": {
            "$ref": "#/components/schemas/SimpleOrder"
          },
          "transaction": {
            "$ref": "#/components/schemas/WebhookVoucherTransaction"
          },
          "pending_points": {
            "$ref": "#/components/schemas/LoyaltyPendingPoints"
          }
        },
        "required": [
          "customer",
          "campaign",
          "voucher",
          "balance",
          "order",
          "transaction",
          "pending_points"
        ]
      },
      "EventVoucherLoyaltyCardPendingPointsAddedData": {
        "title": "Event Voucher Loyalty Card Pending Points Added",
        "description": "Event data object schema for `voucher.loyalty_card.pending_points.added`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "voucher_pending_points_balance": {
            "$ref": "#/components/schemas/VoucherBalance"
          },
          "order": {
            "$ref": "#/components/schemas/SimpleOrder"
          },
          "pending_points": {
            "$ref": "#/components/schemas/LoyaltyPendingPoints"
          }
        },
        "required": [
          "customer",
          "campaign",
          "voucher",
          "voucher_pending_points_balance",
          "order",
          "pending_points"
        ]
      },
      "EventVoucherLoyaltyCardPendingPointsCanceledData": {
        "title": "Event Voucher Loyalty Card Pending Points Canceled",
        "description": "Event data object schema for `voucher.loyalty_card.pending_points.canceled`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "voucher_pending_points_balance": {
            "$ref": "#/components/schemas/VoucherBalance"
          },
          "order": {
            "$ref": "#/components/schemas/SimpleOrder"
          },
          "pending_points": {
            "$ref": "#/components/schemas/LoyaltyPendingPoints"
          }
        },
        "required": [
          "customer",
          "campaign",
          "voucher",
          "voucher_pending_points_balance",
          "order",
          "pending_points"
        ]
      },
      "EventVoucherLoyaltyCardPendingPointsUpdatedData": {
        "title": "Event Voucher Loyalty Card Pending Points Updated",
        "description": "Event data object schema for `voucher.loyalty_card.pending_points.updated`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "voucher_pending_points_balance": {
            "$ref": "#/components/schemas/VoucherBalance"
          },
          "order": {
            "$ref": "#/components/schemas/SimpleOrder"
          },
          "pending_points": {
            "$ref": "#/components/schemas/LoyaltyPendingPoints"
          }
        },
        "required": [
          "customer",
          "campaign",
          "voucher",
          "voucher_pending_points_balance",
          "order",
          "pending_points"
        ]
      },
      "EventVoucherLoyaltyCardPointsAddedData": {
        "title": "Event Voucher Loyalty Card Points Added",
        "type": "object",
        "description": "Event data object schema for `voucher.loyalty_card.points_added`.",
        "properties": {
          "voucher": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimpleVoucher"
              },
              {
                "type": "null"
              }
            ]
          },
          "balance": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WebhookLoyaltiesMembersBalanceUpdateResponseBody"
              },
              {
                "type": "object",
                "properties": {
                  "operation_type": {
                    "type": "string",
                    "description": "The type of the operation being performed. The operation type is `AUTOMATIC` if it is an automatic redemption.",
                    "enum": [
                      "MANUAL",
                      "AUTOMATIC"
                    ]
                  }
                }
              }
            ]
          },
          "campaign": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimpleCampaign"
              },
              {
                "type": "null"
              }
            ]
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimpleCustomer"
              },
              {
                "type": "null"
              }
            ]
          },
          "transaction": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebhookVoucherTransaction"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "EventVoucherLoyaltyCardPointsExpiredData": {
        "title": "Event Voucher Loyalty Card Points Expired",
        "type": "object",
        "description": "Event data object schema for `voucher.loyalty_card.points_expired`.",
        "properties": {
          "voucher": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimpleVoucher"
              },
              {
                "type": "null"
              }
            ]
          },
          "points": {
            "type": "integer",
            "description": "Indicates the number of points that expired."
          },
          "campaign": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimpleCampaign"
              },
              {
                "type": "null"
              }
            ]
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimpleCustomer"
              },
              {
                "type": "null"
              }
            ]
          },
          "buckets": {
            "$ref": "#/components/schemas/LoyaltyPointsBucket"
          },
          "transaction": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebhookVoucherTransaction"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "customer",
          "campaign",
          "points",
          "voucher",
          "buckets",
          "transaction"
        ]
      },
      "EventVoucherGiftTransactionCreatedData": {
        "title": "Event Voucher Gift Transaction Created",
        "type": "object",
        "description": "Event data object schema for `voucher.gift.transaction.created`.",
        "properties": {
          "transaction": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebhookVoucherTransaction"
              },
              {
                "type": "null"
              }
            ]
          },
          "voucher": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Voucher"
              },
              {
                "type": "null"
              }
            ]
          },
          "campaign": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimpleCampaign"
              },
              {
                "type": "null"
              }
            ]
          },
          "holder": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "description": "Details about the redeemable holder.",
                    "$ref": "#/components/schemas/SimpleCustomer"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "balance": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WebhookVouchersBalanceUpdateResponseBody"
              }
            ]
          },
          "order": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimpleOrder"
              },
              {
                "type": "null"
              }
            ]
          },
          "redemption": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimpleRedemption"
              },
              {
                "type": "null"
              }
            ]
          },
          "rollback": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "description": "Details about the redemption rollback. Shown only for a redemption rollback.",
                    "$ref": "#/components/schemas/SimpleRedemption"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "EventVoucherGiftBalanceAddedData": {
        "title": "Event Voucher Gift Balance Added",
        "type": "object",
        "description": "Event data object schema for `voucher.gift.balance_added`.",
        "properties": {
          "voucher": {
            "type": [
              "object",
              "null"
            ],
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "balance": {
            "type": "object",
            "$ref": "#/components/schemas/WebhookVouchersBalanceUpdateResponseBody"
          },
          "campaign": {
            "type": [
              "object",
              "null"
            ],
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "transaction": {
            "type": [
              "object",
              "null"
            ],
            "$ref": "#/components/schemas/WebhookVoucherTransaction"
          }
        }
      },
      "EventVoucherDeletedData": {
        "title": "Event Voucher Deleted",
        "type": "object",
        "description": "Event data object schema for `voucher.deleted`.",
        "properties": {
          "voucher": {
            "type": [
              "object",
              "null"
            ],
            "$ref": "#/components/schemas/Voucher"
          },
          "campaign": {
            "type": [
              "object",
              "null"
            ],
            "$ref": "#/components/schemas/SimpleCampaign"
          }
        }
      },
      "Voucher": {
        "title": "Voucher",
        "description": "This is an object representing a voucher with categories and validation rules assignments.",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherBase"
          },
          {
            "type": "object",
            "properties": {
              "categories": {
                "type": "array",
                "description": "Contains details about the category.",
                "items": {
                  "$ref": "#/components/schemas/Category"
                }
              },
              "validation_rules_assignments": {
                "$ref": "#/components/schemas/ValidationRulesAssignmentsList"
              }
            }
          }
        ]
      },
      "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 generic (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 generic (standalone) vouchers campaigns and it cannot be changed in them. It is always `true` for loyalty campaigns and it cannot be changed in them."
          },
          "active": {
            "type": "boolean",
            "description": "Indicates whether the campaign is active."
          },
          "category_id": {
            "type": [
              "null",
              "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."
          }
        }
      },
      "EventPublicationBase": {
        "title": "Publication",
        "description": "Publication details.",
        "type": "object",
        "properties": {
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimpleCustomer"
              },
              {
                "type": "null"
              }
            ]
          },
          "campaign": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimpleCampaign"
              },
              {
                "type": "null"
              }
            ]
          },
          "publication": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebhookListPublicationsItemBase"
              },
              {
                "type": "null"
              }
            ]
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          }
        }
      },
      "WebhookVoucherTransaction": {
        "title": "Voucher Transaction",
        "type": "object",
        "description": "Transaction details of the voucher.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the transaction."
          },
          "source_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The merchant's product ID (if it is different than Voucherify's product ID)."
          },
          "voucher_id": {
            "type": "string",
            "description": "Unique identifier of the voucher."
          },
          "campaign_id": {
            "type": "string",
            "description": "Unqiue identifier of the voucher's parent campaign if it is part of campaign that generates bulk codes."
          },
          "source": {
            "type": [
              "string",
              "null"
            ],
            "description": "The channel through which the transaction took place, whether through the API, Dashboard, or integrated tool. In case of a redemption, this value is null.",
            "enum": [
              "voucherify-web-ui",
              "voucherify-mobile-ui",
              "voucherify-cockpits-ui",
              "bigcommerce-integration",
              "bigcommerce-webhook-handler",
              "bigcommerce.priority-webhook-handler",
              "shopify_public-webhook-handler",
              "shopify_public.priority-webhook-handler",
              "activecampaign-webhook-handler",
              "mparticle-webhook-handler",
              "API",
              "Automation"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reason why the transaction occurred. In case of a redemption, this value is null."
          },
          "type": {
            "description": "Type of transaction.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/LoyaltyCardTransactionsType"
              },
              {
                "$ref": "#/components/schemas/GiftCardTransactionsType"
              }
            ]
          },
          "details": {
            "type": [
              "object",
              "null"
            ],
            "description": "Contains the detailed information about the transaction.",
            "properties": {
              "balance": {
                "$ref": "#/components/schemas/VoucherBalance"
              },
              "order": {
                "type": "object",
                "description": "Contains information about the original order.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique identifier of the order."
                  },
                  "source_id": {
                    "type": "string",
                    "description": "Unique identifier of the merchant's order if it is different from the Voucherify order ID."
                  }
                },
                "required": [
                  "id",
                  "source_id"
                ]
              },
              "event": {
                "type": "object",
                "description": "Contains information about the event that triggers the point accrual.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique event ID."
                  },
                  "type": {
                    "type": "string",
                    "description": "Type of event."
                  }
                },
                "required": [
                  "id",
                  "type"
                ]
              },
              "earning_rule": {
                "type": "object",
                "description": "Contains information about the earning rule.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique identifier of an earning rule, assigned by Voucherify."
                  },
                  "source": {
                    "type": "object",
                    "required": [
                      "banner"
                    ],
                    "description": "Contains the custom earning rule name.",
                    "properties": {
                      "banner": {
                        "type": "string",
                        "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
                      }
                    }
                  }
                },
                "required": [
                  "id",
                  "source"
                ]
              },
              "segment": {
                "type": "object",
                "description": "Contains information about the segment.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique identifier of the segment."
                  },
                  "name": {
                    "type": "string",
                    "description": "Name of the segment."
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              },
              "loyalty_tier": {
                "type": "object",
                "description": "Contains information about the loyalty tier that is mapped for the earning rule and used in the transaction.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique identifier of the loyalty tier, assigned by Voucherify."
                  },
                  "name": {
                    "type": "string",
                    "description": "User-defined name of the loyalty tier."
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              },
              "redemption": {
                "type": "object",
                "description": "Contains information about the original redemption.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique redemption ID."
                  }
                },
                "required": [
                  "id"
                ]
              },
              "rollback": {
                "type": "object",
                "description": "Contains information about the redemption rollback.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique identifier of the redemption rollback."
                  }
                },
                "required": [
                  "id"
                ]
              },
              "custom_event": {
                "type": "object",
                "description": "Contains information about the custom event that triggers the point accrual.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique identifier of the event."
                  },
                  "type": {
                    "type": "string",
                    "description": "Type of the custom event."
                  }
                },
                "required": [
                  "id",
                  "type"
                ]
              },
              "event_schema": {
                "type": "object",
                "description": "Contains information about the custom event metadata schema.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique identifier of the metadata schema."
                  },
                  "name": {
                    "type": "string",
                    "description": "Type of the custom event."
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              },
              "holder_loyalty_tier": {
                "type": "object",
                "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique identifier of the loyalty tier, assigned by Voucherify."
                  },
                  "name": {
                    "type": "string",
                    "description": "User-defined name of the loyalty tier."
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              },
              "pending_points": {
                "$ref": "#/components/schemas/LoyaltyPendingPoints"
              },
              "reward": {
                "type": "object",
                "description": "Contains information about the pay with points reward.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique reward ID."
                  },
                  "name": {
                    "type": "string",
                    "description": "Reward name."
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              },
              "source_voucher": {
                "description": "Contains information on how the balance on the donor loyalty card was affected by the transaction.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/SimpleVoucher"
                  }
                ]
              },
              "destination_voucher": {
                "description": "Contains information on how the balance on the receiving loyalty card was affected by the transaction.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/SimpleVoucher"
                  }
                ]
              }
            }
          },
          "related_transaction_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The related identifier of the transaction on the receiving card."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the transaction was created in ISO 8601 format."
          }
        },
        "required": [
          "id",
          "source_id",
          "voucher_id",
          "campaign_id",
          "source",
          "reason",
          "type",
          "details",
          "related_transaction_id",
          "created_at"
        ]
      },
      "SimpleCustomer": {
        "title": "Simple Customer",
        "type": "object",
        "description": "Simplified customer data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of an existing customer. It is assigned by Voucherify."
          },
          "name": {
            "type": "string",
            "description": "Customer's first and last name."
          },
          "email": {
            "type": "string",
            "description": "Customer's email address."
          },
          "source_id": {
            "type": "string",
            "description": "A unique identifier of the customer. It can be a customer ID or email from a CRM system, database, or a third-party service."
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that are attached to the customer. It stores all custom attributes assigned to the customer."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "enum": [
              "customer"
            ]
          }
        }
      },
      "LoyaltyTier": {
        "title": "Loyalty Tier",
        "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",
                  "null"
                ],
                "description": "The metadata object stores all custom attributes assigned to the loyalty tier. A set of key/value pairs that you can attach to a loyalty tier object. It can be useful for storing additional information about the loyalty tier in a structured format."
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format."
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Timestamp representing the date and time when the loyalty tier was updated. The value is shown 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"
            ]
          }
        ]
      },
      "WebhookLoyaltiesMembersBalanceUpdateResponseBody": {
        "title": "Loyalty Card Balance Data",
        "type": "object",
        "description": "Voucher balance data for loyalty cards.",
        "properties": {
          "points": {
            "type": "integer",
            "description": "The incremental points removed or added to the current balance on the loyalty card."
          },
          "total": {
            "type": "integer",
            "description": "The total of points accrued over the lifetime of the loyalty card."
          },
          "balance": {
            "type": "integer",
            "minimum": 0,
            "description": "The balance after adding/removing points."
          },
          "type": {
            "type": "string",
            "enum": [
              "loyalty_card"
            ],
            "description": "The type of voucher being modified."
          },
          "object": {
            "type": "string",
            "pattern": "balance",
            "default": "balance",
            "enum": [
              "balance"
            ],
            "description": "The type of the object represented by JSON. Default is balance."
          },
          "related_object": {
            "type": "object",
            "title": "Related object",
            "required": [
              "type",
              "id"
            ],
            "description": "Defines the object that is being modified with the values that are returned in the balance object.",
            "properties": {
              "type": {
                "type": "string",
                "default": "voucher",
                "enum": [
                  "voucher"
                ],
                "description": "The object being modified."
              },
              "id": {
                "type": "string",
                "description": "Unique identifier of the loyalty card that is being modified."
              }
            }
          }
        },
        "required": [
          "points",
          "total",
          "balance",
          "type",
          "object",
          "related_object"
        ]
      },
      "SimpleOrder": {
        "title": "Simple Order",
        "type": "object",
        "description": "Order information.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of an existing order that will be linked to the redemption of this request."
          },
          "source_id": {
            "type": "string",
            "description": "Unique source identifier of an existing order that will be linked to the redemption of this request."
          },
          "status": {
            "type": "string",
            "description": "The order status.",
            "enum": [
              "CREATED",
              "PAID",
              "CANCELED",
              "FULFILLED"
            ]
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.",
            "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
          },
          "referrer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique identifier of the referrer assigned by Voucherify.",
            "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
          },
          "amount": {
            "type": "integer",
            "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts."
          },
          "discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "applied_discount_amount": {
            "type": "integer",
            "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "items_discount_amount": {
            "type": "integer",
            "description": "Sum of all product-specific discounts applied to the order.  It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "items_applied_discount_amount": {
            "type": "integer",
            "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).  \n`sum(items, i => i.applied_discount_amount)`"
          },
          "total_discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "total_applied_discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).\n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`"
          },
          "total_amount": {
            "type": "integer",
            "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "items": {
            "type": "array",
            "description": "Array of items applied to the order. It can include up to 500 items.",
            "items": {
              "$ref": "#/components/schemas/SimpleOrderItem"
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "order",
            "enum": [
              "order"
            ]
          }
        },
        "required": [
          "object"
        ]
      },
      "SimpleEvent": {
        "title": "Simple Event",
        "type": "object",
        "description": "Simplified event data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier assigned by Voucherify that will be linked to the this event.",
            "example": "evcus_0e3070fef399b70b00"
          },
          "type": {
            "type": "string",
            "description": "Type of the triggering event.",
            "example": "customer.order.paid"
          },
          "category": {
            "type": "string",
            "description": "Type of the event.",
            "enum": [
              "EFFECT",
              "ACTION"
            ]
          },
          "entity_id": {
            "type": "string",
            "description": "ID of the entity that initiated the event.",
            "example": "cust_ADqZIwGvWFvugWXVbrHwXRHO"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the event was created in the ISO 8601 format."
          },
          "group_id": {
            "type": "string",
            "description": "Unique identifier of the request that triggered the event.",
            "example": "v-1f36113948e50fc4ge"
          }
        }
      },
      "SimpleEarningRule": {
        "title": "Simple Earning Rule",
        "type": "object",
        "description": "Simplified earning rule data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique earning rule identifier assigned by Voucherify."
          },
          "campaign_id": {
            "type": "string",
            "description": "Unique identifier of the parent campaign assigned by Voucherify."
          },
          "validation_rule_id": {
            "type": "string",
            "description": "A unique validation rule identifier assigned by Voucherify."
          },
          "parameters": {
            "type": "object",
            "oneOf": [
              {
                "$ref": "#/components/schemas/EarningRuleObjectOrderPaid"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportionalCustomEvent"
              },
              {
                "$ref": "#/components/schemas/EarningRuleObjectEnteredSegment"
              },
              {
                "$ref": "#/components/schemas/EarningRuleObjectTier"
              }
            ]
          },
          "automation_id": {
            "type": "string",
            "description": "For internal use by Voucherify."
          },
          "active": {
            "type": "boolean",
            "description": "A flag to toggle the earning rule on or off."
          },
          "source": {
            "type": "object",
            "required": [
              "object_id",
              "object_type"
            ],
            "description": "Contains the custom earning rule name and parent campaign.",
            "properties": {
              "banner": {
                "type": "string",
                "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
              },
              "object_id": {
                "type": "string",
                "description": "A unique campaign identifier assigned by Voucherify."
              },
              "object_type": {
                "type": "string",
                "description": "Defines the object associated with the earning rule. Defaults to `campaign`.",
                "default": "campaign",
                "enum": [
                  "campaign"
                ]
              }
            }
          },
          "loyalty": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EarningRuleFixed"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportional"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportionalOrderItems"
              }
            ]
          },
          "segment": {
            "type": "object",
            "description": "Contains the id of a customer segment. Required for the `customer.segment.entered` option in event.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of a customer segment assigned by Voucherify."
              }
            },
            "required": [
              "id"
            ]
          },
          "loyalty_tier": {
            "type": "string",
            "example": "ltr_UJ5Q54Q0OvEhua87Qfv2Ki5x",
            "description": "Customer's loyalty tier within the campaign."
          },
          "custom_event": {
            "type": "object",
            "properties": {
              "schema_id": {
                "type": "string"
              }
            },
            "required": [
              "schema_id"
            ]
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that is attached to an earning rule object."
          },
          "event": {
            "description": "Defines the event which triggers the earning rule to add points to a loyalty card.",
            "allOf": [
              {
                "$ref": "#/components/schemas/EarningRuleEvent"
              }
            ]
          }
        },
        "required": [
          "id"
        ]
      },
      "SimpleSegment": {
        "title": "Simple Segment",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique segment ID.",
            "example": "seg_DNAOhUtJffvX0f57ajLMFBYR"
          },
          "name": {
            "type": "string",
            "description": "Segment name."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the ID.",
            "default": "segment",
            "enum": [
              "segment"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "object"
        ]
      },
      "SimpleRedemption": {
        "type": "object",
        "title": "Simple Redemption",
        "description": "Simplified redemption data.",
        "properties": {
          "id": {
            "type": "string",
            "example": "r_0bc92f81a6801f9bca",
            "description": "Unique redemption ID."
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed customer source ID."
          },
          "date": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the redemption was created in the ISO 8601 format.",
            "format": "date-time"
          },
          "amount": {
            "type": "integer",
            "description": "For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits.\nFor loyalty cards, this is the number of loyalty points used in the transaction.\nIn the case of redemption rollback, the numbers are expressed as negative integers.",
            "example": 10000
          },
          "order": {
            "$ref": "#/components/schemas/SimpleOrder"
          },
          "reward": {
            "$ref": "#/components/schemas/SimpleRedemptionRewardResult"
          },
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "SUCCEEDED",
              "FAILED",
              "ROLLED BACK"
            ]
          },
          "voucher": {
            "description": "Defines the details of the voucher being redeemed.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleVoucher"
              }
            ]
          },
          "promotion_tier": {
            "$ref": "#/components/schemas/SimplePromotionTier"
          },
          "redemption": {
            "type": "string",
            "description": "Unique redemption ID of the parent redemption.",
            "example": "r_0c656311b5878a2031"
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "failure_code": {
            "type": "string",
            "example": "customer_rules_violated",
            "description": "If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed."
          },
          "failure_message": {
            "type": "string",
            "description": "If the result is `FAILURE`, this parameter will provide an expanded reason as to why the redemption failed."
          },
          "reason": {
            "type": "string",
            "description": "The reason for the redemption rollback."
          },
          "channel": {
            "type": "object",
            "description": "Defines the details of the channel through which the redemption was issued.",
            "properties": {
              "channel_id": {
                "type": "string",
                "description": "Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard, an X-APP-Id of a user using the API, or the reward assignment ID for automatic reward redemption."
              },
              "channel_type": {
                "type": "string",
                "description": "The source of the channel for the redemption:\n`USER` - the redemption was made in the Voucherify Dashboard by a user,\n `API` - redemption was made through the API,\n`AUTO_REDEEM` - the redemption was made automatically for a reward.",
                "enum": [
                  "API",
                  "AUTO_REDEEM",
                  "USER"
                ]
              }
            }
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON. This object stores information about the `redemption`.",
            "default": "redemption"
          }
        },
        "required": [
          "id",
          "date",
          "metadata",
          "status",
          "object"
        ]
      },
      "Reward": {
        "type": "object",
        "title": "Reward",
        "properties": {
          "id": {
            "type": "string",
            "example": "rew_nIy4gHpQHle2c3pNMwuj7G6j",
            "description": "Unique reward ID, assigned by Voucherify."
          },
          "name": {
            "type": "string",
            "description": "Reward name."
          },
          "stock": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Configurable for **material rewards**. The number of units of the product that you want to share as a reward. Use this parameter to code a stock-taking logic."
          },
          "redeemed": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Defines the number of already invoked (successful) reward redemptions.\t"
          },
          "attributes": {
            "type": "object",
            "description": "These properties are configurable for **material rewards**.",
            "properties": {
              "image_url": {
                "type": "string",
                "description": "The HTTPS URL pointing to the .png or .jpg file."
              },
              "description": {
                "type": "string",
                "description": "An arbitrary string that you can attach to a material reward."
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the reward. A set of key/value pairs that you can attach to a reward object. It can be useful for storing additional information about the reward in a structured format."
          },
          "type": {
            "type": "string",
            "enum": [
              "CAMPAIGN",
              "COIN",
              "MATERIAL"
            ],
            "description": "Reward type."
          },
          "parameters": {
            "description": "Defines how the reward is generated.",
            "allOf": [
              {
                "$ref": "#/components/schemas/RewardType"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the reward was created. The value is shown in the ISO 8601 format.",
            "example": "2022-08-11T14:49:22.586Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "Timestamp representing the date and time when the reward was updated. The value is shown in the ISO 8601 format.",
            "example": "2022-08-11T16:01:34.885Z",
            "format": "date-time"
          },
          "object": {
            "description": "The type of the object represented by the JSON. This object stores information about the reward.",
            "default": "reward",
            "enum": [
              "reward"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "type",
          "stock",
          "redeemed",
          "metadata",
          "created_at",
          "updated_at",
          "object"
        ]
      },
      "CustomEvent": {
        "title": "Custom Event",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique custom event ID."
          },
          "object": {
            "type": "string",
            "default": "event",
            "description": "The object represented is an `event`.",
            "enum": [
              "event"
            ]
          },
          "type": {
            "type": "string",
            "description": "The event name."
          },
          "customer": {
            "description": "A simple customer object",
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleCustomerRequiredObjectType"
              }
            ]
          },
          "referral": {
            "type": "object",
            "description": "Referral object.",
            "properties": {
              "referrer_id": {
                "type": "string",
                "description": "Unique referrer ID.",
                "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
              },
              "code": {
                "type": "string",
                "description": "Voucher code."
              },
              "id": {
                "type": "string",
                "description": "Unique voucher ID."
              }
            }
          },
          "loyalty": {
            "type": "object",
            "description": "Loyalty object.",
            "properties": {
              "code": {
                "type": "string",
                "description": "Loyalty card code."
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer object."
          },
          "created_at": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the custom event was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          }
        },
        "required": [
          "object",
          "type",
          "customer",
          "referral",
          "loyalty"
        ]
      },
      "SimpleVoucher": {
        "type": "object",
        "title": "Simple Voucher",
        "description": "Simplified voucher data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "A unique identifier that represents the voucher assigned by Voucherify."
          },
          "code": {
            "type": "string",
            "description": "Voucher code."
          },
          "gift": {
            "description": "Gift object response.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Gift"
              }
            ]
          },
          "discount": {
            "$ref": "#/components/schemas/Discount"
          },
          "loyalty_card": {
            "description": "Defines the loyalty card details.",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleLoyaltyCard"
              }
            ]
          },
          "type": {
            "type": "string",
            "description": "Type of the voucher.",
            "enum": [
              "DISCOUNT_VOUCHER",
              "LOYALTY_CARD",
              "GIFT_VOUCHER"
            ]
          },
          "campaign": {
            "type": "string",
            "description": "Campaign name."
          },
          "campaign_id": {
            "type": "string",
            "description": "Campaign unique ID."
          },
          "is_referral_code": {
            "type": "boolean",
            "description": "Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`."
          },
          "holder_id": {
            "type": "string",
            "example": "cust_eWgXlBBiY6THFRJwX45Iakv4",
            "description": "Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify."
          },
          "referrer_id": {
            "type": "string",
            "description": "Unique identifier of the referrer assigned by Voucherify.",
            "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
          },
          "category_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique identifier of the category that this voucher belongs to.",
            "example": "cat_0b6152ce12414820dc"
          },
          "categories": {
            "type": "array",
            "description": "Contains details about the category.",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          },
          "active": {
            "type": "boolean",
            "description": "Shows whether the voucher is on or off. `true` indicates an *active* voucher and `false` indicates an *inactive* voucher."
          },
          "created_at": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the order 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 order was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "redemption": {
            "type": "object",
            "description": "Defines the redemption limits on vouchers.",
            "properties": {
              "quantity": {
                "type": [
                  "integer",
                  "null"
                ],
                "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."
              },
              "redeemed_points": {
                "type": "integer",
                "description": "Total loyalty points redeemed."
              }
            },
            "required": [
              "quantity",
              "redeemed_quantity"
            ]
          },
          "start_date": {
            "type": "string",
            "example": "2021-12-01T00:00:00.000Z",
            "format": "date-time",
            "description": "Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date."
          },
          "expiration_date": {
            "type": "string",
            "example": "2021-12-31T00:00:00.000Z",
            "format": "date-time",
            "description": "Expiration timestamp defines when the code expires in ISO 8601 format.  Voucher is *inactive after* this date."
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a voucher. The metadata object stores all custom attributes assigned to the voucher."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "voucher",
            "enum": [
              "voucher"
            ]
          }
        },
        "required": [
          "type",
          "code",
          "created_at",
          "object"
        ]
      },
      "VoucherBalance": {
        "type": "object",
        "title": "Voucher Balance",
        "description": "Contains information on how the balance was affected by the transaction.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of voucher whose balance is being adjusted due to the transaction.",
            "enum": [
              "loyalty_card",
              "gift_voucher"
            ]
          },
          "total": {
            "type": "integer",
            "description": "The number of all points or credits accumulated on the card as affected by add or subtract operations."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON.",
            "enum": [
              "balance"
            ]
          },
          "amount": {
            "type": "integer",
            "description": "Credits added or subtracted on a gift card."
          },
          "points": {
            "type": "integer",
            "description": "Points added or subtracted in the transaction of a loyalty card."
          },
          "balance": {
            "type": "integer",
            "description": "The available points or credits on the card after the transaction as affected by redemption or rollback."
          },
          "operation_type": {
            "type": "string",
            "description": "The type of the operation being performed. The operation type is `AUTOMATIC` if it is an automatic redemption.",
            "enum": [
              "MANUAL",
              "AUTOMATIC"
            ]
          },
          "related_object": {
            "type": "object",
            "required": [
              "id",
              "type"
            ],
            "description": "Defines the resource that is being modified with the values that are returned in the balance object.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Identifies the voucher that is being modified. The ID is assigned by the Voucherify API."
              },
              "type": {
                "type": "string",
                "description": "The object being modified, i.e. voucher.",
                "enum": [
                  "voucher"
                ]
              }
            }
          }
        },
        "required": [
          "total",
          "object",
          "balance",
          "related_object"
        ]
      },
      "LoyaltyPendingPoints": {
        "type": "object",
        "title": "Loyalty Pending Point Entry",
        "description": "Contains details about the pending point entry.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the pending point entry, assigned by Voucherify.",
            "example": "lopp_0ffd593d5ad207ba6b"
          },
          "voucher_id": {
            "type": "string",
            "description": "Unique identifier of the loyalty card, assigned by Voucherify.",
            "example": "v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc"
          },
          "campaign_id": {
            "type": "string",
            "description": "Unique campaign identifier, assigned by Voucherify.",
            "example": "camp_weer1c3p5ZgktqfW56RfoNaG"
          },
          "customer_id": {
            "type": "string",
            "description": "Unique customer identifier, assigned by Voucherify.",
            "example": "cust_IdgAFZxYwwHctOk9ppZMu319"
          },
          "order_id": {
            "type": "string",
            "description": "Unique order identifier, assigned by Voucherify.",
            "example": "ord_0ffc0fa65f15d2df17"
          },
          "points": {
            "type": "integer",
            "description": "Number of points in the pending state."
          },
          "activates_at": {
            "type": "string",
            "description": "Date when the pending points are activated and added to the customer's loyalty card.",
            "format": "date"
          },
          "details": {
            "$ref": "#/components/schemas/LoyaltyPendingPointsDetails"
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the pending point entry was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the pending point entry was modified. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "voucher_id",
          "campaign_id",
          "customer_id",
          "order_id",
          "points",
          "activates_at",
          "details",
          "created_at"
        ]
      },
      "LoyaltyPointsBucket": {
        "type": "object",
        "title": "Loyalty Point Bucket",
        "description": "Contains the details about expiring loyalty points.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the loyalty points bucket."
          },
          "voucher_id": {
            "type": "string",
            "description": "Unique identifier of the parent loyalty card."
          },
          "campaign_id": {
            "type": "string",
            "description": "Unique identifier of the parent campaign."
          },
          "bucket": {
            "type": "object",
            "required": [
              "total_points"
            ],
            "description": "Defines the number of points stored in this loyalty point bucket.",
            "properties": {
              "total_points": {
                "type": "integer",
                "description": "Total number of points in the loyalty point bucket."
              }
            }
          },
          "status": {
            "type": "string",
            "description": "Loyalty point bucket status."
          },
          "expires_at": {
            "type": "string",
            "format": "date",
            "description": "Date when the number of points defined in the bucket object are due to expire."
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the loyalty point bucket object was created in ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the loyalty point bucket object was updated in ISO 8601 format."
          },
          "object": {
            "type": "string",
            "enum": [
              "loyalty_points_bucket"
            ],
            "description": "The type of the object represented by JSON. This object stores information about the loyalty point bucket."
          }
        },
        "required": [
          "id",
          "voucher_id",
          "campaign_id",
          "bucket",
          "created_at",
          "status",
          "expires_at",
          "object"
        ]
      },
      "WebhookVouchersBalanceUpdateResponseBody": {
        "description": "Voucher balance data for gift vouchers",
        "type": "object",
        "title": "Voucher Balance Data",
        "required": [
          "amount",
          "total",
          "balance",
          "type",
          "object",
          "related_object",
          "operation_type"
        ],
        "properties": {
          "amount": {
            "type": "integer",
            "description": "The incremental amount added (positive integer) or subtracted (negative integer) to the current balance on the gift voucher. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000."
          },
          "total": {
            "type": "integer",
            "description": "Total income incurred over the lifespan of the gift voucher."
          },
          "balance": {
            "type": "integer",
            "description": "The balance after adding or subtracting a specified amount. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000."
          },
          "type": {
            "type": "string",
            "description": "The type of voucher being modified.",
            "enum": [
              "gift_voucher"
            ]
          },
          "operation_type": {
            "type": "string",
            "default": "MANUAL",
            "enum": [
              "MANUAL"
            ]
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. Default is `balance`.",
            "default": "balance",
            "enum": [
              "balance"
            ]
          },
          "related_object": {
            "type": "object",
            "description": "Defines the resource that is being modified with the values that are returned in the balance object.",
            "required": [
              "type",
              "id"
            ],
            "properties": {
              "type": {
                "type": "string",
                "description": "The object being modified, i.e. `voucher`.",
                "default": "voucher",
                "enum": [
                  "voucher"
                ]
              },
              "id": {
                "type": "string",
                "description": "The uniqe identifier that was assigned by Voucherify.",
                "example": "v_4Bd3aX7eXjHbe7Ef7on8YsLWBynsT4jq"
              }
            }
          }
        }
      },
      "VoucherBase": {
        "title": "Voucher Base",
        "description": "This is an object representing a voucher.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "v_mkZN9v7vjYUadXnHrMza8W5c34fE5KiV",
            "description": "Assigned by the Voucherify API, identifies the voucher."
          },
          "code": {
            "type": "string",
            "example": "WVPblOYX",
            "description": "A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters."
          },
          "campaign": {
            "type": "string",
            "example": "Gift Card Campaign",
            "description": "A unique campaign name, identifies the voucher's parent campaign."
          },
          "campaign_id": {
            "type": "string",
            "example": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
            "description": "Assigned by the Voucherify API, identifies the voucher's parent campaign."
          },
          "category": {
            "type": "string",
            "description": "Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint."
          },
          "category_id": {
            "type": "string",
            "description": "Unique category ID assigned by Voucherify.",
            "example": "cat_0bb343dee3cdb5ec0c"
          },
          "type": {
            "type": "string",
            "enum": [
              "GIFT_VOUCHER",
              "DISCOUNT_VOUCHER",
              "LOYALTY_CARD"
            ],
            "description": "Defines the type of the voucher. "
          },
          "discount": {
            "$ref": "#/components/schemas/Discount"
          },
          "gift": {
            "type": "object",
            "description": "Object representing gift parameters. Child attributes are present only if `type` is `GIFT_VOUCHER`. Defaults to `null`.",
            "properties": {
              "amount": {
                "type": "integer",
                "example": 10000,
                "description": "Total gift card income over the lifetime of the card. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
              },
              "subtracted_amount": {
                "type": "integer",
                "description": "Total amount of subtracted credits over the gift card lifetime. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
              },
              "balance": {
                "type": "integer",
                "example": 500,
                "description": "Available funds. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
              },
              "effect": {
                "type": "string",
                "enum": [
                  "APPLY_TO_ORDER",
                  "APPLY_TO_ITEMS"
                ],
                "description": "Defines how the credits are applied to the customer's order."
              }
            }
          },
          "loyalty_card": {
            "type": "object",
            "description": "Object representing loyalty card parameters. Child attributes are present only if `type` is `LOYALTY_CARD`. Defaults to `null`.",
            "properties": {
              "points": {
                "type": "integer",
                "example": 7000,
                "description": "Total number of points added to the loyalty card over its lifespan."
              },
              "balance": {
                "type": "integer",
                "example": 6970,
                "description": "Points available for reward redemption. This is calculated as follows: `balance` = `points` - `expired_points` - `subtracted_points` - `redemption.redeemed_points`."
              },
              "next_expiration_date": {
                "type": "string",
                "format": "date",
                "example": "2023-05-30",
                "description": "The next closest date when the next set of points are due to expire."
              },
              "next_expiration_points": {
                "type": "integer",
                "description": "The amount of points that are set to expire next."
              },
              "pending_points": {
                "type": "integer",
                "description": "Shows the number of pending points that will be added to the loyalty card when they are activated automatically or manually."
              },
              "expired_points": {
                "type": "integer",
                "description": "Shows the total number of expired points over the lifetime of the loyalty card."
              },
              "subtracted_points": {
                "type": "integer",
                "description": "Shows the total number of subtracted points over the lifetime of the loyalty card."
              }
            }
          },
          "start_date": {
            "type": "string",
            "example": "2021-12-01T00:00:00.000Z",
            "format": "date-time",
            "description": "Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. "
          },
          "expiration_date": {
            "type": "string",
            "example": "2021-12-31T00:00:00.000Z",
            "format": "date-time",
            "description": "Expiration timestamp defines when the code expires in ISO 8601 format.  Voucher is *inactive after* this date."
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "active": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`.  \n\n- `true` indicates an *active* voucher\n- `false` indicates an *inactive* voucher"
          },
          "additional_info": {
            "type": "string",
            "description": "An optional field to keep any extra textual information about the code such as a code description and details."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format."
          },
          "assets": {
            "$ref": "#/components/schemas/VoucherAssets"
          },
          "is_referral_code": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`."
          },
          "created_at": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "example": "2021-12-22T10:14:45.316Z",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the voucher was last updated in ISO 8601 format."
          },
          "holder_id": {
            "type": "string",
            "example": "cust_eWgXlBBiY6THFRJwX45Iakv4",
            "description": "Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify."
          },
          "referrer_id": {
            "type": "string",
            "description": "Unique identifier of the referring person.",
            "example": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. Default is `voucher`.",
            "default": "voucher"
          },
          "publish": {
            "type": "object",
            "description": "Stores a summary of publication events: an event counter and endpoint to return details of each event. Publication is an assignment of a code to a customer, e.g. through a distribution.",
            "properties": {
              "object": {
                "type": "string",
                "default": "list",
                "description": "The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute."
              },
              "count": {
                "type": "integer",
                "example": 0,
                "description": "Publication events counter."
              },
              "url": {
                "type": "string",
                "example": "/v1/vouchers/WVPblOYX/publications?page=1&limit=10",
                "description": "The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications`"
              }
            }
          },
          "redemption": {
            "type": "object",
            "description": "Stores a summary of redemptions that have been applied to the voucher.",
            "properties": {
              "quantity": {
                "type": "integer",
                "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."
              },
              "redeemed_points": {
                "type": "integer",
                "example": 100000,
                "description": "Total loyalty points redeemed."
              },
              "object": {
                "type": "string",
                "default": "list",
                "description": "The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute."
              },
              "url": {
                "type": "string",
                "example": "/v1/vouchers/WVPblOYX/redemptions?page=1&limit=10",
                "description": "The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions`"
              }
            }
          }
        }
      },
      "Category": {
        "title": "Category",
        "description": "This is an object representing a 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. Categories with lower hierarchy are processed before categories with higher hierarchy value.",
            "minimum": 0
          },
          "object": {
            "type": "string",
            "default": "category",
            "enum": [
              "category"
            ],
            "description": "The type of the object represented by the JSON. This object stores information about the category."
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.",
            "example": "2022-07-14T10:45:13.156Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "example": "2022-08-16T10:52:08.094Z",
            "description": "Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "hierarchy",
          "created_at",
          "object"
        ]
      },
      "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"
        ]
      },
      "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.",
            "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",
                  "null"
                ],
                "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": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CodeConfig"
              }
            ],
            "required": [
              "length",
              "charset",
              "pattern"
            ]
          }
        },
        "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": "Define 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 ID 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": [
                  "LOYALTY_CARD",
                  "GIFT_VOUCHER"
                ],
                "description": "Type of reward."
              },
              "amount": {
                "type": "integer",
                "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."
              }
            }
          }
        }
      },
      "WebhookListPublicationsItemBase": {
        "title": "List Publications Item Base",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "pub_BbjAXnmm8e0SIm3zG8qvvFCP0KuLywtp",
            "description": "Unique identifier of the publication assigned by Voucherify."
          },
          "object": {
            "type": "string",
            "default": "publication",
            "enum": [
              "publication"
            ],
            "description": "The type of the object represented by the JSON. This object stores information about the `publication`."
          },
          "created_at": {
            "type": "string",
            "example": "2022-09-23T09:57:00.434Z",
            "description": "Timestamp representing the date and time when the publication was created in the ISO 8601 format.",
            "format": "date-time"
          },
          "customer_id": {
            "type": "string",
            "example": "cust_eWgXlBBiY6THFRJwX45Iakv4",
            "description": "Unique identifier of the customer receiving the publication."
          },
          "tracking_id": {
            "type": "string",
            "description": "Customer's `source_id`."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object."
          },
          "channel": {
            "type": "string",
            "description": "How the publication was originated."
          },
          "source_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique identifier of the merchant's publication if it is different from the Voucherify publication ID."
          },
          "result": {
            "type": "string",
            "default": "SUCCESS",
            "enum": [
              "SUCCESS"
            ],
            "description": "Status of the publication attempt."
          },
          "customer": {
            "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
          },
          "vouchers_id": {
            "type": "array",
            "description": "Contains the unique internal voucher ID that was assigned by Voucherify.",
            "items": {
              "type": "string",
              "example": "v_Bw3qWZWv47yb1Onra8F2LlFI1enLakfA"
            }
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "customer_id",
          "metadata",
          "channel",
          "source_id",
          "customer",
          "vouchers_id"
        ]
      },
      "LoyaltyCardTransactionsType": {
        "title": "Loyalty Card Transactions Type",
        "type": "string",
        "description": "Transaction types concerning loyalty points.",
        "enum": [
          "PENDING_POINTS_ACTIVATION",
          "POINTS_ACCRUAL",
          "POINTS_REDEMPTION",
          "POINTS_REFUND",
          "POINTS_ADDITION",
          "POINTS_REMOVAL",
          "POINTS_EXPIRATION",
          "POINTS_TRANSFER_IN",
          "POINTS_TRANSFER_OUT"
        ]
      },
      "GiftCardTransactionsType": {
        "title": "Gift Card Transaction Type",
        "type": "string",
        "enum": [
          "CREDITS_REDEMPTION",
          "CREDITS_REFUND",
          "CREDITS_ADDITION",
          "CREDITS_REMOVAL"
        ]
      },
      "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"
        ]
      },
      "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 campaign ID, assigned by Voucherify.",
            "example": "camp_rRsfatlwN7unSeUIJDCYedal"
          },
          "tier_id": {
            "type": "string",
            "description": "Unique tier ID, assigned by Voucherify."
          },
          "start_date": {
            "type": "string",
            "description": "Activation timestamp defines when the loyalty tier starts to be active in ISO 8601 format. Loyalty tier is inactive before this date."
          },
          "expiration_date": {
            "type": "string",
            "description": "Expiration timestamp defines when the loyalty tier expires in ISO 8601 format. Loyalty tier is inactive after this date."
          },
          "created_at": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the loyalty tier was updated. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          }
        },
        "required": [
          "customer_id",
          "campaign_id",
          "tier_id",
          "created_at"
        ]
      },
      "SimpleOrderItem": {
        "type": "object",
        "title": "Simple Order Item",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the order line item."
          },
          "object": {
            "type": "string",
            "default": "order_item",
            "enum": [
              "order_item"
            ],
            "description": "The type of the object represented by JSON. This object stores information about the `order_item`."
          },
          "source_id": {
            "type": "string",
            "description": "The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service."
          },
          "related_object": {
            "type": "string",
            "enum": [
              "product",
              "sku"
            ],
            "description": "Used along with the `source_id` property, can be set to either SKU or product."
          },
          "product_id": {
            "type": "string",
            "description": "Unique identifier of the product. It is assigned by Voucherify."
          },
          "sku_id": {
            "type": "string",
            "description": "Unique identifier of the SKU. It is assigned by Voucherify."
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity of the particular item in the cart."
          },
          "applied_quantity": {
            "type": "integer",
            "description": "Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced."
          },
          "applied_quantity_amount": {
            "type": "integer",
            "description": "Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced."
          },
          "discount_quantity": {
            "type": "integer",
            "description": "Number of discounted items."
          },
          "applied_discount_quantity": {
            "type": "integer",
            "description": "Number of the discounted items applied in the transaction."
          },
          "amount": {
            "type": "integer",
            "description": "Total amount of the order item (price * quantity)."
          },
          "discount_amount": {
            "type": "integer",
            "description": "Sum of all order-item-level discounts applied to the order."
          },
          "applied_discount_amount": {
            "type": "integer",
            "description": "Order-level discount amount applied in the transaction."
          },
          "price": {
            "type": "integer",
            "description": "Unit price of an item. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "subtotal_amount": {
            "type": "integer",
            "description": "Final order item amount after the applied item-level discount.  If there are no item-level discounts applied, this item is equal to the `amount`.   \n`subtotal_amount`=`amount`-`discount_amount`"
          }
        }
      },
      "EarningRuleObjectOrderPaid": {
        "description": "Object representing an earning rule for a paid order.",
        "type": "object",
        "title": "Earning Rule Object for Order Paid",
        "properties": {
          "event": {
            "type": "string",
            "default": "order.paid",
            "enum": [
              "order.paid"
            ],
            "description": "Defines the event which triggers the earning rule to add points to a loyalty card.  \n\n- `order.paid` an event defined by the Voucherify API corresponding to an order status `PAID`. "
          },
          "banner": {
            "type": "string",
            "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
          },
          "loyalty": {
            "description": "An object that defines the number of points that will be added to a loyalty card and how the points will be added.\n\n- `FIXED` adds a fixed number of `points`\n- `PROPORTIONAL` adds points proportionally based on a pre-defined ratio",
            "oneOf": [
              {
                "$ref": "#/components/schemas/EarningRuleFixed"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportional"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportionalOrderItems"
              }
            ]
          }
        }
      },
      "EarningRuleProportionalCustomEvent": {
        "title": "Earning Rule Proportional Custom Event",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ],
            "description": "Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio."
          },
          "calculation_type": {
            "type": "string",
            "default": "CUSTOM_EVENT_METADATA",
            "enum": [
              "CUSTOM_EVENT_METADATA"
            ],
            "description": "CUSTOM_EVENT_METADATA: Custom event metadata (X points for every Y in metadata attribute)."
          },
          "custom_event": {
            "type": "object",
            "required": [
              "metadata"
            ],
            "properties": {
              "metadata": {
                "type": "object",
                "required": [
                  "every",
                  "points",
                  "property"
                ],
                "description": "Defines the ratio based on the property defined in the calculation_type parameter. For every given increment of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every order metadata property value, give points.",
                "properties": {
                  "every": {
                    "type": "integer",
                    "description": "For how many increments of the customer metadata property to grant points for."
                  },
                  "points": {
                    "type": "integer",
                    "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card."
                  },
                  "points_formula": {
                    "type": "string",
                    "description": "Formula used to dynamically calculate the rewarded points."
                  },
                  "property": {
                    "type": "string",
                    "description": "\nCustom event metadata property."
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "custom_event"
        ]
      },
      "EarningRuleObjectEnteredSegment": {
        "description": "Object representing an earning rule for entering a customer segment.",
        "type": "object",
        "title": "Earning Rule Object for Entered Segment",
        "properties": {
          "validation_rule_id": {
            "type": "string",
            "example": "val_248vs7tUjlIE",
            "description": "Unique identifier of the validation rule."
          },
          "loyalty": {
            "description": "An object that defines the number of points that will be added to a loyalty card and how the points will be added.\n\n- `FIXED` adds a fixed number of `points`\n- `PROPORTIONAL` adds points proportionally based on a pre-defined ratio",
            "oneOf": [
              {
                "$ref": "#/components/schemas/EarningRuleFixed"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportionalCustomerMetadata"
              }
            ]
          },
          "segment": {
            "type": "object",
            "description": "Contains the id of a customer segment. **Required** for the `customer.segment.entered` option in `event`.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Contains a unique identifier of a customer segment. Assigned by the Voucherify API."
              }
            }
          },
          "event": {
            "type": "string",
            "default": "customer.segment.entered",
            "enum": [
              "customer.segment.entered"
            ],
            "description": "Defines the event which triggers the earning rule to add points to a loyalty card.  \n\n- `customer.segment.entered` an event defined by the Voucherify API corresponding to a customer entering a pre-defined customer segment."
          },
          "source": {
            "type": "object",
            "description": "Contains the custom earning rule name and parent campaign.",
            "properties": {
              "banner": {
                "type": "string",
                "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
              }
            }
          },
          "active": {
            "type": "boolean",
            "description": "A flag to toggle the earning rule on or off."
          },
          "start_date": {
            "type": "string",
            "example": "2022-02-02T13:00:00.000Z",
            "format": "date-time",
            "description": "Start date defines when the earning rule starts to be active. Activation timestamp in ISO 8601 format."
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-03-03T14:30:00.000Z",
            "description": "Expiration date defines when the earning rule expires. Expiration timestamp in ISO 8601 format."
          },
          "validity_timeframe": {
            "type": "object",
            "description": "Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.",
            "properties": {
              "duration": {
                "type": "string",
                "description": "Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a `duration` of `PT1H` will be valid for a duration of one hour.",
                "example": "PT1H"
              },
              "interval": {
                "type": "string",
                "description": "Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an `interval` of `P2D` will be valid every other day.",
                "example": "P2D"
              }
            }
          },
          "validity_day_of_week": {
            "type": "array",
            "description": "Integer array corresponding to the particular days of the week in which the earning rule 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"
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format."
          }
        }
      },
      "EarningRuleObjectTier": {
        "description": "Object representing an earning rule for tiers.",
        "type": "object",
        "title": "Earning Rule Object for Tiers",
        "properties": {
          "id": {
            "type": "string",
            "example": "ern_P6MWOFGsv63sbTaTZBp0IHGK",
            "description": "Unique identifier of the earning rule."
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the earning rule was created in ISO 8601 format.",
            "example": "2022-02-02T13:18:32.557Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format.",
            "example": "2022-02-03T13:09:27.206Z",
            "format": "date-time"
          },
          "validation_rule_id": {
            "type": "string",
            "example": "val_248vs7tUjlIE",
            "description": "Unique identifier of the validation rule."
          },
          "loyalty": {
            "description": "An object that defines the number of points that will be added to a loyalty card and how the points will be added.\n\n- `FIXED` adds a fixed number of `points`\n- `PROPORTIONAL` adds points proportionally based on a pre-defined ratio",
            "oneOf": [
              {
                "$ref": "#/components/schemas/EarningRuleFixed"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportionalCustomerMetadata"
              }
            ]
          },
          "event": {
            "type": "string",
            "description": "Defines the event which triggers the earning rule to add points to a loyalty card.",
            "enum": [
              "customer.loyalty.tier.joined",
              "customer.loyalty.tier.left",
              "customer.loyalty.tier.upgraded",
              "customer.loyalty.tier.downgraded",
              "customer.loyalty.tier.prolonged"
            ]
          },
          "loyalty_tier": {
            "type": "object",
            "description": "Defines the tier associated with the earning rule definition.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the loyalty tier associated with the earning rule.",
                "example": "ltr_pudTGWasuIqxdiDM0go31OV1"
              }
            }
          },
          "source": {
            "type": "object",
            "description": "Contains the custom earning rule name and parent campaign.",
            "properties": {
              "banner": {
                "type": "string",
                "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
              },
              "object_id": {
                "type": "string",
                "example": "camp_Pfja7X91b1GoyH5wnpzCwlP3",
                "description": "Unique identifier of the campaign."
              },
              "object_type": {
                "type": "string",
                "default": "campaign",
                "description": "Defines the object associated with the earning rule. Defaults to `campaign`."
              }
            }
          },
          "active": {
            "type": "boolean",
            "description": "A flag to toggle the earning rule on or off."
          },
          "start_date": {
            "type": "string",
            "example": "2022-02-02T13:00:00.000Z",
            "format": "date-time",
            "description": "Start date defines when the earning rule starts to be active. Activation timestamp in ISO 8601 format."
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-03-03T14:30:00.000Z",
            "description": "Expiration date defines when the earning rule expires. Expiration timestamp in ISO 8601 format."
          },
          "validity_timeframe": {
            "type": "object",
            "description": "Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.",
            "properties": {
              "duration": {
                "type": "string",
                "description": "Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a `duration` of `PT1H` will be valid for a duration of one hour.",
                "example": "PT1H"
              },
              "interval": {
                "type": "string",
                "description": "Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an `interval` of `P2D` will be valid every other day.",
                "example": "P2D"
              }
            }
          },
          "validity_day_of_week": {
            "type": "array",
            "description": "Integer array corresponding to the particular days of the week in which the earning rule 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"
          },
          "object": {
            "type": "string",
            "default": "earning_rule",
            "description": "The type of the object represented by JSON. Default is `earning_rule`."
          },
          "automation_id": {
            "type": "string",
            "description": "For internal use by Voucherify.",
            "example": "auto_4jH1yq9WJS0oJ8suagCrltyb"
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format."
          }
        }
      },
      "EarningRuleFixed": {
        "title": "Define fixed amount of points",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "FIXED",
            "enum": [
              "FIXED"
            ],
            "description": "The number of points to be added to the loyalty card."
          },
          "points": {
            "type": "integer",
            "description": "Defines how the points will be added to the loyalty card. FIXED adds a fixed number of points."
          },
          "points_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the rewarded points."
          }
        },
        "required": [
          "type",
          "points"
        ]
      },
      "EarningRuleProportional": {
        "title": "Calculate points proportionally",
        "oneOf": [
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrder"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderItems"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalCustomerMetadata"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalCustomEvent"
          }
        ]
      },
      "EarningRuleProportionalOrderItems": {
        "title": "Define amount of points proportional to order items",
        "oneOf": [
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderItemsQuantity"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderItemsAmount"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderItemsSubtotalAmount"
          }
        ]
      },
      "EarningRuleEvent": {
        "title": "Earning Rule Event",
        "example": "`order.paid`, `customer.segment.entered`, `customer.loyalty.tier.upgraded`, `customer.loyalty.tier.downgraded`, `customer.loyalty.tier.prolonged`, `customer.loyalty.tier.joined`, `customer.loyalty.tier.left`",
        "type": "string"
      },
      "SimpleRedemptionRewardResult": {
        "title": "Simple Redemption Reward Result",
        "type": "object",
        "description": "Simplified redemption reward result data",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "assignment_id": {
            "type": "string",
            "description": "Unique reward assignment ID assigned by Voucherify."
          },
          "voucher": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleVoucher"
              }
            ]
          },
          "product": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleProduct"
              }
            ]
          },
          "sku": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleSku"
              }
            ]
          },
          "loyalty_tier_id": {
            "type": "string",
            "description": "Unique loyalty tier ID assigned by Voucherify."
          },
          "id": {
            "type": "string",
            "example": "rew_nIy4gHpQHle2c3pNMwuj7G6j",
            "description": "Unique reward ID, assigned by Voucherify."
          },
          "object": {
            "type": "string",
            "default": "reward",
            "enum": [
              "reward"
            ],
            "description": "The type of the object represented by the JSON. This object stores information about the reward."
          },
          "name": {
            "type": "string",
            "description": "Reward name."
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the reward was created. The value is shown in the ISO 8601 format.",
            "example": "2024-01-01T11:11:11.111Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "Timestamp representing the date and time when the reward was updated. The value is shown in the ISO 8601 format.",
            "example": "2024-01-01T11:11:11.111Z",
            "format": "date-time"
          },
          "parameters": {
            "description": "Defines how the reward is generated.",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/RewardType"
              }
            ]
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a reward. The metadata object stores all custom attributes assigned to the reward."
          },
          "type": {
            "type": "string",
            "enum": [
              "CAMPAIGN",
              "COIN",
              "MATERIAL"
            ],
            "description": "Reward type."
          }
        }
      },
      "SimplePromotionTier": {
        "title": "Simple Promotion Tier",
        "type": "object",
        "description": "This is an object representing a simple promotion tier. Promotion tiers are always assigned to a campaign and cannot be used standalone.",
        "properties": {
          "id": {
            "type": "string",
            "example": "promo_63fYCt81Aw0h7lzyRkrGZh9p",
            "description": "Unique promotion tier ID."
          },
          "name": {
            "type": "string",
            "description": "Name of the promotion tier."
          },
          "banner": {
            "type": "string",
            "description": "Text to be displayed to your customers on your website."
          },
          "campaign": {
            "type": "object",
            "description": "Contains details about promotion tier's parent campaign.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique campaign ID."
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a promotion tier. The metadata object stores all custom attributes assigned to the promotion tier."
          }
        }
      },
      "RewardType": {
        "title": "Reward type",
        "oneOf": [
          {
            "$ref": "#/components/schemas/RewardTypeCampaign"
          },
          {
            "$ref": "#/components/schemas/RewardTypeCoin"
          },
          {
            "$ref": "#/components/schemas/RewardTypeMaterial"
          }
        ]
      },
      "SimpleCustomerRequiredObjectType": {
        "type": "object",
        "description": "This is an object representing a customer with limited properties used in Event Tracking endpoints.",
        "title": "Customer Object Required Object Type",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique ID of a customer that is assigned by Voucherify.",
            "example": "cust_CSnYd37MXmrbS19XCrghjBsv"
          },
          "source_id": {
            "type": "string",
            "description": "The merchant's customer ID if it is different from the Voucherify customer ID. It is really useful in case of an integration between multiple systems. It can be a customer ID from a CRM system, database or 3rd-party service."
          },
          "name": {
            "type": "string",
            "description": "Customer's first and last name."
          },
          "email": {
            "type": "string",
            "description": "Customer's email address."
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. "
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON. This object stores information about the customer.",
            "default": "customer"
          }
        },
        "required": [
          "object"
        ]
      },
      "Gift": {
        "title": "Gift",
        "type": "object",
        "description": "Contains current gift card balance information.",
        "properties": {
          "amount": {
            "type": "number",
            "description": "Total gift card income over the lifetime of the card. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "subtracted_amount": {
            "type": "integer",
            "description": "Total amount of subtracted credits over the gift card lifetime."
          },
          "balance": {
            "type": "number",
            "description": "Available funds. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`. `balance` = `amount` - `subtracted_amount` - `redemption.redeemed_amount`."
          },
          "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"
        ]
      },
      "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"
          }
        ]
      },
      "SimpleLoyaltyCard": {
        "title": "Simple Loyalty Card",
        "type": "object",
        "description": "Simplified loyalty card data.",
        "required": [
          "points"
        ],
        "properties": {
          "points": {
            "type": "integer",
            "description": "Total number of points added to the loyalty card over its lifespan."
          },
          "balance": {
            "type": "integer",
            "description": "Points available for reward redemption. This is calculated as follows: `balance` = `points` - `expired_points` - `subtracted_points` - `redemption.redeemed_points`."
          },
          "next_expiration_date": {
            "type": "string",
            "description": "The next closest date when the next set of points are due to expire."
          },
          "next_expiration_points": {
            "type": "integer",
            "description": "The amount of points that are set to expire next."
          },
          "pending_points": {
            "type": "integer",
            "description": "Shows the number of pending points that will be added to the loyalty card when they are activated automatically or manually."
          },
          "expired_points": {
            "type": "integer",
            "description": "Shows the total number of expired points over the lifetime of the loyalty card."
          },
          "subtracted_points": {
            "type": "integer",
            "description": "Shows the total number of subtracted points over the lifetime of the loyalty card."
          }
        }
      },
      "LoyaltyPendingPointsDetails": {
        "title": "Pending Point Details",
        "type": "object",
        "description": "Details about how the pending points were earned.",
        "properties": {
          "loyalty_tier": {
            "type": "object",
            "description": "The loyalty tier that is mapped for the earning rule and used in the pending point transaction.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the loyalty tier, assigned by Voucherify."
              },
              "name": {
                "type": "string",
                "description": "User-defined name of the loyalty tier."
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "holder_loyalty_tier": {
            "type": "object",
            "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was at the moment pending points were created.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the loyalty tier, assigned by Voucherify."
              },
              "name": {
                "type": "string",
                "description": "User-defined name of the loyalty tier."
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "event": {
            "type": "object",
            "description": "Details about the event that created pending points.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique event identifier, assigned by Voucherify."
              },
              "type": {
                "type": "string",
                "description": "Type of the event that triggered the creation of pending points.",
                "enum": [
                  "customer.order.paid"
                ]
              },
              "group_id": {
                "type": "string",
                "description": "Unique identifier of the request that triggered the event, assigned by Voucherify."
              },
              "entity_id": {
                "type": "string",
                "description": "Unique identifier of the entity that triggered the event, assigned by Voucherify. For pending points, it is the `customer_id` of the customer who paid for the order."
              },
              "created_at": {
                "type": "string",
                "description": "Timestamp representing the date and time when the event occurred. The value is shown in the ISO 8601 format.",
                "format": "date-time"
              },
              "category": {
                "type": "string",
                "description": "Type of the event.",
                "enum": [
                  "ACTION",
                  "EFFECT"
                ]
              },
              "event_source": {
                "$ref": "#/components/schemas/EventSource"
              }
            }
          },
          "earning_rule": {
            "type": "object",
            "description": "Contains information about the earning rule.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of an earning rule, assigned by Voucherify."
              },
              "source": {
                "type": "object",
                "required": [
                  "banner"
                ],
                "description": "Contains the custom earning rule name.",
                "properties": {
                  "banner": {
                    "type": "string",
                    "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
                  }
                }
              }
            },
            "required": [
              "id",
              "source"
            ]
          },
          "order": {
            "type": "object",
            "description": "Details about the order that caused adding pending points.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique order identifier, assigned by Voucherify."
              },
              "source_id": {
                "type": [
                  "null",
                  "string"
                ],
                "description": "User-defined order identifier."
              }
            },
            "required": [
              "id",
              "source_id"
            ]
          }
        },
        "required": [
          "event",
          "earning_rule",
          "order"
        ]
      },
      "ValidityTimeframe": {
        "title": "Validity Timeframe",
        "type": "object",
        "description": "Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.",
        "properties": {
          "duration": {
            "type": "string",
            "description": "Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a `duration` of `PT1H` will be valid for a duration of one hour.",
            "example": "PT1H"
          },
          "interval": {
            "type": "string",
            "description": "Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an `interval` of `P2D` will be valid every other day.",
            "example": "P2D"
          }
        }
      },
      "ValidityDayOfWeek": {
        "title": "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
          ]
        }
      },
      "ValidityHours": {
        "title": "Validity Hours",
        "type": "object",
        "description": "Determines the hours of validity, e.g. to create a happy hours scenario.",
        "properties": {
          "daily": {
            "type": "array",
            "description": "Defines the recurring period(s) when the resource is active. The periods should not overlap.",
            "items": {
              "type": "object",
              "description": "Defines the recurring period(s) when the resource will be active.",
              "properties": {
                "start_time": {
                  "type": "string",
                  "format": "time",
                  "description": "Defines the starting hour of validity in the HH:mm format. The resource is *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 resource 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
                    ]
                  }
                },
                "expiration_time": {
                  "type": "string",
                  "format": "time",
                  "description": "Defines the ending hour of validity in the HH:mm format. The resource is *inactive after* this time.",
                  "example": "14:00"
                }
              }
            }
          }
        }
      },
      "VoucherAssets": {
        "title": "Voucher Assets",
        "type": "object",
        "description": "Stores links to images of QR and barcode that correspond to an encrypted voucher code.",
        "properties": {
          "qr": {
            "type": "object",
            "description": "Stores Quick Response (QR) representation of encrypted code.",
            "properties": {
              "id": {
                "type": "string",
                "example": "U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q==",
                "description": "Encrypted voucher code ID."
              },
              "url": {
                "type": "string",
                "example": "https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D",
                "description": "URL to QR code  \n\n*Optional:* Attach query parameters to base URL to customize the image of the encrypted voucher code.  \n\n- `size`: integer value from `1` to `100`  \n- `format`: string, either `png` (default) or `svg`"
              }
            }
          },
          "barcode": {
            "type": "object",
            "description": "Stores barcode representation of encrypted code.",
            "properties": {
              "id": {
                "type": "string",
                "example": "U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ==",
                "description": "Encrypted voucher code ID."
              },
              "url": {
                "type": "string",
                "example": "https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D",
                "description": "URL to barcode  \n\n*Optional:* Attach query parameters to base URL to customize the image of the encrypted voucher code.  \n\n- `size`: integer value from `1` to `100`  \n- `format`: string, either `png` (default) or `svg`"
              }
            }
          }
        }
      },
      "BusValRuleAssignment": {
        "title": "Business Validation Rule Assignment",
        "description": "Assignments of business validation rule",
        "example": {
          "id": "asgm_LnY1g7UNFA9KyDrD",
          "rule_id": "val_3gPNA6SnH4ae",
          "related_object_id": "camp_CZOnEGiZfwIKWmSjhIoIT7Ol",
          "related_object_type": "campaign",
          "object": "validation_rules_assignment",
          "validation_status": "PARTIALLY_VALID",
          "validation_omitted_rules": [
            "1"
          ]
        },
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier for a 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 related object"
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.",
            "example": "2022-03-09T11:19:04.819Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the object was last updated in ISO 8601 format.",
            "example": "2022-03-09T11:19:04.819Z",
            "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"
        ]
      },
      "CampaignLoyaltyCard": {
        "type": "object",
        "description": "Schema model for a campaign loyalty card.",
        "title": "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"
        ]
      },
      "CodeConfig": {
        "title": "Code Config",
        "type": "object",
        "description": "Contains information about the config used for the voucher code. Defines the code's pattern (prefix, postfix, 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.  \n\nExamples:\n\n- Alphanumeric: `0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` \n- Alphabetic: `abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` \n- Alphabetic Lowercase: `abcdefghijklmnopqrstuvwxyz` \n- Alphabetic Uppercase: `ABCDEFGHIJKLMNOPQRSTUVWXYZ` \n- Numbers: `0123456789`  \n- Custom: a custom character set"
          },
          "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": "Internal value, does not change anything if provided."
          }
        }
      },
      "CustomerWithSummaryLoyaltyReferrals": {
        "title": "Customer With Summary Loyalty Referrals",
        "allOf": [
          {
            "type": "object",
            "title": "Customer Response Data",
            "properties": {
              "id": {
                "type": "string",
                "description": "The ID of an existing customer that will be linked to redemption in this request."
              },
              "source_id": {
                "type": "string",
                "description": "A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored."
              },
              "summary": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/CustomerSummary"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "loyalty": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/CustomerLoyalty"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "referrals": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/CustomerReferrals"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "system_metadata": {
                "type": "object",
                "description": "Object used to store system metadata information."
              },
              "created_at": {
                "type": "string",
                "description": "Timestamp representing the date and time when the customer was created. The value is shown in the ISO 8601 format.",
                "example": "2022-08-30T06:32:07.380Z",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "description": "Timestamp representing the date and time when the customer was updated. The value is shown in the ISO 8601 format.",
                "example": "2022-08-31T06:32:07.380Z",
                "format": "date-time"
              },
              "assets": {
                "type": "object",
                "description": "Contains information about the customer's cockpit.\n\n⚠️ Warning: Customer cockpits were removed. The customer cockpit URLs redirect to customer preference center.",
                "properties": {
                  "cockpit_url": {
                    "type": "string",
                    "description": "URL address to customer preference center. Previously, a customer's cockpit URL address."
                  },
                  "cockpit_preference_center_url": {
                    "type": "string",
                    "description": "URL address to customer preference center."
                  }
                }
              },
              "object": {
                "type": "string",
                "description": "The type of the object represented by JSON.",
                "default": "customer",
                "enum": [
                  "customer"
                ]
              }
            },
            "required": [
              "summary",
              "loyalty",
              "referrals",
              "object"
            ]
          },
          {
            "$ref": "#/components/schemas/CustomerBase"
          }
        ]
      },
      "MappingPoints": {
        "title": "MappingPoints",
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/MappingMultiply"
          },
          {
            "$ref": "#/components/schemas/MappingFixed"
          }
        ]
      },
      "EarningRuleProportionalCustomerMetadata": {
        "title": "Define amount of points proportional to customer metadata",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ],
            "description": "Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio."
          },
          "calculation_type": {
            "type": "string",
            "default": "CUSTOMER_METADATA",
            "enum": [
              "CUSTOMER_METADATA"
            ],
            "description": "CUSTOMER_METADATA: Customer Metadata (X points for every Y in metadata attribute, defined in the property key under the customer.metadata object)"
          },
          "customer": {
            "type": "object",
            "required": [
              "metadata"
            ],
            "properties": {
              "metadata": {
                "type": "object",
                "required": [
                  "every",
                  "points",
                  "property"
                ],
                "description": "Defines the ratio based on the property defined in the calculation_type parameter. For every given increment of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every order metadata property value, give points.",
                "properties": {
                  "every": {
                    "type": "integer",
                    "description": "For how many increments of the customer metadata property to grant points for."
                  },
                  "points": {
                    "type": "integer",
                    "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card."
                  },
                  "points_formula": {
                    "type": "string",
                    "description": "Formula used to dynamically calculate the rewarded points."
                  },
                  "property": {
                    "type": "string",
                    "description": "Customer metadata property."
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "customer"
        ]
      },
      "EarningRuleProportionalOrder": {
        "title": "Define amount of points proportional to the order",
        "oneOf": [
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderAmount"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderTotalAmount"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderMetadata"
          }
        ]
      },
      "EarningRuleProportionalOrderItemsQuantity": {
        "title": "Order Items Quantity",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ],
            "description": "Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio."
          },
          "calculation_type": {
            "type": "string",
            "default": "ORDER_ITEMS_QUANTITY",
            "enum": [
              "ORDER_ITEMS_QUANTITY"
            ],
            "description": "`ORDER_ITEMS_QUANTITY`: Quantity of items defined in the `order_items.quantity.applicable_to` array or `order_items.quantity.object` & `.id` (X points for every Y items excluding free items)."
          },
          "order_items": {
            "type": "object",
            "required": [
              "quantity"
            ],
            "properties": {
              "quantity": {
                "type": "object",
                "required": [
                  "every",
                  "points"
                ],
                "description": "Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.",
                "properties": {
                  "every": {
                    "type": "integer",
                    "description": "Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000."
                  },
                  "points": {
                    "type": "integer",
                    "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card."
                  },
                  "points_formula": {
                    "type": "string",
                    "description": "Formula used to dynamically calculate the rewarded points."
                  },
                  "object": {
                    "type": "string",
                    "description": "Type of object which will be covered by the earning rule. This is required together with `id`. Can be replaced by the `applicable_to` array. In response, the value of the first object is returned even if `applicable_to` array was used.",
                    "enum": [
                      "products_collection",
                      "product",
                      "sku"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "description": "Unique ID of the resource assigned by Voucherify. This is required together with `object`. Can be replaced by the `applicable_to` array. In response, the value of the first object is returned even if `applicable_to` array was used. Values are, for example, `pc_75U0dHlr7u75BJodrW1AE3t6` for product collection, `prod_0bae32322150fd0546` for a product, or `sku_0b7d7dfb090be5c619` for a SKU."
                  },
                  "applicable_to": {
                    "type": "array",
                    "description": "Defines products, SKUs, or product collections covered by the earning rule. Can be replaced by `object` and `id` to define only one object.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string",
                          "description": "Type of object which will be covered by the earning rule.",
                          "enum": [
                            "products_collection",
                            "product",
                            "sku"
                          ]
                        },
                        "id": {
                          "type": "string",
                          "description": "Unique ID of the resource assigned by Voucherify. Values are, for example, `pc_75U0dHlr7u75BJodrW1AE3t6` for product collection, `prod_0bae32322150fd0546` for a product, or `sku_0b7d7dfb090be5c619` for a SKU."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "order_items"
        ]
      },
      "EarningRuleProportionalOrderItemsAmount": {
        "title": "Order Items Amount",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ],
            "description": "Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio."
          },
          "calculation_type": {
            "type": "string",
            "default": "ORDER_ITEMS_AMOUNT",
            "enum": [
              "ORDER_ITEMS_AMOUNT"
            ],
            "description": "ORDER_ITEMS_AMOUNT; Pre-discount amount spent on items defined in the `order_items.quantity.applicable_to` array or `order_items.quantity.object` & `.id` (X points for every Y spent on items excluding discounts)"
          },
          "order_items": {
            "type": "object",
            "required": [
              "amount"
            ],
            "properties": {
              "amount": {
                "type": "object",
                "required": [
                  "every",
                  "points"
                ],
                "description": "Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.",
                "properties": {
                  "every": {
                    "type": "integer",
                    "description": "Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000."
                  },
                  "points": {
                    "type": "integer",
                    "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card."
                  },
                  "points_formula": {
                    "type": "string",
                    "description": "Formula used to dynamically calculate the rewarded points."
                  },
                  "object": {
                    "type": "string",
                    "description": "Type of object which will be covered by the earning rule. This is required together with `id`. Can be replaced by the `applicable_to` array. In response, the value of the first object is returned even if `applicable_to` array was used.",
                    "enum": [
                      "products_collection",
                      "product",
                      "sku"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "description": "Unique ID of the resource assigned by Voucherify. This is required together with `object`. Can be replaced by the `applicable_to` array. In response, the value of the first object is returned even if `applicable_to` array was used. Values are, for example, `pc_75U0dHlr7u75BJodrW1AE3t6` for product collection, `prod_0bae32322150fd0546` for a product, or `sku_0b7d7dfb090be5c619` for a SKU."
                  },
                  "applicable_to": {
                    "type": "array",
                    "description": "Defines products, SKUs, or product collections covered by the earning rule. Can be replaced by `object` and `id` to define only one object.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string",
                          "description": "Type of object which will be covered by the earning rule.",
                          "enum": [
                            "products_collection",
                            "product",
                            "sku"
                          ]
                        },
                        "id": {
                          "type": "string",
                          "description": "Unique ID of the resource assigned by Voucherify. Values are, for example, `pc_75U0dHlr7u75BJodrW1AE3t6` for product collection, `prod_0bae32322150fd0546` for a product, or `sku_0b7d7dfb090be5c619` for a SKU."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "order_items"
        ]
      },
      "EarningRuleProportionalOrderItemsSubtotalAmount": {
        "title": "Order Items Subtotal Amount",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ],
            "description": "Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio."
          },
          "calculation_type": {
            "type": "string",
            "default": "ORDER_ITEMS_SUBTOTAL_AMOUNT",
            "enum": [
              "ORDER_ITEMS_SUBTOTAL_AMOUNT"
            ],
            "description": "ORDER_ITEMS_SUBTOTAL_AMOUNT; Amount spent on items defined in the order_items.subtotal_amount.object & .id (X points for every Y spent on items including discounts)"
          },
          "order_items": {
            "type": "object",
            "required": [
              "subtotal_amount"
            ],
            "properties": {
              "subtotal_amount": {
                "type": "object",
                "required": [
                  "every",
                  "points"
                ],
                "description": "Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.",
                "properties": {
                  "every": {
                    "type": "integer",
                    "description": "Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000."
                  },
                  "points": {
                    "type": "integer",
                    "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card."
                  },
                  "points_formula": {
                    "type": "string",
                    "description": "Formula used to dynamically calculate the rewarded points."
                  },
                  "object": {
                    "type": "string",
                    "description": "Type of object which will be covered by the earning rule. This is required together with `id`. Can be replaced by the `applicable_to` array. In response, the value of the first object is returned even if `applicable_to` array was used.",
                    "enum": [
                      "products_collection",
                      "product",
                      "sku"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "description": "Unique ID of the resource assigned by Voucherify. This is required together with `object`. Can be replaced by the `applicable_to` array. In response, the value of the first object is returned even if `applicable_to` array was used. Values are, for example, `pc_75U0dHlr7u75BJodrW1AE3t6` for product collection, `prod_0bae32322150fd0546` for a product, or `sku_0b7d7dfb090be5c619` for a SKU."
                  },
                  "applicable_to": {
                    "type": "array",
                    "description": "Defines products, SKUs, or product collections covered by the earning rule. Can be replaced by `object` and `id` to define only one object.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string",
                          "description": "Type of object which will be covered by the earning rule.",
                          "enum": [
                            "products_collection",
                            "product",
                            "sku"
                          ]
                        },
                        "id": {
                          "type": "string",
                          "description": "Unique ID of the resource assigned by Voucherify. Values are, for example, `pc_75U0dHlr7u75BJodrW1AE3t6` for product collection, `prod_0bae32322150fd0546` for a product, or `sku_0b7d7dfb090be5c619` for a SKU."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "order_items"
        ]
      },
      "SimpleProduct": {
        "title": "Simple Product",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique product ID."
          },
          "source_id": {
            "type": "string",
            "description": "Product source ID."
          },
          "name": {
            "type": "string",
            "description": "Product name."
          }
        }
      },
      "SimpleSku": {
        "title": "Simple Sku",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique sku ID."
          },
          "source_id": {
            "type": "string",
            "description": "Sku source ID."
          },
          "sku": {
            "type": "string",
            "description": "Sku name."
          }
        }
      },
      "RewardTypeCampaign": {
        "title": "Digital",
        "type": "object",
        "properties": {
          "campaign": {
            "type": "object",
            "required": [
              "id",
              "type"
            ],
            "description": "Objects stores information about the campaign related to the reward.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique campaign ID, assigned by Voucherify."
              },
              "balance": {
                "type": "integer",
                "description": "The number of points to be added to a loyalty card or the amount to be added to the current balance on the gift card.\n\nFor gift cards, the value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000."
              },
              "type": {
                "type": "string",
                "enum": [
                  "DISCOUNT_COUPONS",
                  "GIFT_VOUCHERS",
                  "LOYALTY_PROGRAM"
                ],
                "description": "Campaign type."
              }
            }
          }
        },
        "required": [
          "campaign"
        ]
      },
      "RewardTypeCoin": {
        "title": "Pay with Points",
        "type": "object",
        "properties": {
          "coin": {
            "type": "object",
            "required": [
              "exchange_ratio"
            ],
            "description": "Defines the ratio by mapping the number of loyalty points in points_ratio to a predefined cash amount in exchange_ratio.",
            "properties": {
              "exchange_ratio": {
                "type": "number",
                "description": "The cash equivalent of the points defined in the points_ratio property."
              },
              "points_ratio": {
                "type": "integer",
                "description": "The number of loyalty points that will map to the predefined cash amount defined by the exchange_ratio property."
              }
            }
          }
        },
        "required": [
          "coin"
        ]
      },
      "RewardTypeMaterial": {
        "title": "Material",
        "type": "object",
        "properties": {
          "product": {
            "type": "object",
            "required": [
              "id"
            ],
            "description": "Contains information about the product given as a reward.",
            "properties": {
              "id": {
                "type": "string",
                "example": "prod_0b7d7dfb05cbe5c616",
                "description": "Unique product ID, assigned by Voucherify."
              },
              "sku_id": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "sku_0b7d7dfb090be5c619",
                "description": "Unique SKU ID, assigned by Voucherify, of the SKU given as a reward."
              }
            }
          }
        },
        "required": [
          "product"
        ]
      },
      "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",
            "description": "Formula used to dynamically calculate the discount."
          },
          "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 to be granted a full value discount."
          },
          "unit_off_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the number of units."
          },
          "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",
            "description": "Formula used to dynamically calculate the discount."
          },
          "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",
            "description": "Formula used to dynamically calculate the discount."
          },
          "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"
        ]
      },
      "EventSource": {
        "type": "object",
        "title": "Event Source",
        "description": "Contains the source of the object that initiated the event.",
        "required": [
          "channel"
        ],
        "properties": {
          "channel": {
            "type": "string",
            "description": "Determines the channel that initiated the event.",
            "enum": [
              "USER_PORTAL",
              "API",
              "CLIENT_API",
              "INTERNAL"
            ],
            "example": "API"
          },
          "user": {
            "type": "object",
            "description": "Determines the Voucherify user who triggered the event.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the user.",
                "example": "user_xyzfghSTprSTUVWXYlk6tuvXYst7FGH7"
              }
            },
            "required": [
              "id"
            ]
          },
          "api_key": {
            "type": "object",
            "description": "Determines the API key used to initiate the event.",
            "required": [
              "name",
              "app_id"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Channel name in the application keys."
              },
              "app_id": {
                "type": "string",
                "description": "Contains the application ID from the Voucherify API key pair.",
                "example": "1XXXX5XX-0XXX-XXXb-X7XX-XX2XXaXXX6XX"
              }
            }
          }
        }
      },
      "CustomerSummary": {
        "title": "Customer Summary",
        "type": "object",
        "properties": {
          "redemptions": {
            "$ref": "#/components/schemas/CustomerSummaryRedemptions"
          },
          "orders": {
            "$ref": "#/components/schemas/CustomerSummaryOrders"
          }
        },
        "required": [
          "redemptions",
          "orders"
        ]
      },
      "CustomerLoyalty": {
        "title": "Customer Loyalty",
        "type": "object",
        "properties": {
          "points": {
            "type": "integer",
            "description": "Customer's loyalty points minus expired for all loyalty cards which the customer has."
          },
          "referred_customers": {
            "type": "integer",
            "description": "Total number of customers referred by the customer."
          },
          "campaigns": {
            "type": "object",
            "description": "Contains campaigns with details about point balances and how many customers were referred by the customer.",
            "additionalProperties": {
              "type": "object",
              "description": "Contains details about the point balances left on loyalty cards and the number of referred customers in each campaign.",
              "properties": {
                "points": {
                  "type": "integer",
                  "description": "Remaining point balance in campaign."
                },
                "loyalty_tier": {
                  "type": "string",
                  "example": "ltr_UJ5Q54Q0OvEhua87Qfv2Ki5x",
                  "description": "Customer's loyalty tier within the campaign."
                },
                "referred_customers": {
                  "type": "integer",
                  "description": "Number of customers referred by the customer in campaign."
                }
              }
            }
          }
        },
        "required": [
          "points",
          "referred_customers",
          "campaigns"
        ]
      },
      "CustomerReferrals": {
        "title": "Customer Referrals",
        "type": "object",
        "description": "Summary of customer's referrals, in this case, the customer being the referee, i.e. information about the source of referrals and number of times the customer was referred by other customers.",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Total number of times this customer received a referral, i.e. was referred by another customer."
          },
          "campaigns": {
            "type": "array",
            "description": "Contains an array of campaigns that served as the source of a referral for the customer.",
            "items": {
              "title": "Customer Referrals Campaigns Item",
              "type": "object",
              "description": "Contains information about the source of the referral.",
              "properties": {
                "campaign_id": {
                  "type": "string",
                  "description": "Unique campaign ID, assigned by Voucherify.",
                  "example": "camp_rRsfatlwN7unSeUIJDCYedal"
                },
                "referrer_id": {
                  "type": "string",
                  "example": "cust_sehkNIi8Uq2qQuRqSr7xn4Zi",
                  "description": "Unique referrer ID, assigned by Voucherify. This is the customer ID of a customer that is referring this customer."
                },
                "related_object_id": {
                  "type": "string",
                  "description": "Related object id",
                  "example": "r_0b9d4cc4aa164dd073"
                },
                "related_object_type": {
                  "type": "string",
                  "description": "Related object type, i.e. `redemption`."
                },
                "date": {
                  "type": "string",
                  "format": "date-time",
                  "example": "2022-08-30T10:19:39.196Z",
                  "description": "Timestamp representing the date and time when the customer was referred in ISO 8601 format."
                }
              },
              "required": [
                "campaign_id",
                "referrer_id",
                "related_object_id",
                "related_object_type",
                "date"
              ]
            }
          }
        },
        "required": [
          "total",
          "campaigns"
        ]
      },
      "CustomerBase": {
        "title": "Customer Base",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Customer's first and last name."
          },
          "description": {
            "type": "string",
            "description": "An arbitrary string that you can attach to a customer object."
          },
          "email": {
            "type": "string",
            "description": "Customer's email address."
          },
          "phone": {
            "type": "string",
            "description": "Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel."
          },
          "birthday": {
            "type": "string",
            "description": "`Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~.",
            "format": "date"
          },
          "birthdate": {
            "type": "string",
            "description": "Customer's birthdate; format YYYY-MM-DD.",
            "format": "date"
          },
          "address": {
            "type": [
              "object",
              "null"
            ],
            "description": "Customer's address.",
            "properties": {
              "city": {
                "type": "string",
                "description": "City"
              },
              "state": {
                "type": "string",
                "description": "State"
              },
              "line_1": {
                "type": "string",
                "description": "First line of address."
              },
              "line_2": {
                "type": "string",
                "description": "Second line of address."
              },
              "country": {
                "type": "string",
                "description": "Country."
              },
              "postal_code": {
                "type": "string",
                "description": "Postal code."
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments."
          }
        }
      },
      "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."
          }
        }
      },
      "EarningRuleProportionalOrderAmount": {
        "title": "Order Amount",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ],
            "description": "Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio."
          },
          "calculation_type": {
            "type": "string",
            "default": "ORDER_AMOUNT",
            "enum": [
              "ORDER_AMOUNT"
            ],
            "description": "`ORDER_AMOUNT`: Pre-discount order amount (X points for every Y spent excluding discounts)"
          },
          "order": {
            "type": "object",
            "required": [
              "amount"
            ],
            "properties": {
              "amount": {
                "type": "object",
                "required": [
                  "every",
                  "points"
                ],
                "description": "Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.",
                "properties": {
                  "every": {
                    "type": "integer",
                    "description": "Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000."
                  },
                  "points": {
                    "type": "integer",
                    "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card."
                  },
                  "points_formula": {
                    "type": "string",
                    "description": "Formula used to dynamically calculate the rewarded points."
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "order"
        ]
      },
      "EarningRuleProportionalOrderTotalAmount": {
        "title": "Order Total Amount",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ],
            "description": "Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio."
          },
          "calculation_type": {
            "type": "string",
            "default": "ORDER_TOTAL_AMOUNT",
            "enum": [
              "ORDER_TOTAL_AMOUNT"
            ],
            "description": "`ORDER_TOTAL_AMOUNT`: Total order amount (X points for every Y spent including discount)"
          },
          "order": {
            "type": "object",
            "required": [
              "total_amount"
            ],
            "properties": {
              "total_amount": {
                "type": "object",
                "required": [
                  "every",
                  "points"
                ],
                "description": "Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.",
                "properties": {
                  "every": {
                    "type": "integer",
                    "description": "Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000."
                  },
                  "points": {
                    "type": "integer",
                    "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card."
                  },
                  "points_formula": {
                    "type": "string",
                    "description": "Formula used to dynamically calculate the rewarded points."
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "order"
        ]
      },
      "EarningRuleProportionalOrderMetadata": {
        "title": "Order Metadata",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ],
            "description": "Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio."
          },
          "calculation_type": {
            "type": "string",
            "default": "ORDER_METADATA",
            "enum": [
              "ORDER_METADATA"
            ],
            "description": "`ORDER_METADATA`: Order Metadata (X points for every Y in metadata attribute, defined in the property key under the order.metadata object)"
          },
          "order": {
            "type": "object",
            "required": [
              "metadata"
            ],
            "description": "Defines the formula for calculating points proportionally.",
            "properties": {
              "metadata": {
                "type": "object",
                "required": [
                  "every",
                  "points",
                  "property"
                ],
                "description": "Defines the ratio based on the property defined in the calculation_type parameter. For every given increment of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every order metadata property value, give points.",
                "properties": {
                  "every": {
                    "type": "integer",
                    "description": "For how many increments of the order metadata property to grant points for."
                  },
                  "points": {
                    "type": "integer",
                    "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card."
                  },
                  "points_formula": {
                    "type": "string",
                    "description": "Formula used to dynamically calculate the rewarded points."
                  },
                  "property": {
                    "type": "string",
                    "description": "Order metadata property."
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "order"
        ]
      },
      "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",
          "ADD_SAME_ITEMS"
        ],
        "type": "string"
      },
      "SimpleProductDiscountUnit": {
        "type": "object",
        "title": "Simple Product Discount Unit",
        "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",
        "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 to be granted a full value discount."
          },
          "unit_off_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the number of units."
          },
          "effect": {
            "type": "string",
            "enum": [
              "ADD_NEW_ITEMS",
              "ADD_MISSING_ITEMS"
            ],
            "description": "Defines how the unit is added to the customer's order.\n\n"
          },
          "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"
      },
      "CustomerSummaryRedemptions": {
        "title": "Customer Summary Redemptions",
        "type": "object",
        "properties": {
          "total_redeemed": {
            "type": "integer",
            "description": "Total number of redemptions made by the customer."
          },
          "total_failed": {
            "type": "integer",
            "description": "Total number of redemptions that failed."
          },
          "total_succeeded": {
            "type": "integer",
            "description": "Total number of redemptions that succeeded."
          },
          "total_rolled_back": {
            "type": "integer",
            "description": "Total number of redemptions that were rolled back for the customer."
          },
          "total_rollback_failed": {
            "type": "integer",
            "description": "Total number of redemption rollbacks that failed."
          },
          "total_rollback_succeeded": {
            "type": "integer",
            "description": "Total number of redemption rollbacks that succeeded."
          },
          "gift": {
            "type": "object",
            "description": "Summary of gift card credits.",
            "required": [
              "redeemed_amount",
              "amount_to_go"
            ],
            "properties": {
              "redeemed_amount": {
                "type": "integer",
                "description": "Total amount of gift card credits redeemed by customer. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
                "default": 0
              },
              "amount_to_go": {
                "type": "integer",
                "description": "Remaining gift card balance across all gift cards. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
                "default": 0
              }
            }
          },
          "loyalty_card": {
            "type": "object",
            "description": "Summary of loyalty points.",
            "required": [
              "redeemed_points",
              "points_to_go"
            ],
            "properties": {
              "redeemed_points": {
                "type": "integer",
                "description": "Total number of loyalty points redeemed by the customer."
              },
              "points_to_go": {
                "type": "integer",
                "description": "Sum of remaining available point balance across all loyalty cards."
              }
            }
          }
        },
        "required": [
          "total_redeemed",
          "total_failed",
          "total_succeeded",
          "total_rolled_back",
          "total_rollback_failed",
          "total_rollback_succeeded",
          "gift",
          "loyalty_card"
        ]
      },
      "CustomerSummaryOrders": {
        "title": "Customer Summary Orders",
        "description": "Lists details about orders related to the customer. Lists only data for orders with the `PAID` or `FULFILLED` status. Data from orders with a `CREATED` or `CANCELED` status are not included. The data is updated also when an order changes status.",
        "type": "object",
        "properties": {
          "total_amount": {
            "type": "integer",
            "description": "The total amount spent by the customer. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "total_count": {
            "type": "integer",
            "description": "Total number of orders made by the customer."
          },
          "average_amount": {
            "type": "integer",
            "description": "Average amount spent on orders. `total_amount` &divide; `total_count`. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "last_order_amount": {
            "type": "integer",
            "description": "Amount spent on last order. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "last_order_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-08-30T11:51:08.029Z",
            "description": "Timestamp representing the date and time of the customer's last order in ISO 8601 format."
          }
        },
        "required": [
          "total_amount",
          "total_count",
          "average_amount",
          "last_order_amount"
        ]
      }
    }
  },
  "webhooks": {
    "EVENTS.VOUCHER.CREATED": {
      "post": {
        "operationId": "events-voucher-created",
        "summary": "Created",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventVoucherCreatedData"
              },
              "examples": {
                "voucher.created": {
                  "value": {
                    "voucher": {
                      "id": "v_T3TAfGlOsyjEQkfvUvknNYfcynUEvJ3i",
                      "code": "Your-applicable-9",
                      "gift": null,
                      "type": "DISCOUNT_VOUCHER",
                      "active": true,
                      "assets": {
                        "qr": {
                          "id": "5a112cc9-900a-4d24-95b7-9680ca7f7133",
                          "url": "{{voucher_qr_code.url}}"
                        },
                        "barcode": {
                          "id": "c09881b3-b569-492f-82bb-5b977cd07b54",
                          "url": "{{voucher_barcode.url}}"
                        }
                      },
                      "object": "voucher",
                      "publish": {
                        "url": "/v1/vouchers/Your-applicable-9/publications?page=1&limit=10",
                        "count": 0,
                        "object": "list"
                      },
                      "campaign": "Your-campaign-applicable-to",
                      "category": null,
                      "discount": {
                        "type": "PERCENT",
                        "effect": "APPLY_TO_ITEMS",
                        "percent_off": 5,
                        "amount_limit": 15000,
                        "aggregated_amount_limit": 30000
                      },
                      "metadata": {},
                      "categories": [],
                      "created_at": "2024-02-09T11:11:11.111Z",
                      "redemption": {
                        "url": "/v1/vouchers/Your-applicable-9/redemptions?page=1&limit=10",
                        "object": "list",
                        "quantity": null,
                        "redeemed_quantity": 0
                      },
                      "start_date": "2024-02-17T00:00:00.000Z",
                      "updated_at": null,
                      "campaign_id": "camp_18NCNUkQIaXnqbHqhtQnt355",
                      "category_id": "cat_0e156dab8f2e43873a",
                      "loyalty_card": null,
                      "additional_info": "Additional information about the voucher",
                      "expiration_date": "2024-02-29T00:00:00.000Z",
                      "is_referral_code": false,
                      "validity_timeframe": null,
                      "validity_day_of_week": [
                        1,
                        0
                      ]
                    },
                    "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": "Your-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
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.VOUCHER.DISABLED": {
      "post": {
        "operationId": "events-voucher-disabled",
        "summary": "Disabled",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventVoucherDisabledData"
              },
              "examples": {
                "voucher.disabled": {
                  "value": {
                    "voucher": {
                      "id": "v_T3TAfGlOsyjEQkfvUvknNYfcynUEvJ3i",
                      "code": "Your-applicable-9",
                      "gift": null,
                      "type": "DISCOUNT_VOUCHER",
                      "active": false,
                      "assets": {
                        "qr": {
                          "id": "5a112cc9-900a-4d24-95b7-9680ca7f7133",
                          "url": "{{voucher_qr_code.url}}"
                        },
                        "barcode": {
                          "id": "c09881b3-b569-492f-82bb-5b977cd07b54",
                          "url": "{{voucher_barcode.url}}"
                        }
                      },
                      "object": "voucher",
                      "publish": {
                        "url": "/v1/vouchers/Your-applicable-9/publications?page=1&limit=10",
                        "count": 0,
                        "object": "list"
                      },
                      "campaign": "Test-campaign-applicable-to",
                      "category": "Star Platinum",
                      "discount": {
                        "type": "PERCENT",
                        "effect": "APPLY_TO_ITEMS",
                        "percent_off": 5,
                        "amount_limit": 15000,
                        "aggregated_amount_limit": 30000
                      },
                      "metadata": {},
                      "categories": [
                        {
                          "id": "cat_0e156dab8f2e43873a",
                          "name": "Star Platinum",
                          "object": "category",
                          "hierarchy": 10,
                          "created_at": "2024-01-03T10:03:24.092Z"
                        }
                      ],
                      "created_at": "2024-02-09T11:18:34.621Z",
                      "redemption": {
                        "url": "/v1/vouchers/Your-applicable-9/redemptions?page=1&limit=10",
                        "object": "list",
                        "quantity": null,
                        "redeemed_quantity": 0
                      },
                      "start_date": "2024-02-17T00:00:00.000Z",
                      "updated_at": "2024-02-09T11:33:46.580Z",
                      "campaign_id": "camp_18NCNUkQIaXnqbHqhtQnt355",
                      "category_id": "cat_0e156dab8f2e43873a",
                      "loyalty_card": null,
                      "additional_info": "Additional information about the voucher",
                      "expiration_date": "2024-02-29T00:00:00.000Z",
                      "is_referral_code": false,
                      "validity_timeframe": null,
                      "validity_day_of_week": [
                        1,
                        0
                      ],
                      "validation_rules_assignments": {
                        "data": [
                          {
                            "id": "asgm_2V5oGJRMK0fAPhwU",
                            "object": "validation_rules_assignment",
                            "rule_id": "val_WmgZXBqwCZrv",
                            "created_at": "2024-02-09T10:16:04.401Z",
                            "related_object_id": "camp_18NCNUkQIaXnqbHqhtQnt355",
                            "related_object_type": "campaign"
                          }
                        ],
                        "total": 1,
                        "object": "list",
                        "data_ref": "data"
                      }
                    },
                    "campaign": {
                      "id": "camp_18NCNUkQIaXnqbHqhtQnt355",
                      "name": "Test-campaign-applicable-to",
                      "object": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.VOUCHER.ENABLED": {
      "post": {
        "operationId": "events-voucher-enabled",
        "summary": "Enabled",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventVoucherEnabledData"
              },
              "examples": {
                "voucher.enabled": {
                  "value": {
                    "voucher": {
                      "id": "v_T3TAfGlOsyjEQkfvUvknNYfcynUEvJ3i",
                      "code": "Your-applicable-9",
                      "gift": null,
                      "type": "DISCOUNT_VOUCHER",
                      "active": true,
                      "assets": {
                        "qr": {
                          "id": "5a112cc9-900a-4d24-95b7-9680ca7f7133",
                          "url": "{{voucher_qr_code.url}}"
                        },
                        "barcode": {
                          "id": "c09881b3-b569-492f-82bb-5b977cd07b54",
                          "url": "{{voucher_barcode.url}}"
                        }
                      },
                      "object": "voucher",
                      "publish": {
                        "url": "/v1/vouchers/Your-applicable-9/publications?page=1&limit=10",
                        "count": 0,
                        "object": "list"
                      },
                      "campaign": "Your-campaign-applicable-to",
                      "category": "Star Platinum",
                      "discount": {
                        "type": "PERCENT",
                        "effect": "APPLY_TO_ITEMS",
                        "percent_off": 5,
                        "amount_limit": 15000,
                        "aggregated_amount_limit": 30000
                      },
                      "metadata": {},
                      "categories": [
                        {
                          "id": "cat_0e156dab8f2e43873a",
                          "name": "Star Platinum",
                          "object": "category",
                          "hierarchy": 10,
                          "created_at": "2024-01-03T10:03:24.092Z"
                        }
                      ],
                      "created_at": "2024-02-09T11:18:34.621Z",
                      "redemption": {
                        "url": "/v1/vouchers/Your-applicable-9/redemptions?page=1&limit=10",
                        "object": "list",
                        "quantity": null,
                        "redeemed_quantity": 0
                      },
                      "start_date": "2024-02-17T00:00:00.000Z",
                      "updated_at": "2024-02-09T11:34:02.496Z",
                      "campaign_id": "camp_18NCNUkQIaXnqbHqhtQnt355",
                      "category_id": "cat_0e156dab8f2e43873a",
                      "loyalty_card": null,
                      "additional_info": "Additional information about the voucher",
                      "expiration_date": "2024-02-29T00:00:00.000Z",
                      "is_referral_code": false,
                      "validity_timeframe": null,
                      "validity_day_of_week": [
                        1,
                        0
                      ],
                      "validation_rules_assignments": {
                        "data": [
                          {
                            "id": "asgm_2V5oGJRMK0fAPhwU",
                            "object": "validation_rules_assignment",
                            "rule_id": "val_WmgZXBqwCZrv",
                            "created_at": "2024-02-09T10:16:04.401Z",
                            "related_object_id": "camp_18NCNUkQIaXnqbHqhtQnt355",
                            "related_object_type": "campaign"
                          }
                        ],
                        "total": 1,
                        "object": "list",
                        "data_ref": "data"
                      }
                    },
                    "campaign": {
                      "id": "camp_18NCNUkQIaXnqbHqhtQnt355",
                      "name": "Test-campaign-applicable-to",
                      "object": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.VOUCHER.UPDATED": {
      "post": {
        "operationId": "events-voucher-updated",
        "summary": "Updated",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventVoucherUpdatedData"
              },
              "examples": {
                "voucher.updated": {
                  "value": {
                    "voucher": {
                      "id": "v_EORkAULfvUsDf45sLckrboPi7Yl4FdjH",
                      "code": "10-percent-item-3",
                      "campaign": "Percent Item Discount Campaign",
                      "campaign_id": "camp_ILAvZfVhlUDm46S4DDZD6Yrv",
                      "category": null,
                      "category_id": "cat_0e156dab8f2e43873a",
                      "categories": [],
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "PERCENT",
                        "amount_limit": 5000,
                        "aggregated_amount_limit": 10000,
                        "percent_off": 10,
                        "effect": "APPLY_TO_ITEMS"
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": null,
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": true,
                      "additional_info": null,
                      "metadata": {},
                      "assets": {
                        "qr": {
                          "id": "2d6ad829-a502-4dc1-b251-1522979b7c70",
                          "url": "{{voucher_qr_code.url}}"
                        },
                        "barcode": {
                          "id": "9d02c9a7-da65-41d9-b915-877880c92a52",
                          "url": "{{voucher_barcode.url}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2023-12-12T12:12:12.638000Z",
                      "updated_at": "2024-01-01T11:11:11.572692Z",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 4,
                        "object": "list",
                        "url": "/v1/vouchers/10-percent-item-3/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/10-percent-item-3/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    },
                    "campaign": {
                      "id": "camp_ILAvZfVhlUDm46S4DDZD6Yrv",
                      "name": "Percent Item Discount Campaign",
                      "object": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.VOUCHER.PUBLISHED": {
      "post": {
        "operationId": "events-voucher-published",
        "summary": "Published",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventVoucherPublishedData"
              },
              "examples": {
                "voucher.published": {
                  "value": {
                    "customer": {
                      "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "name": "Jack Webhook",
                      "email": null,
                      "source_id": "jck-wbhk",
                      "metadata": {
                        "region": "EMEA"
                      },
                      "object": "customer"
                    },
                    "campaign": {
                      "id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "name": "Loyalty programme",
                      "campaign_type": "LOYALTY_PROGRAM",
                      "type": "AUTO_UPDATE",
                      "is_referral_code": false,
                      "voucher": {
                        "type": "LOYALTY_CARD",
                        "loyalty_card": {
                          "points": 0
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "code_config": {
                          "length": 8,
                          "prefix": "",
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "pattern": "########",
                          "postfix": ""
                        }
                      },
                      "auto_join": true,
                      "join_once": true,
                      "active": true,
                      "category_id": null,
                      "created_at": "2024-01-18T15:18:38.577044Z",
                      "object": "campaign"
                    },
                    "publication": {
                      "id": "pub_mLP4jygSMXfVejD3T9DmpsvHYah0Nd0I",
                      "object": "publication",
                      "created_at": "2024-01-18T15:19:26.594000Z",
                      "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "tracking_id": "jck-wbhk",
                      "metadata": {},
                      "channel": "Automation",
                      "source_id": null,
                      "result": "SUCCESS",
                      "customer": {
                        "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "source_id": "jck-wbhk",
                        "name": "Jack Webhook",
                        "address": null,
                        "summary": null,
                        "loyalty": null,
                        "referrals": null,
                        "metadata": {
                          "region": "EMEA"
                        },
                        "object": "customer"
                      },
                      "vouchers_id": [
                        "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw"
                      ]
                    },
                    "voucher": {
                      "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                      "code": "L0y4L",
                      "loyalty_card": {
                        "points": 0,
                        "balance": 0
                      },
                      "type": "LOYALTY_CARD",
                      "campaign": "Loyalty programme",
                      "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "is_referral_code": false,
                      "holder_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "category_id": null,
                      "active": true,
                      "created_at": "2024-01-18T15:18:39.015000Z",
                      "updated_at": "2024-01-18T15:19:26.501570Z",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "redeemed_points": 0
                      },
                      "object": "voucher"
                    },
                    "created_at": "2024-01-18T15:19:26.595Z"
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.VOUCHER.LOYALTY_CARD.TRANSACTION.CREATED": {
      "post": {
        "operationId": "events-voucher-loyalty_card-transaction-created",
        "summary": "Loyalty_card transaction created",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventVoucherLoyaltyCardTransactionCreatedData"
              },
              "examples": {
                "voucher.loyalty_card.transaction.created": {
                  "value": {
                    "transaction": {
                      "id": "vtx_0f1ad36b8992670da4",
                      "source_id": null,
                      "voucher_id": "v_9st8n1XRtoeBz85LPi7P9BCnKJS5OIIY",
                      "campaign_id": "camp_CF2h3bNSTGgH2dDdTDy60qYg",
                      "source": "Automation",
                      "reason": null,
                      "type": "POINTS_ACCRUAL",
                      "details": {
                        "balance": {
                          "type": "loyalty_card",
                          "total": 210,
                          "object": "balance",
                          "points": 10,
                          "balance": 210,
                          "related_object": {
                            "id": "v_9st8n1XRtoeBz85LPi7P9BCnKJS5OIIY",
                            "type": "voucher"
                          }
                        },
                        "order": {
                          "id": "ord_0f1ad36a828d1c7c5f",
                          "source_id": null
                        },
                        "event": {
                          "id": "evcus_0f1ad36a884d1c7c69",
                          "type": "customer.order.paid"
                        },
                        "earning_rule": {
                          "id": "ern_XbXveWmCdcjhmaxqf0wuFp0Q",
                          "source": {
                            "banner": "Basic points"
                          }
                        }
                      },
                      "related_transaction_id": null,
                      "created_at": "2024-07-24T10:51:30.608Z"
                    },
                    "voucher": {
                      "id": "v_9st8n1XRtoeBz85LPi7P9BCnKJS5OIIY",
                      "code": "8KBUE0M6",
                      "campaign": "new loyalty test",
                      "campaign_id": "camp_CF2h3bNSTGgH2dDdTDy60qYg",
                      "category": null,
                      "category_id": null,
                      "categories": [],
                      "type": "LOYALTY_CARD",
                      "discount": null,
                      "gift": null,
                      "loyalty_card": {
                        "points": 210,
                        "balance": 210,
                        "next_expiration_date": "2025-07-24",
                        "next_expiration_points": 110
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_hours": null,
                      "validity_day_of_week": null,
                      "active": true,
                      "additional_info": null,
                      "metadata": {},
                      "assets": {
                        "qr": {
                          "id": "8c63e9eb-576f-4cc8-91df-b6797b6de8c6",
                          "url": "{{voucher_qr_code.url}}"
                        },
                        "barcode": {
                          "id": "a713187b-792f-47b6-993c-c83bd340ffd9",
                          "url": "{{voucher_barcode.url}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2024-07-24T09:48:32.358Z",
                      "updated_at": "2024-07-24T10:51:30.608Z",
                      "holder_id": "cust_PL4iqfS8K5Ej2LuBNV1RqlfJ",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "redeemed_points": 0,
                        "object": "list",
                        "url": "/v1/vouchers/8KBUE0M6/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 1,
                        "url": "/v1/vouchers/8KBUE0M6/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    },
                    "campaign": {
                      "id": "camp_CF2h3bNSTGgH2dDdTDy60qYg",
                      "name": "new loyalty test",
                      "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": 12
                          }
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "code_config": {
                          "pattern": "########",
                          "length": 8,
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "prefix": "",
                          "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": "2024-07-24T09:48:31.790Z",
                      "updated_at": "2024-07-24T10:48:29.156Z",
                      "object": "campaign"
                    },
                    "holder": {
                      "id": "cust_PL4iqfS8K5Ej2LuBNV1RqlfJ",
                      "name": "John Demo",
                      "email": null,
                      "source_id": "230724-01",
                      "metadata": {},
                      "object": "customer"
                    },
                    "holder_loyalty_tier": {
                      "id": "ltr_0f1ac501ef53236abb",
                      "name": "Basic",
                      "campaign_id": "camp_CF2h3bNSTGgH2dDdTDy60qYg",
                      "metadata": {},
                      "created_at": "2024-07-24T09:48:32.573Z",
                      "updated_at": null,
                      "earning_rules": {},
                      "rewards": {},
                      "config": {
                        "points": {
                          "from": 0,
                          "to": 499
                        }
                      },
                      "points": {
                        "from": 0,
                        "to": 499
                      },
                      "expiration": {
                        "customer_id": "cust_PL4iqfS8K5Ej2LuBNV1RqlfJ",
                        "campaign_id": "camp_CF2h3bNSTGgH2dDdTDy60qYg",
                        "tier_id": "ltr_0f1ac501ef53236abb",
                        "start_date": "2024-07-24",
                        "created_at": "2024-07-24T09:52:21.616Z"
                      },
                      "object": "loyalty_tier"
                    },
                    "balance": {
                      "points": 10,
                      "total": 210,
                      "balance": 210,
                      "type": "loyalty_card",
                      "object": "balance",
                      "related_object": {
                        "type": "voucher",
                        "id": "v_9st8n1XRtoeBz85LPi7P9BCnKJS5OIIY"
                      }
                    },
                    "order": {
                      "id": "ord_0f1ad36a828d1c7c5f",
                      "source_id": null,
                      "status": "PAID",
                      "customer_id": "cust_PL4iqfS8K5Ej2LuBNV1RqlfJ",
                      "referrer_id": null,
                      "amount": 1000,
                      "total_amount": 1000,
                      "items": [
                        {
                          "id": "ordli_0f1ad36a820d1c7c5e",
                          "object": "order_item",
                          "source_id": "123123123",
                          "related_object": "product",
                          "quantity": 1,
                          "amount": 1000,
                          "price": 1000,
                          "subtotal_amount": 1000
                        }
                      ],
                      "metadata": {
                        "location": "Katowice"
                      },
                      "created_at": "2024-07-24T10:51:29.669Z",
                      "object": "order"
                    },
                    "event": {
                      "id": "evcus_0f1ad36a884d1c7c69",
                      "type": "customer.order.paid",
                      "category": "EFFECT",
                      "entity_id": "cust_PL4iqfS8K5Ej2LuBNV1RqlfJ",
                      "created_at": "2024-07-24T10:51:29.670Z",
                      "group_id": "v-0f1ad36a77025ce17c"
                    },
                    "earning_rule": {
                      "id": "ern_XbXveWmCdcjhmaxqf0wuFp0Q",
                      "campaign_id": "camp_CF2h3bNSTGgH2dDdTDy60qYg",
                      "validation_rule_id": null,
                      "parameters": {
                        "event": "order.paid",
                        "banner": "Basic points",
                        "loyalty": {
                          "type": "PROPORTIONAL",
                          "calculation_type": "ORDER_TOTAL_AMOUNT",
                          "order": {
                            "total_amount": {
                              "every": 100,
                              "points": 1
                            }
                          }
                        }
                      },
                      "automation_id": "auto_y1JL5lMLJXYVQUCyOP1D9gOC",
                      "active": true,
                      "metadata": {
                        "sponsors": [
                          "sponsor1"
                        ]
                      }
                    },
                    "segment": null,
                    "loyalty_tier": null,
                    "redemption": null,
                    "rollback": null,
                    "reward": null,
                    "custom_event": null,
                    "source_voucher": null,
                    "destination_voucher": null
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.VOUCHER.LOYALTY_CARD.PENDING_POINTS.ACTIVATED": {
      "post": {
        "operationId": "events-voucher-loyalty_card-pending_points-activated",
        "summary": "Loyalty_card pending_points activated",
        "description": "",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventVoucherLoyaltyCardPendingPointsActivatedData"
              },
              "examples": {
                "voucher.loyalty_card.pending_points.activated": {
                  "value": {
                    "customer": {
                      "id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                      "name": "Alex Doe",
                      "email": null,
                      "source_id": "4lx-d03",
                      "metadata": {},
                      "object": "customer"
                    },
                    "campaign": {
                      "id": "camp_E14SFSXh2JueXgZ0wFarf3jU",
                      "name": "Loyalty program",
                      "campaign_type": "LOYALTY_PROGRAM",
                      "type": "AUTO_UPDATE",
                      "is_referral_code": false,
                      "voucher": {
                        "type": "LOYALTY_CARD",
                        "discount": null,
                        "gift": null,
                        "loyalty_card": {
                          "points": 0
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "code_config": {
                          "pattern": "########",
                          "length": 8,
                          "charset": "0123456789",
                          "prefix": "",
                          "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": "2025-01-07T12:44:10.211Z",
                      "object": "campaign"
                    },
                    "voucher": {
                      "id": "v_bITntTcyfRHPvrOMgwdQVSlShsWRZu4v",
                      "code": "67028386",
                      "loyalty_card": {
                        "points": 23,
                        "balance": 23,
                        "pending_points": 46
                      },
                      "type": "LOYALTY_CARD",
                      "campaign": "Loyalty Program",
                      "campaign_id": "camp_E14SFSXh2JueXgZ0wFarf3jU",
                      "is_referral_code": false,
                      "holder_id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                      "category_id": null,
                      "active": true,
                      "created_at": "2025-01-07T12:44:11.371Z",
                      "updated_at": "2025-01-08T14:08:34.127Z",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "redeemed_points": 0
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "metadata": {},
                      "object": "voucher"
                    },
                    "balance": {
                      "points": 23,
                      "total": 23,
                      "balance": 23,
                      "type": "loyalty_card",
                      "object": "balance",
                      "related_object": {
                        "type": "voucher",
                        "id": "v_bITntTcyfRHPvrOMgwdQVSlShsWRZu4v"
                      },
                      "operation_type": "MANUAL"
                    },
                    "order": {
                      "id": "ord_0ff203bb8a0ca13337",
                      "source_id": null,
                      "status": "PAID",
                      "customer_id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                      "referrer_id": null,
                      "amount": 500,
                      "total_amount": 500,
                      "items": [
                        {
                          "id": "ordli_0ff203bb898ca13335",
                          "object": "order_item",
                          "product_id": "prod_0fc35dfeabcdefeb80",
                          "quantity": 1,
                          "amount": 500,
                          "price": 500,
                          "subtotal_amount": 500
                        },
                        {
                          "id": "ordli_0ff203bb898ca13336",
                          "object": "order_item",
                          "product_id": "prod_5h1pp1ng",
                          "quantity": 1,
                          "amount": 0,
                          "price": 0,
                          "subtotal_amount": 0
                        }
                      ],
                      "metadata": {
                        "card": [
                          "Other"
                        ],
                        "region": "US",
                        "currency": "USD"
                      },
                      "created_at": "2025-01-07T14:16:01.311Z",
                      "object": "order"
                    },
                    "transaction": {
                      "id": "vtx_0ff34b9df109a39357",
                      "source_id": null,
                      "voucher_id": "v_bITntTcyfRHPvrOMgwdQVSlShsWRZu4v",
                      "campaign_id": "camp_E14SFSXh2JueXgZ0wFarf3jU",
                      "source": null,
                      "reason": null,
                      "type": "PENDING_POINTS_ACTIVATION",
                      "details": {
                        "balance": {
                          "type": "loyalty_card",
                          "total": 23,
                          "object": "balance",
                          "points": 23,
                          "balance": 23,
                          "operation_type": "MANUAL",
                          "related_object": {
                            "id": "v_bITntTcyfRHPvrOMgwdQVSlShsWRZu4v",
                            "type": "voucher"
                          }
                        },
                        "order": {
                          "id": "ord_0ff203bb8a0ca13337",
                          "source_id": null
                        },
                        "event": {
                          "id": "evcus_0ff203bb8d4ca13341",
                          "type": "customer.order.paid"
                        },
                        "earning_rule": {
                          "id": "ern_vjzc7A2IHoCUbl5lyO6kyJQM",
                          "source": {
                            "banner": "Here come your loyalty points"
                          }
                        },
                        "pending_points": {
                          "id": "lopp_0ffd9a0a87c8dd17c9",
                          "points": 23,
                          "details": {
                            "event": {
                              "id": "evcus_0ff203bb8d4ca13341",
                              "type": "customer.order.paid",
                              "category": "EFFECT",
                              "group_id": "v-0ff203bb84d36fe41a",
                              "entity_id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                              "created_at": "2025-01-07T14:16:01.312Z",
                              "event_source": {
                                "user": {
                                  "id": "user_ypzfEcSAphSONMGJRlj6trzXKsh7FGX7"
                                },
                                "channel": "USER_PORTAL"
                              }
                            },
                            "order": {
                              "id": "ord_0ff203bb8a0ca13337",
                              "source_id": null
                            },
                            "earning_rule": {
                              "id": "ern_vjzc7A2IHoCUbl5lyO6kyJQM",
                              "source": {
                                "banner": "Here come your loyalty points"
                              }
                            }
                          },
                          "order_id": "ord_0ff203bb8a0ca13337",
                          "created_at": "2025-01-07T14:16:02.296Z",
                          "voucher_id": "v_bITntTcyfRHPvrOMgwdQVSlShsWRZu4v",
                          "campaign_id": "camp_E14SFSXh2JueXgZ0wFarf3jU",
                          "customer_id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                          "activates_at": "2025-01-16"
                        }
                      },
                      "related_transaction_id": null,
                      "created_at": "2025-01-08T14:08:34.127Z"
                    },
                    "pending_points": {
                      "id": "lopp_0ffd9a0a87c8dd17c9",
                      "voucher_id": "v_bITntTcyfRHPvrOMgwdQVSlShsWRZu4v",
                      "campaign_id": "camp_E14SFSXh2JueXgZ0wFarf3jU",
                      "customer_id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                      "order_id": "ord_0ff203bb8a0ca13337",
                      "points": 23,
                      "activates_at": "2025-01-16",
                      "details": {
                        "event": {
                          "id": "evcus_0ff203bb8d4ca13341",
                          "type": "customer.order.paid",
                          "group_id": "v-0ff203bb84d36fe41a",
                          "entity_id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                          "created_at": "2025-01-07T14:16:01.312Z",
                          "category": "EFFECT",
                          "event_source": {
                            "channel": "USER_PORTAL",
                            "user": {
                              "id": "user_ypzfEcSAphSONMGJRlj6trzXKsh7FGX7"
                            }
                          }
                        },
                        "earning_rule": {
                          "id": "ern_vjzc7A2IHoCUbl5lyO6kyJQM",
                          "source": {
                            "banner": "Here come your loyalty points"
                          }
                        },
                        "order": {
                          "id": "ord_0ff203bb8a0ca13337",
                          "source_id": null
                        }
                      },
                      "created_at": "2025-01-07T14:16:02.296Z"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.VOUCHER.LOYALTY_CARD.PENDING_POINTS.ADDED": {
      "post": {
        "operationId": "events-voucher-loyalty_card-pending_points-added",
        "summary": "Loyalty_card pending_points added",
        "description": "",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventVoucherLoyaltyCardPendingPointsAddedData"
              },
              "examples": {
                "voucher.loyalty_card.pending_points.added": {
                  "value": {
                    "voucher": {
                      "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                      "code": "L0y4L",
                      "loyalty_card": {
                        "points": 2187,
                        "balance": 7,
                        "next_expiration_date": "2026-01-31",
                        "next_expiration_points": 7,
                        "pending_points": 1234
                      },
                      "type": "LOYALTY_CARD",
                      "campaign": "Loyalty program",
                      "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "is_referral_code": false,
                      "holder_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "category_id": "cat_0e156dab8f2e43873a",
                      "active": true,
                      "created_at": "2024-01-18T15:18:39.015Z",
                      "updated_at": "2025-01-27T09:00:51.058Z",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 19,
                        "redeemed_points": 2180
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "metadata": {},
                      "object": "voucher",
                      "categories": [
                        {
                          "id": "cat_0e156dab8f2e43873a",
                          "name": "Star Platinum",
                          "hierarchy": 10,
                          "created_at": "2024-01-03T10:03:24.092Z",
                          "object": "category"
                        }
                      ],
                      "category": "Star Platinum"
                    },
                    "voucher_pending_points_balance": {
                      "points": 1,
                      "total": 1234,
                      "object": "balance",
                      "related_object": {
                        "type": "voucher",
                        "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw"
                      },
                      "operation_type": "AUTOMATIC"
                    },
                    "campaign": {
                      "id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "name": "Loyalty programme",
                      "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": 2,
                            "rounding_type": "PARTICULAR_MONTH",
                            "rounding_value": 1
                          }
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "code_config": {
                          "pattern": "########",
                          "length": 8,
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "prefix": "",
                          "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": "2024-01-18T15:18:38.577Z",
                      "updated_at": "2024-08-12T19:37:49.750Z",
                      "object": "campaign"
                    },
                    "customer": {
                      "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "name": "Jack Webhook",
                      "email": null,
                      "source_id": "jck-wbhk",
                      "metadata": {
                        "region": "EMEA",
                        "sign-up": "true"
                      },
                      "object": "customer"
                    },
                    "order": {
                      "id": "ord_100b7b63c54d4d6ec0",
                      "source_id": "test_20250127-001",
                      "status": "PAID",
                      "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "referrer_id": null,
                      "amount": 2499,
                      "total_amount": 2499,
                      "items": [
                        {
                          "id": "ordli_100b7b63c48d4d6ebd",
                          "object": "order_item",
                          "product_id": "prod_0f59fdfe17e465fa05",
                          "quantity": 1,
                          "amount": 500,
                          "price": 500,
                          "subtotal_amount": 500
                        },
                        {
                          "id": "ordli_100b7b63c48d4d6ebe",
                          "object": "order_item",
                          "product_id": "prod_0f0a6020cf2c301fdd",
                          "quantity": 1,
                          "amount": 900,
                          "price": 900,
                          "subtotal_amount": 900
                        },
                        {
                          "id": "ordli_100b7b63c48d4d6ebf",
                          "object": "order_item",
                          "product_id": "prod_0ef925321f691a234d",
                          "sku_id": "sku_0ef9253223e91a2354",
                          "quantity": 1,
                          "amount": 1099,
                          "price": 1099,
                          "subtotal_amount": 1099
                        }
                      ],
                      "created_at": "2025-01-27T09:00:50.320Z",
                      "object": "order"
                    },
                    "pending_points": {
                      "id": "lopp_100cc4fac41469454d",
                      "voucher_id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                      "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "order_id": "ord_100b7b63c54d4d6ec0",
                      "points": 1,
                      "activates_at": "2025-01-28",
                      "details": {
                        "holder_loyalty_tier": {
                          "id": "ltr_0e30613ad01f044517",
                          "name": "Loyal Star Platinum"
                        },
                        "event": {
                          "id": "evcus_100b7b63c78d4d6eca",
                          "type": "customer.order.paid",
                          "group_id": "v-100b7b63aedd691db6",
                          "entity_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                          "created_at": "2025-01-27T09:00:50.321Z",
                          "category": "EFFECT",
                          "event_source": {
                            "channel": "API",
                            "api_key": {
                              "name": "Primary",
                              "app_id": "12abc345-678d-901e-f234-gh5i6j7k8901"
                            }
                          }
                        },
                        "earning_rule": {
                          "id": "ern_FQxftbKUq9E93k00Z3qkC0sX",
                          "source": {
                            "banner": "Order-paid"
                          }
                        },
                        "order": {
                          "id": "ord_100b7b63c54d4d6ec0",
                          "source_id": "test_20250127-001"
                        }
                      },
                      "created_at": "2025-01-27T09:00:51.058Z"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.VOUCHER.LOYALTY_CARD.PENDING_POINTS.CANCELED": {
      "post": {
        "operationId": "events-voucher-loyalty_card-pending_points-canceled",
        "summary": "Loyalty_card pending_points canceled",
        "description": "",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventVoucherLoyaltyCardPendingPointsCanceledData"
              },
              "examples": {
                "voucher.loyalty_card.pending_points.canceled": {
                  "value": {
                    "customer": {
                      "id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                      "name": "Alex Doe",
                      "email": null,
                      "source_id": "4lx-d03",
                      "metadata": {},
                      "object": "customer"
                    },
                    "campaign": {
                      "id": "camp_E14SFSXh2JueXgZ0wFarf3jU",
                      "name": "Loyalty program",
                      "campaign_type": "LOYALTY_PROGRAM",
                      "type": "AUTO_UPDATE",
                      "is_referral_code": false,
                      "voucher": {
                        "type": "LOYALTY_CARD",
                        "discount": null,
                        "gift": null,
                        "loyalty_card": {
                          "points": 0
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "code_config": {
                          "pattern": "########",
                          "length": 8,
                          "charset": "0123456789",
                          "prefix": "",
                          "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": "2025-01-07T12:44:10.211Z",
                      "object": "campaign"
                    },
                    "voucher": {
                      "id": "v_bITntTcyfRHPvrOMgwdQVSlShsWRZu4v",
                      "code": "67028386",
                      "loyalty_card": {
                        "points": 23,
                        "balance": 23,
                        "pending_points": 23
                      },
                      "type": "LOYALTY_CARD",
                      "campaign": "Loyalty program",
                      "campaign_id": "camp_E14SFSXh2JueXgZ0wFarf3jU",
                      "is_referral_code": false,
                      "holder_id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                      "category_id": null,
                      "active": true,
                      "created_at": "2025-01-07T12:44:11.371Z",
                      "updated_at": "2025-01-08T14:10:48.300Z",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "redeemed_points": 0
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "metadata": {},
                      "object": "voucher"
                    },
                    "voucher_pending_points_balance": {
                      "points": -23,
                      "total": 23,
                      "object": "balance",
                      "related_object": {
                        "type": "voucher",
                        "id": "v_bITntTcyfRHPvrOMgwdQVSlShsWRZu4v"
                      },
                      "operation_type": "MANUAL"
                    },
                    "order": {
                      "id": "ord_0ff3476ebb49a3901d",
                      "source_id": null,
                      "status": "PAID",
                      "customer_id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                      "referrer_id": null,
                      "amount": 500,
                      "total_amount": 500,
                      "items": [
                        {
                          "id": "ordli_0ff3476ebac9a3901b",
                          "object": "order_item",
                          "product_id": "prod_0fc35dfeabcdefeb80",
                          "quantity": 1,
                          "amount": 500,
                          "price": 500,
                          "subtotal_amount": 500
                        },
                        {
                          "id": "ordli_0ff3476ebac9a3901c",
                          "object": "order_item",
                          "product_id": "prod_5h1pp1ng",
                          "quantity": 1,
                          "amount": 0,
                          "price": 0,
                          "subtotal_amount": 0
                        }
                      ],
                      "metadata": {
                        "card": [
                          "Other"
                        ],
                        "region": "US",
                        "currency": "USD"
                      },
                      "created_at": "2025-01-08T13:50:17.318Z",
                      "object": "order"
                    },
                    "redemption": null,
                    "pending_points": {
                      "id": "lopp_0ff49105b988dd5c8f",
                      "voucher_id": "v_bITntTcyfRHPvrOMgwdQVSlShsWRZu4v",
                      "campaign_id": "camp_E14SFSXh2JueXgZ0wFarf3jU",
                      "customer_id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                      "order_id": "ord_0ff3476ebb49a3901d",
                      "points": 23,
                      "activates_at": "2025-01-09",
                      "details": {
                        "event": {
                          "id": "evcus_0ff3476ebf89a39027",
                          "type": "customer.order.paid",
                          "group_id": "v-0ff3476eb50dfac446",
                          "entity_id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                          "created_at": "2025-01-08T13:50:17.319Z",
                          "category": "EFFECT",
                          "event_source": {
                            "channel": "USER_PORTAL",
                            "user": {
                              "id": "user_ypzfEcSAphSONMGJRlj6trzXKsh7FGX7"
                            }
                          }
                        },
                        "earning_rule": {
                          "id": "ern_vjzc7A2IHoCUbl5lyO6kyJQM",
                          "source": {
                            "banner": "Here come your loyalty points"
                          }
                        },
                        "order": {
                          "id": "ord_0ff3476ebb49a3901d",
                          "source_id": null
                        }
                      },
                      "created_at": "2025-01-08T13:50:17.680Z"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.VOUCHER.LOYALTY_CARD.PENDING_POINTS.UPDATED": {
      "post": {
        "operationId": "events-voucher-loyalty_card-pending_points-updated",
        "summary": "Loyalty_card pending_points updated",
        "description": "",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventVoucherLoyaltyCardPendingPointsUpdatedData"
              },
              "examples": {
                "voucher.loyalty_card.pending_points.canceled": {
                  "value": {
                    "voucher": {
                      "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                      "code": "L0y4L",
                      "loyalty_card": {
                        "points": 28786,
                        "balance": 5156,
                        "next_expiration_date": "2026-01-31",
                        "next_expiration_points": 23786,
                        "pending_points": 41,
                        "subtracted_points": 4000
                      },
                      "type": "LOYALTY_CARD",
                      "campaign": "Loyalty programme",
                      "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "is_referral_code": false,
                      "holder_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "category_id": "cat_0e156dab8f2e43873a",
                      "active": true,
                      "created_at": "2024-01-18T15:18:39.015Z",
                      "updated_at": "2025-03-06T11:39:53.395Z",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 262,
                        "redeemed_points": 19630
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "metadata": {},
                      "object": "voucher",
                      "categories": [
                        {
                          "id": "cat_0e156dab8f2e43873a",
                          "name": "Star Platinum",
                          "hierarchy": 10,
                          "created_at": "2024-01-03T10:03:24.092Z",
                          "object": "category"
                        }
                      ],
                      "category": "Star Platinum"
                    },
                    "voucher_pending_points_balance": {
                      "points": 10,
                      "total": 41,
                      "object": "balance",
                      "related_object": {
                        "type": "voucher",
                        "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw"
                      },
                      "operation_type": "MANUAL"
                    },
                    "campaign": {
                      "id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "name": "Loyalty programme",
                      "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": 2,
                            "rounding_type": "PARTICULAR_MONTH",
                            "rounding_value": 1
                          }
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "code_config": {
                          "pattern": "########",
                          "length": 8,
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "prefix": "",
                          "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": "2024-01-18T15:18:38.577Z",
                      "updated_at": "2024-08-12T19:37:49.750Z",
                      "object": "campaign"
                    },
                    "customer": {
                      "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "name": "Jack Webhook",
                      "email": null,
                      "source_id": "jck-wbhk",
                      "metadata": {
                        "region": "EMEA",
                        "sign-up": "true"
                      },
                      "object": "customer"
                    },
                    "order": {
                      "id": "ord_103c8af3c09ea311b4",
                      "source_id": null,
                      "status": "PAID",
                      "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "referrer_id": null,
                      "amount": 36500,
                      "discount_amount": 50,
                      "total_discount_amount": 50,
                      "total_amount": 36450,
                      "items": [
                        {
                          "id": "ordli_103c8af3c09ea311b5",
                          "object": "order_item",
                          "source_id": "adv-scks",
                          "related_object": "product",
                          "quantity": 1,
                          "amount": 1500,
                          "price": 1500,
                          "subtotal_amount": 1500
                        },
                        {
                          "id": "ordli_103c8af3c09ea311b6",
                          "object": "order_item",
                          "source_id": "adv-tshirt",
                          "related_object": "product",
                          "quantity": 2,
                          "amount": 5000,
                          "price": 2500,
                          "subtotal_amount": 5000
                        },
                        {
                          "id": "ordli_103c8af3c09ea311b7",
                          "object": "order_item",
                          "source_id": "adv-poster",
                          "related_object": "product",
                          "quantity": 10,
                          "amount": 25000,
                          "price": 2500,
                          "subtotal_amount": 25000
                        },
                        {
                          "id": "ordli_103c8af3c09ea311b8",
                          "object": "order_item",
                          "source_id": "adv-poster",
                          "related_object": "product",
                          "quantity": 1,
                          "amount": 2500,
                          "price": 2500,
                          "subtotal_amount": 2500
                        },
                        {
                          "id": "ordli_103c8af3c09ea311b9",
                          "object": "order_item",
                          "source_id": "adv-poster",
                          "related_object": "product",
                          "quantity": 1,
                          "amount": 2500,
                          "price": 2500,
                          "subtotal_amount": 2500
                        }
                      ],
                      "metadata": {},
                      "created_at": "2025-03-06T11:34:24.301Z",
                      "updated_at": "2025-03-06T11:34:24.366Z",
                      "object": "order"
                    },
                    "pending_points": {
                      "id": "lopp_103dd48adba7591619",
                      "voucher_id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                      "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "order_id": "ord_103c8af3c09ea311b4",
                      "points": 35,
                      "activates_at": "2025-03-07",
                      "details": {
                        "holder_loyalty_tier": {
                          "id": "ltr_0e30613ad01f044517",
                          "name": "Loyal Star Platinum"
                        },
                        "event": {
                          "id": "evcus_103c8af3cedea311c3",
                          "type": "customer.order.paid",
                          "group_id": "v-103c8af396ae968360",
                          "entity_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                          "created_at": "2025-03-06T11:34:24.302Z",
                          "category": "EFFECT",
                          "event_source": {
                            "channel": "API",
                            "api_key": {
                              "name": "Primary",
                              "app_id": "12abc345-678d-901e-f234-gh5i6j7k8901"
                            }
                          }
                        },
                        "earning_rule": {
                          "id": "ern_F8RCTaDdMTUo0pOBQBBHr5el",
                          "source": {
                            "banner": "Earn points and wait"
                          }
                        },
                        "order": {
                          "id": "ord_103c8af3c09ea311b4",
                          "source_id": null
                        }
                      },
                      "created_at": "2025-03-06T11:34:24.483Z",
                      "updated_at": "2025-03-06T11:39:53.395Z"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.VOUCHER.LOYALTY_CARD.POINTS_ADDED": {
      "post": {
        "operationId": "events-voucher-loyalty_card-points_added",
        "summary": "Loyalty_card points_added",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventVoucherLoyaltyCardPointsAddedData"
              },
              "examples": {
                "voucher.loyalty_card.points_added": {
                  "value": {
                    "voucher": {
                      "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                      "code": "L0y4L",
                      "loyalty_card": {
                        "points": 1370,
                        "balance": 1020
                      },
                      "type": "LOYALTY_CARD",
                      "campaign": "Loyalty programme",
                      "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "is_referral_code": false,
                      "holder_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "category_id": null,
                      "active": true,
                      "created_at": "2024-01-18T15:18:39.015000Z",
                      "updated_at": "2024-01-24T08:28:37.621033Z",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 5,
                        "redeemed_points": 350
                      },
                      "object": "voucher"
                    },
                    "balance": {
                      "type": "loyalty_card",
                      "total": 1370,
                      "object": "balance",
                      "points": 50,
                      "balance": 1020,
                      "operation_type": "MANUAL",
                      "related_object": {
                        "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                        "type": "voucher"
                      }
                    },
                    "campaign": {
                      "id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "name": "Loyalty programme",
                      "campaign_type": "LOYALTY_PROGRAM",
                      "type": "AUTO_UPDATE",
                      "is_referral_code": false,
                      "voucher": {
                        "type": "LOYALTY_CARD",
                        "loyalty_card": {
                          "points": 0
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "code_config": {
                          "length": 8,
                          "prefix": "",
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "pattern": "########",
                          "postfix": ""
                        }
                      },
                      "auto_join": true,
                      "join_once": true,
                      "active": true,
                      "category_id": null,
                      "created_at": "2024-01-18T15:18:38.577044Z",
                      "object": "campaign"
                    },
                    "customer": {
                      "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "name": "Jack Webhook",
                      "email": null,
                      "source_id": "jck-wbhk",
                      "metadata": {
                        "region": "EMEA"
                      },
                      "object": "customer"
                    },
                    "transaction": {
                      "id": "vtx_0e30615d5ed9b7011b",
                      "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "type": "POINTS_ADDITION",
                      "details": null,
                      "created_at": "2024-01-24T08:28:37.621033Z"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.VOUCHER.LOYALTY_CARD.POINTS_EXPIRED": {
      "post": {
        "operationId": "events-voucher-loyalty_card-points_expired",
        "summary": "Loyalty_card points_expired",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventVoucherLoyaltyCardPointsExpiredData"
              },
              "examples": {
                "voucher.loyalty_card.points_expired": {
                  "value": {
                    "voucher": {
                      "id": "v_66qyRgwumJomTSV2NvkCBa05lP0UOn82",
                      "code": "vyOsbgzj",
                      "loyalty_card": {
                        "points": 1000,
                        "balance": 970,
                        "next_expiration_points": 970
                      },
                      "type": "LOYALTY_CARD",
                      "campaign": "Loyalty program",
                      "campaign_id": "camp_s2Ui43Pk2JMuON3hA7CfwGpa",
                      "is_referral_code": false,
                      "holder_id": "cust_FGtYypgEx2tBL5jB6PuYfSES",
                      "category_id": null,
                      "active": true,
                      "created_at": "2024-07-09T07:23:14.897Z",
                      "updated_at": "2024-07-09T08:36:55.237Z",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 3,
                        "redeemed_points": 30
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "metadata": {},
                      "object": "voucher"
                    },
                    "points": 10,
                    "campaign": {
                      "id": "camp_s2Ui43Pk2JMuON3hA7CfwGpa",
                      "name": "Loyalty program",
                      "campaign_type": "LOYALTY_PROGRAM",
                      "type": "AUTO_UPDATE",
                      "voucher": {
                        "type": "LOYALTY_CARD",
                        "loyalty_card": {
                          "points": 0
                        },
                        "redemption": {
                          "quantity": null
                        },
                        "code_config": {
                          "length": 8,
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "pattern": "########"
                        }
                      },
                      "auto_join": false,
                      "join_once": true,
                      "active": true,
                      "category_id": null,
                      "categories": [],
                      "metadata": {},
                      "created_at": "2024-07-09T07:22:16.139Z",
                      "updated_at": "2024-07-09T07:39:39.707Z",
                      "object": "campaign"
                    },
                    "customer": {
                      "id": "cust_PL4iqfS8K5Ej2LuBNV1RqlfJ",
                      "name": "Jack Webhook",
                      "email": "jack.webhook@somedomain.io",
                      "source_id": "jck-wbhk",
                      "metadata": {
                        "isTrade": true
                      },
                      "object": "customer"
                    },
                    "buckets": [
                      {
                        "id": "lopb_m3gpvB4WLF1a443feIDm2q9i",
                        "voucher_id": "v_66qyRgwumJomTSV2NvkCBa05lP0UOn82",
                        "campaign_id": "camp_s2Ui43Pk2JMuON3hA7CfwGpa",
                        "bucket": {
                          "total_points": 10
                        },
                        "status": "ACTIVE",
                        "expires_at": "2024-07-08",
                        "created_at": "2024-07-09T08:30:25.671Z",
                        "object": "loyalty_points_bucket"
                      }
                    ],
                    "transaction": {
                      "id": "vtx_0f0764c45fd232ef8e",
                      "source_id": null,
                      "voucher_id": "v_66qyRgwumJomTSV2NvkCBa05lP0UOn82",
                      "campaign_id": "camp_s2Ui43Pk2JMuON3hA7CfwGpa",
                      "source": "Automation",
                      "reason": null,
                      "type": "POINTS_EXPIRATION",
                      "details": {
                        "balance": {
                          "type": "loyalty_card",
                          "total": 1000,
                          "object": "balance",
                          "points": -10,
                          "balance": 970,
                          "related_object": {
                            "id": "v_66qyRgwumJomTSV2NvkCBa05lP0UOn82",
                            "type": "voucher"
                          }
                        }
                      },
                      "related_transaction_id": null,
                      "created_at": "2024-07-09T08:36:55.237Z"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.VOUCHER.GIFT.TRANSACTION.CREATED": {
      "post": {
        "operationId": "events-voucher-gift-transaction-created",
        "summary": "Gift transaction created",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventVoucherGiftTransactionCreatedData"
              },
              "examples": {
                "voucher.gift.transaction.created": {
                  "value": {
                    "transaction": {
                      "id": "vtx_0f1c4589b8cd1c07b2",
                      "source_id": null,
                      "voucher_id": "v_Wi8kP8EW4f1L2yT2N7tfFXxMzZOp7EsS",
                      "campaign_id": "camp_gYFHS8RZw9seypbbBPXmRboq",
                      "source": "voucherify-web-ui",
                      "reason": null,
                      "type": "CREDITS_ADDITION",
                      "details": {
                        "balance": {
                          "type": "gift_voucher",
                          "total": 2000,
                          "amount": 1000,
                          "object": "balance",
                          "balance": 2000,
                          "operation_type": "MANUAL",
                          "related_object": {
                            "id": "v_Wi8kP8EW4f1L2yT2N7tfFXxMzZOp7EsS",
                            "type": "voucher"
                          }
                        }
                      },
                      "related_transaction_id": null,
                      "created_at": "2024-07-25T13:48:34.908Z"
                    },
                    "voucher": {
                      "id": "v_Wi8kP8EW4f1L2yT2N7tfFXxMzZOp7EsS",
                      "code": "3HgJNUlD",
                      "campaign": "test gift 1807",
                      "campaign_id": "camp_gYFHS8RZw9seypbbBPXmRboq",
                      "category": null,
                      "category_id": null,
                      "categories": [],
                      "type": "GIFT_VOUCHER",
                      "discount": null,
                      "gift": {
                        "amount": 2000,
                        "balance": 2000,
                        "effect": "APPLY_TO_ORDER"
                      },
                      "loyalty_card": null,
                      "start_date": null,
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_hours": null,
                      "validity_day_of_week": null,
                      "active": true,
                      "additional_info": null,
                      "metadata": {},
                      "assets": {
                        "qr": {
                          "id": "8d3ddf23-a85b-477d-aa11-d1c2c917f632",
                          "url": "{{voucher_qr_code.url}}"
                        },
                        "barcode": {
                          "id": "c47dc508-6ca8-4697-bf1d-e9d2082b6c53",
                          "url": "{{voucher_barcode.url}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2024-07-23T10:01:01.848Z",
                      "updated_at": "2024-07-25T13:48:34.908Z",
                      "holder_id": "cust_PL4iqfS8K5Ej2LuBNV1RqlfJ",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "redeemed_amount": 0,
                        "object": "list",
                        "url": "/v1/vouchers/3HgJNUlD/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 1,
                        "url": "/v1/vouchers/3HgJNUlD/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    },
                    "campaign": {
                      "id": "camp_gYFHS8RZw9seypbbBPXmRboq",
                      "name": "test gift 1807",
                      "campaign_type": "GIFT_VOUCHERS",
                      "type": "AUTO_UPDATE",
                      "is_referral_code": false,
                      "voucher": {
                        "type": "GIFT_VOUCHER",
                        "discount": null,
                        "gift": {
                          "amount": 0,
                          "effect": "APPLY_TO_ORDER"
                        },
                        "loyalty_card": null,
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "code_config": {
                          "pattern": "########",
                          "length": 8,
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "prefix": "",
                          "postfix": ""
                        }
                      },
                      "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-07-18T13:22:42.429Z",
                      "object": "campaign"
                    },
                    "holder": {
                      "id": "cust_PL4iqfS8K5Ej2LuBNV1RqlfJ",
                      "name": "John Demo 23-01",
                      "email": null,
                      "source_id": "230724-01",
                      "metadata": {},
                      "object": "customer"
                    },
                    "balance": {
                      "amount": 1000,
                      "total": 2000,
                      "balance": 2000,
                      "type": "gift_voucher",
                      "object": "balance",
                      "related_object": {
                        "type": "voucher",
                        "id": "v_Wi8kP8EW4f1L2yT2N7tfFXxMzZOp7EsS"
                      },
                      "operation_type": "MANUAL"
                    },
                    "order": null,
                    "redemption": null,
                    "rollback": null
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.VOUCHER.GIFT.BALANCE_ADDED": {
      "post": {
        "operationId": "events-voucher-gift-balance_added",
        "summary": "Gift balance_added",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventVoucherGiftBalanceAddedData"
              },
              "examples": {
                "voucher.loyalty_card.points_added": {
                  "value": {
                    "balance": {
                      "type": "gift_voucher",
                      "total": 16200,
                      "amount": 1200,
                      "object": "balance",
                      "balance": 11500,
                      "operation_type": "MANUAL",
                      "related_object": {
                        "id": "v_oNia4nTFDqYZOWYJiMpX8ocB6p6ZaEBm",
                        "type": "voucher"
                      }
                    },
                    "voucher": {
                      "id": "v_oNia4nTFDqYZOWYJiMpX8ocB6p6ZaEBm",
                      "code": "Gift-for-you-0",
                      "gift": {
                        "amount": 16200,
                        "effect": "APPLY_TO_ORDER",
                        "balance": 11500
                      },
                      "type": "GIFT_VOUCHER",
                      "active": true,
                      "object": "voucher",
                      "campaign": "Gift programme",
                      "metadata": {},
                      "holder_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "created_at": "2024-01-24T12:07:36.501Z",
                      "redemption": {
                        "quantity": null,
                        "redeemed_amount": 4700,
                        "redeemed_quantity": 2
                      },
                      "updated_at": "2024-02-09T13:27:46.844Z",
                      "campaign_id": "camp_bfrwAVsP6Q1EM1ZjgHwheKYr",
                      "category_id": "cat_0e1d0ba99c2fff2b51",
                      "is_referral_code": false
                    },
                    "campaign": {
                      "id": "camp_bfrwAVsP6Q1EM1ZjgHwheKYr",
                      "name": "Gift programme",
                      "type": "AUTO_UPDATE",
                      "active": true,
                      "object": "campaign",
                      "voucher": {
                        "gift": {
                          "amount": 5000,
                          "effect": "APPLY_TO_ORDER"
                        },
                        "type": "GIFT_VOUCHER",
                        "discount": null,
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "code_config": {
                          "length": 1,
                          "prefix": "Gift-for-you-",
                          "charset": "0123456789",
                          "pattern": "#",
                          "postfix": ""
                        },
                        "loyalty_card": null
                      },
                      "metadata": {},
                      "auto_join": false,
                      "join_once": false,
                      "created_at": "2024-01-24T12:07:35.835Z",
                      "updated_at": "2024-02-07T11:17:53.712Z",
                      "category_id": "cat_0e1d0ba99c2fff2b51",
                      "campaign_type": "GIFT_VOUCHERS",
                      "is_referral_code": false
                    },
                    "transaction": {
                      "id": "vtx_0e453f45e82ef51f2a",
                      "type": "CREDITS_ADDITION",
                      "details": null,
                      "created_at": "2024-02-09T13:27:46.844Z",
                      "campaign_id": "camp_bfrwAVsP6Q1EM1ZjgHwheKYr"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.VOUCHER.DELETED": {
      "post": {
        "operationId": "events-voucher-deleted",
        "summary": "Deleted",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventVoucherDeletedData"
              },
              "examples": {
                "voucher.deleted": {
                  "value": {
                    "voucher": {
                      "id": "v_48SKO3XotBsaHBVGXIdgcGSb684cbyrO",
                      "code": "SPRING-2024-Ke5",
                      "gift": null,
                      "type": "DISCOUNT_VOUCHER",
                      "active": true,
                      "assets": {
                        "qr": {
                          "id": "4eb4397e-74b7-4272-85ce-8009699bb216",
                          "url": "{{voucher_qr_code.url}}"
                        },
                        "barcode": {
                          "id": "abb5691b-92f7-413a-ad22-ca492ac9df8a",
                          "url": "{{voucher_barcode.url}}"
                        }
                      },
                      "object": "voucher",
                      "publish": {
                        "url": "/v1/vouchers/SPRING-2024-Ke5/publications?page=1&limit=10",
                        "count": 1,
                        "object": "list"
                      },
                      "campaign": "Spring Discounts",
                      "category": "Star Platinum",
                      "discount": {
                        "type": "PERCENT",
                        "effect": "APPLY_TO_ORDER",
                        "percent_off": 10,
                        "amount_limit": 3000,
                        "percent_off_formula": "IF(ORDER_AMOUNT > 150;15;10)"
                      },
                      "metadata": {
                        "brand": "Adventure"
                      },
                      "holder_id": "cust_ufwK2qUNGDYxa1aji7XKzuHm",
                      "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.456Z",
                      "redemption": {
                        "url": "/v1/vouchers/SPRING-2024-Ke5/redemptions?page=1&limit=10",
                        "object": "list",
                        "quantity": 1,
                        "redeemed_quantity": 0
                      },
                      "start_date": null,
                      "updated_at": "2024-03-29T07:38:38.643Z",
                      "campaign_id": "camp_iRMdcq07g9W4dOSRXuTovupi",
                      "category_id": "cat_0e156dab8f2e43873a",
                      "loyalty_card": null,
                      "validity_hours": null,
                      "additional_info": null,
                      "expiration_date": null,
                      "is_referral_code": false,
                      "validity_timeframe": null,
                      "validity_day_of_week": null
                    },
                    "campaign": {
                      "id": "camp_iRMdcq07g9W4dOSRXuTovupi",
                      "name": "Spring Discounts",
                      "type": "AUTO_UPDATE",
                      "active": true,
                      "object": "campaign",
                      "voucher": {
                        "gift": null,
                        "type": "DISCOUNT_VOUCHER",
                        "discount": {
                          "type": "PERCENT",
                          "units": null,
                          "effect": "APPLY_TO_ORDER",
                          "percent_off": 10,
                          "amount_limit": 3000,
                          "percent_off_formula": "IF(ORDER_AMOUNT > 150;15;10)"
                        },
                        "redemption": {
                          "quantity": 1,
                          "redeemed_quantity": 0
                        },
                        "code_config": {
                          "length": 3,
                          "prefix": "SPRING-2024-",
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "pattern": "###",
                          "postfix": ""
                        },
                        "loyalty_card": null
                      },
                      "category": null,
                      "metadata": {},
                      "auto_join": false,
                      "join_once": false,
                      "created_at": "2024-02-21T10:01:24.102Z",
                      "start_date": null,
                      "updated_at": "2024-03-13T17:35:51.314Z",
                      "category_id": "cat_0e156dab8f2e43873a",
                      "description": "Spring 2024 big campaign",
                      "campaign_type": "DISCOUNT_COUPONS",
                      "expiration_date": null,
                      "is_referral_code": false
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}