{
  "openapi": "3.1.0",
  "info": {
    "title": "Events - Events customer",
    "version": "2024-01-01",
    "description": ""
  },
  "paths": {},
  "components": {
    "schemas": {
      "EventCustomerCreatedData": {
        "type": "object",
        "title": "Event Customer Created",
        "description": "Event data object schema for `customer.created`.",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
          }
        }
      },
      "EventCustomerUpdatedData": {
        "type": "object",
        "title": "Event Customer Updated Data",
        "description": "Event data object schema for `customer.updated`.",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
          }
        }
      },
      "EventCustomerDeletedData": {
        "title": "Event Customer Deleted",
        "description": "Event data object schema for `customer.deleted`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
          }
        }
      },
      "EventCustomerRedemptionSucceededData": {
        "type": "object",
        "title": "Event Customer Redemption Succeeded",
        "description": "Event data object schema for `customer.redemption.succeeded`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRedemption"
          }
        ]
      },
      "EventCustomerRedemptionRollbackSucceededData": {
        "type": "object",
        "title": "Event Customer Redemption Rollback Succeeded",
        "description": "Event data object schema for `customer.redemption.rollback.succeeded`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRedemption"
          },
          {
            "type": "object",
            "properties": {
              "redemption_rollback": {
                "$ref": "#/components/schemas/SimpleRedemption"
              }
            }
          }
        ]
      },
      "EventCustomerRewardedData": {
        "title": "Event Customer Rewarded",
        "description": "Event data object schema for `customer.rewarded`.",
        "type": "object",
        "properties": {
          "customer": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "holder": {
            "nullable": true,
            "allOf": [
              {
                "description": "Details about the redeemable holder.",
                "$ref": "#/components/schemas/SimpleCustomer"
              }
            ]
          },
          "voucher": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "campaign": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "redemption": {
            "nullable": true,
            "$ref": "#/components/schemas/RedemptionInternal"
          },
          "reward": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleRedemptionRewardResult"
          },
          "referral_tier": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleReferralTier"
          },
          "balance": {
            "nullable": true,
            "type": "object",
            "description": "Balance changed by the event.",
            "properties": {
              "amount": {
                "type": "integer",
                "description": "Gift card amount changed by the event."
              },
              "points": {
                "type": "integer",
                "description": "Number of loyalty card points changed by the event."
              }
            }
          },
          "custom_event": {
            "nullable": true,
            "$ref": "#/components/schemas/CustomEvent"
          },
          "customer_event": {
            "nullable": true,
            "type": "object",
            "properties": {
              "segment": {
                "$ref": "#/components/schemas/SimpleSegment"
              },
              "event_type": {
                "type": "string",
                "description": "Type of activity that triggered the event."
              }
            }
          }
        }
      },
      "EventCustomerRewardedLoyaltyPointsData": {
        "title": "Event Customer Rewarded Loyalty Points",
        "description": "Event data object schema for `customer.rewarded.loyalty_points`.",
        "type": "object",
        "properties": {
          "customer": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "holder": {
            "nullable": true,
            "allOf": [
              {
                "description": "Details about the redeemable holder.",
                "$ref": "#/components/schemas/SimpleCustomer"
              }
            ]
          },
          "voucher": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "campaign": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "loyalty_tier": {
            "nullable": true,
            "$ref": "#/components/schemas/LoyaltyTier"
          },
          "earning_rule": {
            "nullable": true,
            "$ref": "#/components/schemas/EarningRule"
          },
          "balance": {
            "nullable": true,
            "$ref": "#/components/schemas/VoucherBalance"
          },
          "order": {
            "nullable": true,
            "$ref": "#/components/schemas/OrderCalculated"
          },
          "event": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleEvent"
          },
          "publication": {
            "nullable": true,
            "$ref": "#/components/schemas/PublicationsVoucher"
          }
        }
      },
      "EventCustomerRewardRedemptionsBase": {
        "title": "Event Customer Reward Redemptions",
        "description": "Event data object schema for `customer.reward_redemptions`.",
        "type": "object",
        "properties": {
          "customer": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "holder": {
            "nullable": true,
            "allOf": [
              {
                "description": "Details about the redeemable holder.",
                "$ref": "#/components/schemas/SimpleCustomer"
              }
            ]
          },
          "voucher": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "campaign": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "reward_redemption": {
            "nullable": true,
            "$ref": "#/components/schemas/RewardRedemption"
          },
          "reward": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleRedemptionRewardResult"
          },
          "reward_assignment": {
            "nullable": true,
            "$ref": "#/components/schemas/RewardAssignment"
          },
          "source": {
            "nullable": true,
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the reward redemption."
              },
              "type": {
                "type": "string",
                "description": "Type of the source triggering the event."
              }
            }
          },
          "balance": {
            "nullable": true,
            "type": "object",
            "description": "Balance changed by the event.",
            "properties": {
              "amount": {
                "type": "integer"
              }
            }
          }
        }
      },
      "EventCustomerRewardRedemptionsCompletedData": {
        "type": "object",
        "title": "Event Customer Rewarded",
        "description": "Event data object schema for `EVENTS.CUSTOMER.REWARD_REDEMPTIONS.COMPLETED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRewardRedemptionsBase"
          },
          {
            "type": "object",
            "properties": {
              "publication": {
                "nullable": true,
                "$ref": "#/components/schemas/PublicationsVoucher"
              }
            }
          }
        ]
      },
      "EventCustomerVoucherLoyaltyCardPendingPointsActivatedData": {
        "title": "Event Customer Voucher Loyalty Card Pending Points Activated",
        "description": "Event data object schema for `customer.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/VoucherTransaction"
          },
          "pending_points": {
            "$ref": "#/components/schemas/LoyaltyPendingPoints"
          }
        },
        "required": [
          "customer",
          "campaign",
          "voucher",
          "balance",
          "order",
          "transaction",
          "pending_points"
        ]
      },
      "EventCustomerVoucherLoyaltyCardPendingPointsAddedData": {
        "title": "Event Customer Voucher Loyalty Card Pending Points Added",
        "description": "Event data object schema for `customer.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"
        ]
      },
      "EventCustomerVoucherLoyaltyCardPendingPointsCanceledData": {
        "title": "Event Customer Voucher Loyalty Card Pending Points Canceled",
        "description": "Event data object schema for `customer.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"
        ]
      },
      "EventCustomerVoucherLoyaltyCardPendingPointsUpdatedData": {
        "title": "Event Customer Voucher Loyalty Card Pending Points Updated",
        "description": "Event data object schema for `customer.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"
        ]
      },
      "EventCustomerVoucherLoyaltyCardPointsAddedData": {
        "title": "Event Customer Voucher Loyalty Card Points Added",
        "type": "object",
        "description": "Event data object schema for `customer.voucher.loyalty_card.points_added`.",
        "properties": {
          "customer": {
            "type": "object",
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "type": "object",
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "type": "object",
            "nullable": true,
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "balance": {
            "type": "object",
            "$ref": "#/components/schemas/LoyaltiesMembersBalanceUpdateResponseBody"
          },
          "transaction": {
            "type": "object",
            "nullable": true,
            "$ref": "#/components/schemas/VoucherTransaction"
          }
        },
        "required": [
          "customer",
          "campaign",
          "voucher",
          "balance",
          "transaction"
        ]
      },
      "EventCustomerVoucherLoyaltyCardPointsExpiredData": {
        "title": "Event Customer Voucher Loyalty Card Points Expired",
        "type": "object",
        "description": "Event data object schema for `customer.voucher.loyalty_card.points_expired`.",
        "properties": {
          "customer": {
            "type": "object",
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "type": "object",
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "type": "object",
            "nullable": true,
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "points": {
            "type": "integer",
            "description": "Indicates the number of points that expired."
          },
          "buckets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LoyaltyPointsBucket"
            }
          },
          "transaction": {
            "type": "object",
            "nullable": true,
            "$ref": "#/components/schemas/VoucherTransaction"
          }
        },
        "required": [
          "customer",
          "campaign",
          "voucher",
          "points",
          "buckets",
          "transaction"
        ]
      },
      "EventCustomerVoucherGiftBalanceAddedData": {
        "title": "Event Customer Gift Voucher Balance Added",
        "description": "Event data object schema for `customer.voucher.gift.balance_added`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "balance": {
            "$ref": "#/components/schemas/VouchersBalanceUpdateResponseBody"
          },
          "transaction": {
            "$ref": "#/components/schemas/VoucherTransaction"
          }
        }
      },
      "EventCustomerSegmentEnteredData": {
        "title": "Customer entered segment",
        "type": "object",
        "description": "Event data object schema for `customer.segment.entered`",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "customer": {
                "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "segment": {
                "$ref": "#/components/schemas/SimpleSegment"
              }
            }
          },
          {
            "$ref": "#/components/schemas/EventDistributionScenariosPromotionSendCode"
          }
        ],
        "required": [
          "customer",
          "segment"
        ]
      },
      "EventCustomerSegmentLeftData": {
        "title": "Customer left segment",
        "type": "object",
        "description": "Event data object schema for `customer.segment.left`",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "customer": {
                "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "segment": {
                "$ref": "#/components/schemas/SimpleSegment"
              }
            }
          },
          {
            "$ref": "#/components/schemas/EventDistributionScenariosPromotionSendCode"
          }
        ],
        "required": [
          "customer",
          "segment"
        ]
      },
      "EventCustomerLoyaltyTierJoinedData": {
        "title": "Event Customer Loyalty Tier Joined",
        "description": "Event data object schema for `customer.loyalty.tier.joined`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyTierBase"
          },
          {
            "title": "Loyalty Tier Joined",
            "type": "object",
            "properties": {
              "loyalty_tier": {
                "nullable": true,
                "$ref": "#/components/schemas/LoyaltyTier"
              },
              "created_at": {
                "type": "string",
                "description": "Timestamp representing the date and time when the customer joined the loyalty tier structure.",
                "example": "2022-02-25T13:32:08.734Z",
                "format": "date-time"
              }
            },
            "required": [
              "loyalty_tier",
              "created_at"
            ]
          }
        ]
      },
      "EventCustomerLoyaltyTierUpgradedData": {
        "title": "Event Customer Loyalty Tier Upgraded",
        "description": "Event data object schema for `customer.loyalty.tier.upgraded`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyTierBase"
          },
          {
            "title": "Loyalty Tier Upgraded",
            "type": "object",
            "properties": {
              "loyalty_tier_from": {
                "nullable": true,
                "$ref": "#/components/schemas/LoyaltyTier"
              },
              "loyalty_tier_to": {
                "nullable": true,
                "$ref": "#/components/schemas/LoyaltyTier"
              },
              "created_at": {
                "type": "string",
                "description": "Timestamp representing the date and time when the customer entered a higher loyalty tier.",
                "example": "2022-02-25T13:32:08.734Z",
                "format": "date-time"
              }
            },
            "required": [
              "customer",
              "campaign",
              "loyalty_tier_from",
              "loyalty_tier_to",
              "created_at"
            ]
          }
        ]
      },
      "EventCustomerLoyaltyTierDowngradedData": {
        "title": "Event Customer Loyalty Tier Downgraded",
        "description": "Event data object schema for `customer.loyalty.tier.downgraded`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyTierBase"
          },
          {
            "title": "Loyalty Tier Downgraded",
            "type": "object",
            "properties": {
              "loyalty_tier_from": {
                "nullable": true,
                "$ref": "#/components/schemas/LoyaltyTier"
              },
              "loyalty_tier_to": {
                "nullable": true,
                "$ref": "#/components/schemas/LoyaltyTier"
              },
              "created_at": {
                "type": "string",
                "description": "Timestamp representing the date and time when the customer entered a lower loyalty tier.",
                "example": "2022-02-25T13:32:08.734Z",
                "format": "date-time"
              }
            },
            "required": [
              "customer",
              "campaign",
              "loyalty_tier_from",
              "loyalty_tier_to",
              "created_at"
            ]
          }
        ]
      },
      "EventCustomerLoyaltyTierProlongedData": {
        "title": "Event Customer Loyalty Tier Prolonged",
        "description": "Event data object schema for `customer.loyalty.tier.prolonged`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyTierBase"
          },
          {
            "title": "Loyalty Tier Prolonged",
            "type": "object",
            "properties": {
              "loyalty_tier": {
                "nullable": true,
                "$ref": "#/components/schemas/LoyaltyTier"
              },
              "created_at": {
                "type": "string",
                "description": "Timestamp representing the date and time when the customer left the loyalty tier structure.",
                "example": "2022-02-25T13:32:08.734Z",
                "format": "date-time"
              }
            },
            "required": [
              "loyalty_tier",
              "created_at"
            ]
          }
        ]
      },
      "EventCustomerLoyaltyTierLeftData": {
        "title": "Event Customer Loyalty Tier Left",
        "description": "Event data object schema for `customer.loyalty.tier.left`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyTierBase"
          },
          {
            "title": "Loyalty Tier Left",
            "type": "object",
            "properties": {
              "loyalty_tier": {
                "nullable": true,
                "$ref": "#/components/schemas/LoyaltyTier"
              },
              "created_at": {
                "type": "string",
                "description": "Timestamp representing the date and time when the customer left the loyalty tier structure.",
                "example": "2022-02-25T13:32:08.734Z",
                "format": "date-time"
              }
            },
            "required": [
              "loyalty_tier",
              "created_at"
            ]
          }
        ]
      },
      "EventCustomerHolderAssignmentCreatedData": {
        "title": "Event Customer Holder Assignment Created",
        "description": "Event data object schema for `customer.holder.assignment.created`.",
        "properties": {
          "holder": {
            "$ref": "#/components/schemas/SimpleRedeemableHolder"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          }
        },
        "required": [
          "holder",
          "voucher",
          "campaign",
          "customer"
        ]
      },
      "EventCustomerHolderAssignmentDeletedData": {
        "title": "Event Customer Holder Assignment Deleted",
        "description": "Event data object schema for `customer.holder.assignment.deleted`.",
        "properties": {
          "holder": {
            "$ref": "#/components/schemas/SimpleRedeemableHolder"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          }
        },
        "required": [
          "holder",
          "voucher",
          "campaign",
          "customer"
        ]
      },
      "EventCustomerOrderCreatedData": {
        "title": "Event Customer Order Created",
        "description": "Event data object schema for `customer.order.created`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerOrder"
          },
          {
            "$ref": "#/components/schemas/EventDistributionScenariosPromotionSendCode"
          }
        ],
        "required": [
          "customer",
          "referrer",
          "order",
          "redemption"
        ]
      },
      "EventCustomerOrderPaidData": {
        "title": "Event Customer Order Paid",
        "description": "Event data object schema for `customer.order.paid`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerOrder"
          },
          {
            "$ref": "#/components/schemas/EventDistributionScenariosPromotionSendCode"
          }
        ],
        "required": [
          "customer",
          "referrer",
          "order",
          "redemption"
        ]
      },
      "EventCustomerOrderUpdatedData": {
        "title": "Event Customer Order Updated",
        "description": "Event data object schema for `customer.order.updated`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerOrder"
          },
          {
            "$ref": "#/components/schemas/EventDistributionScenariosPromotionSendCode"
          }
        ],
        "required": [
          "customer",
          "referrer",
          "order",
          "redemption"
        ]
      },
      "EventCustomerOrderCanceledData": {
        "title": "Event Customer Order Canceled",
        "description": "Event data object schema for `customer.order.canceled`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerOrder"
          },
          {
            "$ref": "#/components/schemas/EventDistributionScenariosPromotionSendCode"
          }
        ],
        "required": [
          "customer",
          "referrer",
          "order",
          "redemption"
        ]
      },
      "EventCustomerPublicationSucceededData": {
        "title": "Event Customer Publication Succeeded",
        "description": "Event data object schema for `customer.publication.succeeded",
        "type": "object",
        "properties": {
          "customer": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "publication": {
            "nullable": true,
            "$ref": "#/components/schemas/PublicationsVoucher"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          }
        },
        "required": [
          "customer",
          "campaign",
          "publication",
          "voucher"
        ]
      },
      "EventCustomerCustomEventData": {
        "type": "object",
        "title": "Event Customer Custom Event",
        "description": "Event data object schema for `customer.custom_event`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerCustomEvent"
          },
          {
            "$ref": "#/components/schemas/EventDistributionScenariosPromotionSendCode"
          }
        ]
      },
      "CustomerWithSummaryLoyaltyReferrals": {
        "title": "Customer With Summary Loyalty Referrals",
        "description": "Customer details with details about loyalty and referral programs.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CustomerBase"
          },
          {
            "type": "object",
            "title": "Customer Response Data",
            "properties": {
              "id": {
                "type": "string",
                "description": "The ID of an existing customer that will be linked to the redemption in this request."
              },
              "source_id": {
                "type": "string",
                "description": "A unique identifier of the customer who validates a voucher."
              },
              "summary": {
                "nullable": true,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CustomerSummary"
                  }
                ]
              },
              "loyalty": {
                "nullable": true,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CustomerLoyalty"
                  }
                ]
              },
              "referrals": {
                "nullable": true,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CustomerReferrals"
                  }
                ]
              },
              "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 in the ISO 8601 format.",
                "example": "2024-01-01T11:11:11.111Z",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "description": "Timestamp representing the date and time when the customer was updated in the ISO 8601 format.",
                "example": "2024-01-01T11:11:11.111Z",
                "format": "date-time"
              },
              "assets": {
                "type": "object",
                "description": "Contains information about the customer's cockpit.",
                "properties": {
                  "cockpit_url": {
                    "type": "string",
                    "description": "Customer's cockpit URL address."
                  }
                }
              },
              "object": {
                "type": "string",
                "description": "The type of the object represented by JSON.",
                "default": "customer",
                "enum": [
                  "customer"
                ]
              }
            },
            "required": [
              "summary",
              "loyalty",
              "referrals",
              "object"
            ]
          }
        ]
      },
      "EventCustomerRedemption": {
        "title": "Event Customer Redemption",
        "type": "object",
        "properties": {
          "customer": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "order": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleOrder"
          },
          "campaign": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "holder": {
            "nullable": true,
            "allOf": [
              {
                "description": "Details about the redeemable holder.",
                "$ref": "#/components/schemas/SimpleCustomer"
              }
            ]
          },
          "promotion_tier": {
            "nullable": true,
            "$ref": "#/components/schemas/SimplePromotionTier"
          },
          "promotion_stack": {
            "nullable": true,
            "$ref": "#/components/schemas/SimplePromotionStack"
          },
          "redemption": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleRedemption"
          }
        }
      },
      "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",
            "nullable": true,
            "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",
            "nullable": true,
            "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 for a reward and it was made automatically.",
                "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"
        ]
      },
      "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"
            ]
          }
        }
      },
      "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",
            "nullable": true,
            "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",
                "nullable": true,
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              },
              "redeemed_quantity": {
                "type": "integer",
                "example": 1,
                "description": "How many times a voucher has already been redeemed."
              }
            },
            "required": [
              "quantity",
              "redeemed_quantity"
            ]
          },
          "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"
        ]
      },
      "SimpleCampaign": {
        "title": "Simple Campaign",
        "type": "object",
        "description": "Simplified campaign data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Campaign ID."
          },
          "name": {
            "type": "string",
            "description": "Campaign name."
          },
          "campaign_type": {
            "type": "string",
            "description": "Type of campaign."
          },
          "type": {
            "type": "string",
            "description": "Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers.\n\n- `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria\n-  `STATIC`: vouchers need to be manually published\n- `STANDALONE`: campaign for single vouchers",
            "enum": [
              "AUTO_UPDATE",
              "STATIC",
              "STANDALONE"
            ]
          },
          "is_referral_code": {
            "type": "boolean",
            "description": "Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`."
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleCampaignVoucher"
          },
          "referral_program": {
            "$ref": "#/components/schemas/ReferralProgram"
          },
          "auto_join": {
            "type": "boolean",
            "description": "Indicates whether customers will be able to auto-join the campaign if any earning rule is fulfilled."
          },
          "join_once": {
            "type": "boolean",
            "description": "If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them. It is always `true` for loyalty campaigns."
          },
          "active": {
            "type": "boolean",
            "description": "Indicates whether the campaign is active."
          },
          "category_id": {
            "nullable": true,
            "type": "string",
            "description": "The unique category ID that this campaign belongs to."
          },
          "category": {
            "type": "string",
            "description": "Unique category name."
          },
          "categories": {
            "type": "array",
            "description": "Contains details about the category.",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a campaign. The metadata object stores all custom attributes assigned to the campaign."
          },
          "start_date": {
            "type": "string",
            "format": "date-time",
            "description": "Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive *before* this date. ",
            "example": "2022-09-20T00:00:00.000Z"
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "description": "Expiration timestamp defines when the campaign expires in ISO 8601 format.  Campaign is inactive *after* this date.",
            "example": "2022-09-30T00:00:00.000Z"
          },
          "description": {
            "type": "string",
            "description": "An optional field to keep extra textual information about the campaign such as a campaign description and details."
          },
          "created_at": {
            "type": "string",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the campaign was updated in the ISO 8601 format.",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "default": "campaign",
            "enum": [
              "campaign"
            ],
            "description": "The type of the object represented by JSON. This object stores information about the campaign."
          }
        }
      },
      "RedemptionInternal": {
        "title": "Redemption Internal",
        "description": "Redemption data used for internal communication",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "r_0bc92f81a6801f9bca",
            "description": "Unique redemption ID."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON. This object stores information about the `redemption`.",
            "default": "redemption"
          },
          "created_at": {
            "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"
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the redemption."
          },
          "channel_type": {
            "type": "string",
            "description": "The source of the channel for the redemption rollback. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.",
            "enum": [
              "USER",
              "API"
            ]
          },
          "channel_id": {
            "type": "string",
            "example": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
            "description": "Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API."
          },
          "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."
          },
          "order": {
            "$ref": "#/components/schemas/OrderCalculated"
          },
          "previous_order": {
            "$ref": "#/components/schemas/OrderCalculated"
          },
          "reward": {
            "$ref": "#/components/schemas/RedemptionRewardResult"
          },
          "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
          },
          "reason": {
            "type": "string",
            "description": "System generated cause for the redemption being invalid in the context of the provided parameters."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "status": {
            "type": "string",
            "enum": [
              "SUCCEEDED",
              "FAILED"
            ],
            "description": "Redemption status."
          },
          "related_redemptions": {
            "type": "object",
            "properties": {
              "rollbacks": {
                "type": "array",
                "items": {
                  "title": "Redemption Internal Related Redemptions Rollbacks Item",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "rr_0bc92f81a6801f9bca",
                      "description": "Unique rollback redemption ID."
                    },
                    "date": {
                      "type": "string",
                      "example": "2021-12-22T10:13:06.487Z",
                      "description": "Timestamp representing the date and time when the object was created in the ISO 8601 format.",
                      "format": "date-time"
                    }
                  }
                }
              },
              "redemptions": {
                "type": "array",
                "items": {
                  "title": "Redemption Internal Related Redemptions Item",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "r_0bc92f81a6801f9bca",
                      "description": "Unique redemption ID."
                    },
                    "date": {
                      "type": "string",
                      "example": "2021-12-22T10:13:06.487Z",
                      "description": "Timestamp representing the date and time when the object was created in the ISO 8601 format.",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "parent_redemption_id": {
            "type": "string",
            "description": "Unique redemption ID of the parent redemption.",
            "example": "r_0c656311b5878a2031"
          },
          "redemption": {
            "type": "string",
            "description": "Unique redemption ID of the parent redemption.",
            "example": "r_0c656311b5878a2031"
          },
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "customer_id": {
            "type": "string",
            "nullable": true,
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.",
            "enum": [
              "voucher",
              "promotion_tier"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher."
          },
          "related_object_parent_id": {
            "type": "string",
            "description": "Unique related parent object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher."
          },
          "campaign_name": {
            "type": "string",
            "description": "Campaign name"
          },
          "voucher": {
            "description": "Defines the details of the voucher being redeemed.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Voucher"
              }
            ]
          },
          "promotion_tier": {
            "description": "Contains details of the promotion tier and the parent campaign.",
            "allOf": [
              {
                "$ref": "#/components/schemas/PromotionTier"
              }
            ]
          }
        }
      },
      "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": [
              {
                "description": "Defines the voucher reward.",
                "$ref": "#/components/schemas/SimpleVoucher"
              }
            ]
          },
          "product": {
            "allOf": [
              {
                "description": "Defines the product reward.",
                "$ref": "#/components/schemas/SimpleProduct"
              }
            ]
          },
          "sku": {
            "allOf": [
              {
                "description": "Defines the SKU reward.",
                "$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 in the ISO 8601 format.",
            "example": "2024-01-01T11:11:11.111Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "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",
            "oneOf": [
              {
                "$ref": "#/components/schemas/4_obj_reward_object_parameters_CAMPAIGN"
              },
              {
                "$ref": "#/components/schemas/4_obj_reward_object_parameters_COIN"
              },
              {
                "$ref": "#/components/schemas/4_obj_reward_object_parameters_MATERIAL"
              }
            ]
          },
          "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."
          }
        }
      },
      "SimpleReferralTier": {
        "title": "Simple Referral Tier",
        "type": "object",
        "description": "Simplified referral tier data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique referral tier ID.",
            "example": "seg_DNAOhUtJffvX0f57ajLMFBYR"
          },
          "campaign_id": {
            "type": "string",
            "description": "Campaign ID."
          },
          "banner": {
            "type": "string",
            "description": "Text displayed to customers on the website."
          },
          "parameters": {
            "type": "object",
            "description": "Referral tier parameters.",
            "properties": {
              "event_type": {
                "type": "string",
                "description": "Type of the event."
              },
              "segment": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique identifier of the segment."
                  }
                }
              },
              "custom_event": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique identifier of the custome event."
                  }
                }
              },
              "distribution": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique identifier of the distribution."
                  }
                }
              }
            }
          }
        }
      },
      "CustomEvent": {
        "title": "Custom Event",
        "type": "object",
        "description": "Details about the custom event.",
        "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 identifier of the referrer assigned by Voucherify.",
                "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
              },
              "code": {
                "type": "string",
                "description": "Voucher code."
              },
              "id": {
                "type": "string",
                "description": "Unique identifier of the voucher."
              }
            }
          },
          "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 in the ISO 8601 format.",
            "format": "date-time"
          }
        },
        "required": [
          "object",
          "type",
          "customer",
          "referral",
          "loyalty"
        ]
      },
      "SimpleSegment": {
        "title": "Simple Segment",
        "type": "object",
        "description": "Simplified segment data.",
        "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"
        ]
      },
      "LoyaltyTier": {
        "title": "Loyalty Tier",
        "description": "Loyalty tier data.",
        "allOf": [
          {
            "$ref": "#/components/schemas/LoyaltyTierBase"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique loyalty tier ID."
              },
              "campaign_id": {
                "type": "string",
                "description": "Unique parent campaign ID."
              },
              "metadata": {
                "type": "object",
                "nullable": true,
                "description": "The metadata object stores all custom attributes assigned to the loyalty tier. A set of key/value pairs that can be attached to a loyalty tier object."
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp representing the date and time when the loyalty tier was created in the ISO 8601 format."
              },
              "updated_at": {
                "type": "string",
                "nullable": true,
                "format": "date-time",
                "description": "Timestamp representing the date and time when the loyalty tier was updated in the ISO 8601 format."
              },
              "config": {
                "type": "object",
                "description": "Defines loyalty tier range in points.",
                "required": [
                  "points"
                ],
                "properties": {
                  "points": {
                    "type": "object",
                    "description": "Defines range of loyalty tier in points.",
                    "properties": {
                      "from": {
                        "type": "integer",
                        "description": "Bottom points threshold value."
                      },
                      "to": {
                        "type": "integer",
                        "description": "Top points threshold value."
                      }
                    }
                  }
                }
              },
              "expiration": {
                "$ref": "#/components/schemas/LoyaltyTierExpiration"
              },
              "object": {
                "type": "string",
                "default": "loyalty_tier",
                "enum": [
                  "loyalty_tier"
                ],
                "description": "The type of the object represented by JSON. This object stores information about the loyalty."
              }
            },
            "required": [
              "id",
              "campaign_id",
              "metadata",
              "created_at",
              "config",
              "object"
            ]
          }
        ]
      },
      "EarningRule": {
        "title": "Earning Rule",
        "description": "Earning rule data.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EarningRuleBase"
          },
          {
            "type": "object",
            "properties": {
              "validation_rule_id": {
                "type": "string",
                "nullable": true,
                "description": "A unique validation rule identifier assigned by Voucherify."
              },
              "updated_at": {
                "type": "string",
                "nullable": true,
                "format": "date-time",
                "description": "Timestamp representing the date and time when the earning rule was last updated in the ISO 8601 format."
              },
              "active": {
                "type": "boolean",
                "description": "Shows whether the earning rule is turned on or off. `true` indicates an active earning rule\n- `false` indicates an inactive earning rule"
              }
            },
            "required": [
              "validation_rule_id",
              "updated_at"
            ]
          }
        ]
      },
      "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"
        ]
      },
      "OrderCalculated": {
        "title": "Order Calculated",
        "allOf": [
          {
            "$ref": "#/components/schemas/OrderCalculatedBase"
          },
          {
            "title": "Order Calculated",
            "type": "object",
            "additionalProperties": false,
            "description": "Order information.",
            "properties": {
              "customer": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
                  },
                  {
                    "$ref": "#/components/schemas/CustomerId"
                  }
                ]
              },
              "referrer": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ReferrerWithSummaryLoyaltyReferrals"
                  },
                  {
                    "$ref": "#/components/schemas/ReferrerId"
                  }
                ]
              }
            }
          }
        ]
      },
      "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"
          }
        }
      },
      "PublicationsVoucher": {
        "title": "Publications with Voucher",
        "type": "object",
        "description": "Publication with a voucher.",
        "allOf": [
          {
            "$ref": "#/components/schemas/PublicationsDistributionItemBase"
          },
          {
            "type": "object",
            "properties": {
              "voucher": {
                "description": "Defines the voucher reward.",
                "$ref": "#/components/schemas/Voucher"
              }
            },
            "required": [
              "voucher"
            ]
          }
        ]
      },
      "RewardRedemption": {
        "type": "object",
        "description": "Details about the redemption of a reward",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the reward redemption."
          },
          "state": {
            "type": "string",
            "description": "State of the reward redemption.",
            "enum": [
              "COMPLETED",
              "CREATED",
              "PENDING",
              "ROLLEDBACK"
            ]
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the reward redemption was created in the ISO 8601 format.",
            "example": "2024-01-01T11:11:11.111Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the reward redemption was last updated in the ISO 8601 format.",
            "example": "2024-01-01T11:11:11.111Z",
            "format": "date-time"
          },
          "voucher_id": {
            "type": "string",
            "description": "Unique identifier of the voucher."
          },
          "campaign_id": {
            "type": "string",
            "description": "Unique identifier of the campaign to which the redeemed reward belongs."
          },
          "customer_id": {
            "type": "string",
            "description": "Unique identifier of the customer redeeming the reward."
          },
          "reward_assignment_id": {
            "type": "string",
            "description": "Unique identifier of the reward assignment."
          },
          "source_id": {
            "type": "string",
            "description": "Unique identifier of the source which triggered the event."
          },
          "source_type": {
            "type": "string",
            "description": "Defines the source type of the reward redemption."
          }
        }
      },
      "RewardAssignment": {
        "type": "object",
        "description": "Details about the assignment of the reward to the customer.",
        "properties": {
          "id": {
            "type": "string",
            "example": "rewa_PbIRoMXpwe5QhobW4JKu0VjH",
            "description": "Unique reward assignment ID, assigned by Voucherify."
          },
          "reward_id": {
            "type": "string",
            "description": "Associated reward ID.",
            "example": "rew_C7wS9eHFDN4CIbXI5PpLSkGY"
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the reward assignment 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",
            "nullable": true,
            "description": "Timestamp representing the date and time when the reward assignment was updated. The value is shown in the ISO 8601 format.",
            "example": "2022-08-11T16:01:34.885Z",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON. This object stores information about the reward assignment.",
            "default": "reward_assignment",
            "enum": [
              "reward_assignment"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Related object ID to which the reward was assigned.",
            "example": "camp_wciTvaOfYmAa3EmIIW3QpXXZ"
          },
          "related_object_type": {
            "type": "string",
            "description": "Related object type to which the reward was assigned.",
            "default": "campaign",
            "enum": [
              "campaign"
            ]
          },
          "parameters": {
            "type": "object",
            "description": "Defines the cost of the reward",
            "properties": {
              "loyalty": {
                "type": "object",
                "description": "Defines the equivalent points value of the reward.",
                "properties": {
                  "points": {
                    "type": "integer",
                    "description": "The number of points required to redeem the reward."
                  }
                }
              }
            },
            "required": [
              "loyalty"
            ]
          }
        }
      },
      "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",
            "nullable": true,
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.",
            "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
          },
          "referrer_id": {
            "type": "string",
            "nullable": true,
            "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"
        ]
      },
      "VoucherTransaction": {
        "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",
            "nullable": true,
            "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",
            "nullable": true,
            "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",
            "nullable": true,
            "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",
            "description": "Contains the detailed information about the transaction.",
            "nullable": true,
            "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",
            "nullable": true,
            "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"
        ]
      },
      "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"
        ]
      },
      "LoyaltiesMembersBalanceUpdateResponseBody": {
        "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"
        ]
      },
      "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 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",
            "pattern": "loyalty_points_bucket",
            "default": "loyalty_points_bucket",
            "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"
        ]
      },
      "VouchersBalanceUpdateResponseBody": {
        "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"
              }
            }
          }
        }
      },
      "EventDistributionScenariosPromotionSendCode": {
        "properties": {
          "campaign": {
            "description": "Details about the campaign related to the distribution with a promotion or send voucher purpose.",
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "description": "Details about the voucher related to the distribution with a send voucher purpose.",
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "publication": {
            "description": "Details about the publication related to the distribution with a send voucher purpose.",
            "$ref": "#/components/schemas/PublicationsDistributionItemBase"
          },
          "promotion_tier": {
            "description": "Details about the promotion tier related to the distribution with a promotion purpose.",
            "$ref": "#/components/schemas/SimplePromotionTier"
          }
        }
      },
      "EventCustomerLoyaltyTierBase": {
        "title": "Event Customer Loyalty Tier Base",
        "type": "object",
        "properties": {
          "customer": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCampaign"
          }
        },
        "required": [
          "customer",
          "campaign"
        ]
      },
      "SimpleRedeemableHolder": {
        "type": "object",
        "title": "Redeemable Holder",
        "description": "Details about the holder of the redeemable.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the redeemable holder.",
            "example": "rh_0e7b8db4700106a852"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the redeemable was assigned. Timestamp is presented in the ISO 8601 format.",
            "example": "2024-03-22T17:48:25.910Z"
          },
          "redeemable_id": {
            "type": "string",
            "description": "Identifier of the redeemable item.",
            "example": "v_GXVguPhq2khgFxH7GrRXWA91gDr1LiA1"
          },
          "redeemable_object": {
            "type": "string",
            "description": "Type of the redeemable.",
            "example": "voucher",
            "enum": [
              "voucher"
            ]
          },
          "campaign_id": {
            "type": "string",
            "description": "Unique identifier of the campaign as assigned by Voucherify.",
            "example": "camp_weer1c3p5ZgktqfW56RfoNaG"
          },
          "campaign_type": {
            "type": "string",
            "description": "Defines the type of the campaign.",
            "enum": [
              "REFERRAL_PROGRAM"
            ],
            "example": "REFERRAL_PROGRAM"
          },
          "voucher_type": {
            "type": "string",
            "description": "Defines the type of the voucher.",
            "enum": [
              "GIFT_VOUCHER",
              "DISCOUNT_VOUCHER",
              "LOYALTY_CARD"
            ],
            "example": "DISCOUNT_VOUCHER"
          },
          "publication_id": {
            "type": "string",
            "nullable": true,
            "description": "Unique identifier of the publication."
          },
          "customer_id": {
            "type": "string",
            "description": "Unique identifier of the customer.",
            "example": "cust_p1ufreYbVbwZ1x70nFkH9rF9"
          },
          "holder_role": {
            "type": "string",
            "description": "Role of the holder.",
            "enum": [
              "OWNER",
              "REFERRER",
              "REFEREE"
            ],
            "example": "REFERRER"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "enum": [
              "redeemable_holder"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "redeemable_id",
          "redeemable_object",
          "campaign_id",
          "campaign_type",
          "voucher_type",
          "publication_id",
          "customer_id",
          "holder_role",
          "object"
        ]
      },
      "EventCustomerOrder": {
        "title": "Event Customer Order",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "referrer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "order": {
            "$ref": "#/components/schemas/OrderCalculated"
          },
          "redemption": {
            "$ref": "#/components/schemas/RedemptionInternal"
          }
        }
      },
      "EventCustomerCustomEvent": {
        "type": "object",
        "title": "Event Customer Custom Event",
        "description": "Event data object schema for `customer.custom_event`.",
        "properties": {
          "event": {
            "$ref": "#/components/schemas/CustomEvent"
          },
          "event_schema": {
            "$ref": "#/components/schemas/SimpleCustomEvent"
          },
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "referral": {
            "type": "object",
            "nullable": true,
            "description": "Details about the referral.",
            "properties": {
              "referrer": {
                "description": "Details about the referrer.",
                "$ref": "#/components/schemas/SimpleCustomer"
              },
              "voucher": {
                "description": "Details about the referral code.",
                "$ref": "#/components/schemas/SimpleVoucher"
              },
              "campaign": {
                "description": "Details about the referral campaign.",
                "$ref": "#/components/schemas/SimpleCampaign"
              }
            },
            "required": [
              "referrer",
              "voucher",
              "campaign"
            ]
          },
          "loyalty": {
            "type": "object",
            "nullable": true,
            "description": "Details about the loyalty activity.",
            "properties": {
              "voucher": {
                "description": "Details about the loyalty code.",
                "$ref": "#/components/schemas/SimpleVoucher"
              },
              "campaign": {
                "description": "Details about the loyalty campaign.",
                "$ref": "#/components/schemas/SimpleCampaign"
              }
            },
            "required": [
              "voucher",
              "campaign"
            ]
          }
        },
        "required": [
          "event",
          "event_schema",
          "customer",
          "referral",
          "loyalty"
        ]
      },
      "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 for sending out codes to customers via an SMS channel."
          },
          "birthdate": {
            "type": "string",
            "description": "Customer's birthdate; format YYYY-MM-DD.",
            "format": "date"
          },
          "address": {
            "type": "object",
            "nullable": true,
            "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."
          }
        }
      },
      "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."
          },
          "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": {
              "title": "Campaign Loyalty Card Details",
              "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 the 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 identifier of the campaign 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": "2024-01-01T11:11:11.111Z",
                  "description": "Timestamp representing the date and time when the customer was referred in the ISO 8601 format."
                }
              },
              "required": [
                "campaign_id",
                "referrer_id",
                "related_object_id",
                "related_object_type",
                "date"
              ]
            }
          }
        },
        "required": [
          "total",
          "campaigns"
        ]
      },
      "SimplePromotionTier": {
        "title": "Simple Promotion Tier",
        "type": "object",
        "description": "Simplified promotion tier data.",
        "properties": {
          "id": {
            "type": "string",
            "example": "promo_63fYCt81Aw0h7lzyRkrGZh9p",
            "description": "Unique promotion tier ID."
          },
          "name": {
            "type": "string",
            "description": "Name of the promotion tier."
          },
          "banner": {
            "type": "string",
            "nullable": true,
            "description": "Text to be displayed to your customers on your website."
          },
          "campaign": {
            "$ref": "#/components/schemas/SimplePromotionTierCampaign"
          },
          "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."
          }
        }
      },
      "SimplePromotionStack": {
        "title": "Simple Promotion Stack",
        "type": "object",
        "description": "Simplified promotion stack data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the promotion stack."
          },
          "name": {
            "type": "string",
            "description": "Name of the promotion stack."
          },
          "category_id": {
            "type": "string",
            "description": "Unique identifier of the category of the promotion stack."
          },
          "campaign": {
            "type": "object",
            "description": "Represents simplified promotion stack campaign data.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the campaign."
              }
            }
          },
          "tiers": {
            "type": "object",
            "required": [
              "ids"
            ],
            "description": "Contains the tier configuration.",
            "properties": {
              "ids": {
                "type": "array",
                "minItems": 1,
                "description": "Contains the list of tiers in a pre-defined sequence.",
                "items": {
                  "type": "string"
                }
              },
              "hierarchy_mode": {
                "type": "string",
                "default": "MANUAL",
                "enum": [
                  "MANUAL"
                ]
              }
            }
          }
        }
      },
      "Gift": {
        "title": "Gift",
        "type": "object",
        "additionalProperties": false,
        "description": "Contains current gift card balance information.",
        "properties": {
          "amount": {
            "type": "number",
            "description": "Total gift card income over the lifetime of the card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $10 amount is written as 1000."
          },
          "balance": {
            "type": "number",
            "description": "Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $10 amount is written as 1000."
          },
          "effect": {
            "type": "string",
            "description": "Defines how the credits are applied to the customer's order.",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS"
            ]
          }
        },
        "required": [
          "amount",
          "balance"
        ]
      },
      "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."
          }
        }
      },
      "Category": {
        "title": "Category",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique category ID assigned by Voucherify."
          },
          "name": {
            "type": "string",
            "description": "Category name."
          },
          "hierarchy": {
            "type": "integer",
            "description": "Category hierarchy."
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the category was created in the ISO 8601 format.",
            "example": "2024-01-01T11:11:11.111Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the category was updated in the ISO 8601 format.",
            "example": "2024-01-01T11:11:11.111Z",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "default": "category",
            "enum": [
              "category"
            ],
            "description": "The type of the object represented by the JSON. This object stores information about the category."
          },
          "stacking_rules_type": {
            "type": "string",
            "description": "The type of the stacking rule eligibility.",
            "enum": [
              "JOINT",
              "EXCLUSIVE"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "hierarchy",
          "created_at",
          "object"
        ]
      },
      "SimpleCampaignVoucher": {
        "type": "object",
        "description": "Simplified campaign voucher data.",
        "title": "Simple Campaign Voucher",
        "properties": {
          "type": {
            "type": "string",
            "description": "Type of the voucher.",
            "enum": [
              "DISCOUNT_VOUCHER",
              "LOYALTY_CARD",
              "GIFT_VOUCHER"
            ]
          },
          "discount": {
            "description": "Defines the voucher discount type and details. It will not be returned at all or it will return a `null` for `LOYALTY_CARD`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Discount"
              }
            ]
          },
          "gift": {
            "description": "Defines the voucher gift details. It will not be returned at all or it will return a `null` for `LOYALTY_CARD`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Gift"
              }
            ]
          },
          "loyalty_card": {
            "description": "Defines the voucher loyalty card details.  It will not be returned at all or it will return a `null` for `DISCOUNT_VOUCHER` or `GIFT_CARD`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/CampaignLoyaltyCard"
              }
            ]
          },
          "redemption": {
            "type": "object",
            "description": "Defines the redemption limits on vouchers.",
            "properties": {
              "quantity": {
                "type": "integer",
                "nullable": true,
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              },
              "redeemed_quantity": {
                "type": "integer",
                "example": 1,
                "description": "How many times a voucher has already been redeemed."
              }
            },
            "required": [
              "quantity",
              "redeemed_quantity"
            ]
          },
          "code_config": {
            "$ref": "#/components/schemas/CodeConfigRequiredLengthCharsetPattern"
          }
        },
        "required": [
          "type",
          "redemption",
          "code_config"
        ]
      },
      "ReferralProgram": {
        "title": "Referral Program",
        "description": "Defines the referee reward and the way a referral is triggered. Context: `REFERRAL_PROGRAM`.",
        "type": "object",
        "properties": {
          "conversion_event_type": {
            "type": "string",
            "enum": [
              "redemption",
              "custom_event"
            ],
            "description": "Defines how a referral is triggered."
          },
          "custom_event": {
            "type": "object",
            "description": "Contains details about the custom event.",
            "properties": {
              "id": {
                "type": "string",
                "example": "ms_Ll9enAm2BCN0M1s4VxWobLFM",
                "description": "Unique custom event ID."
              },
              "name": {
                "type": "string",
                "description": "Custom event name."
              }
            }
          },
          "referee_reward": {
            "type": "object",
            "description": "Defines the referee reward.",
            "properties": {
              "related_object_parent": {
                "type": "object",
                "description": "Details of the resource from which the reward originates.",
                "properties": {
                  "id": {
                    "type": "string",
                    "example": "camp_kdxp3vf1clQ9CFs1jpqv3tZe",
                    "description": "Unique identifier of the reward source."
                  },
                  "name": {
                    "type": "string",
                    "description": "Name of the reward source."
                  },
                  "object": {
                    "type": "string",
                    "default": "CAMPAIGN",
                    "enum": [
                      "CAMPAIGN"
                    ],
                    "description": "Type of resource represented by the source of the reward."
                  }
                }
              },
              "type": {
                "type": "string",
                "enum": [
                  "DISCOUNT_VOUCHER",
                  "LOYALTY_CARD",
                  "GIFT_VOUCHER"
                ],
                "description": "Type of reward."
              },
              "amount": {
                "type": "string",
                "description": "Define the number of `points` to add to a loyalty card or `credits` to the balance on a gift card. In case of the gift card, the value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000."
              }
            }
          }
        }
      },
      "RedemptionRewardResult": {
        "title": "Redemption Reward Result",
        "type": "object",
        "properties": {
          "customer": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleCustomer"
              }
            ]
          },
          "assignment_id": {
            "type": "string",
            "nullable": true,
            "description": "Unique reward assignment ID assigned by Voucherify."
          },
          "voucher": {
            "nullable": true,
            "allOf": [
              {
                "description": "Defines the voucher reward.",
                "$ref": "#/components/schemas/Voucher"
              }
            ]
          },
          "product": {
            "nullable": true,
            "allOf": [
              {
                "description": "Defines the product reward.",
                "$ref": "#/components/schemas/Product"
              }
            ]
          },
          "sku": {
            "nullable": true,
            "allOf": [
              {
                "description": "Defines the SKU reward.",
                "$ref": "#/components/schemas/Sku"
              }
            ]
          },
          "loyalty_tier_id": {
            "type": "string",
            "nullable": true,
            "description": "Unique loyalty tier ID assigned by Voucherify."
          },
          "id": {
            "type": "string",
            "example": "rew_0bc92f81a6801f9bca",
            "description": "Unique reward ID."
          },
          "name": {
            "type": "string",
            "example": "Reward Name",
            "description": "Name of the reward."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON",
            "default": "reward",
            "enum": [
              "reward"
            ]
          },
          "created_at": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the reward was updated."
          },
          "parameters": {
            "description": "Defines how the reward is generated.",
            "type": "object",
            "oneOf": [
              {
                "$ref": "#/components/schemas/4_obj_reward_object_parameters_CAMPAIGN"
              },
              {
                "$ref": "#/components/schemas/4_obj_reward_object_parameters_COIN"
              },
              {
                "$ref": "#/components/schemas/4_obj_reward_object_parameters_MATERIAL"
              }
            ]
          },
          "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."
          }
        },
        "required": [
          "reward",
          "customer",
          "assignment_id",
          "voucher",
          "product",
          "sku",
          "loyalty_tier_id"
        ]
      },
      "Voucher": {
        "title": "Voucher",
        "type": "object",
        "description": "Object representing a voucher.",
        "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"
          },
          "categories": {
            "type": "array",
            "description": "Contains details about the category.",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          },
          "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. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000."
              },
              "balance": {
                "type": "integer",
                "example": 500,
                "description": "Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000."
              },
              "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": {
            "type": "object",
            "description": "Set recurrent time periods when the voucher is valid. For example, valid for 1 hour every other day. `start_date` **required** when including the `validity_timeframe`.",
            "properties": {
              "interval": {
                "type": "string",
                "example": "P2D",
                "description": "Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a voucher with an `interval` of `P2D` will be active every other day."
              },
              "duration": {
                "type": "string",
                "example": "PT1H",
                "description": "Defines the amount of time the voucher will be active in ISO 8601 format. For example, a voucher with a `duration` of `PT1H` will be valid for a duration of one hour."
              }
            }
          },
          "validity_day_of_week": {
            "type": "array",
            "description": "Integer array corresponding to the particular days of the week in which the voucher is valid.\n\n- `0` Sunday\n- `1` Monday\n- `2` Tuesday\n- `3` Wednesday\n- `4` Thursday\n- `5` Friday\n- `6` Saturday",
            "items": {
              "type": "integer",
              "enum": [
                0,
                1,
                2,
                3,
                4,
                5,
                6
              ]
            }
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "active": {
            "type": "boolean",
            "nullable": true,
            "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",
            "nullable": true,
            "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 in 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 ID of voucher owner."
          },
          "validation_rules_assignments": {
            "$ref": "#/components/schemas/ValidationRulesAssignmentsList"
          },
          "referrer_id": {
            "type": "string",
            "description": "Unique identifier of the referrer assigned by Voucherify.",
            "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. Default is `voucher`.",
            "default": "voucher"
          },
          "publish": {
            "type": "object",
            "description": "This object stores a summary of publish events: an events counter and an endpoint which can be called to return details of each event.  A publication is required for loyalty cards and referral codes. This object gets updated whenever a voucher has been published. Publication means assigning a code to a particular customer.",
            "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_amount": {
                "type": "integer",
                "example": 100000,
                "description": "Total amount redeemed. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 balance is written as 10000."
              },
              "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`"
              }
            }
          }
        }
      },
      "PromotionTier": {
        "type": "object",
        "description": "Object representing a promotion tier. Promotion tiers are always assigned to a campaign and cannot be used standalone.",
        "title": "Promotion Tier",
        "properties": {
          "id": {
            "type": "string",
            "example": "promo_63fYCt81Aw0h7lzyRkrGZh9p",
            "description": "Unique promotion tier ID."
          },
          "created_at": {
            "type": "string",
            "example": "2021-12-15T11:34:01.333Z",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the promotion tier was created in the ISO 8601 format."
          },
          "updated_at": {
            "type": "string",
            "example": "2022-02-09T09:20:05.603Z",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the promotion tier was updated in the ISO 8601 format."
          },
          "name": {
            "type": "string",
            "description": "Name of the promotion tier."
          },
          "banner": {
            "type": "string",
            "description": "Text to be displayed to your customers on your website."
          },
          "action": {
            "type": "object",
            "description": "Contains details about the discount applied by the promotion tier.",
            "properties": {
              "discount": {
                "$ref": "#/components/schemas/Discount"
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format."
          },
          "hierarchy": {
            "type": "integer",
            "description": "The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy."
          },
          "promotion_id": {
            "type": "string",
            "description": "Promotion unique ID."
          },
          "campaign": {
            "type": "object",
            "description": "Contains details about promotion tier's parent campaign.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique campaign ID."
              },
              "start_date": {
                "type": "string",
                "description": "Activation timestamp defines when the campaign starts to be active in the ISO 8601 format. Campaign is *inactive before* this date. ",
                "format": "date-time",
                "example": "2022-09-22T00:00:00.000Z"
              },
              "expiration_date": {
                "type": "string",
                "format": "date-time",
                "description": "Expiration timestamp defines when the campaign expires in the ISO 8601 format.  Campaign is *inactive after* this date.",
                "example": "2022-09-30T00:00:00.000Z"
              },
              "validity_timeframe": {
                "type": "object",
                "description": "Recurrent time periods when the campaign is valid. For example, valid for 1 hour every other day.",
                "properties": {
                  "interval": {
                    "type": "string",
                    "description": "Defines the intervening time between two time points in the ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day."
                  },
                  "duration": {
                    "type": "string",
                    "description": "Defines the amount of time the campaign will be active in the ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day."
                  }
                }
              },
              "validity_day_of_week": {
                "type": "array",
                "description": "Integer array corresponding to the particular days of the week in which the campaign is valid.\n\n- `0` Sunday\n- `1` Monday\n- `2` Tuesday\n- `3` Wednesday\n- `4` Thursday\n- `5` Friday\n- `6` Saturday",
                "items": {
                  "type": "integer",
                  "enum": [
                    0,
                    1,
                    2,
                    3,
                    4,
                    5,
                    6
                  ]
                }
              },
              "validity_hours": {
                "$ref": "#/components/schemas/ValidityHours"
              },
              "active": {
                "type": "boolean",
                "description": "A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the `start_date` and `expiration_date` using the [Disable Campaign](ref:disable-campaign) endpoint.  \n\n- `true` indicates an *active* campaign\n- `false` indicates an *inactive* campaign"
              },
              "category_id": {
                "type": "string",
                "example": "cat_0b688929a2476386a6",
                "description": "Unique category ID that this campaign belongs to."
              },
              "object": {
                "type": "string",
                "description": "The type of the object represented by the campaign object. This object stores information about the campaign.",
                "default": "campaign"
              }
            }
          },
          "campaign_id": {
            "type": "string",
            "description": "Promotion tier's parent campaign's unique ID."
          },
          "active": {
            "type": "boolean",
            "description": "A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`.  \n\n- `true` indicates an *active* promotion tier\n- `false` indicates an *inactive* promotion tier"
          },
          "start_date": {
            "type": "string",
            "description": "Activation timestamp defines when the promotion tier starts to be active in the ISO 8601 format. Promotion tier is *inactive before* this date. ",
            "format": "date-time",
            "example": "2022-09-23T00:00:00.000Z"
          },
          "expiration_date": {
            "type": "string",
            "description": "Activation timestamp defines when the promotion tier expires in the ISO 8601 format. Promotion tier is *inactive after* this date. ",
            "format": "date-time",
            "example": "2022-09-26T00:00:00.000Z"
          },
          "validity_timeframe": {
            "type": "object",
            "description": "Set recurrent time periods when the promotion tier is valid. For example, valid for 1 hour every other day. `start_date` **required** when including the `validity_timeframe`.",
            "properties": {
              "interval": {
                "type": "string",
                "description": "Defines the intervening time between two time points in the ISO 8601 format, expressed as a duration. For example, a promotion tier with an `interval` of `P2D` will be active every other day."
              },
              "duration": {
                "type": "string",
                "description": "Defines the amount of time the promotion tier will be active in the ISO 8601 format. For example, a promotion tier with a `duration` of `P1D` will be valid for a duration of one day."
              }
            }
          },
          "validity_day_of_week": {
            "type": "array",
            "description": "Integer array corresponding to the particular days of the week in which the promotion tier is valid.\n\n- `0` Sunday\n- `1` Monday\n- `2` Tuesday\n- `3` Wednesday\n- `4` Thursday\n- `5` Friday\n- `6` Saturday",
            "items": {
              "type": "integer",
              "enum": [
                0,
                1,
                2,
                3,
                4,
                5,
                6
              ]
            }
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "summary": {
            "type": "object",
            "description": "Contains statistics about promotion tier redemptions and orders.",
            "properties": {
              "redemptions": {
                "type": "object",
                "description": "Contains statistics about promotion tier redemptions.",
                "properties": {
                  "total_redeemed": {
                    "type": "integer",
                    "description": "Number of times the promotion tier was redeemed."
                  }
                }
              },
              "orders": {
                "type": "object",
                "description": "Contains statistics about orders related to the promotion tier.",
                "properties": {
                  "total_amount": {
                    "type": "integer",
                    "description": "Sum of order totals."
                  },
                  "total_discount_amount": {
                    "type": "integer",
                    "description": "Sum of total discount applied using the promotion tier."
                  }
                }
              }
            }
          },
          "object": {
            "type": "string",
            "default": "promotion_tier",
            "description": "The type of the object represented by JSON. This object stores information about the promotion tier."
          },
          "validation_rule_assignments": {
            "$ref": "#/components/schemas/ValidationRuleAssignmentsList"
          },
          "category_id": {
            "type": "string",
            "description": "Promotion tier category ID.",
            "example": "cat_0c9da30e7116ba6bba"
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          }
        }
      },
      "SimpleProduct": {
        "title": "Simple Product",
        "type": "object",
        "description": "Simplified product data.",
        "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",
        "description": "Simplified SKU data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique SKU ID."
          },
          "source_id": {
            "type": "string",
            "description": "SKU source id."
          },
          "sku": {
            "type": "string",
            "description": "SKU name."
          }
        }
      },
      "4_obj_reward_object_parameters_CAMPAIGN": {
        "title": "Campaign",
        "type": "object",
        "description": "These are parameters representing a Campaign reward. These can be in the form of discount coupons, gift card credits, or loyalty point credits.",
        "properties": {
          "campaign": {
            "description": "Objects stores information about the campaign related to the reward.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/4_obj_reward_object_parameters_CAMPAIGN_DISCOUNT_COUPONS"
              },
              {
                "$ref": "#/components/schemas/4_obj_reward_object_parameters_CAMPAIGN_GIFT_VOUCHERS"
              },
              {
                "$ref": "#/components/schemas/4_obj_reward_object_parameters_CAMPAIGN_LOYALTY_PROGRAM"
              }
            ]
          }
        }
      },
      "4_obj_reward_object_parameters_COIN": {
        "title": "Pay with Points",
        "type": "object",
        "description": "These are parameters representing a Pay with Points (COIN) reward. ",
        "properties": {
          "coin": {
            "type": "object",
            "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": "integer",
                "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."
              }
            }
          }
        }
      },
      "4_obj_reward_object_parameters_MATERIAL": {
        "title": "Material",
        "type": "object",
        "description": "These are parameters representing products as a reward.",
        "properties": {
          "product": {
            "type": "object",
            "description": "Contains information about the product given as a reward.",
            "properties": {
              "id": {
                "type": "string",
                "example": "prod_0b7d7dfb05cbe5c616",
                "description": "Unique identifier of the product assigned by Voucherify. "
              },
              "sku_id": {
                "type": "string",
                "nullable": true,
                "description": "Unique identifier of the SKU assigned by Voucherify for the SKU given as a reward.",
                "example": "sku_0b7d7dfb090be5c619"
              }
            }
          }
        }
      },
      "SimpleCustomerRequiredObjectType": {
        "type": "object",
        "description": "Simplified customer data with limited properties used in Event Tracking endpoints.",
        "title": "Event Tracking Customer Object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of a customer. It is assigned by Voucherify.",
            "example": "cust_CSnYd37MXmrbS19XCrghjBsv"
          },
          "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 you can attach to a customer. The metadata object stores all custom attributes assigned to the customer."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON. This object stores information about the customer.",
            "default": "customer"
          }
        },
        "required": [
          "object"
        ]
      },
      "LoyaltyTierBase": {
        "title": "Loyalty Tier Base",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Loyalty Tier name."
          },
          "earning_rules": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/MappingPoints"
            },
            "description": "Contains a list of earning rule IDs and their points mapping for the given earning rule."
          },
          "rewards": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/MappingPoints"
            },
            "description": "Contains a list of reward IDs and their points mapping for the given reward."
          },
          "points": {
            "type": "object",
            "description": "Defines range of loyalty tier in points.",
            "properties": {
              "from": {
                "type": "integer",
                "description": "Bottom points threshold value."
              },
              "to": {
                "type": "integer",
                "description": "Top points threshold value."
              }
            }
          }
        },
        "required": [
          "name",
          "points",
          "earning_rules",
          "rewards"
        ]
      },
      "LoyaltyTierExpiration": {
        "title": "Loyalty Tier Expiration",
        "description": "Defines loyalty tier expiration date.",
        "type": "object",
        "properties": {
          "customer_id": {
            "type": "string",
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.",
            "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
          },
          "campaign_id": {
            "type": "string",
            "description": "Unique identifier of the campaign.",
            "example": "camp_rRsfatlwN7unSeUIJDCYedal"
          },
          "tier_id": {
            "type": "string",
            "description": "Unique identifier of the tier."
          },
          "start_date": {
            "type": "string",
            "description": "Activation timestamp defines when the loyalty tier starts to be active in the ISO 8601 format. Loyalty tier is inactive before this date."
          },
          "expiration_date": {
            "type": "string",
            "description": "Expiration timestamp defines when the loyalty tier expires in the ISO 8601 format. Loyalty tier is inactive after this date."
          },
          "created_at": {
            "type": "string",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the loyalty tier was created in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the loyalty tier was updated in the ISO 8601 format.",
            "format": "date-time"
          }
        },
        "required": [
          "customer_id",
          "campaign_id",
          "tier_id",
          "created_at"
        ]
      },
      "EarningRuleBase": {
        "title": "EarningRuleBase",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique earning rule identifier assigned by Voucherify."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the earning rule was created in the ISO 8601 format."
          },
          "loyalty": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EarningRuleFixed"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportional"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportionalOrderItems"
              }
            ]
          },
          "event": {
            "description": "Defines the event which triggers the earning rule to add points to a loyalty card.",
            "allOf": [
              {
                "$ref": "#/components/schemas/EarningRuleEvent"
              }
            ]
          },
          "custom_event": {
            "type": "object",
            "properties": {
              "schema_id": {
                "type": "string"
              }
            },
            "required": [
              "schema_id"
            ]
          },
          "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": "object",
            "description": "Defines the tier associated with the earning rule definition.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique loyalty tier ID associated with the earning rule.    \n\n- `__ANY__`: any loyalty tier within the campaign",
                "example": "ltr_pudTGWasuIqxdiDM0go31OV1"
              }
            }
          },
          "pending_points": {
            "type": "object",
            "description": "Defines the configuration for pending points. Pending points can be used only with the `order.paid` event.",
            "properties": {
              "period_type": {
                "type": "string",
                "description": "Defines the type of the period during which the points are in the pending state. Currently, only `DAY` value is accepted.",
                "enum": [
                  "DAY"
                ]
              },
              "period_value": {
                "type": "integer",
                "description": "Defines for how long the points are in the pending state. The minimum value is 1, maximum is 90.",
                "minimum": 1,
                "maximum": 90
              }
            }
          },
          "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"
                ]
              }
            }
          },
          "object": {
            "type": "string",
            "default": "earning_rule",
            "enum": [
              "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."
          },
          "start_date": {
            "type": "string",
            "description": "Activation timestamp defines when the earning rule starts to be active in the ISO 8601 format."
          },
          "expiration_date": {
            "type": "string",
            "description": "Expiration date defines when the earning rule expires. Expiration timestamp in the ISO 8601 format."
          },
          "validity_timeframe": {
            "type": "object",
            "description": "Sets recurrent time periods when the earning rule is valid.",
            "properties": {
              "duration": {
                "type": "string",
                "description": "Defines the amount of time an earning rule will be active in the ISO 8601 format."
              },
              "interval": {
                "type": "string",
                "description": "Defines the intervening time between two time points in the ISO 8601 format, expressed as a duration."
              }
            },
            "required": [
              "duration",
              "interval"
            ]
          },
          "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 is attached to an earning rule object."
          }
        },
        "required": [
          "id",
          "created_at",
          "loyalty",
          "source",
          "object",
          "automation_id",
          "metadata"
        ]
      },
      "OrderCalculatedBase": {
        "title": "Order Response Base",
        "type": "object",
        "additionalProperties": false,
        "description": "Order information.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier assigned by Voucherify of an existing order that is linked to the redemption of this request."
          },
          "source_id": {
            "type": "string",
            "nullable": true,
            "description": "Unique source ID of an existing order that is linked to the redemption of this request."
          },
          "created_at": {
            "type": "string",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the order was created in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "example": "024-01-01T11:11:11.111Z",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the order was last updated in the ISO 8601 format."
          },
          "status": {
            "type": "string",
            "description": "Order status.",
            "enum": [
              "CREATED",
              "PAID",
              "CANCELED",
              "FULFILLED"
            ]
          },
          "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."
          },
          "initial_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."
          },
          "items_discount_amount": {
            "type": "integer",
            "description": "Sum of all product-specific discounts applied to the order."
          },
          "total_discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level AND all product-specific discounts applied to the order."
          },
          "total_amount": {
            "type": "integer",
            "description": "Order amount after undoing all the discounts through the rollback redemption."
          },
          "applied_discount_amount": {
            "type": "integer",
            "description": "This field shows the order-level discount applied."
          },
          "items_applied_discount_amount": {
            "type": "integer",
            "description": "Sum of all product-specific discounts applied in a particular request.  \n`sum(items, i => i.applied_discount_amount)`"
          },
          "total_applied_discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level AND all product-specific discounts applied in a particular request.  \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`"
          },
          "items": {
            "type": "array",
            "description": "Array of items applied to the order.",
            "items": {
              "$ref": "#/components/schemas/OrderItemCalculated"
            }
          },
          "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."
          },
          "customer_id": {
            "type": "string",
            "nullable": true,
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.",
            "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
          },
          "referrer_id": {
            "type": "string",
            "nullable": true,
            "description": "Unique identifier of the referrer assigned by Voucherify.",
            "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "order",
            "enum": [
              "order"
            ]
          },
          "redemptions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/OrderRedemptions"
            }
          }
        },
        "required": [
          "id",
          "source_id",
          "customer_id",
          "referrer_id",
          "object"
        ]
      },
      "CustomerId": {
        "title": "Customer ID",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "A unique identifier of an existing customer."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "customer",
            "enum": [
              "customer"
            ]
          }
        },
        "required": [
          "id",
          "object"
        ]
      },
      "ReferrerWithSummaryLoyaltyReferrals": {
        "title": "Referrer With Summary Loyalty Referrals",
        "allOf": [
          {
            "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
          }
        ]
      },
      "ReferrerId": {
        "title": "Referrer Id",
        "allOf": [
          {
            "$ref": "#/components/schemas/CustomerId"
          }
        ]
      },
      "PublicationsDistributionItemBase": {
        "title": "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.",
            "properties": {
              "source_type": {
                "type": "string",
                "description": "Defines the type of the distribution source."
              },
              "source_id": {
                "type": "string",
                "description": "Unique identifier of the distribution source."
              },
              "distribution_id": {
                "type": "string",
                "description": "Unique identifier of the distribution."
              }
            },
            "required": [
              "source_type",
              "source_id",
              "distribution_id"
            ]
          },
          "channel": {
            "type": "string",
            "description": "How the publication was originated."
          },
          "source_id": {
            "type": "string",
            "nullable": true,
            "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"
        ]
      },
      "SimpleOrderItem": {
        "type": "object",
        "title": "Simple Order Item",
        "description": "Simplified order item data.",
        "properties": {
          "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)."
          },
          "related_object": {
            "type": "string",
            "enum": [
              "product",
              "sku"
            ],
            "description": "Used along with the source_id property. It can be set to either SKU or product."
          },
          "product_id": {
            "type": "string",
            "description": "A unique product ID assigned by Voucherify."
          },
          "sku_id": {
            "type": "string",
            "description": "A unique SKU ID assigned by Voucherify."
          },
          "quantity": {
            "type": "integer",
            "description": "The quantity of the particular item in the cart."
          },
          "discount_quantity": {
            "type": "integer",
            "description": "Number of dicounted items."
          },
          "amount": {
            "type": "integer",
            "description": "The total amount of the order item (price * quantity)."
          },
          "discount_amount": {
            "type": "integer",
            "description": "The sum of all order-item-level discounts applied to the order."
          },
          "applied_discount_amount": {
            "type": "integer",
            "description": "The order-level discount applied."
          },
          "price": {
            "type": "integer",
            "description": "Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000."
          },
          "subtotal_amount": {
            "type": "integer",
            "description": "Final order amount after the applied discount."
          }
        }
      },
      "LoyaltyCardTransactionsType": {
        "title": "Loyalty Card Transaction Type",
        "type": "string",
        "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"
        ]
      },
      "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": {
                "nullable": true,
                "type": "string",
                "description": "User-defined order identifier."
              }
            },
            "required": [
              "id",
              "source_id"
            ]
          }
        },
        "required": [
          "event",
          "earning_rule",
          "order"
        ]
      },
      "SimpleCustomEvent": {
        "title": "Simple Custom Event",
        "type": "object",
        "description": "Simplified custom event data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the custom event."
          },
          "name": {
            "type": "string",
            "description": "Name of the custom event."
          }
        }
      },
      "CustomerSummaryRedemptions": {
        "title": "Customer Summary Redemptions",
        "type": "object",
        "properties": {
          "total_redeemed": {
            "type": "integer",
            "description": "Total number of the redemptions made by the customer."
          },
          "total_failed": {
            "type": "integer",
            "description": "Total number of the redemptions that failed."
          },
          "total_succeeded": {
            "type": "integer",
            "description": "Total number of the redemptions that succeeded."
          },
          "total_rolled_back": {
            "type": "integer",
            "description": "Total number of the redemptions that were rolled back for the customer."
          },
          "total_rollback_failed": {
            "type": "integer",
            "description": "Total number of the redemption rollbacks that failed."
          },
          "total_rollback_succeeded": {
            "type": "integer",
            "description": "Total number of the 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 the customer. The value is multiplied by 100 to precisely represent 2 decimal places. For example `1000 cents` for `$10.00`.",
                "default": 0
              },
              "amount_to_go": {
                "type": "integer",
                "description": "Remaining gift card balance across all gift cards. The value is multiplied by 100 to precisely represent 2 decimal places. For example `1000 cents` for `$10.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 the loyalty points redeemed by the customer."
              },
              "points_to_go": {
                "type": "integer",
                "description": "Sum of the 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",
        "type": "object",
        "properties": {
          "total_amount": {
            "type": "integer",
            "description": "The total amount spent by the customer. The value is multiplied by 100 to precisely represent 2 decimal places. For example `1000 cents` for `$10.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 precisely represent 2 decimal places. For example `1000 cents` for `$10.00`."
          },
          "last_order_amount": {
            "type": "integer",
            "description": "Amount spent on last order. The value is multiplied by 100 to precisely represent 2 decimal places. For example `1000 cents` for `$10.00`."
          },
          "last_order_date": {
            "type": "string",
            "format": "date-time",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time of the customer's last order in the ISO 8601 format."
          }
        },
        "required": [
          "total_amount",
          "total_count",
          "average_amount",
          "last_order_amount"
        ]
      },
      "SimplePromotionTierCampaign": {
        "title": "Simple Promotion Tier Campaign",
        "type": "object",
        "description": "Simplified promotion tier campaign data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the campaign."
          }
        }
      },
      "DiscountAmount": {
        "type": "object",
        "title": "Amount",
        "properties": {
          "type": {
            "type": "string",
            "default": "AMOUNT",
            "enum": [
              "AMOUNT"
            ],
            "description": "Defines the type of the voucher."
          },
          "amount_off": {
            "type": "number",
            "description": "Amount taken off the subtotal of a price. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000."
          },
          "amount_off_formula": {
            "type": "string"
          },
          "aggregated_amount_limit": {
            "type": "integer",
            "description": "Maximum discount amount per order."
          },
          "effect": {
            "description": "Defines how the discount is applied to the customer's order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DiscountAmountVouchersEffectTypes"
              }
            ]
          },
          "is_dynamic": {
            "type": "boolean",
            "description": "Flag indicating whether the discount was calculated using a formula."
          }
        },
        "required": [
          "type",
          "amount_off"
        ]
      },
      "DiscountUnit": {
        "type": "object",
        "title": "Unit",
        "properties": {
          "type": {
            "type": "string",
            "default": "UNIT",
            "enum": [
              "UNIT"
            ],
            "description": "Discount type."
          },
          "unit_off": {
            "type": "integer",
            "description": "Number of units granted a full value discount."
          },
          "unit_off_formula": {
            "type": "string"
          },
          "effect": {
            "description": "Defines how the unit is added to the customer's order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DiscountUnitVouchersEffectTypes"
              }
            ]
          },
          "unit_type": {
            "type": "string",
            "description": "The product deemed as free, chosen from product inventory (e.g. time, items)."
          },
          "product": {
            "description": "Contains information about the product.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleProductDiscountUnit"
              }
            ]
          },
          "sku": {
            "$ref": "#/components/schemas/SimpleSkuDiscountUnit"
          },
          "is_dynamic": {
            "type": "boolean",
            "description": "Flag indicating whether the discount was calculated using a formula."
          }
        },
        "required": [
          "type",
          "unit_type"
        ]
      },
      "DiscountUnitMultiple": {
        "type": "object",
        "title": "Unit Multiple",
        "properties": {
          "type": {
            "type": "string",
            "default": "UNIT",
            "enum": [
              "UNIT"
            ],
            "description": "Discount type."
          },
          "effect": {
            "type": "string",
            "default": "ADD_MANY_ITEMS",
            "enum": [
              "ADD_MANY_ITEMS"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          },
          "units": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiscountUnitMultipleOneUnit"
            }
          }
        },
        "required": [
          "type",
          "units"
        ]
      },
      "DiscountPercent": {
        "type": "object",
        "title": "Percent",
        "properties": {
          "type": {
            "type": "string",
            "default": "PERCENT",
            "enum": [
              "PERCENT"
            ],
            "description": "Defines the type of the voucher."
          },
          "percent_off": {
            "type": "number",
            "description": "The percent discount that the customer will receive."
          },
          "percent_off_formula": {
            "type": "string"
          },
          "amount_limit": {
            "type": "number",
            "description": "Upper limit allowed to be applied as a discount. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600."
          },
          "aggregated_amount_limit": {
            "type": "integer",
            "description": "Maximum discount amount per order."
          },
          "effect": {
            "description": "Defines how the discount is applied to the customer's order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DiscountPercentVouchersEffectTypes"
              }
            ]
          },
          "is_dynamic": {
            "type": "boolean",
            "description": "Flag indicating whether the discount was calculated using a formula."
          }
        },
        "required": [
          "type",
          "percent_off"
        ]
      },
      "DiscountFixed": {
        "title": "Fixed",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "FIXED",
            "enum": [
              "FIXED"
            ],
            "description": "Defines the type of the voucher."
          },
          "fixed_amount": {
            "type": "number",
            "description": "Sets a fixed value for an order total or the item price. The value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000. If the fixed amount is calculated by the formula, i.e. the `fixed_amount_formula` parameter is present in the fixed amount definition, this value becomes the **fallback value**. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value."
          },
          "fixed_amount_formula": {
            "type": "string"
          },
          "effect": {
            "description": "Defines how the discount is applied to the customer's order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DiscountFixedVouchersEffectTypes"
              }
            ]
          },
          "is_dynamic": {
            "type": "boolean",
            "description": "Flag indicating whether the discount was calculated using a formula."
          }
        },
        "required": [
          "type",
          "fixed_amount"
        ]
      },
      "CampaignLoyaltyCard": {
        "title": "Campaign Loyalty Card",
        "type": "object",
        "description": "Schema model for a campaign loyalty card.",
        "properties": {
          "points": {
            "type": "integer",
            "description": "The initial number of points to assign to the loyalty card. This is the current loyalty card score i.e. the number of loyalty points on the card."
          },
          "expiration_rules": {
            "type": "object",
            "description": "Defines the loyalty point expiration rule. This expiration rule applies when there are no `expiration_rules` defined for an earning rule.",
            "properties": {
              "period_type": {
                "type": "string",
                "description": "Type of period. Can be set for `MONTH` or `FIXED_DAY_OF_YEAR`. `MONTH` requires the `period_value` field. `FIXED_DAY_OF_YEAR` requires the `fixed_month` and `fixed_day` fields.",
                "enum": [
                  "FIXED_DAY_OF_YEAR",
                  "MONTH"
                ]
              },
              "period_value": {
                "type": "integer",
                "description": "Value of the period. Required for the `period_type: MONTH`."
              },
              "rounding_type": {
                "type": "string",
                "description": "Type of rounding of the expiration period. Optional  for the `period_type: MONTH`.",
                "enum": [
                  "END_OF_MONTH",
                  "END_OF_QUARTER",
                  "END_OF_HALF_YEAR",
                  "END_OF_YEAR",
                  "PARTICULAR_MONTH"
                ]
              },
              "rounding_value": {
                "type": "integer",
                "description": "Value of rounding of the expiration period. Required for the `rounding_type`."
              },
              "fixed_month": {
                "type": "integer",
                "description": "Determines the month when the points expire; `1` is January, `2` is February, and so on. Required for the `period_type: FIXED_DAY_OF_YEAR`.",
                "minimum": 1,
                "maximum": 12
              },
              "fixed_day": {
                "type": "integer",
                "description": "Determines the day of the month when the points expire. Required for the `period_type: FIXED_DAY_OF_YEAR`.",
                "minimum": 1,
                "maximum": 31
              }
            },
            "required": [
              "period_type"
            ]
          }
        },
        "required": [
          "points"
        ]
      },
      "CodeConfigRequiredLengthCharsetPattern": {
        "title": "Code Config Settings",
        "allOf": [
          {
            "$ref": "#/components/schemas/CodeConfig"
          }
        ],
        "required": [
          "length",
          "prefix",
          "charset",
          "pattern",
          "postfix"
        ]
      },
      "Product": {
        "type": "object",
        "description": "Object representing a product.",
        "title": "Product",
        "allOf": [
          {
            "$ref": "#/components/schemas/ProductWithoutSkus"
          },
          {
            "type": "object",
            "properties": {
              "skus": {
                "$ref": "#/components/schemas/SkusListForProduct"
              }
            }
          }
        ]
      },
      "Sku": {
        "title": "SKU Object",
        "type": "object",
        "description": "Object representing a product SKU.",
        "properties": {
          "id": {
            "type": "string",
            "example": "sku_0b1621b319d248b79f",
            "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
          },
          "source_id": {
            "type": "string",
            "nullable": true,
            "example": "sku_source_id_4",
            "description": "A unique SKU identifier from your inventory system."
          },
          "product_id": {
            "type": "string",
            "example": "prod_0b15f6b9f650c16990",
            "description": "The parent product's unique ID."
          },
          "sku": {
            "type": "string",
            "nullable": true,
            "example": "Large Pink Shirt",
            "description": "Unique user-defined SKU name."
          },
          "price": {
            "type": "integer",
            "nullable": true,
            "description": "Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`."
          },
          "currency": {
            "type": "string",
            "nullable": true,
            "description": "SKU price currency.",
            "example": "USD"
          },
          "attributes": {
            "type": "object",
            "description": "The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family."
          },
          "image_url": {
            "type": "string",
            "nullable": true,
            "description": "The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format."
          },
          "created_at": {
            "type": "string",
            "example": "2022-05-17T10:36:30.187Z",
            "description": "Timestamp representing the date and time when the SKU was created in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "example": "2022-05-17T10:55:09.137Z",
            "description": "Timestamp representing the date and time when the SKU was updated in the ISO 8601 format.",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "default": "sku",
            "description": "The type of the object represented by JSON. This object stores information about the `SKU`.",
            "enum": [
              "sku"
            ]
          }
        },
        "required": [
          "id",
          "source_id",
          "product_id",
          "sku",
          "price",
          "attributes",
          "metadata",
          "image_url",
          "created_at",
          "updated_at",
          "object"
        ]
      },
      "ValidityHours": {
        "title": "Validity Hours",
        "type": "object",
        "description": "Allows to create Happy Hours scenario.",
        "properties": {
          "daily": {
            "type": "array",
            "description": "Defines the reccuring period/s of time when the happy hour promotion will be active.",
            "items": {
              "title": "Daily",
              "type": "object",
              "description": "Defines the reccuring period/s of time when the happy hour promotion will be active.",
              "properties": {
                "start_time": {
                  "type": "string",
                  "format": "time",
                  "description": "Defines the starting hour for the happy hours promotion in HH:mm format. Happy hours are *inactive before* this time.",
                  "example": "12:00"
                },
                "days_of_week": {
                  "type": "array",
                  "description": "Integer array corresponding to the particular days of the week in which the campaign is valid.\n\n- `0`  Sunday  \n- `1`  Monday  \n- `2`  Tuesday  \n- `3`  Wednesday  \n- `4`  Thursday  \n- `5`  Friday  \n- `6`  Saturday"
                },
                "expiration_time": {
                  "type": "string",
                  "format": "time",
                  "description": "Defines the ending hour for the happy hours promotion in HH:mm format. Happy hours are *inactive after* this time.",
                  "example": "14:00"
                }
              }
            }
          }
        }
      },
      "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",
                "description": "URL to a QR code."
              }
            }
          },
          "barcode": {
            "type": "object",
            "description": "Stores barcode representation of encrypted code.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Encrypted voucher code ID."
              },
              "url": {
                "type": "string",
                "description": "URL to a barcode."
              }
            }
          }
        }
      },
      "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"
        ]
      },
      "ValidationRuleAssignmentsList": {
        "type": "object",
        "description": "Validation Rule Assignments List",
        "title": "Validation Rule Assignments List",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about validation rule assignments.",
            "default": "list"
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the JSON property that contains the array of validation rule assignments.",
            "default": "data"
          },
          "data": {
            "type": "array",
            "description": "A dictionary that contains an array of validation rule assignments.",
            "items": {
              "$ref": "#/components/schemas/ValidationRuleAssignment"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of validation rule assignments."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "4_obj_reward_object_parameters_CAMPAIGN_DISCOUNT_COUPONS": {
        "title": "Discount Coupons",
        "type": "object",
        "description": "These are parameters representing a discount coupon, which is a subset of a Campaign reward.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the campaign assigned by Voucherify.",
            "example": "camp_13BbZ0kQsNinhqsX3wUts2UP"
          },
          "type": {
            "type": "string",
            "description": "Campaign type.",
            "default": "DISCOUNT_COUPONS",
            "enum": [
              "DISCOUNT_COUPONS"
            ]
          }
        },
        "required": [
          "id",
          "type"
        ]
      },
      "4_obj_reward_object_parameters_CAMPAIGN_GIFT_VOUCHERS": {
        "title": "Gift Vouchers",
        "type": "object",
        "description": "These are parameters representing a gift voucher, which is a subset of a Campaign reward.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the campaign assigned by Voucherify.",
            "example": "camp_13BbZ0kQsNinhqsX3wUts2UP"
          },
          "balance": {
            "type": "integer",
            "description": "The incremental amout to be added to the current balance on the gift card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000."
          },
          "type": {
            "type": "string",
            "description": "Campaign type.",
            "default": "GIFT_VOUCHERS",
            "enum": [
              "GIFT_VOUCHERS"
            ]
          }
        },
        "required": [
          "id",
          "balance",
          "type"
        ]
      },
      "4_obj_reward_object_parameters_CAMPAIGN_LOYALTY_PROGRAM": {
        "title": "Points on loyalty card",
        "type": "object",
        "description": "These are parameters representing points on a loyalty card, which is a subset of a Campaign reward.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the campaign assigned by Voucherify.",
            "example": "camp_13BbZ0kQsNinhqsX3wUts2UP"
          },
          "balance": {
            "type": "integer",
            "description": "The incremental points to be added to the current balance on the loyalty card."
          },
          "type": {
            "type": "string",
            "description": "Campaign type.",
            "default": "LOYALTY_PROGRAM",
            "enum": [
              "LOYALTY_PROGRAM"
            ]
          }
        },
        "required": [
          "id",
          "balance",
          "type"
        ]
      },
      "MappingPoints": {
        "title": "MappingPoints",
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/MappingMultiply"
          },
          {
            "$ref": "#/components/schemas/MappingFixed"
          }
        ]
      },
      "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 are added to the loyalty card. FIXED adds a fixed number of points."
          }
        }
      },
      "EarningRuleProportional": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrder"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderItems"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalCustomerMetadata"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalCustomEvent"
          }
        ],
        "title": "Calculate points proportionally"
      },
      "EarningRuleProportionalOrderItems": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderItemsQuantity"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderItemsAmount"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderItemsSubtotalAmount"
          }
        ],
        "title": "Order Items"
      },
      "EarningRuleEvent": {
        "title": "Earning Rule Event",
        "type": "string",
        "enum": [
          "order.paid",
          "customer.segment.entered",
          "custom_event",
          "customer.loyalty.tier.upgraded",
          "customer.loyalty.tier.downgraded",
          "customer.loyalty.tier.prolonged",
          "customer.loyalty.tier.joined",
          "customer.loyalty.tier.left"
        ]
      },
      "OrderItemCalculated": {
        "type": "object",
        "title": "Order Item Calculated",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the order line item."
          },
          "sku_id": {
            "type": "string",
            "description": "Unique identifier of the SKU. It is assigned by Voucherify."
          },
          "product_id": {
            "type": "string",
            "description": "Unique identifier of the product. It is assigned by Voucherify."
          },
          "related_object": {
            "type": "string",
            "enum": [
              "product",
              "sku"
            ],
            "description": "Used along with the source_id property, can be set to either sku or product."
          },
          "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."
          },
          "quantity": {
            "type": "integer",
            "description": "The quantity of the particular item in the cart."
          },
          "discount_quantity": {
            "type": "integer",
            "description": "Number of dicounted items."
          },
          "initial_quantity": {
            "type": "integer",
            "description": "A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity."
          },
          "amount": {
            "type": "integer",
            "description": "The 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": "This field shows the order-level discount applied."
          },
          "applied_discount_quantity": {
            "type": "integer",
            "description": "Number of the discounted items applied in the transaction."
          },
          "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."
          },
          "initial_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."
          },
          "price": {
            "type": "integer",
            "description": "Unit price of an item. Value is multiplied by 100 to precisely 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`-`applied_discount_amount`"
          },
          "object": {
            "type": "string",
            "default": "order_item",
            "enum": [
              "order_item"
            ],
            "description": "The type of the object represented by JSON."
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas."
          }
        },
        "required": [
          "object"
        ]
      },
      "OrderRedemptions": {
        "title": "Order Redemptions",
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "Timestamp representing the date and time when the redemption was created in ISO 8601 format.",
            "example": "2024-01-01T11:11:11.111Z",
            "format": "date-time"
          },
          "rollback_id": {
            "type": "string",
            "description": "Unique identifier of the redemption rollback.",
            "example": "rr_0c63c84eb78ee0a6c0"
          },
          "rollback_date": {
            "type": "string",
            "description": "Timestamp representing the date and tiem when the redemption rollback was created in the ISO 8601 format.",
            "example": "2024-01-01T11:11:11.111Z",
            "format": "date-time"
          },
          "related_object_type": {
            "type": "string",
            "description": "The source of the incentive.",
            "default": "redemption"
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique identifier of the parent redemption.",
            "example": "r_0ba186c4824e4881e1"
          },
          "related_object_parent_id": {
            "type": "string",
            "description": "Represent's the campaign ID of the voucher if the redemption was based on a voucher that was part of bulk codes generated within a campaign. In case of a promotion tier, this represents the campaign ID of the promotion tier's parent campaign."
          },
          "stacked": {
            "type": "array",
            "description": "Contains a list of unique IDs of child redemptions, which belong to the stacked incentives.",
            "items": {
              "type": "string"
            }
          },
          "rollback_stacked": {
            "type": "array",
            "description": "Lists the rollback redemption IDs of the particular child redemptions.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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"
              }
            }
          }
        }
      },
      "DiscountAmountVouchersEffectTypes": {
        "title": "Discount Amount Vouchers Effect Types",
        "enum": [
          "APPLY_TO_ORDER",
          "APPLY_TO_ITEMS",
          "APPLY_TO_ITEMS_PROPORTIONALLY",
          "APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY",
          "APPLY_TO_ITEMS_BY_QUANTITY"
        ],
        "type": "string"
      },
      "DiscountUnitVouchersEffectTypes": {
        "title": "Discount Unit Vouchers Effect Types",
        "enum": [
          "ADD_MISSING_ITEMS",
          "ADD_NEW_ITEMS",
          "ADD_MANY_ITEMS"
        ],
        "type": "string"
      },
      "SimpleProductDiscountUnit": {
        "type": "object",
        "title": "Simple Product Discount Unit",
        "description": "Simplified product discount unit data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique product ID, assigned by Voucherify."
          },
          "source_id": {
            "type": "string",
            "description": "Product's source ID."
          },
          "name": {
            "type": "string",
            "description": "Product name."
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "SimpleSkuDiscountUnit": {
        "type": "object",
        "title": "Simple SKU Discount Unit",
        "description": "Simplified SKU discount unit data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique SKU ID, assigned by Voucherify."
          },
          "source_id": {
            "type": "string",
            "description": "Product variant's source ID."
          },
          "name": {
            "type": "string",
            "description": "SKU name."
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "DiscountUnitMultipleOneUnit": {
        "type": "object",
        "title": "One Unit",
        "properties": {
          "unit_off": {
            "type": "number",
            "description": "Number of units granted a full value discount."
          },
          "unit_off_formula": {
            "type": "string"
          },
          "effect": {
            "type": "string",
            "enum": [
              "ADD_NEW_ITEMS",
              "ADD_MISSING_ITEMS"
            ],
            "description": "Defines how the unit is added to the customer's order."
          },
          "unit_type": {
            "type": "string",
            "description": "The product deemed as free, chosen from product inventory (e.g. time, items)."
          },
          "product": {
            "description": "Contains information about the product.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleProductDiscountUnit"
              }
            ]
          },
          "sku": {
            "description": "Contains information about the sku.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleSkuDiscountUnit"
              }
            ]
          }
        },
        "required": [
          "effect",
          "unit_type"
        ]
      },
      "DiscountPercentVouchersEffectTypes": {
        "title": "Discount Percent Vouchers Effect Types",
        "enum": [
          "APPLY_TO_ORDER",
          "APPLY_TO_ITEMS"
        ],
        "type": "string"
      },
      "DiscountFixedVouchersEffectTypes": {
        "title": "Discount Fixed Vouchers Effect Types",
        "enum": [
          "APPLY_TO_ORDER",
          "APPLY_TO_ITEMS"
        ],
        "type": "string"
      },
      "CodeConfig": {
        "title": "Code Config",
        "type": "object",
        "description": "Schema containing information about config used for voucher. Defines the code pattern (prefix, suffix, length, charset, etc).",
        "properties": {
          "length": {
            "type": "number",
            "description": "Number of characters in a generated code (excluding prefix and postfix)."
          },
          "charset": {
            "type": "string",
            "description": "Characters that can appear in the code."
          },
          "prefix": {
            "type": "string",
            "description": "A text appended before the code."
          },
          "postfix": {
            "type": "string",
            "description": "A text appended after the code."
          },
          "pattern": {
            "type": "string",
            "description": "A pattern for codes where hashes (#) will be replaced with random characters. Overrides `length`."
          },
          "initial_count": {
            "type": "integer",
            "description": "The initial count."
          }
        }
      },
      "ProductWithoutSkus": {
        "title": "Product without Skus Object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique product ID assigned by Voucherify.",
            "example": "prod_0b1da8105693710357"
          },
          "source_id": {
            "type": "string",
            "nullable": true,
            "example": "productSourceID16",
            "description": "Unique product source ID."
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Unique user-defined product name.",
            "example": "T-shirt"
          },
          "price": {
            "type": "integer",
            "nullable": true,
            "description": "Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`."
          },
          "attributes": {
            "type": "array",
            "description": "A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute.",
            "items": {
              "type": "string"
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format."
          },
          "image_url": {
            "type": "string",
            "nullable": true,
            "description": "The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image.",
            "example": "https://images.com/original.jpg"
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the product was created in the ISO 8601 format.",
            "example": "2022-05-23T06:52:55.008Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "Timestamp representing the date and time when the product was updated in the ISO 8601 format.",
            "example": "2022-05-23T09:24:07.405Z",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about the product.",
            "default": "product",
            "enum": [
              "product"
            ]
          }
        },
        "required": [
          "id",
          "source_id",
          "name",
          "attributes",
          "metadata",
          "object",
          "price"
        ]
      },
      "SkusListForProduct": {
        "type": "object",
        "description": "Contains information about child SKUs.",
        "title": "Skus List For Product",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about SKUs.",
            "default": "list"
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the JSON property that contains the array of SKUs.",
            "default": "data"
          },
          "data": {
            "type": "array",
            "description": "A dictionary that contains an array of SKUs.",
            "items": {
              "$ref": "#/components/schemas/Sku"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of SKUs in the product."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "BusValRuleAssignment": {
        "title": "Business Validation Rule Assignment",
        "description": "Assignments of a business validation rule",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier for an assignment."
          },
          "rule_id": {
            "type": "string",
            "description": "The unique identifier for a rule."
          },
          "related_object_id": {
            "type": "string",
            "description": "The unique identifier for a related object."
          },
          "related_object_type": {
            "type": "string",
            "description": "The type of a related object.",
            "enum": [
              "campaign",
              "voucher",
              "earning_rule"
            ]
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the object was created in the ISO 8601 format.",
            "example": "2024-01-01T11:11:11.111Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the object was last updated in the ISO 8601 format.",
            "example": "2024-01-01T11:11:11.111Z",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "validation_rules_assignment",
            "enum": [
              "validation_rules_assignment"
            ]
          },
          "validation_status": {
            "type": "string",
            "description": "The validation status of the assignment.",
            "enum": [
              "VALID",
              "PARTIALLY_VALID",
              "INVALID"
            ]
          },
          "validation_omitted_rules": {
            "type": "array",
            "description": "The list of omitted rules.",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "rule_id",
          "related_object_id",
          "related_object_type",
          "object",
          "validation_status",
          "validation_omitted_rules"
        ]
      },
      "ValidationRuleAssignment": {
        "title": "Validation Rule Assignment",
        "type": "object",
        "description": "Object representing a validation rule assignment.",
        "properties": {
          "id": {
            "type": "string",
            "example": "asgm_74F7QZoYbUoljwQO",
            "description": "Validation rule assignment ID."
          },
          "rule_id": {
            "type": "string",
            "example": "val_4j7DCRm2IS59",
            "description": "Validation rule ID."
          },
          "related_object_id": {
            "type": "string",
            "example": "v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT",
            "description": "The resource ID to which the validation rule was assigned."
          },
          "related_object_type": {
            "type": "string",
            "description": "The type of resource to which the validation rule was assigned.",
            "enum": [
              "voucher",
              "campaign",
              "earning_rule",
              "reward_assignment",
              "promotion_tier",
              "distribution"
            ]
          },
          "created_at": {
            "type": "string",
            "example": "2022-02-17T08:18:15.085Z",
            "description": "Timestamp representing the date and time when the validation rule assignment was created in the ISO 8601 format.",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "default": "validation_rules_assignment",
            "description": "The type of the object represented by the ID.",
            "enum": [
              "validation_rules_assignment"
            ]
          }
        },
        "required": [
          "id",
          "rule_id",
          "related_object_id",
          "related_object_type",
          "created_at",
          "object"
        ]
      },
      "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."
          }
        }
      },
      "EarningRuleProportionalOrder": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderAmount"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderTotalAmount"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderMetadata"
          }
        ],
        "title": "Order"
      },
      "EarningRuleProportionalCustomerMetadata": {
        "title": "Customer Metadata",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ],
            "description": "Defines how the points are 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.",
                "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."
                  },
                  "property": {
                    "type": "string",
                    "description": "Customer metadata property."
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "customer"
        ]
      },
      "EarningRuleProportionalCustomEvent": {
        "title": "Earning Rule Proportional Custom Event",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ],
            "description": "Defines how the points are 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.",
                "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."
                  },
                  "property": {
                    "type": "string",
                    "description": "Custom event metadata property."
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "custom_event"
        ]
      },
      "EarningRuleProportionalOrderItemsQuantity": {
        "title": "Order Items Quantity",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ],
            "description": "Defines how the points are 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 the items defined in 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",
                  "object",
                  "id"
                ],
                "description": "Defines the ratio based on the property defined in the `calculation_type` parameter.",
                "properties": {
                  "every": {
                    "type": "integer",
                    "description": "The 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."
                  },
                  "object": {
                    "type": "string",
                    "description": "Type of object taken under consideration.",
                    "enum": [
                      "products_collection",
                      "product",
                      "sku"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "description": "unique identifier of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6, prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619."
                  }
                }
              }
            }
          }
        },
        "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 are 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.amount.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",
                  "object",
                  "id"
                ],
                "description": "Defines the ratio based on the property defined in the `calculation_type` parameter.",
                "properties": {
                  "every": {
                    "type": "integer",
                    "description": "The 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."
                  },
                  "object": {
                    "type": "string",
                    "description": "Type of object taken under consideration.",
                    "enum": [
                      "products_collection",
                      "product",
                      "sku"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "description": "Unique identifier of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6, prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619."
                  }
                }
              }
            }
          }
        },
        "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 are 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",
                  "object",
                  "id"
                ],
                "description": "Defines the ratio based on the property defined in the `calculation_type` parameter.",
                "properties": {
                  "every": {
                    "type": "integer",
                    "description": "The 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."
                  },
                  "object": {
                    "type": "string",
                    "description": "Type of object taken under consideration.",
                    "enum": [
                      "products_collection",
                      "product",
                      "sku"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "description": "unique identifier of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6, prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619."
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "order_items"
        ]
      },
      "EarningRuleProportionalOrderAmount": {
        "title": "Order Amount",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ],
            "description": "Defines how the points are 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.",
                "properties": {
                  "every": {
                    "type": "integer",
                    "description": "The 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."
                  }
                }
              }
            }
          }
        },
        "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 are 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.",
                "properties": {
                  "every": {
                    "type": "integer",
                    "description": "The 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."
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "order"
        ]
      },
      "EarningRuleProportionalOrderMetadata": {
        "title": "Order Metadata",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ],
            "description": "Defines how the points are 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.",
                "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."
                  },
                  "property": {
                    "type": "string",
                    "description": "Order metadata property."
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "order"
        ]
      }
    }
  },
  "webhooks": {
    "EVENTS.CUSTOMER.CREATED": {
      "post": {
        "operationId": "events-customer-created",
        "summary": "Created",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerCreatedData"
              },
              "examples": {
                "customer.created": {
                  "value": {
                    "customer": {
                      "id": "cust_7LvqCsUB9c8WyFP8JaLXchtF",
                      "name": "Lionel Johnson",
                      "email": "lionel-johnson@lion.io",
                      "object": "customer",
                      "address": {
                        "city": "Nottingham",
                        "state": "England",
                        "line_1": "Hammer Street 123",
                        "country": "United Kingdom",
                        "postal_code": "XX-ZZZ"
                      },
                      "loyalty": {
                        "points": 0,
                        "campaigns": {},
                        "referred_customers": 0
                      },
                      "summary": {
                        "orders": {
                          "total_count": 0,
                          "total_amount": 0,
                          "average_amount": 0,
                          "last_order_amount": 0
                        },
                        "redemptions": {
                          "gift": {
                            "amount_to_go": 0,
                            "redeemed_amount": 0
                          },
                          "loyalty_card": {
                            "points_to_go": 0,
                            "redeemed_points": 0
                          },
                          "total_failed": 0,
                          "total_redeemed": 0,
                          "total_succeeded": 0,
                          "total_rolled_back": 0,
                          "total_rollback_failed": 0,
                          "total_rollback_succeeded": 0
                        }
                      },
                      "birthdate": "1974-01-02",
                      "referrals": {
                        "total": 0,
                        "campaigns": []
                      },
                      "source_id": "lionel-johnson",
                      "created_at": "2024-02-01T10:42:59.594Z",
                      "description": "Famous",
                      "system_metadata": {}
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.UPDATED": {
      "post": {
        "operationId": "events-customer-updated",
        "summary": "Updated",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerUpdatedData"
              },
              "examples": {
                "customer.updated": {
                  "value": {
                    "customer": {
                      "id": "cust_A9f32Khs91",
                      "name": "Ariana Patel",
                      "email": "ariana.patel@example.org",
                      "object": "customer",
                      "address": {
                        "city": "Toronto",
                        "state": "Ontario",
                        "line_1": "125 Maple Leaf Road",
                        "country": "Canada",
                        "postal_code": "M4B 2L1"
                      },
                      "loyalty": {
                        "points": 45,
                        "campaigns": {
                          "holiday_2025": {
                            "redeemed_points": 10,
                            "points_to_go": 40
                          }
                        },
                        "referred_customers": 1
                      },
                      "summary": {
                        "orders": {
                          "total_count": 3,
                          "total_amount": 24900,
                          "average_amount": 8300,
                          "last_order_amount": 9100
                        },
                        "redemptions": {
                          "gift": {
                            "amount_to_go": 0,
                            "redeemed_amount": 0
                          },
                          "loyalty_card": {
                            "points_to_go": 5,
                            "redeemed_points": 40
                          },
                          "total_failed": 0,
                          "total_redeemed": 1,
                          "total_succeeded": 1,
                          "total_rolled_back": 0,
                          "total_rollback_failed": 0,
                          "total_rollback_succeeded": 0
                        }
                      },
                      "birthdate": "1990-07-14",
                      "referrals": {
                        "total": 1,
                        "campaigns": [
                          "summer_savings_2024"
                        ]
                      },
                      "source_id": "ariana-patel",
                      "created_at": "2024-09-21T13:12:44.000Z",
                      "updated_at": "2025-01-28T16:48:09.000Z",
                      "description": "Subscribed newsletter user",
                      "system_metadata": {}
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.DELETED": {
      "post": {
        "operationId": "events-customer-deleted",
        "summary": "Deleted",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerDeletedData"
              },
              "examples": {
                "customer.deleted": {
                  "value": {
                    "customer": {
                      "id": "cust_7LvqCsUB9c8WyFP8JaLXchtF",
                      "name": "Lionel Johnson",
                      "email": "lionel-johnson@lion.io",
                      "object": "customer",
                      "address": {
                        "city": "Nottingham",
                        "state": "England",
                        "line_1": "Hammer Street 123",
                        "country": "United Kingdom",
                        "postal_code": "XX-ZZZ"
                      },
                      "loyalty": {
                        "points": 301,
                        "campaigns": {
                          "Loyalty programme": {
                            "points": 301,
                            "loyalty_tier": "ltr_0e30613ad01f044516",
                            "referred_customers": 0
                          }
                        },
                        "referred_customers": 0
                      },
                      "summary": {
                        "orders": {
                          "total_count": 1,
                          "total_amount": 2500,
                          "average_amount": 2500,
                          "last_order_date": "2024-02-01T10:42:59.676Z",
                          "last_order_amount": 2500
                        },
                        "redemptions": {
                          "gift": {
                            "amount_to_go": 0,
                            "redeemed_amount": 0
                          },
                          "loyalty_card": {
                            "points_to_go": 301,
                            "redeemed_points": 0
                          },
                          "total_failed": 0,
                          "total_redeemed": 1,
                          "total_succeeded": 1,
                          "total_rolled_back": 0,
                          "total_rollback_failed": 0,
                          "total_rollback_succeeded": 0
                        }
                      },
                      "birthdate": "1974-01-02",
                      "referrals": {
                        "total": 0,
                        "campaigns": []
                      },
                      "source_id": "lionel-johnson_deleted2024-02-01T11:16:40.918Z",
                      "created_at": "2024-02-01T10:42:59.594Z",
                      "updated_at": "2024-02-01T11:16:40.934Z",
                      "description": "Famous",
                      "system_metadata": {}
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.REDEMPTION.SUCCEEDED": {
      "post": {
        "operationId": "events-customer-redemption-succeeded",
        "summary": "Redemption succeeded",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerRedemptionSucceededData"
              },
              "examples": {
                "customer.redemption.succeeded": {
                  "value": {
                    "customer": {
                      "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "name": "Jack Webhook",
                      "email": null,
                      "source_id": "jck-wbhk",
                      "metadata": {
                        "region": "EMEA",
                        "sign-up": "true"
                      },
                      "object": "customer"
                    },
                    "order": {
                      "id": "ord_p6B1A0y805yUQQaCw4bC6Fbk",
                      "source_id": null,
                      "status": "PAID",
                      "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "referrer_id": null,
                      "amount": 11499,
                      "discount_amount": 1150,
                      "applied_discount_amount": 1150,
                      "total_discount_amount": 1150,
                      "total_applied_discount_amount": 1150,
                      "total_amount": 10349,
                      "items": [
                        {
                          "object": "order_item",
                          "product_id": "prod_0df14b684f58f282d4",
                          "quantity": 1,
                          "amount": 3500,
                          "price": 3500,
                          "subtotal_amount": 3500
                        },
                        {
                          "object": "order_item",
                          "product_id": "prod_0de0c540ad917bb410",
                          "quantity": 1,
                          "amount": 7999,
                          "price": 7999,
                          "subtotal_amount": 7999
                        }
                      ],
                      "metadata": {},
                      "created_at": "2024-03-13T17:35:58.482Z",
                      "object": "order"
                    },
                    "campaign": {
                      "id": "camp_iRMdcq07g9W4dOSRXuTovupi",
                      "name": "Spring Discounts",
                      "campaign_type": "DISCOUNT_COUPONS",
                      "type": "AUTO_UPDATE",
                      "is_referral_code": false,
                      "voucher": {
                        "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": ""
                        }
                      },
                      "auto_join": false,
                      "join_once": false,
                      "active": true,
                      "category_id": "cat_0e156dab8f2e43873a",
                      "category": null,
                      "metadata": {},
                      "start_date": null,
                      "expiration_date": null,
                      "description": "Spring 2024 big campaign",
                      "created_at": "2024-02-21T10:01:24.102Z",
                      "updated_at": "2024-03-13T17:35:51.314Z",
                      "object": "campaign"
                    },
                    "voucher": {
                      "id": "v_eaxx9mNFwWZWZGBwkZf3JpN7yJZlU9Y7",
                      "code": "SPRING-2024-hOg",
                      "discount": {
                        "type": "PERCENT",
                        "amount_limit": 3000,
                        "percent_off": 10,
                        "effect": "APPLY_TO_ORDER",
                        "percent_off_formula": "IF(ORDER_AMOUNT > 150;15;10)"
                      },
                      "type": "DISCOUNT_VOUCHER",
                      "campaign": "Spring Discounts",
                      "campaign_id": "camp_iRMdcq07g9W4dOSRXuTovupi",
                      "is_referral_code": false,
                      "holder_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "category_id": "cat_0e156dab8f2e43873a",
                      "active": true,
                      "created_at": "2024-03-12T14:41:53.591Z",
                      "updated_at": "2024-03-13T17:35:58.530Z",
                      "redemption": {
                        "quantity": 1,
                        "redeemed_quantity": 1
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "metadata": {},
                      "object": "voucher"
                    },
                    "holder": {
                      "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "name": "Jack Webhook",
                      "email": null,
                      "source_id": "jck-wbhk",
                      "metadata": {
                        "region": "EMEA",
                        "sign-up": "true"
                      },
                      "object": "customer"
                    },
                    "promotion_tier": null,
                    "promotion_stack": null,
                    "redemption": {
                      "id": "r_0e6ff48b91cfa02e97",
                      "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "tracking_id": "track_8RFQINPxgc+pykybVOUEXQ==",
                      "date": "2024-03-13T17:35:58.535Z",
                      "order": {
                        "id": "ord_p6B1A0y805yUQQaCw4bC6Fbk",
                        "source_id": null,
                        "status": "PAID",
                        "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "referrer_id": null,
                        "amount": 11499,
                        "discount_amount": 1150,
                        "applied_discount_amount": 1150,
                        "total_discount_amount": 1150,
                        "total_applied_discount_amount": 1150,
                        "total_amount": 10349,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0df14b684f58f282d4",
                            "quantity": 1,
                            "amount": 3500,
                            "price": 3500,
                            "subtotal_amount": 3500
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0de0c540ad917bb410",
                            "quantity": 1,
                            "amount": 7999,
                            "price": 7999,
                            "subtotal_amount": 7999
                          }
                        ],
                        "metadata": {},
                        "created_at": "2024-03-13T17:35:58.482Z",
                        "object": "order"
                      },
                      "customer": {
                        "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "name": "Jack Webhook",
                        "email": null,
                        "source_id": "jck-wbhk",
                        "metadata": {
                          "region": "EMEA",
                          "sign-up": "true"
                        },
                        "object": "customer"
                      },
                      "result": "SUCCESS",
                      "status": "SUCCEEDED",
                      "voucher": {
                        "id": "v_eaxx9mNFwWZWZGBwkZf3JpN7yJZlU9Y7",
                        "code": "SPRING-2024-hOg",
                        "discount": {
                          "type": "PERCENT",
                          "amount_limit": 3000,
                          "percent_off": 10,
                          "effect": "APPLY_TO_ORDER",
                          "percent_off_formula": "IF(ORDER_AMOUNT > 150;15;10)"
                        },
                        "type": "DISCOUNT_VOUCHER",
                        "campaign": "Spring Discounts",
                        "campaign_id": "camp_iRMdcq07g9W4dOSRXuTovupi",
                        "is_referral_code": false,
                        "holder_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "category_id": "cat_0e156dab8f2e43873a",
                        "active": true,
                        "created_at": "2024-03-12T14:41:53.591Z",
                        "updated_at": "2024-03-13T17:35:58.530Z",
                        "redemption": {
                          "quantity": 1,
                          "redeemed_quantity": 1
                        },
                        "start_date": null,
                        "expiration_date": null,
                        "metadata": {},
                        "object": "voucher"
                      },
                      "metadata": {
                        "location_id": []
                      },
                      "object": "redemption"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.REDEMPTION.ROLLBACK.SUCCEEDED": {
      "post": {
        "operationId": "events-customer-redemption-rollback-succeeded",
        "summary": "Redemption rollback succeeded",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerRedemptionRollbackSucceededData"
              },
              "examples": {
                "customer.redemption.rollback.succeeded": {
                  "value": {
                    "customer": {
                      "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "name": "Jack Webhook",
                      "email": null,
                      "source_id": "jck-wbhk",
                      "metadata": {
                        "region": "EMEA",
                        "sign-up": "true"
                      },
                      "object": "customer"
                    },
                    "order": {
                      "id": "ord_p6B1A0y805yUQQaCw4bC6Fbk",
                      "source_id": null,
                      "status": "CANCELED",
                      "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "referrer_id": null,
                      "amount": 11499,
                      "total_amount": 11499,
                      "items": [
                        {
                          "object": "order_item",
                          "product_id": "prod_0df14b684f58f282d4",
                          "quantity": 1,
                          "amount": 3500,
                          "price": 3500,
                          "subtotal_amount": 3500
                        },
                        {
                          "object": "order_item",
                          "product_id": "prod_0de0c540ad917bb410",
                          "quantity": 1,
                          "amount": 7999,
                          "price": 7999,
                          "subtotal_amount": 7999
                        }
                      ],
                      "metadata": {},
                      "created_at": "2024-03-13T17:35:58.482Z",
                      "updated_at": "2024-03-14T09:11:53.803Z",
                      "object": "order"
                    },
                    "campaign": {
                      "id": "camp_iRMdcq07g9W4dOSRXuTovupi",
                      "name": "Spring Discounts",
                      "campaign_type": "DISCOUNT_COUPONS",
                      "type": "AUTO_UPDATE",
                      "is_referral_code": false,
                      "voucher": {
                        "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": ""
                        }
                      },
                      "auto_join": false,
                      "join_once": false,
                      "active": true,
                      "category_id": "cat_0e156dab8f2e43873a",
                      "category": null,
                      "metadata": {},
                      "start_date": null,
                      "expiration_date": null,
                      "description": "Spring 2024 big campaign",
                      "created_at": "2024-02-21T10:01:24.102Z",
                      "updated_at": "2024-03-13T17:35:51.314Z",
                      "object": "campaign"
                    },
                    "voucher": {
                      "id": "v_eaxx9mNFwWZWZGBwkZf3JpN7yJZlU9Y7",
                      "code": "SPRING-2024-hOg",
                      "discount": {
                        "type": "PERCENT",
                        "amount_limit": 3000,
                        "percent_off": 10,
                        "effect": "APPLY_TO_ORDER",
                        "percent_off_formula": "IF(ORDER_AMOUNT > 150;15;10)"
                      },
                      "type": "DISCOUNT_VOUCHER",
                      "campaign": "Spring Discounts",
                      "campaign_id": "camp_iRMdcq07g9W4dOSRXuTovupi",
                      "is_referral_code": false,
                      "holder_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "category_id": "cat_0e156dab8f2e43873a",
                      "active": true,
                      "created_at": "2024-03-12T14:41:53.591Z",
                      "updated_at": "2024-03-14T09:11:53.756Z",
                      "redemption": {
                        "quantity": 1,
                        "redeemed_quantity": 0
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "metadata": {},
                      "object": "voucher"
                    },
                    "holder": {
                      "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "name": "Jack Webhook",
                      "email": null,
                      "source_id": "jck-wbhk",
                      "metadata": {
                        "region": "EMEA",
                        "sign-up": "true"
                      },
                      "object": "customer"
                    },
                    "promotion_tier": null,
                    "promotion_stack": null,
                    "redemption": {
                      "id": "r_0e6ff48b91cfa02e97",
                      "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "tracking_id": "track_8RFQINPxgc+pykybVOUEXQ==",
                      "date": "2024-03-13T17:35:58.535Z",
                      "order": {
                        "id": "ord_p6B1A0y805yUQQaCw4bC6Fbk",
                        "source_id": null,
                        "status": "PAID",
                        "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "referrer_id": null,
                        "amount": 11499,
                        "discount_amount": 1150,
                        "applied_discount_amount": 1150,
                        "total_discount_amount": 1150,
                        "total_applied_discount_amount": 1150,
                        "total_amount": 10349,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0df14b684f58f282d4",
                            "quantity": 1,
                            "amount": 3500,
                            "price": 3500,
                            "subtotal_amount": 3500
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0de0c540ad917bb410",
                            "quantity": 1,
                            "amount": 7999,
                            "price": 7999,
                            "subtotal_amount": 7999
                          }
                        ],
                        "metadata": {},
                        "created_at": "2024-03-13T17:35:58.482Z",
                        "object": "order"
                      },
                      "customer": {
                        "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "name": "Jack Webhook",
                        "email": null,
                        "source_id": "jck-wbhk",
                        "metadata": {
                          "region": "EMEA",
                          "sign-up": "true"
                        },
                        "object": "customer"
                      },
                      "result": "SUCCESS",
                      "status": "SUCCEEDED",
                      "voucher": {
                        "id": "v_eaxx9mNFwWZWZGBwkZf3JpN7yJZlU9Y7",
                        "code": "SPRING-2024-hOg",
                        "campaign": "Spring Discounts",
                        "campaign_id": "camp_iRMdcq07g9W4dOSRXuTovupi",
                        "active": null,
                        "object": "voucher"
                      },
                      "metadata": {
                        "location_id": []
                      },
                      "object": "redemption"
                    },
                    "redemption_rollback": {
                      "id": "rr_0e70cac29fee95aa7b",
                      "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "tracking_id": "track_8RFQINPxgc+pykybVOUEXQ==",
                      "date": "2024-03-14T09:11:53.787Z",
                      "order": {
                        "id": "ord_p6B1A0y805yUQQaCw4bC6Fbk",
                        "source_id": null,
                        "status": "CANCELED",
                        "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "referrer_id": null,
                        "amount": 11499,
                        "total_amount": 11499,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0df14b684f58f282d4",
                            "quantity": 1,
                            "amount": 3500,
                            "price": 3500,
                            "subtotal_amount": 3500
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0de0c540ad917bb410",
                            "quantity": 1,
                            "amount": 7999,
                            "price": 7999,
                            "subtotal_amount": 7999
                          }
                        ],
                        "metadata": {},
                        "created_at": "2024-03-13T17:35:58.482Z",
                        "updated_at": "2024-03-14T09:11:53.803Z",
                        "object": "order"
                      },
                      "customer": {
                        "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "name": "Jack Webhook",
                        "email": null,
                        "source_id": "jck-wbhk",
                        "metadata": {
                          "region": "EMEA",
                          "sign-up": "true"
                        },
                        "object": "customer"
                      },
                      "result": "SUCCESS",
                      "status": "SUCCEEDED",
                      "voucher": {
                        "id": "v_eaxx9mNFwWZWZGBwkZf3JpN7yJZlU9Y7",
                        "code": "SPRING-2024-hOg",
                        "discount": {
                          "type": "PERCENT",
                          "amount_limit": 3000,
                          "percent_off": 10,
                          "effect": "APPLY_TO_ORDER",
                          "percent_off_formula": "IF(ORDER_AMOUNT > 150;15;10)"
                        },
                        "type": "DISCOUNT_VOUCHER",
                        "campaign": "Spring Discounts",
                        "campaign_id": "camp_iRMdcq07g9W4dOSRXuTovupi",
                        "is_referral_code": false,
                        "holder_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "category_id": "cat_0e156dab8f2e43873a",
                        "active": true,
                        "created_at": "2024-03-12T14:41:53.591Z",
                        "updated_at": "2024-03-14T09:11:53.756Z",
                        "redemption": {
                          "quantity": 1,
                          "redeemed_quantity": 0
                        },
                        "start_date": null,
                        "expiration_date": null,
                        "metadata": {},
                        "object": "voucher"
                      },
                      "redemption": "r_0e6ff48b91cfa02e97",
                      "metadata": null,
                      "reason": "Spring promotion error",
                      "object": "redemption_rollback"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.REWARDED": {
      "post": {
        "operationId": "events-customer-rewarded",
        "summary": "Rewarded",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerRewardedData"
              },
              "examples": {
                "customer.rewarded": {
                  "value": {
                    "customer": {
                      "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "name": "Jack Webhook",
                      "email": null,
                      "source_id": "jck-wbhk",
                      "metadata": {
                        "region": "EMEA"
                      },
                      "object": "customer"
                    },
                    "holder": {
                      "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "name": "Jack Webhook",
                      "email": null,
                      "source_id": "jck-wbhk",
                      "metadata": {
                        "region": "EMEA"
                      },
                      "object": "customer"
                    },
                    "voucher": {
                      "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                      "code": "L0y4L",
                      "loyalty_card": {
                        "points": 900,
                        "balance": 850
                      },
                      "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:27:56.228461Z",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 1,
                        "redeemed_points": 50
                      },
                      "object": "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"
                    },
                    "redemption": {
                      "id": "r_0e2907cc52498573ee",
                      "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "tracking_id": "track_8RFQINPxgc+pykybVOUEXQ==",
                      "date": "2024-01-18T15:27:56.234000Z",
                      "amount": 50,
                      "order": {
                        "id": "ord_8GGVSci7FUPX1UX94qBHQPSE",
                        "source_id": null,
                        "status": "PAID",
                        "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "referrer_id": null,
                        "amount": 2900,
                        "total_amount": 2900,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0df14b684f58f282d4",
                            "quantity": 1,
                            "amount": 2900,
                            "price": 2900,
                            "subtotal_amount": 2900
                          }
                        ],
                        "metadata": {},
                        "created_at": "2024-01-18T15:27:56.175354Z",
                        "object": "order"
                      },
                      "reward": {
                        "customer": {
                          "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                          "name": "Jack Webhook",
                          "email": null,
                          "source_id": "jck-wbhk",
                          "metadata": {
                            "region": "EMEA"
                          },
                          "object": "customer"
                        },
                        "assignment_id": "rewa_XiIei2UpOYkLQxZ4J3U2pYlK",
                        "product": {
                          "id": "prod_0df14b7e7d8975079d",
                          "source_id": "star-th-bottle",
                          "name": "Star Thermal Bottle"
                        },
                        "id": "rew_oOrlSAeYmfh6gYGOH7JMYVzv",
                        "object": "reward",
                        "name": "Material",
                        "created_at": "2024-01-18T15:17:20.072326Z",
                        "updated_at": null,
                        "parameters": {
                          "product": {
                            "id": "prod_0df14b7e7d8975079d",
                            "sku_id": null
                          }
                        },
                        "type": "MATERIAL"
                      },
                      "customer": {
                        "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "name": "Jack Webhook",
                        "email": null,
                        "source_id": "jck-wbhk",
                        "metadata": {
                          "region": "EMEA"
                        },
                        "object": "customer"
                      },
                      "result": "SUCCESS",
                      "status": "SUCCEEDED",
                      "voucher": {
                        "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                        "code": "L0y4L",
                        "loyalty_card": {
                          "points": 900,
                          "balance": 850
                        },
                        "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:27:56.228461Z",
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 1,
                          "redeemed_points": 50
                        },
                        "object": "voucher"
                      },
                      "metadata": {
                        "location_id": []
                      },
                      "object": "redemption"
                    },
                    "reward": {
                      "assignment_id": "rewa_XiIei2UpOYkLQxZ4J3U2pYlK",
                      "product": {
                        "id": "prod_0df14b7e7d8975079d",
                        "source_id": "star-th-bottle",
                        "name": "Star Thermal Bottle"
                      },
                      "id": "rew_oOrlSAeYmfh6gYGOH7JMYVzv",
                      "object": "reward",
                      "name": "Material",
                      "type": "CAMPAIGN"
                    },
                    "referral_tier": null,
                    "balance": null,
                    "custom_event": null,
                    "customer_event": null
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.REWARDED.LOYALTY_POINTS": {
      "post": {
        "operationId": "events-customer-rewarded-loyalty_points",
        "summary": "Rewarded loyalty_points",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerRewardedLoyaltyPointsData"
              },
              "examples": {
                "customer.rewarded.loyalty_points": {
                  "value": {
                    "customer": {
                      "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "name": "Jack Webhook",
                      "email": null,
                      "source_id": "jck-wbhk",
                      "metadata": {
                        "region": "EMEA"
                      },
                      "object": "customer"
                    },
                    "holder": {
                      "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "name": "Jack Webhook",
                      "email": null,
                      "source_id": "jck-wbhk",
                      "metadata": {
                        "region": "EMEA"
                      },
                      "object": "customer"
                    },
                    "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"
                    },
                    "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"
                    },
                    "loyalty_tier": null,
                    "earning_rule": {
                      "id": "ern_FQxftbKUq9E93k00Z3qkC0sX",
                      "created_at": "2024-01-18T15:18:39.156632Z",
                      "updated_at": null,
                      "validation_rule_id": null,
                      "loyalty": {
                        "type": "PROPORTIONAL",
                        "calculation_type": "ORDER_TOTAL_AMOUNT",
                        "order": {
                          "total_amount": {
                            "every": 500,
                            "points": 10
                          }
                        }
                      },
                      "event": "order.paid",
                      "source": {
                        "banner": "Order-paid",
                        "object_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                        "object_type": "campaign"
                      },
                      "active": true,
                      "object": "earning_rule",
                      "automation_id": "auto_sRc6onPl70seyfrGOXhwDxYE",
                      "metadata": {}
                    },
                    "balance": {
                      "type": "loyalty_card",
                      "total": 900,
                      "object": "balance",
                      "points": 900,
                      "balance": 900,
                      "operation_type": "AUTOMATIC",
                      "related_object": {
                        "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                        "type": "voucher"
                      }
                    },
                    "order": {
                      "id": "ord_CkH2s0T5xJkK0x5pGYXoBaFn",
                      "source_id": null,
                      "created_at": "2024-01-18T15:19:20.675043Z",
                      "updated_at": "2024-01-18T15:19:20.731920Z",
                      "status": "PAID",
                      "amount": 50000,
                      "discount_amount": 5000,
                      "total_discount_amount": 5000,
                      "total_amount": 45000,
                      "items": [
                        {
                          "object": "order_item",
                          "product_id": "prod_0df14b7e7d8975079d",
                          "quantity": 20,
                          "amount": 50000,
                          "price": 2500,
                          "subtotal_amount": 50000,
                          "product": {
                            "id": "prod_0df14b7e7d8975079d",
                            "source_id": "star-th-bottle",
                            "name": "Star Thermal Bottle",
                            "price": 2500
                          }
                        },
                        {
                          "object": "order_item",
                          "product_id": "prod_5h1pp1ng",
                          "quantity": 1,
                          "amount": 0,
                          "price": 0,
                          "subtotal_amount": 0,
                          "product": {
                            "id": "prod_5h1pp1ng",
                            "source_id": "5h1pp1ng",
                            "name": "Shipping"
                          }
                        }
                      ],
                      "metadata": {
                        "card": [
                          "Other"
                        ],
                        "region": "US",
                        "currency": "USD"
                      },
                      "customer": {
                        "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "address": null,
                        "summary": null,
                        "loyalty": null,
                        "referrals": null,
                        "object": "customer"
                      },
                      "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "referrer_id": null,
                      "object": "order",
                      "redemptions": {
                        "r_0e2905d4e6985a04b5": {
                          "date": "2024-01-18T15:19:20.731Z",
                          "related_object_type": "promotion_tier",
                          "related_object_id": "promo_aKUQomRfnj47MHoOV8XcNmO1",
                          "related_object_parent_id": "camp_7xzcWMVIefoujUIpuwwrHxIU"
                        }
                      }
                    },
                    "event": {
                      "id": "evcus_0e2905d4db185a04ad",
                      "type": "customer.order.paid",
                      "category": "EFFECT",
                      "entity_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "created_at": "2024-01-18T15:19:20.676Z",
                      "group_id": "v-0e2905d4bb0dcc9e62"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.REWARD_REDEMPTIONS.CREATED": {
      "post": {
        "operationId": "events-customer-reward_redemptions-created",
        "summary": "Reward_redemptions created",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerRewardRedemptionsBase"
              },
              "examples": {
                "customer.reward_redemptions.created": {
                  "value": {
                    "holder": {
                      "id": "cust_2myfc5acSBgoMV72R5tyTBc8",
                      "name": "John Demo",
                      "email": null,
                      "object": "customer",
                      "source_id": "130524-01"
                    },
                    "reward": {
                      "id": "rew_6cXu5JUKsjDo1T1LmFLF3eML",
                      "name": "reward",
                      "type": "CAMPAIGN",
                      "object": "reward",
                      "product": {
                        "id": "prod_0d460f397b92a82905",
                        "name": "laptop",
                        "source_id": "laptop_123"
                      },
                      "assignment_id": "rewa_W4BkaZz7mOwwzlIMfBVQJo0j"
                    },
                    "source": {
                      "id": "r_0ebe386a24c311bff7",
                      "type": "redemption"
                    },
                    "balance": null,
                    "voucher": {
                      "id": "v_p7NP2qmQaMXsNHzb9ujPVjqgDJzJ2ccQ",
                      "code": "H0h9royZ",
                      "type": "LOYALTY_CARD",
                      "active": true,
                      "object": "voucher",
                      "campaign": "loyalty_1305",
                      "metadata": {},
                      "holder_id": "cust_2myfc5acSBgoMV72R5tyTBc8",
                      "created_at": "2024-05-13T10:24:01.084Z",
                      "redemption": {
                        "quantity": null,
                        "redeemed_points": 300,
                        "redeemed_quantity": 3
                      },
                      "start_date": null,
                      "updated_at": "2024-05-13T12:34:01.487Z",
                      "campaign_id": "camp_wce3U0BUekz2YGVl1F43Tvd4",
                      "category_id": null,
                      "loyalty_card": {
                        "points": 370,
                        "balance": 70
                      },
                      "expiration_date": null,
                      "is_referral_code": false
                    },
                    "campaign": {
                      "id": "camp_wce3U0BUekz2YGVl1F43Tvd4",
                      "name": "loyalty_1305",
                      "type": "AUTO_UPDATE",
                      "active": true,
                      "object": "campaign",
                      "voucher": {
                        "gift": null,
                        "type": "LOYALTY_CARD",
                        "discount": null,
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "code_config": {
                          "length": 8,
                          "prefix": "",
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "pattern": "########",
                          "postfix": ""
                        },
                        "loyalty_card": {
                          "points": 0
                        }
                      },
                      "category": null,
                      "metadata": {},
                      "auto_join": false,
                      "join_once": true,
                      "created_at": "2024-05-13T10:23:57.997Z",
                      "start_date": null,
                      "category_id": null,
                      "description": null,
                      "campaign_type": "LOYALTY_PROGRAM",
                      "expiration_date": null,
                      "is_referral_code": false
                    },
                    "customer": {
                      "id": "cust_2myfc5acSBgoMV72R5tyTBc8",
                      "name": "John Demo",
                      "email": null,
                      "object": "customer",
                      "source_id": "130524-01"
                    },
                    "reward_assignment": {
                      "id": "rewa_W4BkaZz7mOwwzlIMfBVQJo0j",
                      "object": "reward_assignment",
                      "reward_id": "rew_6cXu5JUKsjDo1T1LmFLF3eML",
                      "created_at": "2024-05-13T12:33:21.652Z",
                      "parameters": {
                        "loyalty": {
                          "points": 100
                        }
                      },
                      "updated_at": null,
                      "related_object_id": "camp_wce3U0BUekz2YGVl1F43Tvd4",
                      "related_object_type": "campaign"
                    },
                    "reward_redemption": {
                      "id": "rewr_23IX6dCFJe03AX4M56KcI95D",
                      "state": "PENDING",
                      "source_id": "r_0ebe386a24c311bff7",
                      "created_at": "2024-05-13T12:34:10.464Z",
                      "updated_at": null,
                      "voucher_id": "v_p7NP2qmQaMXsNHzb9ujPVjqgDJzJ2ccQ",
                      "campaign_id": "camp_wce3U0BUekz2YGVl1F43Tvd4",
                      "customer_id": "cust_2myfc5acSBgoMV72R5tyTBc8",
                      "source_type": "redemption",
                      "reward_assignment_id": "rewa_W4BkaZz7mOwwzlIMfBVQJo0j"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.REWARD_REDEMPTIONS.PENDING": {
      "post": {
        "operationId": "events-customer-reward_redemptions-pending",
        "summary": "Reward_redemptions pending",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerRewardRedemptionsBase"
              },
              "examples": {
                "customer.reward_redemptions.pending": {
                  "value": {
                    "holder": {
                      "id": "cust_2myfc5acSBgoMV72R5tyTBc8",
                      "name": "John Demo",
                      "email": null,
                      "object": "customer",
                      "source_id": "130524-01"
                    },
                    "reward": {
                      "id": "rew_6cXu5JUKsjDo1T1LmFLF3eML",
                      "name": "reward",
                      "type": "CAMPAIGN",
                      "object": "reward",
                      "product": {
                        "id": "prod_0d460f397b92a82905",
                        "name": "laptop",
                        "source_id": "laptop_123"
                      },
                      "assignment_id": "rewa_W4BkaZz7mOwwzlIMfBVQJo0j"
                    },
                    "source": {
                      "id": "r_0ebe386a24c311bff7",
                      "type": "redemption"
                    },
                    "balance": null,
                    "voucher": {
                      "id": "v_p7NP2qmQaMXsNHzb9ujPVjqgDJzJ2ccQ",
                      "code": "H0h9royZ",
                      "type": "LOYALTY_CARD",
                      "active": true,
                      "object": "voucher",
                      "campaign": "loyalty_1305",
                      "metadata": {},
                      "holder_id": "cust_2myfc5acSBgoMV72R5tyTBc8",
                      "created_at": "2024-05-13T10:24:01.084Z",
                      "redemption": {
                        "quantity": null,
                        "redeemed_points": 300,
                        "redeemed_quantity": 3
                      },
                      "start_date": null,
                      "updated_at": "2024-05-13T12:34:01.487Z",
                      "campaign_id": "camp_wce3U0BUekz2YGVl1F43Tvd4",
                      "category_id": null,
                      "loyalty_card": {
                        "points": 370,
                        "balance": 70
                      },
                      "expiration_date": null,
                      "is_referral_code": false
                    },
                    "campaign": {
                      "id": "camp_wce3U0BUekz2YGVl1F43Tvd4",
                      "name": "loyalty_1305",
                      "type": "AUTO_UPDATE",
                      "active": true,
                      "object": "campaign",
                      "voucher": {
                        "gift": null,
                        "type": "LOYALTY_CARD",
                        "discount": null,
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "code_config": {
                          "length": 8,
                          "prefix": "",
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "pattern": "########",
                          "postfix": ""
                        },
                        "loyalty_card": {
                          "points": 0
                        }
                      },
                      "category": null,
                      "metadata": {},
                      "auto_join": false,
                      "join_once": true,
                      "created_at": "2024-05-13T10:23:57.997Z",
                      "start_date": null,
                      "category_id": null,
                      "description": null,
                      "campaign_type": "LOYALTY_PROGRAM",
                      "expiration_date": null,
                      "is_referral_code": false
                    },
                    "customer": {
                      "id": "cust_2myfc5acSBgoMV72R5tyTBc8",
                      "name": "John Demo",
                      "email": null,
                      "object": "customer",
                      "source_id": "130524-01"
                    },
                    "reward_assignment": {
                      "id": "rewa_W4BkaZz7mOwwzlIMfBVQJo0j",
                      "object": "reward_assignment",
                      "reward_id": "rew_6cXu5JUKsjDo1T1LmFLF3eML",
                      "created_at": "2024-05-13T12:33:21.652Z",
                      "parameters": {
                        "loyalty": {
                          "points": 100
                        }
                      },
                      "updated_at": null,
                      "related_object_id": "camp_wce3U0BUekz2YGVl1F43Tvd4",
                      "related_object_type": "campaign"
                    },
                    "reward_redemption": {
                      "id": "rewr_23IX6dCFJe03AX4M56KcI95D",
                      "state": "PENDING",
                      "source_id": "r_0ebe386a24c311bff7",
                      "created_at": "2024-05-13T12:34:10.464Z",
                      "updated_at": null,
                      "voucher_id": "v_p7NP2qmQaMXsNHzb9ujPVjqgDJzJ2ccQ",
                      "campaign_id": "camp_wce3U0BUekz2YGVl1F43Tvd4",
                      "customer_id": "cust_2myfc5acSBgoMV72R5tyTBc8",
                      "source_type": "redemption",
                      "reward_assignment_id": "rewa_W4BkaZz7mOwwzlIMfBVQJo0j"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.REWARD_REDEMPTIONS.COMPLETED": {
      "post": {
        "operationId": "events-customer-reward_redemptions-completed",
        "summary": "Reward_redemptions completed",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerRewardRedemptionsCompletedData"
              },
              "examples": {
                "customer.reward_redemptions.completed": {
                  "value": {
                    "customer": {
                      "id": "cust_2myfc5acSBgoMV72R5tyTBc8",
                      "name": "John Demo",
                      "email": null,
                      "source_id": "130524-01",
                      "object": "customer"
                    },
                    "holder": {
                      "id": "cust_2myfc5acSBgoMV72R5tyTBc8",
                      "name": "John Demo",
                      "email": null,
                      "source_id": "130524-01",
                      "object": "customer"
                    },
                    "voucher": {
                      "id": "v_p7NP2qmQaMXsNHzb9ujPVjqgDJzJ2ccQ",
                      "code": "H0h9royZ",
                      "loyalty_card": {
                        "points": 270,
                        "balance": 70
                      },
                      "type": "LOYALTY_CARD",
                      "campaign": "loyalty_1305",
                      "campaign_id": "camp_wce3U0BUekz2YGVl1F43Tvd4",
                      "is_referral_code": false,
                      "holder_id": "cust_2myfc5acSBgoMV72R5tyTBc8",
                      "category_id": null,
                      "active": true,
                      "created_at": "2024-05-13T10: 24: 01.084Z",
                      "updated_at": "2024-05-13T12: 25: 59.587Z",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 2,
                        "redeemed_points": 200
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "metadata": {},
                      "object": "voucher"
                    },
                    "campaign": {
                      "id": "camp_wce3U0BUekz2YGVl1F43Tvd4",
                      "name": "loyalty_1305",
                      "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": false,
                      "join_once": true,
                      "active": true,
                      "category_id": null,
                      "category": null,
                      "metadata": {},
                      "start_date": null,
                      "expiration_date": null,
                      "description": null,
                      "created_at": "2024-05-13T10: 23: 57.997Z",
                      "object": "campaign"
                    },
                    "reward_redemption": {
                      "id": "rewr_N5xhKgV5tJBmJxrtb5YB7V3q",
                      "state": "COMPLETED",
                      "created_at": "2024-05-13T12: 26: 06.250Z",
                      "updated_at": null,
                      "voucher_id": "v_p7NP2qmQaMXsNHzb9ujPVjqgDJzJ2ccQ",
                      "campaign_id": "camp_wce3U0BUekz2YGVl1F43Tvd4",
                      "customer_id": "cust_2myfc5acSBgoMV72R5tyTBc8",
                      "reward_assignment_id": "rewa_7121trqxIdcdPv6ToVwn6JXq",
                      "source_id": "r_0ebe369389d0528f1f",
                      "source_type": "redemption"
                    },
                    "reward": {
                      "assignment_id": "rewa_7121trqxIdcdPv6ToVwn6JXq",
                      "voucher": {
                        "id": "v_7cNPiXkbCZJ4SkCil4XFZulEi3Z7ejmD",
                        "code": "tKSTdVk2",
                        "discount": {
                          "type": "PERCENT",
                          "amount_limit": 10000,
                          "percent_off": 10,
                          "effect": "APPLY_TO_ORDER"
                        },
                        "type": "DISCOUNT_VOUCHER",
                        "campaign": "Discount coupon for loyalty",
                        "campaign_id": "camp_XqNwzVA81QY0Lw4NsiTp26cT",
                        "is_referral_code": false,
                        "holder_id": "cust_2myfc5acSBgoMV72R5tyTBc8",
                        "category_id": null,
                        "active": true,
                        "created_at": "2024-05-13T12: 25: 59.630Z",
                        "redemption": {
                          "quantity": 1,
                          "redeemed_quantity": 0
                        },
                        "start_date": null,
                        "expiration_date": null,
                        "metadata": {},
                        "object": "voucher"
                      },
                      "id": "rew_UtRGHxt98jwCzodkskxQ7KLp",
                      "object": "reward",
                      "name": "10% discount coupon",
                      "type": "CAMPAIGN"
                    },
                    "reward_assignment": {
                      "id": "rewa_7121trqxIdcdPv6ToVwn6JXq",
                      "reward_id": "rew_UtRGHxt98jwCzodkskxQ7KLp",
                      "related_object_id": "camp_wce3U0BUekz2YGVl1F43Tvd4",
                      "related_object_type": "campaign",
                      "parameters": {
                        "loyalty": {
                          "points": 100
                        }
                      },
                      "created_at": "2024-05-13T12: 25: 06.389Z",
                      "updated_at": null,
                      "object": "reward_assignment"
                    },
                    "source": {
                      "id": "r_0ebe369389d0528f1f",
                      "type": "redemption"
                    },
                    "balance": null,
                    "publication": {
                      "id": "pub_wTfqQlLXnV5VCaBaswHnTOpdjAr8L4l7",
                      "object": "publication",
                      "created_at": "2024-05-13T12: 25: 59.620Z",
                      "customer_id": "cust_2myfc5acSBgoMV72R5tyTBc8",
                      "tracking_id": "130524-01",
                      "metadata": {},
                      "channel": "API",
                      "source_id": null,
                      "result": "SUCCESS",
                      "customer": {
                        "id": "cust_2myfc5acSBgoMV72R5tyTBc8",
                        "source_id": "130524-01",
                        "name": "John Demo",
                        "address": null,
                        "summary": null,
                        "loyalty": null,
                        "referrals": null,
                        "object": "customer"
                      },
                      "voucher": {
                        "id": "v_7cNPiXkbCZJ4SkCil4XFZulEi3Z7ejmD",
                        "code": "tKSTdVk2",
                        "campaign": "Discount coupon for loyalty",
                        "campaign_id": "camp_XqNwzVA81QY0Lw4NsiTp26cT",
                        "category": null,
                        "category_id": null,
                        "categories": [],
                        "type": "DISCOUNT_VOUCHER",
                        "discount": {
                          "type": "PERCENT",
                          "amount_limit": 10000,
                          "percent_off": 10,
                          "effect": "APPLY_TO_ORDER"
                        },
                        "gift": null,
                        "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": "045c3e7c-ae97-4bf9-a36f-2846777c2419",
                            "url": "{{voucher_qr_code.url}}"
                          },
                          "barcode": {
                            "id": "292a5523-1bff-4387-8d10-5cf8f77cce0e",
                            "url": "{{voucher_barcode.url}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2024-05-13T12: 25: 59.630Z",
                        "updated_at": "2024-05-13T12: 26: 12.167Z",
                        "holder_id": "cust_2myfc5acSBgoMV72R5tyTBc8",
                        "redemption": {
                          "quantity": 1,
                          "redeemed_quantity": 0,
                          "object": "list",
                          "url": "/v1/vouchers/tKSTdVk2/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 1,
                          "url": "/v1/vouchers/tKSTdVk2/publications?page=1&limit=10"
                        },
                        "object": "voucher"
                      },
                      "vouchers_id": [
                        "v_7cNPiXkbCZJ4SkCil4XFZulEi3Z7ejmD"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.VOUCHER.LOYALTY_CARD.PENDING_POINTS.ACTIVATED": {
      "post": {
        "operationId": "events-customer-voucher-loyalty_card-pending_points-activated",
        "summary": "Voucher loyalty_card pending_points activated",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerVoucherLoyaltyCardPendingPointsActivatedData"
              },
              "examples": {
                "customer.voucher.loyalty_card.pending_points.activated": {
                  "value": {
                    "voucher": {
                      "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                      "code": "L0y4L",
                      "loyalty_card": {
                        "points": 2205,
                        "balance": 25,
                        "next_expiration_date": "2026-01-31",
                        "next_expiration_points": 25,
                        "pending_points": 1239
                      },
                      "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-01-28T08:59:35.814Z",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 19,
                        "redeemed_points": 2180
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "metadata": {},
                      "object": "voucher"
                    },
                    "voucher_pending_points_balance": {
                      "points": 5,
                      "total": 1239,
                      "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",
                        "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_100cc4b1b16ab710e7",
                      "source_id": "test_20250128-001",
                      "status": "PAID",
                      "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "referrer_id": null,
                      "amount": 2499,
                      "total_amount": 2499,
                      "items": [
                        {
                          "id": "ordli_100cc4b1b0aab710e4",
                          "object": "order_item",
                          "product_id": "prod_0f59fdfe17e465fa05",
                          "quantity": 1,
                          "amount": 500,
                          "price": 500,
                          "subtotal_amount": 500
                        },
                        {
                          "id": "ordli_100cc4b1b0aab710e5",
                          "object": "order_item",
                          "product_id": "prod_0f0a6020cf2c301fdd",
                          "quantity": 1,
                          "amount": 900,
                          "price": 900,
                          "subtotal_amount": 900
                        },
                        {
                          "id": "ordli_100cc4b1b0aab710e6",
                          "object": "order_item",
                          "product_id": "prod_0ef925321f691a234d",
                          "sku_id": "sku_0ef9253223e91a2354",
                          "quantity": 1,
                          "amount": 1099,
                          "price": 1099,
                          "subtotal_amount": 1099
                        }
                      ],
                      "created_at": "2025-01-28T08:59:35.487Z",
                      "object": "order"
                    },
                    "pending_points": {
                      "id": "lopp_100e0e48afc99da421",
                      "voucher_id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                      "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "order_id": "ord_100cc4b1b16ab710e7",
                      "points": 5,
                      "activates_at": "2025-01-29",
                      "details": {
                        "holder_loyalty_tier": {
                          "id": "ltr_0e30613ad01f044517",
                          "name": "Loyal Star Platinum"
                        },
                        "event": {
                          "id": "evcus_100cc4b1b3aab710f1",
                          "type": "customer.order.paid",
                          "group_id": "v-100cc4b1ac63d4f448",
                          "entity_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                          "created_at": "2025-01-28T08:59:35.488Z",
                          "category": "EFFECT",
                          "event_source": {
                            "channel": "API",
                            "api_key": {
                              "name": "Primary",
                              "app_id": "12abc345-678d-901e-f234-gh5i6j7k8901"
                            }
                          }
                        },
                        "earning_rule": {
                          "id": "ern_JoE4VqpMFWOjiwQkot88WXrt",
                          "source": {
                            "banner": "PENDING POINTS TEST"
                          }
                        },
                        "order": {
                          "id": "ord_100cc4b1b16ab710e7",
                          "source_id": "test_20250128-001"
                        }
                      },
                      "created_at": "2025-01-28T08:59:35.814Z"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.VOUCHER.LOYALTY_CARD.PENDING_POINTS.ADDED": {
      "post": {
        "operationId": "events-customer-voucher-loyalty_card-pending_points-added",
        "summary": "Voucher loyalty_card pending_points added",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerVoucherLoyaltyCardPendingPointsAddedData"
              },
              "examples": {
                "customer.voucher.loyalty_card.pending_points.added": {
                  "value": {
                    "customer": {
                      "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "name": "Jack Webhook",
                      "email": null,
                      "source_id": "jck-wbhk",
                      "metadata": {
                        "region": "EMEA",
                        "sign-up": "true"
                      },
                      "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,
                          "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"
                    },
                    "voucher": {
                      "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                      "code": "L0y4L",
                      "loyalty_card": {
                        "points": 2205,
                        "balance": 25,
                        "next_expiration_date": "2026-01-31",
                        "next_expiration_points": 25,
                        "pending_points": 1234
                      },
                      "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-01-28T08:59:35.814Z",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 19,
                        "redeemed_points": 2180
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "metadata": {},
                      "object": "voucher"
                    },
                    "voucher_pending_points_balance": {
                      "points": 1,
                      "total": 1234,
                      "object": "balance",
                      "related_object": {
                        "type": "voucher",
                        "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw"
                      },
                      "operation_type": "AUTOMATIC"
                    },
                    "order": {
                      "id": "ord_100cc4b1b16ab710e7",
                      "source_id": "test_20250128-001",
                      "status": "PAID",
                      "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "referrer_id": null,
                      "amount": 2499,
                      "total_amount": 2499,
                      "items": [
                        {
                          "id": "ordli_100cc4b1b0aab710e4",
                          "object": "order_item",
                          "product_id": "prod_0f59fdfe17e465fa05",
                          "quantity": 1,
                          "amount": 500,
                          "price": 500,
                          "subtotal_amount": 500
                        },
                        {
                          "id": "ordli_100cc4b1b0aab710e5",
                          "object": "order_item",
                          "product_id": "prod_0f0a6020cf2c301fdd",
                          "quantity": 1,
                          "amount": 900,
                          "price": 900,
                          "subtotal_amount": 900
                        },
                        {
                          "id": "ordli_100cc4b1b0aab710e6",
                          "object": "order_item",
                          "product_id": "prod_0ef925321f691a234d",
                          "sku_id": "sku_0ef9253223e91a2354",
                          "quantity": 1,
                          "amount": 1099,
                          "price": 1099,
                          "subtotal_amount": 1099
                        }
                      ],
                      "created_at": "2025-01-28T08:59:35.487Z",
                      "object": "order"
                    },
                    "pending_points": {
                      "id": "lopp_100e0e48afc99da41a",
                      "voucher_id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                      "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "order_id": "ord_100cc4b1b16ab710e7",
                      "points": 1,
                      "activates_at": "2025-01-29",
                      "details": {
                        "holder_loyalty_tier": {
                          "id": "ltr_0e30613ad01f044517",
                          "name": "Loyal Star Platinum"
                        },
                        "event": {
                          "id": "evcus_100cc4b1b3aab710f1",
                          "type": "customer.order.paid",
                          "group_id": "v-100cc4b1ac63d4f448",
                          "entity_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                          "created_at": "2025-01-28T08:59:35.488Z",
                          "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_100cc4b1b16ab710e7",
                          "source_id": "test_20250128-001"
                        }
                      },
                      "created_at": "2025-01-28T08:59:35.814Z"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.VOUCHER.LOYALTY_CARD.PENDING_POINTS.CANCELED": {
      "post": {
        "operationId": "events-customer-voucher-loyalty_card-pending_points-canceled",
        "summary": "Voucher loyalty_card pending_points canceled",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerVoucherLoyaltyCardPendingPointsCanceledData"
              },
              "examples": {
                "customer.voucher.loyalty_card.pending_points.canceled": {
                  "value": {
                    "customer": {
                      "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "name": "Jack Webhook",
                      "email": null,
                      "source_id": "jck-wbhk",
                      "metadata": {
                        "region": "EMEA",
                        "sign-up": "true"
                      },
                      "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,
                          "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"
                    },
                    "voucher": {
                      "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                      "code": "L0y4L",
                      "loyalty_card": {
                        "points": 2210,
                        "balance": 30,
                        "next_expiration_date": "2026-01-31",
                        "next_expiration_points": 30,
                        "pending_points": 1233
                      },
                      "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-01-28T09:04:56.136Z",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 19,
                        "redeemed_points": 2180
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "metadata": {},
                      "object": "voucher"
                    },
                    "voucher_pending_points_balance": {
                      "points": -1,
                      "total": 1233,
                      "object": "balance",
                      "related_object": {
                        "type": "voucher",
                        "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw"
                      },
                      "operation_type": "MANUAL"
                    },
                    "order": {
                      "id": "ord_100cc4b1b16ab710e7",
                      "source_id": "test_20250128-001",
                      "status": "PAID",
                      "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "referrer_id": null,
                      "amount": 2499,
                      "total_amount": 2499,
                      "items": [
                        {
                          "id": "ordli_100cc5d5c20a1e29c3",
                          "object": "order_item",
                          "product_id": "prod_0f59fdfe17e465fa05",
                          "quantity": 1,
                          "amount": 500,
                          "price": 500,
                          "subtotal_amount": 500
                        },
                        {
                          "id": "ordli_100cc5d5c20a1e29c4",
                          "object": "order_item",
                          "product_id": "prod_0f0a6020cf2c301fdd",
                          "quantity": 1,
                          "amount": 900,
                          "price": 900,
                          "subtotal_amount": 900
                        },
                        {
                          "id": "ordli_100cc5d5c20a1e29c5",
                          "object": "order_item",
                          "product_id": "prod_0ef925321f691a234d",
                          "sku_id": "sku_0ef9253223e91a2354",
                          "quantity": 1,
                          "amount": 1099,
                          "price": 1099,
                          "subtotal_amount": 1099
                        }
                      ],
                      "created_at": "2025-01-28T08:59:35.487Z",
                      "updated_at": "2025-01-28T09:04:34.578Z",
                      "object": "order"
                    },
                    "pending_points": {
                      "id": "lopp_100e0e48afc99da41a",
                      "voucher_id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                      "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "order_id": "ord_100cc4b1b16ab710e7",
                      "points": 1,
                      "activates_at": "2025-01-29",
                      "details": {
                        "holder_loyalty_tier": {
                          "id": "ltr_0e30613ad01f044517",
                          "name": "Loyal Star Platinum"
                        },
                        "event": {
                          "id": "evcus_100cc4b1b3aab710f1",
                          "type": "customer.order.paid",
                          "group_id": "v-100cc4b1ac63d4f448",
                          "entity_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                          "created_at": "2025-01-28T08:59:35.488Z",
                          "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_100cc4b1b16ab710e7",
                          "source_id": "test_20250128-001"
                        }
                      },
                      "created_at": "2025-01-28T08:59:35.814Z"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.VOUCHER.LOYALTY_CARD.PENDING_POINTS.UPDATED": {
      "post": {
        "operationId": "events-customer-voucher-loyalty_card-pending_points-updated",
        "summary": "Voucher loyalty_card pending_points updated",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerVoucherLoyaltyCardPendingPointsUpdatedData"
              },
              "examples": {
                "customer.voucher.loyalty_card.pending_points.updated": {
                  "value": {
                    "customer": {
                      "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "name": "Jack Webhook",
                      "email": null,
                      "source_id": "jck-wbhk",
                      "metadata": {
                        "region": "EMEA",
                        "sign-up": "true"
                      },
                      "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,
                          "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"
                    },
                    "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"
                    },
                    "voucher_pending_points_balance": {
                      "points": 10,
                      "total": 41,
                      "object": "balance",
                      "related_object": {
                        "type": "voucher",
                        "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw"
                      },
                      "operation_type": "MANUAL"
                    },
                    "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.CUSTOMER.VOUCHER.LOYALTY_CARD.POINTS_ADDED": {
      "post": {
        "operationId": "events-customer-voucher-loyalty_card-points_added",
        "summary": "Voucher loyalty_card points_added",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerVoucherLoyaltyCardPointsAddedData"
              },
              "examples": {
                "customer.voucher.loyalty_card.points_added": {
                  "value": {
                    "customer": {
                      "id": "cust_2p0TvCOvB25HWUrW9JFf4czJ",
                      "name": "Alex Doe",
                      "source_id": "4l3x-d03",
                      "metadata": {},
                      "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,
                      "category": null,
                      "metadata": {},
                      "start_date": null,
                      "expiration_date": null,
                      "description": null,
                      "created_at": "2024-01-18T15:18:38.577Z",
                      "updated_at": "2024-02-09T13:04:15.034Z",
                      "object": "campaign"
                    },
                    "voucher": {
                      "id": "v_mFlEY0ZESRsEyfY12vTvz1VPfVDirAjc",
                      "code": "NK5iReoi",
                      "loyalty_card": {
                        "points": 2641,
                        "balance": 2641
                      },
                      "type": "LOYALTY_CARD",
                      "campaign": "Loyalty programme",
                      "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "is_referral_code": false,
                      "holder_id": "cust_tPTOETl00z1mWL5CzWEEPkNX",
                      "category_id": null,
                      "active": true,
                      "created_at": "2024-02-14T08:12:21.643Z",
                      "updated_at": "2024-03-11T15:27:44.884Z",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "redeemed_points": 0
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "metadata": {},
                      "object": "voucher"
                    },
                    "balance": {
                      "type": "loyalty_card",
                      "total": 2641,
                      "object": "balance",
                      "points": 40,
                      "balance": 2641,
                      "related_object": {
                        "id": "v_mFlEY0ZESRsEyfY12vTvz1VPfVDirAjc",
                        "type": "voucher"
                      }
                    },
                    "transaction": {
                      "id": "vtx_0e6d44043e9e51d377",
                      "source_id": "dd-pnts-uion",
                      "voucher_id": "v_mFlEY0ZESRsEyfY12vTvz1VPfVDirAjc",
                      "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "source": "voucherify-web-ui",
                      "reason": "Spring time",
                      "type": "POINTS_ADDITION",
                      "details": {
                        "balance": {
                          "type": "loyalty_card",
                          "total": 2641,
                          "object": "balance",
                          "points": 40,
                          "balance": 2641,
                          "related_object": {
                            "id": "v_mFlEY0ZESRsEyfY12vTvz1VPfVDirAjc",
                            "type": "voucher"
                          }
                        }
                      },
                      "related_transaction_id": null,
                      "created_at": "2024-03-11T15:27:44.884Z"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.VOUCHER.LOYALTY_CARD.POINTS_EXPIRED": {
      "post": {
        "operationId": "events-customer-voucher-loyalty_card-points_expired",
        "summary": "Voucher loyalty_card points_expired",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerVoucherLoyaltyCardPointsExpiredData"
              },
              "examples": {
                "customer.voucher.loyalty_card.points_expired": {
                  "value": {
                    "customer": {
                      "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "name": "Jack Webhook",
                      "source_id": "jck-wbhk",
                      "metadata": {
                        "region": "EMEA",
                        "sign-up": "true"
                      },
                      "object": "customer"
                    },
                    "campaign": {
                      "id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "name": "Loyalty programme",
                      "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,
                      "metadata": {},
                      "created_at": "2024-01-18T15:18:38.577Z",
                      "updated_at": "2024-03-14T10:01:16.596Z",
                      "object": "campaign"
                    },
                    "voucher": {
                      "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                      "code": "L0y4L",
                      "loyalty_card": {
                        "points": 992,
                        "balance": 262,
                        "next_expiration_date": "2024-05-30"
                      },
                      "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.015Z",
                      "updated_at": "2024-03-15T00:02:09.334Z",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 7,
                        "redeemed_points": 730
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "metadata": {},
                      "object": "voucher"
                    },
                    "points": 70,
                    "buckets": [
                      {
                        "id": "lopb_wQey6iuachtxVonzt51V01Qx",
                        "voucher_id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                        "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                        "bucket": {
                          "total_points": 70
                        },
                        "status": "ACTIVE",
                        "expires_at": "2024-03-14",
                        "created_at": "2024-03-13T17:39:56.818Z",
                        "updated_at": "2024-03-14T15:29:33.239Z",
                        "object": "loyalty_points_bucket"
                      }
                    ],
                    "transaction": {
                      "id": "vtx_0e719686512773b205",
                      "source_id": null,
                      "voucher_id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                      "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "source": "Automation",
                      "reason": null,
                      "type": "POINTS_EXPIRATION",
                      "details": {
                        "balance": {
                          "type": "loyalty_card",
                          "total": 992,
                          "object": "balance",
                          "points": -70,
                          "balance": 262,
                          "related_object": {
                            "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                            "type": "voucher"
                          }
                        }
                      },
                      "related_transaction_id": null,
                      "created_at": "2024-03-15T00:02:09.334Z"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.VOUCHER.GIFT.BALANCE_ADDED": {
      "post": {
        "operationId": "events-customer-voucher-gift-balance_added",
        "summary": "Voucher gift balance_added",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerVoucherGiftBalanceAddedData"
              },
              "examples": {
                "customer.voucher.gift.balance_added": {
                  "value": {
                    "customer": {
                      "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "name": "Jack Webhook",
                      "email": null,
                      "source_id": "jck-wbhk",
                      "metadata": {
                        "region": "EMEA",
                        "sign-up": "true"
                      },
                      "object": "customer"
                    },
                    "campaign": {
                      "id": "camp_bfrwAVsP6Q1EM1ZjgHwheKYr",
                      "name": "Gift programme",
                      "campaign_type": "GIFT_VOUCHERS",
                      "type": "AUTO_UPDATE",
                      "is_referral_code": false,
                      "voucher": {
                        "type": "GIFT_VOUCHER",
                        "gift": {
                          "amount": 5000,
                          "effect": "APPLY_TO_ORDER"
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "code_config": {
                          "length": 1,
                          "prefix": "Gift-for-you-",
                          "charset": "0123456789",
                          "pattern": "#",
                          "postfix": ""
                        }
                      },
                      "auto_join": false,
                      "join_once": false,
                      "active": true,
                      "category_id": "cat_0e1d0ba99c2fff2b51",
                      "category": null,
                      "metadata": {},
                      "start_date": null,
                      "expiration_date": null,
                      "description": null,
                      "created_at": "2024-01-24T12:07:35.835Z",
                      "updated_at": "2024-02-07T11:17:53.712Z",
                      "object": "campaign"
                    },
                    "voucher": {
                      "id": "v_oNia4nTFDqYZOWYJiMpX8ocB6p6ZaEBm",
                      "code": "Gift-for-you-0",
                      "gift": {
                        "amount": 16600,
                        "balance": 15900,
                        "effect": "APPLY_TO_ORDER"
                      },
                      "type": "GIFT_VOUCHER",
                      "campaign": "Gift programme",
                      "campaign_id": "camp_bfrwAVsP6Q1EM1ZjgHwheKYr",
                      "is_referral_code": false,
                      "holder_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "category_id": "cat_0e1d0ba99c2fff2b51",
                      "active": true,
                      "created_at": "2024-01-24T12:07:36.501Z",
                      "updated_at": "2024-03-13T16:54:14.688Z",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 1,
                        "redeemed_amount": 700
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "metadata": {},
                      "object": "voucher"
                    },
                    "balance": {
                      "type": "gift_voucher",
                      "total": 16600,
                      "amount": 400,
                      "object": "balance",
                      "balance": 15900,
                      "related_object": {
                        "id": "v_oNia4nTFDqYZOWYJiMpX8ocB6p6ZaEBm",
                        "type": "voucher"
                      }
                    },
                    "transaction": {
                      "id": "vtx_0e6feafe6952a94a54",
                      "source_id": null,
                      "voucher_id": "v_oNia4nTFDqYZOWYJiMpX8ocB6p6ZaEBm",
                      "campaign_id": "camp_bfrwAVsP6Q1EM1ZjgHwheKYr",
                      "source": "voucherify-web-ui",
                      "reason": "Refund",
                      "type": "CREDITS_ADDITION",
                      "details": {
                        "balance": {
                          "type": "gift_voucher",
                          "total": 16600,
                          "amount": 400,
                          "object": "balance",
                          "balance": 15900,
                          "operation_type": "MANUAL",
                          "related_object": {
                            "id": "v_oNia4nTFDqYZOWYJiMpX8ocB6p6ZaEBm",
                            "type": "voucher"
                          }
                        }
                      },
                      "related_transaction_id": null,
                      "created_at": "2024-03-13T16:54:14.688Z"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.SEGMENT.ENTERED": {
      "post": {
        "operationId": "events-customer-segment-entered",
        "summary": "Segment entered",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerSegmentEnteredData"
              },
              "examples": {
                "customer.segment.entered": {
                  "value": {
                    "customer": {
                      "id": "cust_5P5B8oy1pxM3sTOZ8qDpmkpG",
                      "source_id": "a-tst",
                      "name": "Alex Test",
                      "address": {
                        "city": null,
                        "state": null,
                        "line_1": null,
                        "line_2": null,
                        "country": null,
                        "postal_code": null
                      },
                      "summary": {
                        "redemptions": {
                          "total_redeemed": 0,
                          "total_failed": 0,
                          "total_succeeded": 0,
                          "total_rolled_back": 0,
                          "total_rollback_failed": 0,
                          "total_rollback_succeeded": 0,
                          "gift": {
                            "redeemed_amount": 0,
                            "amount_to_go": 0
                          },
                          "loyalty_card": {
                            "redeemed_points": 0,
                            "points_to_go": 0
                          }
                        },
                        "orders": {
                          "total_amount": 0,
                          "total_count": 0,
                          "average_amount": 0,
                          "last_order_amount": 0
                        }
                      },
                      "loyalty": {
                        "points": 0,
                        "referred_customers": 0,
                        "campaigns": {}
                      },
                      "referrals": {
                        "total": 0,
                        "campaigns": []
                      },
                      "metadata": {},
                      "system_metadata": {},
                      "created_at": "2024-02-29T14:04:46.506Z",
                      "object": "customer"
                    },
                    "segment": {
                      "id": "seg_n3vVcU5t0m3rs4rEPr3C1oU5",
                      "name": "New Customers",
                      "object": "segment"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.SEGMENT.LEFT": {
      "post": {
        "operationId": "events-customer-segment-left",
        "summary": "Segment left",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerSegmentLeftData"
              },
              "examples": {
                "customer.segment.left": {
                  "value": {
                    "customer": {
                      "id": "cust_5P5B8oy1pxM3sTOZ8qDpmkpG",
                      "source_id": "a-tst",
                      "name": "Alex Test",
                      "address": {
                        "city": null,
                        "state": null,
                        "line_1": null,
                        "line_2": null,
                        "country": null,
                        "postal_code": null
                      },
                      "summary": {
                        "redemptions": {
                          "total_redeemed": 0,
                          "total_failed": 0,
                          "total_succeeded": 0,
                          "total_rolled_back": 0,
                          "total_rollback_failed": 0,
                          "total_rollback_succeeded": 0,
                          "gift": {
                            "redeemed_amount": 0,
                            "amount_to_go": 0
                          },
                          "loyalty_card": {
                            "redeemed_points": 0,
                            "points_to_go": 0
                          }
                        },
                        "orders": {
                          "total_amount": 0,
                          "total_count": 0,
                          "average_amount": 0,
                          "last_order_amount": 0
                        }
                      },
                      "loyalty": {
                        "points": 0,
                        "referred_customers": 0,
                        "campaigns": {}
                      },
                      "referrals": {
                        "total": 0,
                        "campaigns": []
                      },
                      "metadata": {},
                      "system_metadata": {},
                      "created_at": "2024-02-29T14:04:46.506Z",
                      "object": "customer"
                    },
                    "segment": {
                      "id": "seg_n3vVcU5t0m3rs4rEPr3C1oU5",
                      "name": "New Customers",
                      "object": "segment"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.LOYALTY.TIER.JOINED": {
      "post": {
        "operationId": "events-customer-loyalty-tier-joined",
        "summary": "Loyalty tier joined",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerLoyaltyTierJoinedData"
              },
              "examples": {
                "customer.loyalty.tier.joined": {
                  "value": {
                    "customer": {
                      "id": "cust_154FDQKcbzygdo231M62r4CD",
                      "name": "Alex Doe",
                      "email": null,
                      "source_id": "4lx-d03",
                      "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,
                      "category": null,
                      "metadata": {},
                      "start_date": null,
                      "expiration_date": null,
                      "description": null,
                      "created_at": "2024-01-18T15:18:38.577Z",
                      "updated_at": "2024-02-09T13:04:15.034Z",
                      "object": "campaign"
                    },
                    "loyalty_tier": {
                      "id": "ltr_0e30613ad01f044515",
                      "name": "Loyal silver",
                      "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "metadata": {},
                      "created_at": "2024-01-24T08:28:02.240Z",
                      "updated_at": null,
                      "earning_rules": {},
                      "rewards": {},
                      "config": {
                        "points": {
                          "from": 151,
                          "to": 250
                        }
                      },
                      "points": {
                        "from": 151,
                        "to": 250
                      },
                      "object": "loyalty_tier"
                    },
                    "created_at": "2024-03-14T09:29:32.501Z"
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.LOYALTY.TIER.UPGRADED": {
      "post": {
        "operationId": "events-customer-loyalty-tier-upgraded",
        "summary": "Loyalty tier upgraded",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerLoyaltyTierUpgradedData"
              },
              "examples": {
                "customer.loyalty.tier.upgraded": {
                  "value": {
                    "customer": {
                      "id": "cust_2p0TvCOvB25HWUrW9JFf4czJ",
                      "name": "Alex Doe",
                      "email": null,
                      "source_id": "4l3x-d03",
                      "metadata": {},
                      "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,
                      "category": null,
                      "metadata": {},
                      "start_date": null,
                      "expiration_date": null,
                      "description": null,
                      "created_at": "2024-01-18T15:18:38.577Z",
                      "updated_at": "2024-02-09T13:04:15.034Z",
                      "object": "campaign"
                    },
                    "loyalty_tier_from": {
                      "id": "ltr_0e30613ad01f044515",
                      "name": "Loyal silver",
                      "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "metadata": {},
                      "created_at": "2024-01-24T08:28:02.240Z",
                      "updated_at": null,
                      "earning_rules": {},
                      "rewards": {},
                      "config": {
                        "points": {
                          "from": 151,
                          "to": 250
                        }
                      },
                      "points": {
                        "from": 151,
                        "to": 250
                      },
                      "object": "loyalty_tier"
                    },
                    "loyalty_tier_to": {
                      "id": "ltr_0e30613ad01f044516",
                      "name": "Loyal gold",
                      "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "metadata": {},
                      "created_at": "2024-01-24T08:28:02.240Z",
                      "updated_at": null,
                      "earning_rules": {},
                      "rewards": {},
                      "config": {
                        "points": {
                          "from": 251,
                          "to": 350
                        }
                      },
                      "points": {
                        "from": 251,
                        "to": 350
                      },
                      "object": "loyalty_tier"
                    },
                    "created_at": "2024-03-11T12:06:34.423Z"
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.LOYALTY.TIER.DOWNGRADED": {
      "post": {
        "operationId": "events-customer-loyalty-tier-downgraded",
        "summary": "Loyalty tier downgraded",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerLoyaltyTierDowngradedData"
              },
              "examples": {
                "customer.loyalty.tier.downgraded": {
                  "value": {
                    "customer": {
                      "id": "cust_154FDQKcbzygdo231M62r4CD",
                      "name": "Alex Doe",
                      "email": null,
                      "source_id": "4lx-d03",
                      "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": 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-03-14T10:01:16.596Z",
                      "object": "campaign"
                    },
                    "loyalty_tier_from": {
                      "id": "ltr_0e30613ad01f044517",
                      "name": "Loyal Star Platinum",
                      "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "metadata": {},
                      "created_at": "2024-01-24T08:28:02.240Z",
                      "updated_at": "2024-03-14T10:01:17.717Z",
                      "earning_rules": {
                        "ern_FQxftbKUq9E93k00Z3qkC0sX": {
                          "type": "MULTIPLY",
                          "multiplier": 1
                        }
                      },
                      "rewards": {},
                      "config": {
                        "points": {
                          "from": 351
                        }
                      },
                      "points": {
                        "from": 351
                      },
                      "object": "loyalty_tier"
                    },
                    "loyalty_tier_to": {
                      "id": "ltr_0e30613ad01f044515",
                      "name": "Loyal silver",
                      "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "metadata": {},
                      "created_at": "2024-01-24T08:28:02.240Z",
                      "updated_at": null,
                      "earning_rules": {},
                      "rewards": {},
                      "config": {
                        "points": {
                          "from": 151,
                          "to": 250
                        }
                      },
                      "points": {
                        "from": 151,
                        "to": 250
                      },
                      "object": "loyalty_tier"
                    },
                    "created_at": "2024-03-14T10:08:14.814Z"
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.LOYALTY.TIER.PROLONGED": {
      "post": {
        "operationId": "events-customer-loyalty-tier-prolonged",
        "summary": "Loyalty tier prolonged",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerLoyaltyTierProlongedData"
              },
              "examples": {
                "customer.loyalty.tier.prolonged": {
                  "value": {
                    "customer": {
                      "id": "cust_ufwK2qUNGDYxa1aji7XKzuHm",
                      "name": "Jean Genie",
                      "email": null,
                      "source_id": "jn-gn",
                      "metadata": {},
                      "object": "customer"
                    },
                    "campaign": {
                      "id": "camp_mvZmZkLz3Dq2llncChsCr00g",
                      "name": "Loyalty for tier prolonged",
                      "campaign_type": "LOYALTY_PROGRAM",
                      "type": "AUTO_UPDATE",
                      "is_referral_code": false,
                      "voucher": {
                        "type": "LOYALTY_CARD",
                        "loyalty_card": {
                          "points": 0,
                          "expiration_rules": {
                            "period_type": "MONTH",
                            "period_value": 1
                          }
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "code_config": {
                          "length": 3,
                          "prefix": "Prolong-",
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "pattern": "###",
                          "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-03-14T10:31:23.170Z",
                      "updated_at": "2024-03-15T08:48:07.080Z",
                      "object": "campaign"
                    },
                    "loyalty_tier": {
                      "id": "ltr_0e70dcf4bc23747d1a",
                      "name": "Tier-01",
                      "campaign_id": "camp_mvZmZkLz3Dq2llncChsCr00g",
                      "metadata": {},
                      "created_at": "2024-03-14T10:31:23.632Z",
                      "updated_at": null,
                      "earning_rules": {},
                      "rewards": {},
                      "config": {
                        "points": {
                          "from": 50,
                          "to": 99
                        }
                      },
                      "points": {
                        "from": 50,
                        "to": 99
                      },
                      "object": "loyalty_tier"
                    },
                    "created_at": "2024-03-19T00:02:13.529Z"
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.LOYALTY.TIER.LEFT": {
      "post": {
        "operationId": "events-customer-loyalty-tier-left",
        "summary": "Loyalty tier left",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerLoyaltyTierLeftData"
              },
              "examples": {
                "customer.loyalty.tier.left": {
                  "value": {
                    "customer": {
                      "id": "cust_154FDQKcbzygdo231M62r4CD",
                      "name": "Alex Doe",
                      "email": null,
                      "source_id": "4lx-d03",
                      "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": 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-03-14T09:51:33.079Z",
                      "object": "campaign"
                    },
                    "loyalty_tier": {
                      "id": "ltr_0e30613ad01f044516",
                      "name": "Loyal gold",
                      "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                      "metadata": {},
                      "created_at": "2024-01-24T08:28:02.240Z",
                      "updated_at": null,
                      "earning_rules": {},
                      "rewards": {},
                      "config": {
                        "points": {
                          "from": 251,
                          "to": 350
                        }
                      },
                      "points": {
                        "from": 251,
                        "to": 350
                      },
                      "object": "loyalty_tier"
                    },
                    "created_at": "2024-03-14T09:53:38.516Z"
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.HOLDER.ASSIGNMENT.CREATED": {
      "post": {
        "operationId": "events-customer-holder-assignment-created",
        "summary": "Holder assignment created",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerHolderAssignmentCreatedData"
              },
              "examples": {
                "customer.holder.assignment.created": {
                  "value": {
                    "holder": {
                      "id": "rh_0f147785a5c966e4b3",
                      "object": "redeemable_holder",
                      "created_at": "2024-07-19T12:19:07.002Z",
                      "campaign_id": "camp_vVk4unz3k4gA023fk9XoSiTh",
                      "customer_id": "cust_3yngSdlObyvUtdDcnHiGu6Yx",
                      "holder_role": "REFEREE",
                      "voucher_type": "DISCOUNT_VOUCHER",
                      "campaign_type": "REFERRAL_PROGRAM",
                      "redeemable_id": "v_uOrG9tQresN9X51gbAoo0a2vY4MLV9lS",
                      "publication_id": null,
                      "redeemable_object": "voucher"
                    },
                    "voucher": {
                      "id": "v_uOrG9tQresN9X51gbAoo0a2vY4MLV9lS",
                      "code": "REFAPI-mk3",
                      "type": "DISCOUNT_VOUCHER",
                      "active": true,
                      "object": "voucher",
                      "campaign": "Referral API",
                      "discount": {
                        "type": "AMOUNT",
                        "effect": "APPLY_TO_ORDER",
                        "amount_off": 900
                      },
                      "metadata": {},
                      "holder_id": "cust_33924S073JcRVZJRfychtHhW",
                      "created_at": "2024-04-02T13:58:14.081Z",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0
                      },
                      "start_date": null,
                      "updated_at": "2024-04-02T13:58:25.511Z",
                      "campaign_id": "camp_vVk4unz3k4gA023fk9XoSiTh",
                      "category_id": "cat_0d7c4d183011d043cc",
                      "referrer_id": "cust_33924S073JcRVZJRfychtHhW",
                      "expiration_date": null,
                      "is_referral_code": true
                    },
                    "campaign": {
                      "id": "camp_vVk4unz3k4gA023fk9XoSiTh",
                      "name": "Referral API",
                      "type": "AUTO_UPDATE",
                      "active": true,
                      "object": "campaign",
                      "voucher": {
                        "gift": null,
                        "type": "DISCOUNT_VOUCHER",
                        "discount": {
                          "type": "AMOUNT",
                          "units": null,
                          "effect": "APPLY_TO_ORDER",
                          "amount_off": 900
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "code_config": {
                          "length": 3,
                          "prefix": "REFAPI-",
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "pattern": "###",
                          "postfix": ""
                        },
                        "loyalty_card": null
                      },
                      "category": null,
                      "metadata": {},
                      "auto_join": false,
                      "join_once": false,
                      "created_at": "2024-04-02T13:58:13.738Z",
                      "start_date": null,
                      "category_id": "cat_0d7c4d183011d043cc",
                      "description": null,
                      "campaign_type": "REFERRAL_PROGRAM",
                      "expiration_date": null,
                      "is_referral_code": true,
                      "referral_program": {
                        "conversion_event_type": "redemption"
                      }
                    },
                    "customer": {
                      "id": "cust_3yngSdlObyvUtdDcnHiGu6Yx",
                      "name": null,
                      "email": null,
                      "object": "customer",
                      "metadata": {},
                      "source_id": null
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.HOLDER.ASSIGNMENT.DELETED": {
      "post": {
        "operationId": "events-customer-holder-assignment-deleted",
        "summary": "Holder assignment deleted",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerHolderAssignmentDeletedData"
              },
              "examples": {
                "customer.holder.assignment.deleted": {
                  "value": {
                    "holder": {
                      "id": "rh_0f212ebadcc51eefea",
                      "object": "redeemable_holder",
                      "created_at": "2024-07-29T09:21:20.221Z",
                      "campaign_id": "camp_vVk4unz3k4gA023fk9XoSiTh",
                      "customer_id": "cust_B4WY60nNA1HcAnJj6lnW57a7",
                      "holder_role": "REFEREE",
                      "voucher_type": "DISCOUNT_VOUCHER",
                      "campaign_type": "REFERRAL_PROGRAM",
                      "redeemable_id": "v_YdDGS5yBnLCp79vfPbHhkoRrqPwkgyiy",
                      "publication_id": null,
                      "redeemable_object": "voucher"
                    },
                    "voucher": {
                      "id": "v_YdDGS5yBnLCp79vfPbHhkoRrqPwkgyiy",
                      "code": "REFAPI-1L8",
                      "type": "DISCOUNT_VOUCHER",
                      "active": true,
                      "object": "voucher",
                      "campaign": "Referral API",
                      "discount": {
                        "type": "AMOUNT",
                        "effect": "APPLY_TO_ORDER",
                        "amount_off": 900
                      },
                      "metadata": {},
                      "holder_id": "cust_IW0fOCPJcEnL3XuxONs9YX7P",
                      "created_at": "2024-04-02T13:58:14.081Z",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0
                      },
                      "start_date": null,
                      "updated_at": "2024-07-23T13:36:10.822Z",
                      "campaign_id": "camp_vVk4unz3k4gA023fk9XoSiTh",
                      "category_id": "cat_0d7c4d183011d043cc",
                      "referrer_id": "cust_IW0fOCPJcEnL3XuxONs9YX7P",
                      "expiration_date": null,
                      "is_referral_code": true
                    },
                    "campaign": {
                      "id": "camp_vVk4unz3k4gA023fk9XoSiTh",
                      "name": "Referral API",
                      "type": "AUTO_UPDATE",
                      "active": true,
                      "object": "campaign",
                      "voucher": {
                        "gift": null,
                        "type": "DISCOUNT_VOUCHER",
                        "discount": {
                          "type": "AMOUNT",
                          "units": null,
                          "effect": "APPLY_TO_ORDER",
                          "amount_off": 900
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "code_config": {
                          "length": 3,
                          "prefix": "REFAPI-",
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "pattern": "###",
                          "postfix": ""
                        },
                        "loyalty_card": null
                      },
                      "category": null,
                      "metadata": {},
                      "auto_join": false,
                      "join_once": false,
                      "created_at": "2024-04-02T13:58:13.738Z",
                      "start_date": null,
                      "category_id": "cat_0d7c4d183011d043cc",
                      "description": null,
                      "campaign_type": "REFERRAL_PROGRAM",
                      "expiration_date": null,
                      "is_referral_code": true,
                      "referral_program": {
                        "conversion_event_type": "redemption"
                      }
                    },
                    "customer": {
                      "id": "cust_B4WY60nNA1HcAnJj6lnW57a7",
                      "name": null,
                      "email": null,
                      "object": "customer",
                      "source_id": "rh_test-03"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.ORDER.CREATED": {
      "post": {
        "operationId": "events-customer-order-created",
        "summary": "Order created",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerOrderCreatedData"
              },
              "examples": {
                "customer.order.created": {
                  "value": {
                    "customer": {
                      "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "name": "Jack Webhook",
                      "email": null,
                      "source_id": "jck-wbhk",
                      "metadata": {
                        "region": "EMEA",
                        "sign-up": "true"
                      },
                      "object": "customer"
                    },
                    "referrer": null,
                    "order": {
                      "id": "ord_jM5GdBe4OO3ExFrVSlEWLORP",
                      "source_id": null,
                      "created_at": "2024-03-12T14:41:49.128Z",
                      "updated_at": null,
                      "status": "CREATED",
                      "amount": 2500,
                      "total_amount": 2500,
                      "items": [
                        {
                          "object": "order_item",
                          "product_id": "prod_0df14b7e7d8975079d",
                          "quantity": 1,
                          "amount": 2500,
                          "price": 2500,
                          "subtotal_amount": 2500,
                          "product": {
                            "name": "Star Thermal Bottle",
                            "price": 2500
                          }
                        },
                        {
                          "object": "order_item",
                          "product_id": "prod_5h1pp1ng",
                          "quantity": 1,
                          "amount": 0,
                          "price": 0,
                          "subtotal_amount": 0,
                          "product": {
                            "name": "Shipping"
                          }
                        }
                      ],
                      "metadata": {
                        "card": [
                          "Other"
                        ],
                        "region": "US",
                        "currency": "USD"
                      },
                      "customer": {
                        "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "address": null,
                        "summary": null,
                        "loyalty": null,
                        "referrals": null,
                        "object": "customer"
                      },
                      "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "referrer_id": null,
                      "object": "order"
                    },
                    "redemption": null
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.ORDER.PAID": {
      "post": {
        "operationId": "events-customer-order-paid",
        "summary": "Order paid",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerOrderPaidData"
              },
              "examples": {
                "customer.order.paid": {
                  "value": {
                    "customer": {
                      "id": "cust_ufwK2qUNGDYxa1aji7XKzuHm",
                      "name": "Alex Doe",
                      "email": null,
                      "source_id": "4l3x-d03",
                      "metadata": {},
                      "object": "customer"
                    },
                    "referrer": null,
                    "order": {
                      "id": "ord_au8U64mPX6fIArsf6UVLS8u5",
                      "source_id": null,
                      "created_at": "2024-03-11T13:20:39.987Z",
                      "updated_at": "2024-03-11T13:20:39.988Z",
                      "status": "PAID",
                      "amount": 10000,
                      "total_amount": 10000,
                      "items": [
                        {
                          "object": "order_item",
                          "product_id": "prod_0df14b7e7d8975079d",
                          "quantity": 4,
                          "amount": 10000,
                          "price": 2500,
                          "subtotal_amount": 10000,
                          "product": {
                            "name": "Star Thermal Bottle",
                            "price": 2500
                          }
                        },
                        {
                          "object": "order_item",
                          "product_id": "prod_5h1pp1ng",
                          "quantity": 1,
                          "amount": 0,
                          "price": 0,
                          "subtotal_amount": 0,
                          "product": {
                            "name": "Shipping"
                          }
                        }
                      ],
                      "metadata": {
                        "card": [
                          "Other"
                        ],
                        "region": "US",
                        "currency": "USD"
                      },
                      "customer": {
                        "id": "cust_ufwK2qUNGDYxa1aji7XKzuHm",
                        "address": null,
                        "summary": null,
                        "loyalty": null,
                        "referrals": null,
                        "object": "customer"
                      },
                      "customer_id": "cust_ufwK2qUNGDYxa1aji7XKzuHm",
                      "referrer_id": null,
                      "object": "order"
                    },
                    "redemption": null
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.ORDER.UPDATED": {
      "post": {
        "operationId": "events-customer-order-updated",
        "summary": "Order updated",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerOrderUpdatedData"
              },
              "examples": {
                "customer.order.updated": {
                  "value": {
                    "order": {
                      "id": "ord_tNridJhmcEOQXUqNyenX1Up6",
                      "items": [
                        {
                          "price": 2500,
                          "amount": 5000,
                          "object": "order_item",
                          "product": {
                            "name": "Star Thermal Bottle",
                            "price": 2500
                          },
                          "quantity": 2,
                          "product_id": "prod_0df14b7e7d8975079d",
                          "subtotal_amount": 5000
                        },
                        {
                          "price": 0,
                          "amount": 0,
                          "object": "order_item",
                          "product": {
                            "name": "Shipping"
                          },
                          "quantity": 1,
                          "product_id": "prod_5h1pp1ng",
                          "subtotal_amount": 0
                        }
                      ],
                      "amount": 5500,
                      "object": "order",
                      "status": "PAID",
                      "customer": {
                        "id": "cust_ufwK2qUNGDYxa1aji7XKzuHm",
                        "object": "customer",
                        "address": null,
                        "loyalty": null,
                        "summary": null,
                        "referrals": null
                      },
                      "metadata": {
                        "card": [
                          "Other"
                        ],
                        "region": "US",
                        "currency": "USD"
                      },
                      "source_id": null,
                      "created_at": "2024-03-12T08:37:24.296Z",
                      "updated_at": "2024-03-12T13:40:39.080Z",
                      "customer_id": "cust_ufwK2qUNGDYxa1aji7XKzuHm",
                      "referrer_id": null,
                      "total_amount": 5500
                    },
                    "customer": {
                      "id": "cust_ufwK2qUNGDYxa1aji7XKzuHm",
                      "name": "Alex Doe",
                      "email": null,
                      "object": "customer",
                      "metadata": {},
                      "source_id": "4l3x-d03"
                    },
                    "referrer": null,
                    "redemption": null
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.ORDER.CANCELED": {
      "post": {
        "operationId": "events-customer-order-canceled",
        "summary": "Order canceled",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerOrderCanceledData"
              },
              "examples": {
                "customer.order.canceled": {
                  "value": {
                    "customer": {
                      "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "name": "Jack Webhook",
                      "email": null,
                      "source_id": "jck-wbhk",
                      "metadata": {
                        "region": "EMEA",
                        "sign-up": "true"
                      },
                      "object": "customer"
                    },
                    "referrer": null,
                    "order": {
                      "id": "ord_jM5GdBe4OO3ExFrVSlEWLORP",
                      "source_id": null,
                      "created_at": "2024-03-12T14:41:49.128Z",
                      "updated_at": "2024-03-12T15:06:18.866Z",
                      "status": "CANCELED",
                      "amount": 2500,
                      "total_amount": 2500,
                      "items": [
                        {
                          "object": "order_item",
                          "product_id": "prod_0df14b7e7d8975079d",
                          "quantity": 1,
                          "amount": 2500,
                          "price": 2500,
                          "subtotal_amount": 2500,
                          "product": {
                            "name": "Star Thermal Bottle",
                            "price": 2500
                          }
                        },
                        {
                          "object": "order_item",
                          "product_id": "prod_5h1pp1ng",
                          "quantity": 1,
                          "amount": 0,
                          "price": 0,
                          "subtotal_amount": 0,
                          "product": {
                            "name": "Shipping"
                          }
                        }
                      ],
                      "metadata": {
                        "card": [
                          "Other"
                        ],
                        "region": "US",
                        "currency": "USD"
                      },
                      "customer": {
                        "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "address": null,
                        "summary": null,
                        "loyalty": null,
                        "referrals": null,
                        "object": "customer"
                      },
                      "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "referrer_id": null,
                      "object": "order"
                    },
                    "redemption": null
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.PUBLICATION.SUCCEEDED": {
      "post": {
        "operationId": "events-customer-publication-succeeded",
        "summary": "Publication succeeded",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerPublicationSucceededData"
              },
              "examples": {
                "customer.publication.succeeded": {
                  "value": {
                    "customer": {
                      "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "name": "Jack Webhook",
                      "email": null,
                      "source_id": "jck-wbhk",
                      "metadata": {
                        "region": "EMEA",
                        "sign-up": "true"
                      },
                      "object": "customer"
                    },
                    "campaign": {
                      "id": "camp_iRMdcq07g9W4dOSRXuTovupi",
                      "name": "Spring Discounts",
                      "campaign_type": "DISCOUNT_COUPONS",
                      "type": "AUTO_UPDATE",
                      "is_referral_code": false,
                      "voucher": {
                        "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": ""
                        }
                      },
                      "auto_join": false,
                      "join_once": false,
                      "active": true,
                      "category_id": "cat_0e156dab8f2e43873a",
                      "category": null,
                      "metadata": {},
                      "start_date": null,
                      "expiration_date": null,
                      "description": "Spring 2024 big campaign",
                      "created_at": "2024-02-21T10:01:24.102Z",
                      "updated_at": "2024-02-23T11:43:11.539Z",
                      "object": "campaign"
                    },
                    "publication": {
                      "id": "pub_DpHmhx5uTanbM0mnndFrODi1U3MEX6rF",
                      "object": "publication",
                      "result": "SUCCESS",
                      "channel": "voucherify-web-ui",
                      "voucher": {
                        "id": "v_Zmqfq7rKLPtSHv3aCGrD4863sIoQc4QO",
                        "code": "SPRING-2024-tPz",
                        "gift": null,
                        "type": "DISCOUNT_VOUCHER",
                        "active": true,
                        "assets": {
                          "qr": {
                            "id": "2658df7c-5943-477e-87f5-7e582a3e8913",
                            "url": "{{voucher_qr_code.url}}"
                          },
                          "barcode": {
                            "id": "2833ddba-5319-487d-9b0b-ec35a287a766",
                            "url": "{{voucher_barcode.url}}"
                          }
                        },
                        "object": "voucher",
                        "publish": {
                          "url": "/v1/vouchers/SPRING-2024-tPz/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": {},
                        "holder_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "categories": [
                          {
                            "id": "cat_0e156dab8f2e43873a",
                            "name": "Star Platinum",
                            "object": "category",
                            "hierarchy": 10,
                            "created_at": "2024-01-03T10:03:24.092Z"
                          }
                        ],
                        "created_at": "2024-03-13T13:45:41.161Z",
                        "redemption": {
                          "url": "/v1/vouchers/SPRING-2024-tPz/redemptions?page=1&limit=10",
                          "object": "list",
                          "quantity": 1,
                          "redeemed_quantity": 0
                        },
                        "start_date": null,
                        "updated_at": "2024-03-13T13:45:59.498Z",
                        "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
                      },
                      "customer": {
                        "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "name": "Jack Webhook",
                        "object": "customer",
                        "address": null,
                        "loyalty": null,
                        "summary": null,
                        "metadata": {
                          "region": "EMEA",
                          "sign-up": "true"
                        },
                        "referrals": null,
                        "source_id": "jck-wbhk"
                      },
                      "metadata": {},
                      "source_id": null,
                      "created_at": "2024-03-13T13:45:59.492Z",
                      "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "tracking_id": "jck-wbhk",
                      "vouchers_id": [
                        "v_Zmqfq7rKLPtSHv3aCGrD4863sIoQc4QO"
                      ]
                    },
                    "voucher": {
                      "id": "v_Zmqfq7rKLPtSHv3aCGrD4863sIoQc4QO",
                      "code": "SPRING-2024-tPz",
                      "discount": {
                        "type": "PERCENT",
                        "amount_limit": 3000,
                        "percent_off": 10,
                        "effect": "APPLY_TO_ORDER",
                        "percent_off_formula": "IF(ORDER_AMOUNT > 150;15;10)"
                      },
                      "type": "DISCOUNT_VOUCHER",
                      "campaign": "Spring Discounts",
                      "campaign_id": "camp_iRMdcq07g9W4dOSRXuTovupi",
                      "is_referral_code": false,
                      "holder_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                      "category_id": "cat_0e156dab8f2e43873a",
                      "active": true,
                      "created_at": "2024-03-13T13:45:41.161Z",
                      "updated_at": "2024-03-13T13:45:59.498Z",
                      "redemption": {
                        "quantity": 1,
                        "redeemed_quantity": 0
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "metadata": {},
                      "object": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "EVENTS.CUSTOMER.CUSTOM_EVENT": {
      "post": {
        "operationId": "events-customer-custom_event",
        "summary": "Custom_event",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Webhook accepted"
          },
          "202": {
            "description": "Webhook accepted"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCustomerCustomEventData"
              },
              "examples": {
                "customer.custom_event": {
                  "value": {
                    "event": {
                      "id": "event_0e70ee5acd8b2555ce",
                      "object": "event",
                      "type": "sign_up",
                      "customer": {
                        "id": "cust_154FDQKcbzygdo231M62r4CD"
                      },
                      "referral": null,
                      "loyalty": null,
                      "metadata": {
                        "source": "API"
                      },
                      "created_at": "2024-03-14T11:47:24.598Z"
                    },
                    "event_schema": {
                      "id": "ms_f1r5Tcu5T0m3v3nT5ch3ma",
                      "name": "sign_up"
                    },
                    "customer": {
                      "id": "cust_154FDQKcbzygdo231M62r4CD",
                      "name": "Alex Doe",
                      "email": null,
                      "source_id": "4lx-d03",
                      "metadata": {
                        "region": "EMEA"
                      },
                      "object": "customer"
                    },
                    "referral": null,
                    "loyalty": null
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}