{
  "openapi": "3.1.0",
  "info": {
    "title": "Events",
    "version": "2024-01-01"
  },
  "tags": [
    {
      "name": "Events redemption",
      "description": "Events redemption"
    },
    {
      "name": "Events customer",
      "description": "Events customer"
    },
    {
      "name": "Events publication",
      "description": "Events publication"
    },
    {
      "name": "Events voucher",
      "description": "Events voucher"
    },
    {
      "name": "Events campaign",
      "description": "Events campaign"
    },
    {
      "name": "Events bus_val_rule",
      "description": "Events bus_val_rule"
    },
    {
      "name": "Events distribution",
      "description": "Events distribution"
    }
  ],
  "paths": {
    "/EVENTS.REDEMPTION.SUCCEEDED": {
      "post": {
        "summary": "Succeeded",
        "description": "",
        "tags": [
          "Events redemption"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a redemption has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventRedemptionSucceededData"
                },
                "examples": {
                  "redemption.succeeded": {
                    "value": {
                      "customer": {
                        "id": "cust_1g637SqVZnkdPNdAIZ7Ra879",
                        "name": "Jane Doe",
                        "email": "jane@jane.io",
                        "source_id": "test_customer_id_2",
                        "metadata": {
                          "lang": "en",
                          "test": true,
                          "region": "EMEA"
                        },
                        "object": "customer"
                      },
                      "order": {
                        "id": "ord_3VYCHwdV0YOOch2nm1RsTKNI",
                        "source_id": null,
                        "status": "PAID",
                        "customer_id": "cust_1g637SqVZnkdPNdAIZ7Ra879",
                        "referrer_id": null,
                        "amount": 7000,
                        "items_discount_amount": 1000,
                        "items_applied_discount_amount": 1000,
                        "total_discount_amount": 1000,
                        "total_applied_discount_amount": 1000,
                        "total_amount": 6000,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "adv-mug",
                            "related_object": "product",
                            "quantity": 2,
                            "discount_quantity": 1,
                            "amount": 2000,
                            "discount_amount": 1000,
                            "applied_discount_amount": 1000,
                            "price": 1000,
                            "subtotal_amount": 1000
                          },
                          {
                            "object": "order_item",
                            "source_id": "star-th-bottle",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 5000,
                            "price": 2500,
                            "subtotal_amount": 5000
                          }
                        ],
                        "metadata": {},
                        "created_at": "2024-01-15T12:20:38.596843Z",
                        "object": "order"
                      },
                      "campaign": {
                        "id": "camp_kwMyXFKquedx8FzXNpVPN7QU",
                        "name": "Always add missing products",
                        "campaign_type": "DISCOUNT_COUPONS",
                        "type": "AUTO_UPDATE",
                        "is_referral_code": false,
                        "voucher": {
                          "type": "DISCOUNT_VOUCHER",
                          "discount": {
                            "type": "UNIT",
                            "units": null,
                            "effect": "ADD_NEW_ITEMS",
                            "unit_off": 1,
                            "unit_type": "prod_0df14b3a6ad8f282a8"
                          },
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0
                          },
                          "code_config": {
                            "length": 1,
                            "prefix": "Always-add-prods-",
                            "charset": "0123456789",
                            "pattern": "#",
                            "postfix": ""
                          }
                        },
                        "auto_join": false,
                        "join_once": false,
                        "active": true,
                        "category_id": null,
                        "created_at": "2023-12-08T13:54:29.003375Z",
                        "updated_at": "2023-12-15T11:07:05.173502Z",
                        "object": "campaign"
                      },
                      "voucher": {
                        "id": "v_VZgTRbJvauZR7Ub7exOtAg0MqxXljPpA",
                        "code": "Always-add-prods-5",
                        "discount": {
                          "type": "UNIT",
                          "unit_off": 1,
                          "unit_type": "prod_0df14b3a6ad8f282a8",
                          "effect": "ADD_NEW_ITEMS"
                        },
                        "type": "DISCOUNT_VOUCHER",
                        "campaign": "Always add missing products",
                        "campaign_id": "camp_kwMyXFKquedx8FzXNpVPN7QU",
                        "is_referral_code": false,
                        "category_id": null,
                        "active": true,
                        "created_at": "2023-12-08T14:01:18.213000Z",
                        "updated_at": "2024-01-15T12:20:38.624905Z",
                        "object": "voucher"
                      },
                      "holder": null,
                      "promotion_tier": null,
                      "redemption": {
                        "id": "r_0e2500291ae016adea",
                        "customer_id": "cust_1g637SqVZnkdPNdAIZ7Ra879",
                        "tracking_id": "track_Pw6r3ejnml43kIwNS4Zj09KZ67xOfLUy",
                        "date": "2024-01-15T12:20:38.635000Z",
                        "order": {
                          "id": "ord_3VYCHwdV0YOOch2nm1RsTKNI",
                          "source_id": null,
                          "status": "PAID",
                          "customer_id": "cust_1g637SqVZnkdPNdAIZ7Ra879",
                          "referrer_id": null,
                          "amount": 7000,
                          "items_discount_amount": 1000,
                          "items_applied_discount_amount": 1000,
                          "total_discount_amount": 1000,
                          "total_applied_discount_amount": 1000,
                          "total_amount": 6000,
                          "items": [
                            {
                              "object": "order_item",
                              "source_id": "adv-mug",
                              "related_object": "product",
                              "quantity": 2,
                              "discount_quantity": 1,
                              "amount": 2000,
                              "discount_amount": 1000,
                              "applied_discount_amount": 1000,
                              "price": 1000,
                              "subtotal_amount": 1000
                            },
                            {
                              "object": "order_item",
                              "source_id": "star-th-bottle",
                              "related_object": "product",
                              "quantity": 2,
                              "amount": 5000,
                              "price": 2500,
                              "subtotal_amount": 5000
                            }
                          ],
                          "metadata": {},
                          "created_at": "2024-01-15T12:20:38.596843Z",
                          "object": "order"
                        },
                        "customer": {
                          "id": "cust_1g637SqVZnkdPNdAIZ7Ra879",
                          "name": "Jane Doe",
                          "email": "jane@jane.io",
                          "source_id": "test_customer_id_2",
                          "metadata": {
                            "lang": "en",
                            "test": true,
                            "region": "EMEA"
                          },
                          "object": "customer"
                        },
                        "result": "SUCCESS",
                        "status": "SUCCEEDED",
                        "voucher": {
                          "id": "v_VZgTRbJvauZR7Ub7exOtAg0MqxXljPpA",
                          "code": "Always-add-prods-5",
                          "discount": {
                            "type": "UNIT",
                            "unit_off": 1,
                            "unit_type": "prod_0df14b3a6ad8f282a8",
                            "effect": "ADD_NEW_ITEMS"
                          },
                          "type": "DISCOUNT_VOUCHER",
                          "campaign": "Always add missing products",
                          "campaign_id": "camp_kwMyXFKquedx8FzXNpVPN7QU",
                          "is_referral_code": false,
                          "category_id": null,
                          "active": true,
                          "created_at": "2023-12-08T14:01:18.213000Z",
                          "updated_at": "2024-01-15T12:20:38.624905Z",
                          "object": "voucher"
                        },
                        "metadata": {},
                        "object": "redemption"
                      },
                      "created_at": "2024-01-15T12:20:38.636Z"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-redemption-succeeded"
      }
    },
    "/EVENTS.REDEMPTION.FAILED": {
      "post": {
        "summary": "Failed",
        "description": "",
        "tags": [
          "Events redemption"
        ],
        "responses": {
          "200": {
            "description": "Indicates that redemption is unsuccessful.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventRedemptionFailedData"
                },
                "examples": {
                  "redemption.failed": {
                    "value": {
                      "order": null,
                      "holder": null,
                      "voucher": null,
                      "campaign": null,
                      "customer": {
                        "id": "cust_1g637SqVZnkdPNdAIZ7Ra879",
                        "name": "Jane Doe",
                        "email": "jane@jane.io",
                        "object": "customer",
                        "metadata": {
                          "lang": "en",
                          "region": "EMEA"
                        },
                        "source_id": "test_customer_id_2"
                      },
                      "created_at": "2024-02-02T12:12:12.919Z",
                      "redemption": {
                        "id": "rf_0e3ac5685ba431c104",
                        "date": "2024-02-02T12:12:12.918Z",
                        "object": "redemption",
                        "result": "FAILURE",
                        "status": "FAILED",
                        "customer": {
                          "id": "cust_1g637SqVZnkdPNdAIZ7Ra879",
                          "name": "Jane Doe",
                          "email": "jane@jane.io",
                          "object": "customer",
                          "metadata": {
                            "lang": "en",
                            "region": "EMEA"
                          },
                          "source_id": "test_customer_id_2"
                        },
                        "metadata": {},
                        "customer_id": "cust_1g637SqVZnkdPNdAIZ7Ra879",
                        "tracking_id": "track_Pw6r3ejnml43kIwNS4Zj09KZ67xOfLUy",
                        "failure_code": "no_applicable_redeemables",
                        "failure_message": "No applicable redeemables"
                      },
                      "promotion_tier": null
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-redemption-failed"
      }
    },
    "/EVENTS.REDEMPTION.ROLLBACK.SUCCEEDED": {
      "post": {
        "summary": "Rollback succeeded",
        "description": "",
        "tags": [
          "Events redemption"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a redemption rollback is successful.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventRedemptionRollbackSucceededData"
                },
                "examples": {
                  "redemption.rollback.succeeded": {
                    "value": {
                      "order": {
                        "id": "ord_OPBS4bwowjzQ3odiMNk09WPL",
                        "items": [],
                        "object": "order",
                        "status": "CANCELED",
                        "metadata": {},
                        "source_id": null,
                        "created_at": "2024-02-01T08:45:31.967Z",
                        "updated_at": "2024-02-01T10:23:52.507Z",
                        "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "referrer_id": null
                      },
                      "holder": null,
                      "voucher": {
                        "id": "v_7JItZDjNzMjqSw0BZoxNEMBfdHHB9EHf",
                        "code": "Refer-gift-90873378",
                        "type": "DISCOUNT_VOUCHER",
                        "active": true,
                        "object": "voucher",
                        "campaign": "Refer-gift",
                        "discount": {
                          "type": "AMOUNT",
                          "amount_off": 0
                        },
                        "created_at": "2024-02-01T08:44:37.539Z",
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "updated_at": "2024-02-01T10:23:52.490Z",
                        "campaign_id": "camp_QULf1Wzu4yvT3cJ3IzFp76nY",
                        "category_id": null,
                        "is_referral_code": true
                      },
                      "campaign": {
                        "id": "camp_QULf1Wzu4yvT3cJ3IzFp76nY",
                        "name": "Refer-gift",
                        "type": "AUTO_UPDATE",
                        "active": true,
                        "object": "campaign",
                        "voucher": {
                          "gift": null,
                          "type": "DISCOUNT_VOUCHER",
                          "discount": {
                            "type": "AMOUNT",
                            "units": null,
                            "amount_off": 0
                          },
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0
                          },
                          "code_config": {
                            "length": 8,
                            "prefix": "Refer-gift-",
                            "charset": "0123456789",
                            "pattern": "########",
                            "postfix": ""
                          },
                          "loyalty_card": null
                        },
                        "auto_join": false,
                        "join_once": false,
                        "created_at": "2024-02-01T08:44:36.722Z",
                        "category_id": null,
                        "campaign_type": "REFERRAL_PROGRAM",
                        "is_referral_code": true,
                        "referral_program": {
                          "custom_event": {
                            "id": "ms_f1r5Tcu5T0m3v3nT5ch3ma",
                            "name": "sign_up"
                          },
                          "referee_reward": {
                            "type": "GIFT_VOUCHER",
                            "amount": 300,
                            "related_object_parent": {
                              "id": "camp_bfrwAVsP6Q1EM1ZjgHwheKYr",
                              "name": "Gift programme",
                              "object": "CAMPAIGN"
                            }
                          },
                          "conversion_event_type": "custom_event"
                        }
                      },
                      "customer": {
                        "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "name": "Jack Webhook",
                        "email": null,
                        "object": "customer",
                        "metadata": {
                          "region": "EMEA"
                        },
                        "source_id": "jck-wbhk"
                      },
                      "redemption": {
                        "id": "r_0e3ab1f3fb99fee4b9",
                        "date": "2024-02-01T08:45:32.014Z",
                        "order": {
                          "id": "ord_OPBS4bwowjzQ3odiMNk09WPL",
                          "items": [],
                          "object": "order",
                          "status": "PAID",
                          "metadata": {},
                          "source_id": null,
                          "created_at": "2024-02-01T08:45:31.967Z",
                          "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                          "referrer_id": null
                        },
                        "object": "redemption",
                        "result": "SUCCESS",
                        "status": "SUCCEEDED",
                        "voucher": {
                          "id": "v_7JItZDjNzMjqSw0BZoxNEMBfdHHB9EHf",
                          "code": "Refer-gift-90873378",
                          "active": null,
                          "object": "voucher",
                          "campaign": "Refer-gift",
                          "campaign_id": "camp_QULf1Wzu4yvT3cJ3IzFp76nY"
                        },
                        "customer": {
                          "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                          "name": "Jack Webhook",
                          "email": null,
                          "object": "customer",
                          "metadata": {
                            "region": "EMEA",
                            "sign-up": "true"
                          },
                          "source_id": "jck-wbhk"
                        },
                        "metadata": {},
                        "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "tracking_id": "track_8RFQINPxgc+pykybVOUEXQ=="
                      },
                      "promotion_tier": null,
                      "redemption_rollback": {
                        "id": "rr_0e3ac8762299fef1e3",
                        "date": "2024-02-01T10:23:52.499Z",
                        "order": {
                          "id": "ord_OPBS4bwowjzQ3odiMNk09WPL",
                          "items": [],
                          "object": "order",
                          "status": "CANCELED",
                          "metadata": {},
                          "source_id": null,
                          "created_at": "2024-02-01T08:45:31.967Z",
                          "updated_at": "2024-02-01T10:23:52.507Z",
                          "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                          "referrer_id": null
                        },
                        "object": "redemption_rollback",
                        "reason": "Fraud prevention",
                        "result": "SUCCESS",
                        "status": "SUCCEEDED",
                        "voucher": {
                          "id": "v_7JItZDjNzMjqSw0BZoxNEMBfdHHB9EHf",
                          "code": "Refer-gift-90873378",
                          "type": "DISCOUNT_VOUCHER",
                          "active": true,
                          "object": "voucher",
                          "campaign": "Refer-gift",
                          "discount": {
                            "type": "AMOUNT",
                            "amount_off": 0
                          },
                          "created_at": "2024-02-01T08:44:37.539Z",
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0
                          },
                          "updated_at": "2024-02-01T10:23:52.490Z",
                          "campaign_id": "camp_QULf1Wzu4yvT3cJ3IzFp76nY",
                          "category_id": null,
                          "is_referral_code": true
                        },
                        "customer": {
                          "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                          "name": "Jack Webhook",
                          "email": null,
                          "object": "customer",
                          "metadata": {
                            "region": "EMEA",
                            "sign-up": "true"
                          },
                          "source_id": "jck-wbhk"
                        },
                        "metadata": null,
                        "redemption": "r_0e3ab1f3fb99fee4b9",
                        "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "tracking_id": "track_8RFQINPxgc+pykybVOUEXQ=="
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-redemption-rollback-succeeded"
      }
    },
    "/EVENTS.REDEMPTION.ROLLBACK.FAILED": {
      "post": {
        "summary": "Rollback failed",
        "description": "",
        "tags": [
          "Events redemption"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a redemption rollback is unsuccessful.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventRedemptionRollbackFailedData"
                },
                "examples": {
                  "rollback.failed": {
                    "value": {
                      "order": null,
                      "holder": null,
                      "voucher": {
                        "id": "v_7JItZDjNzMjqSw0BZoxNEMBfdHHB9EHf",
                        "code": "Refer-gift-90873378",
                        "type": "DISCOUNT_VOUCHER",
                        "active": true,
                        "object": "voucher",
                        "campaign": "Refer-gift",
                        "discount": {
                          "type": "AMOUNT",
                          "amount_off": 0
                        },
                        "created_at": "2024-02-01T08:44:37.539Z",
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "updated_at": "2024-02-01T10:23:52.490Z",
                        "campaign_id": "camp_QULf1Wzu4yvT3cJ3IzFp76nY",
                        "category_id": null,
                        "is_referral_code": true
                      },
                      "campaign": {
                        "id": "camp_QULf1Wzu4yvT3cJ3IzFp76nY",
                        "name": "Refer-gift",
                        "type": "AUTO_UPDATE",
                        "active": true,
                        "object": "campaign",
                        "voucher": {
                          "gift": null,
                          "type": "DISCOUNT_VOUCHER",
                          "discount": {
                            "type": "AMOUNT",
                            "units": null,
                            "amount_off": 0
                          },
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0
                          },
                          "code_config": {
                            "length": 8,
                            "prefix": "Refer-gift-",
                            "charset": "0123456789",
                            "pattern": "########",
                            "postfix": ""
                          },
                          "loyalty_card": null
                        },
                        "auto_join": false,
                        "join_once": false,
                        "created_at": "2024-02-01T08:44:36.722Z",
                        "category_id": null,
                        "campaign_type": "REFERRAL_PROGRAM",
                        "is_referral_code": true,
                        "referral_program": {
                          "custom_event": {
                            "id": "ms_f1r5Tcu5T0m3v3nT5ch3ma",
                            "name": "sign_up"
                          },
                          "referee_reward": {
                            "type": "GIFT_VOUCHER",
                            "amount": 300,
                            "related_object_parent": {
                              "id": "camp_bfrwAVsP6Q1EM1ZjgHwheKYr",
                              "name": "Gift programme",
                              "object": "CAMPAIGN"
                            }
                          },
                          "conversion_event_type": "custom_event"
                        }
                      },
                      "customer": {
                        "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "object": "customer",
                        "metadata": {
                          "region": "EMEA",
                          "sign-up": "true"
                        },
                        "source_id": "jck-wbhk"
                      },
                      "redemption": {
                        "id": "r_0e3ab1f3fb99fee4b9",
                        "date": "2024-02-01T08:45:32.014Z",
                        "order": {
                          "id": "ord_OPBS4bwowjzQ3odiMNk09WPL",
                          "items": [],
                          "object": "order",
                          "status": "PAID",
                          "metadata": {},
                          "source_id": null,
                          "created_at": "2024-02-01T08:45:31.967Z",
                          "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                          "referrer_id": null
                        },
                        "object": "redemption",
                        "result": "SUCCESS",
                        "status": "ROLLED_BACK",
                        "voucher": {
                          "id": "v_7JItZDjNzMjqSw0BZoxNEMBfdHHB9EHf",
                          "code": "Refer-gift-90873378",
                          "active": null,
                          "object": "voucher",
                          "campaign": "Refer-gift",
                          "campaign_id": "camp_QULf1Wzu4yvT3cJ3IzFp76nY"
                        },
                        "customer": {
                          "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                          "name": "Jack Webhook",
                          "email": null,
                          "object": "customer",
                          "metadata": {
                            "region": "EMEA"
                          },
                          "source_id": "jck-wbhk"
                        },
                        "metadata": {},
                        "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "tracking_id": "track_8RFQINPxgc+pykybVOUEXQ=="
                      },
                      "promotion_tier": null,
                      "redemption_rollback": {
                        "id": "rrf_0e3ac8beeea431c302",
                        "date": "2024-02-01T10:25:07.002Z",
                        "object": "redemption_rollback",
                        "result": "FAILURE",
                        "status": "FAILED",
                        "voucher": {
                          "id": "v_7JItZDjNzMjqSw0BZoxNEMBfdHHB9EHf",
                          "code": "Refer-gift-90873378",
                          "type": "DISCOUNT_VOUCHER",
                          "active": true,
                          "object": "voucher",
                          "campaign": "Refer-gift",
                          "discount": {
                            "type": "AMOUNT",
                            "amount_off": 0
                          },
                          "created_at": "2024-02-01T08:44:37.539Z",
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0
                          },
                          "updated_at": "2024-02-01T10:23:52.490Z",
                          "campaign_id": "camp_QULf1Wzu4yvT3cJ3IzFp76nY",
                          "category_id": null,
                          "is_referral_code": true
                        },
                        "customer": {
                          "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                          "object": "customer",
                          "metadata": {
                            "region": "EMEA",
                            "sign-up": "true"
                          },
                          "source_id": "jck-wbhk"
                        },
                        "metadata": null,
                        "redemption": "r_0e3ab1f3fb99fee4b9",
                        "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "tracking_id": "track_8RFQINPxgc+pykybVOUEXQ==",
                        "failure_code": "already_rolled_back",
                        "failure_message": "Already rolled back"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-redemption-rollback-failed"
      }
    },
    "/EVENTS.CUSTOMER.CREATED": {
      "post": {
        "summary": "Created",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a customer has been created.",
            "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": {}
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-created"
      }
    },
    "/EVENTS.CUSTOMER.DELETED": {
      "post": {
        "summary": "Deleted",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a customer has been deleted.",
            "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": {}
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-deleted"
      }
    },
    "/EVENTS.CUSTOMER.REDEMPTION.SUCCEEDED": {
      "post": {
        "summary": "Redemption succeeded",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a customer has redeemed a voucher successfully.",
            "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"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-redemption-succeeded"
      }
    },
    "/EVENTS.CUSTOMER.REDEMPTION.ROLLBACK.SUCCEEDED": {
      "post": {
        "summary": "Redemption rollback succeeded",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a redemption rollback for a customer has been successful.",
            "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"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-redemption-rollback-succeeded"
      }
    },
    "/EVENTS.CUSTOMER.REWARDED": {
      "post": {
        "summary": "Rewarded",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a customer has received a reward.",
            "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
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-rewarded"
      }
    },
    "/EVENTS.CUSTOMER.REWARDED.LOYALTY_POINTS": {
      "post": {
        "summary": "Rewarded loyalty_points",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a customer has received loyalty points.",
            "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"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-rewarded-loyalty_points"
      }
    },
    "/EVENTS.CUSTOMER.REWARD_REDEMPTIONS.CREATED": {
      "post": {
        "summary": "Reward_redemptions created",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that redemption of a reward has been created for a customer.",
            "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"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-reward_redemptions-created"
      }
    },
    "/EVENTS.CUSTOMER.REWARD_REDEMPTIONS.PENDING": {
      "post": {
        "summary": "Reward_redemptions pending",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that redemption of a reward is pending for a customer.",
            "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"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-reward_redemptions-pending"
      }
    },
    "/EVENTS.CUSTOMER.REWARD_REDEMPTIONS.COMPLETED": {
      "post": {
        "summary": "Reward_redemptions completed",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that redemption of a reward has been completed for a customer.",
            "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"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-reward_redemptions-completed"
      }
    },
    "/EVENTS.CUSTOMER.VOUCHER.LOYALTY_CARD.PENDING_POINTS.ACTIVATED": {
      "post": {
        "summary": "Voucher loyalty_card pending_points activated",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that pending points were activated for a customer's loyalty card.",
            "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"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-voucher-loyalty_card-pending_points-activated"
      }
    },
    "/EVENTS.CUSTOMER.VOUCHER.LOYALTY_CARD.PENDING_POINTS.ADDED": {
      "post": {
        "summary": "Voucher loyalty_card pending_points added",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that pending points were added to a customer's loyalty card.",
            "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"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-voucher-loyalty_card-pending_points-added"
      }
    },
    "/EVENTS.CUSTOMER.VOUCHER.LOYALTY_CARD.PENDING_POINTS.CANCELED": {
      "post": {
        "summary": "Voucher loyalty_card pending_points canceled",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that pending points were canceled for a customer's loyalty card.",
            "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"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-voucher-loyalty_card-pending_points-canceled"
      }
    },
    "/EVENTS.CUSTOMER.VOUCHER.LOYALTY_CARD.PENDING_POINTS.UPDATED": {
      "post": {
        "summary": "Voucher loyalty_card pending_points updated",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that pending points were updated for a customer's loyalty card.",
            "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"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-voucher-loyalty_card-pending_points-updated"
      }
    },
    "/EVENTS.CUSTOMER.VOUCHER.LOYALTY_CARD.POINTS_ADDED": {
      "post": {
        "summary": "Voucher loyalty_card points_added",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a customer's loyalty card has received points.",
            "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"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-voucher-loyalty_card-points_added"
      }
    },
    "/EVENTS.CUSTOMER.VOUCHER.LOYALTY_CARD.POINTS_EXPIRED": {
      "post": {
        "summary": "Voucher loyalty_card points_expired",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that points have expired on a customer's loyalty card.",
            "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"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-voucher-loyalty_card-points_expired"
      }
    },
    "/EVENTS.CUSTOMER.VOUCHER.GIFT.BALANCE_ADDED": {
      "post": {
        "summary": "Voucher gift balance_added",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a customer's gift card has received additional balance.",
            "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"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-voucher-gift-balance_added"
      }
    },
    "/EVENTS.CUSTOMER.SEGMENT.ENTERED": {
      "post": {
        "summary": "Segment entered",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a customer has entered a segment.",
            "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"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-segment-entered"
      }
    },
    "/EVENTS.CUSTOMER.SEGMENT.LEFT": {
      "post": {
        "summary": "Segment left",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a customer has left a segment.",
            "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"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-segment-left"
      }
    },
    "/EVENTS.CUSTOMER.LOYALTY.TIER.JOINED": {
      "post": {
        "summary": "Loyalty tier joined",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a customer has joined a loyalty tier.",
            "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"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-loyalty-tier-joined"
      }
    },
    "/EVENTS.CUSTOMER.LOYALTY.TIER.UPGRADED": {
      "post": {
        "summary": "Loyalty tier upgraded",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a customer has entered a higher loyalty tier.",
            "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"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-loyalty-tier-upgraded"
      }
    },
    "/EVENTS.CUSTOMER.LOYALTY.TIER.DOWNGRADED": {
      "post": {
        "summary": "Loyalty tier downgraded",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a customer has entered a lower loyalty tier.",
            "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"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-loyalty-tier-downgraded"
      }
    },
    "/EVENTS.CUSTOMER.LOYALTY.TIER.PROLONGED": {
      "post": {
        "summary": "Loyalty tier prolonged",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a customer loyalty tier has been prolonged.",
            "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"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-loyalty-tier-prolonged"
      }
    },
    "/EVENTS.CUSTOMER.LOYALTY.TIER.LEFT": {
      "post": {
        "summary": "Loyalty tier left",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a customer has left the loyalty tier structure.",
            "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"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-loyalty-tier-left"
      }
    },
    "/EVENTS.CUSTOMER.HOLDER.ASSIGNMENT.CREATED": {
      "post": {
        "summary": "Holder assignment created",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a customer has been assigned a redeemable.",
            "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
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-holder-assignment-created"
      }
    },
    "/EVENTS.CUSTOMER.HOLDER.ASSIGNMENT.DELETED": {
      "post": {
        "summary": "Holder assignment deleted",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a customer has been removed from a redeemable.",
            "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"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-holder-assignment-deleted"
      }
    },
    "/EVENTS.CUSTOMER.ORDER.CREATED": {
      "post": {
        "summary": "Order created",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that an order has been created.",
            "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
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-order-created"
      }
    },
    "/EVENTS.CUSTOMER.ORDER.PAID": {
      "post": {
        "summary": "Order paid",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a customer has paid for the order.",
            "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
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-order-paid"
      }
    },
    "/EVENTS.CUSTOMER.ORDER.UPDATED": {
      "post": {
        "summary": "Order updated",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that the order has been updated.",
            "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
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-order-updated"
      }
    },
    "/EVENTS.CUSTOMER.ORDER.CANCELED": {
      "post": {
        "summary": "Order canceled",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that the order has been canceled.",
            "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
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-order-canceled"
      }
    },
    "/EVENTS.CUSTOMER.PUBLICATION.SUCCEEDED": {
      "post": {
        "summary": "Publication succeeded",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a voucher has been published successfully to a customer.",
            "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"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-publication-succeeded"
      }
    },
    "/EVENTS.CUSTOMER.CUSTOM_EVENT": {
      "post": {
        "summary": "Custom_event",
        "description": "",
        "tags": [
          "Events customer"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a customer-related custom event has occurred.",
            "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
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-customer-custom_event"
      }
    },
    "/EVENTS.PUBLICATION.SUCCEEDED": {
      "post": {
        "summary": "Succeeded",
        "description": "",
        "tags": [
          "Events publication"
        ],
        "responses": {
          "200": {
            "description": "Indicates that publication has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventPublicationSucceededData"
                },
                "examples": {
                  "publication.succeeded": {
                    "value": {
                      "user": {
                        "id": "user_ypzfEcSAphSONMGJRlj6trzXKsh7FGX7"
                      },
                      "campaign": {
                        "id": "camp_EV79Z6CjaAMpX4pFxVivvzzk",
                        "name": "Free product zero items-test",
                        "type": "AUTO_UPDATE",
                        "active": true,
                        "object": "campaign",
                        "voucher": {
                          "gift": null,
                          "type": "DISCOUNT_VOUCHER",
                          "discount": {
                            "type": "UNIT",
                            "units": null,
                            "effect": "ADD_NEW_ITEMS",
                            "unit_off": 0,
                            "unit_type": "prod_0df14b7e7d8975079d"
                          },
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0
                          },
                          "code_config": {
                            "length": 1,
                            "prefix": "ZERO-",
                            "charset": "0123456789",
                            "pattern": "#",
                            "postfix": ""
                          },
                          "loyalty_card": null
                        },
                        "auto_join": false,
                        "join_once": false,
                        "created_at": "2024-01-24T12:39:58.736Z",
                        "updated_at": "2024-01-24T12:41:49.631Z",
                        "category_id": null,
                        "campaign_type": "DISCOUNT_COUPONS",
                        "is_referral_code": false
                      },
                      "customer": {
                        "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "name": "Jack Webhook",
                        "email": null,
                        "object": "customer",
                        "metadata": {
                          "region": "EMEA"
                        },
                        "source_id": "jck-wbhk"
                      },
                      "vouchers": [
                        {
                          "id": "v_gZt6Zc74XKRv6VXSqubC2jDMfHjzbFPi",
                          "code": "ZERO-8",
                          "type": "DISCOUNT_VOUCHER",
                          "active": true,
                          "object": "voucher",
                          "campaign": "Free product zero items-test",
                          "discount": {
                            "type": "UNIT",
                            "effect": "ADD_NEW_ITEMS",
                            "unit_off": 0,
                            "unit_type": "prod_0df14b7e7d8975079d"
                          },
                          "holder_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                          "created_at": "2024-01-24T12:39:59.139Z",
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 5
                          },
                          "updated_at": "2024-02-01T12:54:33.183Z",
                          "campaign_id": "camp_EV79Z6CjaAMpX4pFxVivvzzk",
                          "category_id": null,
                          "is_referral_code": false
                        }
                      ],
                      "publication": {
                        "id": "pub_r0413bLwExpB6LE0v286eNVmEpx6NxmP",
                        "object": "publication",
                        "result": "SUCCESS",
                        "channel": "voucherify-web-ui",
                        "customer": {
                          "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                          "name": "Jack Webhook",
                          "object": "customer",
                          "address": null,
                          "loyalty": null,
                          "summary": null,
                          "metadata": {
                            "region": "EMEA"
                          },
                          "referrals": null,
                          "source_id": "jck-wbhk"
                        },
                        "metadata": {
                          "method": "manual"
                        },
                        "source_id": "public_321932",
                        "created_at": "2024-02-01T12:54:33.174Z",
                        "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "tracking_id": "jck-wbhk",
                        "vouchers_id": [
                          "v_gZt6Zc74XKRv6VXSqubC2jDMfHjzbFPi"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-publication-succeeded"
      }
    },
    "/EVENTS.VOUCHER.CREATED": {
      "post": {
        "summary": "Created",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a voucher has been created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventVoucherCreatedData"
                },
                "examples": {
                  "voucher.created": {
                    "value": {
                      "voucher": {
                        "id": "v_T3TAfGlOsyjEQkfvUvknNYfcynUEvJ3i",
                        "code": "Your-applicable-9",
                        "gift": null,
                        "type": "DISCOUNT_VOUCHER",
                        "active": true,
                        "assets": {
                          "qr": {
                            "id": "5a112cc9-900a-4d24-95b7-9680ca7f7133",
                            "url": "{{voucher_qr_code.url}}"
                          },
                          "barcode": {
                            "id": "c09881b3-b569-492f-82bb-5b977cd07b54",
                            "url": "{{voucher_barcode.url}}"
                          }
                        },
                        "object": "voucher",
                        "publish": {
                          "url": "/v1/vouchers/Your-applicable-9/publications?page=1&limit=10",
                          "count": 0,
                          "object": "list"
                        },
                        "campaign": "Your-campaign-applicable-to",
                        "category": null,
                        "discount": {
                          "type": "PERCENT",
                          "effect": "APPLY_TO_ITEMS",
                          "percent_off": 5,
                          "amount_limit": 15000,
                          "aggregated_amount_limit": 30000
                        },
                        "metadata": {},
                        "categories": [],
                        "created_at": "2024-02-09T11:11:11.111Z",
                        "redemption": {
                          "url": "/v1/vouchers/Your-applicable-9/redemptions?page=1&limit=10",
                          "object": "list",
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "start_date": "2024-02-17T00:00:00.000Z",
                        "updated_at": null,
                        "campaign_id": "camp_18NCNUkQIaXnqbHqhtQnt355",
                        "category_id": "cat_0e156dab8f2e43873a",
                        "loyalty_card": null,
                        "additional_info": "Additional information about the voucher",
                        "expiration_date": "2024-02-29T00:00:00.000Z",
                        "is_referral_code": false,
                        "validity_timeframe": null,
                        "validity_day_of_week": [
                          1,
                          0
                        ]
                      },
                      "campaign": {
                        "id": "camp_18NCNUkQIaXnqbHqhtQnt355",
                        "name": "Test-campaign-applicable-to",
                        "type": "AUTO_UPDATE",
                        "active": true,
                        "object": "campaign",
                        "voucher": {
                          "gift": null,
                          "type": "DISCOUNT_VOUCHER",
                          "discount": {
                            "type": "PERCENT",
                            "units": null,
                            "effect": "APPLY_TO_ITEMS",
                            "percent_off": 5,
                            "amount_limit": 15000,
                            "aggregated_amount_limit": 30000
                          },
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0
                          },
                          "code_config": {
                            "length": 1,
                            "prefix": "Your-applicable-",
                            "charset": "0123456789",
                            "pattern": "#",
                            "postfix": ""
                          },
                          "loyalty_card": null
                        },
                        "metadata": {},
                        "auto_join": false,
                        "join_once": false,
                        "created_at": "2024-02-09T10:16:04.352Z",
                        "category_id": null,
                        "campaign_type": "DISCOUNT_COUPONS",
                        "is_referral_code": false
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-voucher-created"
      }
    },
    "/EVENTS.VOUCHER.DISABLED": {
      "post": {
        "summary": "Disabled",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a voucher has been disabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventVoucherDisabledData"
                },
                "examples": {
                  "voucher.disabled": {
                    "value": {
                      "voucher": {
                        "id": "v_T3TAfGlOsyjEQkfvUvknNYfcynUEvJ3i",
                        "code": "Your-applicable-9",
                        "gift": null,
                        "type": "DISCOUNT_VOUCHER",
                        "active": false,
                        "assets": {
                          "qr": {
                            "id": "5a112cc9-900a-4d24-95b7-9680ca7f7133",
                            "url": "{{voucher_qr_code.url}}"
                          },
                          "barcode": {
                            "id": "c09881b3-b569-492f-82bb-5b977cd07b54",
                            "url": "{{voucher_barcode.url}}"
                          }
                        },
                        "object": "voucher",
                        "publish": {
                          "url": "/v1/vouchers/Your-applicable-9/publications?page=1&limit=10",
                          "count": 0,
                          "object": "list"
                        },
                        "campaign": "Test-campaign-applicable-to",
                        "category": "Star Platinum",
                        "discount": {
                          "type": "PERCENT",
                          "effect": "APPLY_TO_ITEMS",
                          "percent_off": 5,
                          "amount_limit": 15000,
                          "aggregated_amount_limit": 30000
                        },
                        "metadata": {},
                        "categories": [
                          {
                            "id": "cat_0e156dab8f2e43873a",
                            "name": "Star Platinum",
                            "object": "category",
                            "hierarchy": 10,
                            "created_at": "2024-01-03T10:03:24.092Z"
                          }
                        ],
                        "created_at": "2024-02-09T11:18:34.621Z",
                        "redemption": {
                          "url": "/v1/vouchers/Your-applicable-9/redemptions?page=1&limit=10",
                          "object": "list",
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "start_date": "2024-02-17T00:00:00.000Z",
                        "updated_at": "2024-02-09T11:33:46.580Z",
                        "campaign_id": "camp_18NCNUkQIaXnqbHqhtQnt355",
                        "category_id": "cat_0e156dab8f2e43873a",
                        "loyalty_card": null,
                        "additional_info": "Additional information about the voucher",
                        "expiration_date": "2024-02-29T00:00:00.000Z",
                        "is_referral_code": false,
                        "validity_timeframe": null,
                        "validity_day_of_week": [
                          1,
                          0
                        ],
                        "validation_rules_assignments": {
                          "data": [
                            {
                              "id": "asgm_2V5oGJRMK0fAPhwU",
                              "object": "validation_rules_assignment",
                              "rule_id": "val_WmgZXBqwCZrv",
                              "created_at": "2024-02-09T10:16:04.401Z",
                              "related_object_id": "camp_18NCNUkQIaXnqbHqhtQnt355",
                              "related_object_type": "campaign"
                            }
                          ],
                          "total": 1,
                          "object": "list",
                          "data_ref": "data"
                        }
                      },
                      "campaign": {
                        "id": "camp_18NCNUkQIaXnqbHqhtQnt355",
                        "name": "Test-campaign-applicable-to",
                        "object": "campaign"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-voucher-disabled"
      }
    },
    "/EVENTS.VOUCHER.ENABLED": {
      "post": {
        "summary": "Enabled",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a voucher has been enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventVoucherEnabledData"
                },
                "examples": {
                  "voucher.enabled": {
                    "value": {
                      "voucher": {
                        "id": "v_T3TAfGlOsyjEQkfvUvknNYfcynUEvJ3i",
                        "code": "Your-applicable-9",
                        "gift": null,
                        "type": "DISCOUNT_VOUCHER",
                        "active": true,
                        "assets": {
                          "qr": {
                            "id": "5a112cc9-900a-4d24-95b7-9680ca7f7133",
                            "url": "{{voucher_qr_code.url}}"
                          },
                          "barcode": {
                            "id": "c09881b3-b569-492f-82bb-5b977cd07b54",
                            "url": "{{voucher_barcode.url}}"
                          }
                        },
                        "object": "voucher",
                        "publish": {
                          "url": "/v1/vouchers/Your-applicable-9/publications?page=1&limit=10",
                          "count": 0,
                          "object": "list"
                        },
                        "campaign": "Your-campaign-applicable-to",
                        "category": "Star Platinum",
                        "discount": {
                          "type": "PERCENT",
                          "effect": "APPLY_TO_ITEMS",
                          "percent_off": 5,
                          "amount_limit": 15000,
                          "aggregated_amount_limit": 30000
                        },
                        "metadata": {},
                        "categories": [
                          {
                            "id": "cat_0e156dab8f2e43873a",
                            "name": "Star Platinum",
                            "object": "category",
                            "hierarchy": 10,
                            "created_at": "2024-01-03T10:03:24.092Z"
                          }
                        ],
                        "created_at": "2024-02-09T11:18:34.621Z",
                        "redemption": {
                          "url": "/v1/vouchers/Your-applicable-9/redemptions?page=1&limit=10",
                          "object": "list",
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "start_date": "2024-02-17T00:00:00.000Z",
                        "updated_at": "2024-02-09T11:34:02.496Z",
                        "campaign_id": "camp_18NCNUkQIaXnqbHqhtQnt355",
                        "category_id": "cat_0e156dab8f2e43873a",
                        "loyalty_card": null,
                        "additional_info": "Additional information about the voucher",
                        "expiration_date": "2024-02-29T00:00:00.000Z",
                        "is_referral_code": false,
                        "validity_timeframe": null,
                        "validity_day_of_week": [
                          1,
                          0
                        ],
                        "validation_rules_assignments": {
                          "data": [
                            {
                              "id": "asgm_2V5oGJRMK0fAPhwU",
                              "object": "validation_rules_assignment",
                              "rule_id": "val_WmgZXBqwCZrv",
                              "created_at": "2024-02-09T10:16:04.401Z",
                              "related_object_id": "camp_18NCNUkQIaXnqbHqhtQnt355",
                              "related_object_type": "campaign"
                            }
                          ],
                          "total": 1,
                          "object": "list",
                          "data_ref": "data"
                        }
                      },
                      "campaign": {
                        "id": "camp_18NCNUkQIaXnqbHqhtQnt355",
                        "name": "Test-campaign-applicable-to",
                        "object": "campaign"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-voucher-enabled"
      }
    },
    "/EVENTS.VOUCHER.UPDATED": {
      "post": {
        "summary": "Updated",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a voucher has been updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventVoucherUpdatedData"
                },
                "examples": {
                  "voucher.updated": {
                    "value": {
                      "voucher": {
                        "id": "v_EORkAULfvUsDf45sLckrboPi7Yl4FdjH",
                        "code": "10-percent-item-3",
                        "campaign": "Percent Item Discount Campaign",
                        "campaign_id": "camp_ILAvZfVhlUDm46S4DDZD6Yrv",
                        "category": null,
                        "category_id": "cat_0e156dab8f2e43873a",
                        "categories": [],
                        "type": "DISCOUNT_VOUCHER",
                        "discount": {
                          "type": "PERCENT",
                          "amount_limit": 5000,
                          "aggregated_amount_limit": 10000,
                          "percent_off": 10,
                          "effect": "APPLY_TO_ITEMS"
                        },
                        "gift": null,
                        "loyalty_card": null,
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "active": true,
                        "additional_info": null,
                        "metadata": {},
                        "assets": {
                          "qr": {
                            "id": "2d6ad829-a502-4dc1-b251-1522979b7c70",
                            "url": "{{voucher_qr_code.url}}"
                          },
                          "barcode": {
                            "id": "9d02c9a7-da65-41d9-b915-877880c92a52",
                            "url": "{{voucher_barcode.url}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2023-12-12T12:12:12.638000Z",
                        "updated_at": "2024-01-01T11:11:11.572692Z",
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 4,
                          "object": "list",
                          "url": "/v1/vouchers/10-percent-item-3/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 0,
                          "url": "/v1/vouchers/10-percent-item-3/publications?page=1&limit=10"
                        },
                        "object": "voucher"
                      },
                      "campaign": {
                        "id": "camp_ILAvZfVhlUDm46S4DDZD6Yrv",
                        "name": "Percent Item Discount Campaign",
                        "object": "campaign"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-voucher-updated"
      }
    },
    "/EVENTS.VOUCHER.PUBLISHED": {
      "post": {
        "summary": "Published",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a voucher has been published.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventVoucherPublishedData"
                },
                "examples": {
                  "voucher.published": {
                    "value": {
                      "customer": {
                        "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "name": "Jack Webhook",
                        "email": null,
                        "source_id": "jck-wbhk",
                        "metadata": {
                          "region": "EMEA"
                        },
                        "object": "customer"
                      },
                      "campaign": {
                        "id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                        "name": "Loyalty programme",
                        "campaign_type": "LOYALTY_PROGRAM",
                        "type": "AUTO_UPDATE",
                        "is_referral_code": false,
                        "voucher": {
                          "type": "LOYALTY_CARD",
                          "loyalty_card": {
                            "points": 0
                          },
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0
                          },
                          "code_config": {
                            "length": 8,
                            "prefix": "",
                            "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                            "pattern": "########",
                            "postfix": ""
                          }
                        },
                        "auto_join": true,
                        "join_once": true,
                        "active": true,
                        "category_id": null,
                        "created_at": "2024-01-18T15:18:38.577044Z",
                        "object": "campaign"
                      },
                      "publication": {
                        "id": "pub_mLP4jygSMXfVejD3T9DmpsvHYah0Nd0I",
                        "object": "publication",
                        "created_at": "2024-01-18T15:19:26.594000Z",
                        "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "tracking_id": "jck-wbhk",
                        "metadata": {},
                        "channel": "Automation",
                        "source_id": null,
                        "result": "SUCCESS",
                        "customer": {
                          "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                          "source_id": "jck-wbhk",
                          "name": "Jack Webhook",
                          "address": null,
                          "summary": null,
                          "loyalty": null,
                          "referrals": null,
                          "metadata": {
                            "region": "EMEA"
                          },
                          "object": "customer"
                        },
                        "vouchers_id": [
                          "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw"
                        ]
                      },
                      "voucher": {
                        "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                        "code": "L0y4L",
                        "loyalty_card": {
                          "points": 0,
                          "balance": 0
                        },
                        "type": "LOYALTY_CARD",
                        "campaign": "Loyalty programme",
                        "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                        "is_referral_code": false,
                        "holder_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "category_id": null,
                        "active": true,
                        "created_at": "2024-01-18T15:18:39.015000Z",
                        "updated_at": "2024-01-18T15:19:26.501570Z",
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0,
                          "redeemed_points": 0
                        },
                        "object": "voucher"
                      },
                      "created_at": "2024-01-18T15:19:26.595Z"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-voucher-published"
      }
    },
    "/EVENTS.VOUCHER.LOYALTY_CARD.TRANSACTION.CREATED": {
      "post": {
        "summary": "Loyalty_card transaction created",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a transaction has been created for a loyalty card.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventVoucherLoyaltyCardTransactionCreatedData"
                },
                "examples": {
                  "voucher.loyalty_card.transaction.created": {
                    "value": {
                      "transaction": {
                        "id": "vtx_0f1ad36b8992670da4",
                        "source_id": null,
                        "voucher_id": "v_9st8n1XRtoeBz85LPi7P9BCnKJS5OIIY",
                        "campaign_id": "camp_CF2h3bNSTGgH2dDdTDy60qYg",
                        "source": "Automation",
                        "reason": null,
                        "type": "POINTS_ACCRUAL",
                        "details": {
                          "balance": {
                            "type": "loyalty_card",
                            "total": 210,
                            "object": "balance",
                            "points": 10,
                            "balance": 210,
                            "related_object": {
                              "id": "v_9st8n1XRtoeBz85LPi7P9BCnKJS5OIIY",
                              "type": "voucher"
                            }
                          },
                          "order": {
                            "id": "ord_0f1ad36a828d1c7c5f",
                            "source_id": null
                          },
                          "event": {
                            "id": "evcus_0f1ad36a884d1c7c69",
                            "type": "customer.order.paid"
                          },
                          "earning_rule": {
                            "id": "ern_XbXveWmCdcjhmaxqf0wuFp0Q",
                            "source": {
                              "banner": "Basic points"
                            }
                          }
                        },
                        "related_transaction_id": null,
                        "created_at": "2024-07-24T10:51:30.608Z"
                      },
                      "voucher": {
                        "id": "v_9st8n1XRtoeBz85LPi7P9BCnKJS5OIIY",
                        "code": "8KBUE0M6",
                        "campaign": "new loyalty test",
                        "campaign_id": "camp_CF2h3bNSTGgH2dDdTDy60qYg",
                        "category": null,
                        "category_id": null,
                        "categories": [],
                        "type": "LOYALTY_CARD",
                        "discount": null,
                        "gift": null,
                        "loyalty_card": {
                          "points": 210,
                          "balance": 210,
                          "next_expiration_date": "2025-07-24",
                          "next_expiration_points": 110
                        },
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_hours": null,
                        "validity_day_of_week": null,
                        "active": true,
                        "additional_info": null,
                        "metadata": {},
                        "assets": {
                          "qr": {
                            "id": "8c63e9eb-576f-4cc8-91df-b6797b6de8c6",
                            "url": "{{voucher_qr_code.url}}"
                          },
                          "barcode": {
                            "id": "a713187b-792f-47b6-993c-c83bd340ffd9",
                            "url": "{{voucher_barcode.url}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2024-07-24T09:48:32.358Z",
                        "updated_at": "2024-07-24T10:51:30.608Z",
                        "holder_id": "cust_PL4iqfS8K5Ej2LuBNV1RqlfJ",
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0,
                          "redeemed_points": 0,
                          "object": "list",
                          "url": "/v1/vouchers/8KBUE0M6/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 1,
                          "url": "/v1/vouchers/8KBUE0M6/publications?page=1&limit=10"
                        },
                        "object": "voucher"
                      },
                      "campaign": {
                        "id": "camp_CF2h3bNSTGgH2dDdTDy60qYg",
                        "name": "new loyalty test",
                        "campaign_type": "LOYALTY_PROGRAM",
                        "type": "AUTO_UPDATE",
                        "is_referral_code": false,
                        "voucher": {
                          "type": "LOYALTY_CARD",
                          "discount": null,
                          "gift": null,
                          "loyalty_card": {
                            "points": 0,
                            "expiration_rules": {
                              "period_type": "MONTH",
                              "period_value": 12
                            }
                          },
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0
                          },
                          "code_config": {
                            "pattern": "########",
                            "length": 8,
                            "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                            "prefix": "",
                            "postfix": ""
                          }
                        },
                        "auto_join": false,
                        "join_once": true,
                        "active": true,
                        "category_id": null,
                        "category": null,
                        "metadata": {},
                        "start_date": null,
                        "expiration_date": null,
                        "description": null,
                        "created_at": "2024-07-24T09:48:31.790Z",
                        "updated_at": "2024-07-24T10:48:29.156Z",
                        "object": "campaign"
                      },
                      "holder": {
                        "id": "cust_PL4iqfS8K5Ej2LuBNV1RqlfJ",
                        "name": "John Demo",
                        "email": null,
                        "source_id": "230724-01",
                        "metadata": {},
                        "object": "customer"
                      },
                      "holder_loyalty_tier": {
                        "id": "ltr_0f1ac501ef53236abb",
                        "name": "Basic",
                        "campaign_id": "camp_CF2h3bNSTGgH2dDdTDy60qYg",
                        "metadata": {},
                        "created_at": "2024-07-24T09:48:32.573Z",
                        "updated_at": null,
                        "earning_rules": {},
                        "rewards": {},
                        "config": {
                          "points": {
                            "from": 0,
                            "to": 499
                          }
                        },
                        "points": {
                          "from": 0,
                          "to": 499
                        },
                        "expiration": {
                          "customer_id": "cust_PL4iqfS8K5Ej2LuBNV1RqlfJ",
                          "campaign_id": "camp_CF2h3bNSTGgH2dDdTDy60qYg",
                          "tier_id": "ltr_0f1ac501ef53236abb",
                          "start_date": "2024-07-24",
                          "created_at": "2024-07-24T09:52:21.616Z"
                        },
                        "object": "loyalty_tier"
                      },
                      "balance": {
                        "points": 10,
                        "total": 210,
                        "balance": 210,
                        "type": "loyalty_card",
                        "object": "balance",
                        "related_object": {
                          "type": "voucher",
                          "id": "v_9st8n1XRtoeBz85LPi7P9BCnKJS5OIIY"
                        }
                      },
                      "order": {
                        "id": "ord_0f1ad36a828d1c7c5f",
                        "source_id": null,
                        "status": "PAID",
                        "customer_id": "cust_PL4iqfS8K5Ej2LuBNV1RqlfJ",
                        "referrer_id": null,
                        "amount": 1000,
                        "total_amount": 1000,
                        "items": [
                          {
                            "id": "ordli_0f1ad36a820d1c7c5e",
                            "object": "order_item",
                            "source_id": "123123123",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 1000,
                            "price": 1000,
                            "subtotal_amount": 1000
                          }
                        ],
                        "metadata": {
                          "location": "Katowice"
                        },
                        "created_at": "2024-07-24T10:51:29.669Z",
                        "object": "order"
                      },
                      "event": {
                        "id": "evcus_0f1ad36a884d1c7c69",
                        "type": "customer.order.paid",
                        "category": "EFFECT",
                        "entity_id": "cust_PL4iqfS8K5Ej2LuBNV1RqlfJ",
                        "created_at": "2024-07-24T10:51:29.670Z",
                        "group_id": "v-0f1ad36a77025ce17c"
                      },
                      "earning_rule": {
                        "id": "ern_XbXveWmCdcjhmaxqf0wuFp0Q",
                        "campaign_id": "camp_CF2h3bNSTGgH2dDdTDy60qYg",
                        "validation_rule_id": null,
                        "parameters": {
                          "event": "order.paid",
                          "banner": "Basic points",
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "ORDER_TOTAL_AMOUNT",
                            "order": {
                              "total_amount": {
                                "every": 100,
                                "points": 1
                              }
                            }
                          }
                        },
                        "automation_id": "auto_y1JL5lMLJXYVQUCyOP1D9gOC",
                        "active": true,
                        "metadata": {
                          "sponsors": [
                            "sponsor1"
                          ]
                        }
                      },
                      "segment": null,
                      "loyalty_tier": null,
                      "redemption": null,
                      "rollback": null,
                      "reward": null,
                      "custom_event": null,
                      "source_voucher": null,
                      "destination_voucher": null
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-voucher-loyalty_card-transaction-created"
      }
    },
    "/EVENTS.VOUCHER.LOYALTY_CARD.PENDING_POINTS.ACTIVATED": {
      "post": {
        "summary": "Loyalty_card pending_points activated",
        "description": "",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Indicates that pending points were activated for a loyalty card.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventVoucherLoyaltyCardPendingPointsActivatedData"
                },
                "examples": {
                  "voucher.loyalty_card.pending_points.activated": {
                    "value": {
                      "customer": {
                        "id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                        "name": "Alex Doe",
                        "email": null,
                        "source_id": "4lx-d03",
                        "metadata": {},
                        "object": "customer"
                      },
                      "campaign": {
                        "id": "camp_E14SFSXh2JueXgZ0wFarf3jU",
                        "name": "Loyalty program",
                        "campaign_type": "LOYALTY_PROGRAM",
                        "type": "AUTO_UPDATE",
                        "is_referral_code": false,
                        "voucher": {
                          "type": "LOYALTY_CARD",
                          "discount": null,
                          "gift": null,
                          "loyalty_card": {
                            "points": 0
                          },
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0
                          },
                          "code_config": {
                            "pattern": "########",
                            "length": 8,
                            "charset": "0123456789",
                            "prefix": "",
                            "postfix": ""
                          }
                        },
                        "auto_join": false,
                        "join_once": true,
                        "active": true,
                        "category_id": null,
                        "category": null,
                        "metadata": {},
                        "start_date": null,
                        "expiration_date": null,
                        "description": null,
                        "created_at": "2025-01-07T12:44:10.211Z",
                        "object": "campaign"
                      },
                      "voucher": {
                        "id": "v_bITntTcyfRHPvrOMgwdQVSlShsWRZu4v",
                        "code": "67028386",
                        "loyalty_card": {
                          "points": 23,
                          "balance": 23,
                          "pending_points": 46
                        },
                        "type": "LOYALTY_CARD",
                        "campaign": "Loyalty Program",
                        "campaign_id": "camp_E14SFSXh2JueXgZ0wFarf3jU",
                        "is_referral_code": false,
                        "holder_id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                        "category_id": null,
                        "active": true,
                        "created_at": "2025-01-07T12:44:11.371Z",
                        "updated_at": "2025-01-08T14:08:34.127Z",
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0,
                          "redeemed_points": 0
                        },
                        "start_date": null,
                        "expiration_date": null,
                        "metadata": {},
                        "object": "voucher"
                      },
                      "balance": {
                        "points": 23,
                        "total": 23,
                        "balance": 23,
                        "type": "loyalty_card",
                        "object": "balance",
                        "related_object": {
                          "type": "voucher",
                          "id": "v_bITntTcyfRHPvrOMgwdQVSlShsWRZu4v"
                        },
                        "operation_type": "MANUAL"
                      },
                      "order": {
                        "id": "ord_0ff203bb8a0ca13337",
                        "source_id": null,
                        "status": "PAID",
                        "customer_id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                        "referrer_id": null,
                        "amount": 500,
                        "total_amount": 500,
                        "items": [
                          {
                            "id": "ordli_0ff203bb898ca13335",
                            "object": "order_item",
                            "product_id": "prod_0fc35dfeabcdefeb80",
                            "quantity": 1,
                            "amount": 500,
                            "price": 500,
                            "subtotal_amount": 500
                          },
                          {
                            "id": "ordli_0ff203bb898ca13336",
                            "object": "order_item",
                            "product_id": "prod_5h1pp1ng",
                            "quantity": 1,
                            "amount": 0,
                            "price": 0,
                            "subtotal_amount": 0
                          }
                        ],
                        "metadata": {
                          "card": [
                            "Other"
                          ],
                          "region": "US",
                          "currency": "USD"
                        },
                        "created_at": "2025-01-07T14:16:01.311Z",
                        "object": "order"
                      },
                      "transaction": {
                        "id": "vtx_0ff34b9df109a39357",
                        "source_id": null,
                        "voucher_id": "v_bITntTcyfRHPvrOMgwdQVSlShsWRZu4v",
                        "campaign_id": "camp_E14SFSXh2JueXgZ0wFarf3jU",
                        "source": null,
                        "reason": null,
                        "type": "PENDING_POINTS_ACTIVATION",
                        "details": {
                          "balance": {
                            "type": "loyalty_card",
                            "total": 23,
                            "object": "balance",
                            "points": 23,
                            "balance": 23,
                            "operation_type": "MANUAL",
                            "related_object": {
                              "id": "v_bITntTcyfRHPvrOMgwdQVSlShsWRZu4v",
                              "type": "voucher"
                            }
                          },
                          "order": {
                            "id": "ord_0ff203bb8a0ca13337",
                            "source_id": null
                          },
                          "event": {
                            "id": "evcus_0ff203bb8d4ca13341",
                            "type": "customer.order.paid"
                          },
                          "earning_rule": {
                            "id": "ern_vjzc7A2IHoCUbl5lyO6kyJQM",
                            "source": {
                              "banner": "Here come your loyalty points"
                            }
                          },
                          "pending_points": {
                            "id": "lopp_0ffd9a0a87c8dd17c9",
                            "points": 23,
                            "details": {
                              "event": {
                                "id": "evcus_0ff203bb8d4ca13341",
                                "type": "customer.order.paid",
                                "category": "EFFECT",
                                "group_id": "v-0ff203bb84d36fe41a",
                                "entity_id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                                "created_at": "2025-01-07T14:16:01.312Z",
                                "event_source": {
                                  "user": {
                                    "id": "user_ypzfEcSAphSONMGJRlj6trzXKsh7FGX7"
                                  },
                                  "channel": "USER_PORTAL"
                                }
                              },
                              "order": {
                                "id": "ord_0ff203bb8a0ca13337",
                                "source_id": null
                              },
                              "earning_rule": {
                                "id": "ern_vjzc7A2IHoCUbl5lyO6kyJQM",
                                "source": {
                                  "banner": "Here come your loyalty points"
                                }
                              }
                            },
                            "order_id": "ord_0ff203bb8a0ca13337",
                            "created_at": "2025-01-07T14:16:02.296Z",
                            "voucher_id": "v_bITntTcyfRHPvrOMgwdQVSlShsWRZu4v",
                            "campaign_id": "camp_E14SFSXh2JueXgZ0wFarf3jU",
                            "customer_id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                            "activates_at": "2025-01-16"
                          }
                        },
                        "related_transaction_id": null,
                        "created_at": "2025-01-08T14:08:34.127Z"
                      },
                      "pending_points": {
                        "id": "lopp_0ffd9a0a87c8dd17c9",
                        "voucher_id": "v_bITntTcyfRHPvrOMgwdQVSlShsWRZu4v",
                        "campaign_id": "camp_E14SFSXh2JueXgZ0wFarf3jU",
                        "customer_id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                        "order_id": "ord_0ff203bb8a0ca13337",
                        "points": 23,
                        "activates_at": "2025-01-16",
                        "details": {
                          "event": {
                            "id": "evcus_0ff203bb8d4ca13341",
                            "type": "customer.order.paid",
                            "group_id": "v-0ff203bb84d36fe41a",
                            "entity_id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                            "created_at": "2025-01-07T14:16:01.312Z",
                            "category": "EFFECT",
                            "event_source": {
                              "channel": "USER_PORTAL",
                              "user": {
                                "id": "user_ypzfEcSAphSONMGJRlj6trzXKsh7FGX7"
                              }
                            }
                          },
                          "earning_rule": {
                            "id": "ern_vjzc7A2IHoCUbl5lyO6kyJQM",
                            "source": {
                              "banner": "Here come your loyalty points"
                            }
                          },
                          "order": {
                            "id": "ord_0ff203bb8a0ca13337",
                            "source_id": null
                          }
                        },
                        "created_at": "2025-01-07T14:16:02.296Z"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-voucher-loyalty_card-pending_points-activated"
      }
    },
    "/EVENTS.VOUCHER.LOYALTY_CARD.PENDING_POINTS.ADDED": {
      "post": {
        "summary": "Loyalty_card pending_points added",
        "description": "",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Indicates that pending points were added to a loyalty card.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventVoucherLoyaltyCardPendingPointsAddedData"
                },
                "examples": {
                  "voucher.loyalty_card.pending_points.added": {
                    "value": {
                      "voucher": {
                        "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                        "code": "L0y4L",
                        "loyalty_card": {
                          "points": 2187,
                          "balance": 7,
                          "next_expiration_date": "2026-01-31",
                          "next_expiration_points": 7,
                          "pending_points": 1234
                        },
                        "type": "LOYALTY_CARD",
                        "campaign": "Loyalty program",
                        "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                        "is_referral_code": false,
                        "holder_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "category_id": "cat_0e156dab8f2e43873a",
                        "active": true,
                        "created_at": "2024-01-18T15:18:39.015Z",
                        "updated_at": "2025-01-27T09:00:51.058Z",
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 19,
                          "redeemed_points": 2180
                        },
                        "start_date": null,
                        "expiration_date": null,
                        "metadata": {},
                        "object": "voucher",
                        "categories": [
                          {
                            "id": "cat_0e156dab8f2e43873a",
                            "name": "Star Platinum",
                            "hierarchy": 10,
                            "created_at": "2024-01-03T10:03:24.092Z",
                            "object": "category"
                          }
                        ],
                        "category": "Star Platinum"
                      },
                      "voucher_pending_points_balance": {
                        "points": 1,
                        "total": 1234,
                        "object": "balance",
                        "related_object": {
                          "type": "voucher",
                          "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw"
                        },
                        "operation_type": "AUTOMATIC"
                      },
                      "campaign": {
                        "id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                        "name": "Loyalty programme",
                        "campaign_type": "LOYALTY_PROGRAM",
                        "type": "AUTO_UPDATE",
                        "is_referral_code": false,
                        "voucher": {
                          "type": "LOYALTY_CARD",
                          "discount": null,
                          "gift": null,
                          "loyalty_card": {
                            "points": 0,
                            "expiration_rules": {
                              "period_type": "MONTH",
                              "period_value": 2,
                              "rounding_type": "PARTICULAR_MONTH",
                              "rounding_value": 1
                            }
                          },
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0
                          },
                          "code_config": {
                            "pattern": "########",
                            "length": 8,
                            "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                            "prefix": "",
                            "postfix": ""
                          }
                        },
                        "auto_join": false,
                        "join_once": true,
                        "active": true,
                        "category_id": null,
                        "category": null,
                        "metadata": {},
                        "start_date": null,
                        "expiration_date": null,
                        "description": null,
                        "created_at": "2024-01-18T15:18:38.577Z",
                        "updated_at": "2024-08-12T19:37:49.750Z",
                        "object": "campaign"
                      },
                      "customer": {
                        "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "name": "Jack Webhook",
                        "email": null,
                        "source_id": "jck-wbhk",
                        "metadata": {
                          "region": "EMEA",
                          "sign-up": "true"
                        },
                        "object": "customer"
                      },
                      "order": {
                        "id": "ord_100b7b63c54d4d6ec0",
                        "source_id": "test_20250127-001",
                        "status": "PAID",
                        "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "referrer_id": null,
                        "amount": 2499,
                        "total_amount": 2499,
                        "items": [
                          {
                            "id": "ordli_100b7b63c48d4d6ebd",
                            "object": "order_item",
                            "product_id": "prod_0f59fdfe17e465fa05",
                            "quantity": 1,
                            "amount": 500,
                            "price": 500,
                            "subtotal_amount": 500
                          },
                          {
                            "id": "ordli_100b7b63c48d4d6ebe",
                            "object": "order_item",
                            "product_id": "prod_0f0a6020cf2c301fdd",
                            "quantity": 1,
                            "amount": 900,
                            "price": 900,
                            "subtotal_amount": 900
                          },
                          {
                            "id": "ordli_100b7b63c48d4d6ebf",
                            "object": "order_item",
                            "product_id": "prod_0ef925321f691a234d",
                            "sku_id": "sku_0ef9253223e91a2354",
                            "quantity": 1,
                            "amount": 1099,
                            "price": 1099,
                            "subtotal_amount": 1099
                          }
                        ],
                        "created_at": "2025-01-27T09:00:50.320Z",
                        "object": "order"
                      },
                      "pending_points": {
                        "id": "lopp_100cc4fac41469454d",
                        "voucher_id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                        "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                        "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "order_id": "ord_100b7b63c54d4d6ec0",
                        "points": 1,
                        "activates_at": "2025-01-28",
                        "details": {
                          "holder_loyalty_tier": {
                            "id": "ltr_0e30613ad01f044517",
                            "name": "Loyal Star Platinum"
                          },
                          "event": {
                            "id": "evcus_100b7b63c78d4d6eca",
                            "type": "customer.order.paid",
                            "group_id": "v-100b7b63aedd691db6",
                            "entity_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                            "created_at": "2025-01-27T09:00:50.321Z",
                            "category": "EFFECT",
                            "event_source": {
                              "channel": "API",
                              "api_key": {
                                "name": "Primary",
                                "app_id": "12abc345-678d-901e-f234-gh5i6j7k8901"
                              }
                            }
                          },
                          "earning_rule": {
                            "id": "ern_FQxftbKUq9E93k00Z3qkC0sX",
                            "source": {
                              "banner": "Order-paid"
                            }
                          },
                          "order": {
                            "id": "ord_100b7b63c54d4d6ec0",
                            "source_id": "test_20250127-001"
                          }
                        },
                        "created_at": "2025-01-27T09:00:51.058Z"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-voucher-loyalty_card-pending_points-added"
      }
    },
    "/EVENTS.VOUCHER.LOYALTY_CARD.PENDING_POINTS.CANCELED": {
      "post": {
        "summary": "Loyalty_card pending_points canceled",
        "description": "",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Indicates that pending points were canceled for a loyalty card.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventVoucherLoyaltyCardPendingPointsCanceledData"
                },
                "examples": {
                  "voucher.loyalty_card.pending_points.canceled": {
                    "value": {
                      "customer": {
                        "id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                        "name": "Alex Doe",
                        "email": null,
                        "source_id": "4lx-d03",
                        "metadata": {},
                        "object": "customer"
                      },
                      "campaign": {
                        "id": "camp_E14SFSXh2JueXgZ0wFarf3jU",
                        "name": "Loyalty program",
                        "campaign_type": "LOYALTY_PROGRAM",
                        "type": "AUTO_UPDATE",
                        "is_referral_code": false,
                        "voucher": {
                          "type": "LOYALTY_CARD",
                          "discount": null,
                          "gift": null,
                          "loyalty_card": {
                            "points": 0
                          },
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0
                          },
                          "code_config": {
                            "pattern": "########",
                            "length": 8,
                            "charset": "0123456789",
                            "prefix": "",
                            "postfix": ""
                          }
                        },
                        "auto_join": false,
                        "join_once": true,
                        "active": true,
                        "category_id": null,
                        "category": null,
                        "metadata": {},
                        "start_date": null,
                        "expiration_date": null,
                        "description": null,
                        "created_at": "2025-01-07T12:44:10.211Z",
                        "object": "campaign"
                      },
                      "voucher": {
                        "id": "v_bITntTcyfRHPvrOMgwdQVSlShsWRZu4v",
                        "code": "67028386",
                        "loyalty_card": {
                          "points": 23,
                          "balance": 23,
                          "pending_points": 23
                        },
                        "type": "LOYALTY_CARD",
                        "campaign": "Loyalty program",
                        "campaign_id": "camp_E14SFSXh2JueXgZ0wFarf3jU",
                        "is_referral_code": false,
                        "holder_id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                        "category_id": null,
                        "active": true,
                        "created_at": "2025-01-07T12:44:11.371Z",
                        "updated_at": "2025-01-08T14:10:48.300Z",
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0,
                          "redeemed_points": 0
                        },
                        "start_date": null,
                        "expiration_date": null,
                        "metadata": {},
                        "object": "voucher"
                      },
                      "voucher_pending_points_balance": {
                        "points": -23,
                        "total": 23,
                        "object": "balance",
                        "related_object": {
                          "type": "voucher",
                          "id": "v_bITntTcyfRHPvrOMgwdQVSlShsWRZu4v"
                        },
                        "operation_type": "MANUAL"
                      },
                      "order": {
                        "id": "ord_0ff3476ebb49a3901d",
                        "source_id": null,
                        "status": "PAID",
                        "customer_id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                        "referrer_id": null,
                        "amount": 500,
                        "total_amount": 500,
                        "items": [
                          {
                            "id": "ordli_0ff3476ebac9a3901b",
                            "object": "order_item",
                            "product_id": "prod_0fc35dfeabcdefeb80",
                            "quantity": 1,
                            "amount": 500,
                            "price": 500,
                            "subtotal_amount": 500
                          },
                          {
                            "id": "ordli_0ff3476ebac9a3901c",
                            "object": "order_item",
                            "product_id": "prod_5h1pp1ng",
                            "quantity": 1,
                            "amount": 0,
                            "price": 0,
                            "subtotal_amount": 0
                          }
                        ],
                        "metadata": {
                          "card": [
                            "Other"
                          ],
                          "region": "US",
                          "currency": "USD"
                        },
                        "created_at": "2025-01-08T13:50:17.318Z",
                        "object": "order"
                      },
                      "redemption": null,
                      "pending_points": {
                        "id": "lopp_0ff49105b988dd5c8f",
                        "voucher_id": "v_bITntTcyfRHPvrOMgwdQVSlShsWRZu4v",
                        "campaign_id": "camp_E14SFSXh2JueXgZ0wFarf3jU",
                        "customer_id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                        "order_id": "ord_0ff3476ebb49a3901d",
                        "points": 23,
                        "activates_at": "2025-01-09",
                        "details": {
                          "event": {
                            "id": "evcus_0ff3476ebf89a39027",
                            "type": "customer.order.paid",
                            "group_id": "v-0ff3476eb50dfac446",
                            "entity_id": "cust_KiZa6C6R30sgqqpU76o6B7u0",
                            "created_at": "2025-01-08T13:50:17.319Z",
                            "category": "EFFECT",
                            "event_source": {
                              "channel": "USER_PORTAL",
                              "user": {
                                "id": "user_ypzfEcSAphSONMGJRlj6trzXKsh7FGX7"
                              }
                            }
                          },
                          "earning_rule": {
                            "id": "ern_vjzc7A2IHoCUbl5lyO6kyJQM",
                            "source": {
                              "banner": "Here come your loyalty points"
                            }
                          },
                          "order": {
                            "id": "ord_0ff3476ebb49a3901d",
                            "source_id": null
                          }
                        },
                        "created_at": "2025-01-08T13:50:17.680Z"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-voucher-loyalty_card-pending_points-canceled"
      }
    },
    "/EVENTS.VOUCHER.LOYALTY_CARD.PENDING_POINTS.UPDATED": {
      "post": {
        "summary": "Loyalty_card pending_points updated",
        "description": "",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Indicates that pending points were updated for a loyalty card.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventVoucherLoyaltyCardPendingPointsUpdatedData"
                },
                "examples": {
                  "voucher.loyalty_card.pending_points.canceled": {
                    "value": {
                      "voucher": {
                        "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                        "code": "L0y4L",
                        "loyalty_card": {
                          "points": 28786,
                          "balance": 5156,
                          "next_expiration_date": "2026-01-31",
                          "next_expiration_points": 23786,
                          "pending_points": 41,
                          "subtracted_points": 4000
                        },
                        "type": "LOYALTY_CARD",
                        "campaign": "Loyalty programme",
                        "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                        "is_referral_code": false,
                        "holder_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "category_id": "cat_0e156dab8f2e43873a",
                        "active": true,
                        "created_at": "2024-01-18T15:18:39.015Z",
                        "updated_at": "2025-03-06T11:39:53.395Z",
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 262,
                          "redeemed_points": 19630
                        },
                        "start_date": null,
                        "expiration_date": null,
                        "metadata": {},
                        "object": "voucher",
                        "categories": [
                          {
                            "id": "cat_0e156dab8f2e43873a",
                            "name": "Star Platinum",
                            "hierarchy": 10,
                            "created_at": "2024-01-03T10:03:24.092Z",
                            "object": "category"
                          }
                        ],
                        "category": "Star Platinum"
                      },
                      "voucher_pending_points_balance": {
                        "points": 10,
                        "total": 41,
                        "object": "balance",
                        "related_object": {
                          "type": "voucher",
                          "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw"
                        },
                        "operation_type": "MANUAL"
                      },
                      "campaign": {
                        "id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                        "name": "Loyalty programme",
                        "campaign_type": "LOYALTY_PROGRAM",
                        "type": "AUTO_UPDATE",
                        "is_referral_code": false,
                        "voucher": {
                          "type": "LOYALTY_CARD",
                          "discount": null,
                          "gift": null,
                          "loyalty_card": {
                            "points": 0,
                            "expiration_rules": {
                              "period_type": "MONTH",
                              "period_value": 2,
                              "rounding_type": "PARTICULAR_MONTH",
                              "rounding_value": 1
                            }
                          },
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0
                          },
                          "code_config": {
                            "pattern": "########",
                            "length": 8,
                            "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                            "prefix": "",
                            "postfix": ""
                          }
                        },
                        "auto_join": false,
                        "join_once": true,
                        "active": true,
                        "category_id": null,
                        "category": null,
                        "metadata": {},
                        "start_date": null,
                        "expiration_date": null,
                        "description": null,
                        "created_at": "2024-01-18T15:18:38.577Z",
                        "updated_at": "2024-08-12T19:37:49.750Z",
                        "object": "campaign"
                      },
                      "customer": {
                        "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "name": "Jack Webhook",
                        "email": null,
                        "source_id": "jck-wbhk",
                        "metadata": {
                          "region": "EMEA",
                          "sign-up": "true"
                        },
                        "object": "customer"
                      },
                      "order": {
                        "id": "ord_103c8af3c09ea311b4",
                        "source_id": null,
                        "status": "PAID",
                        "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "referrer_id": null,
                        "amount": 36500,
                        "discount_amount": 50,
                        "total_discount_amount": 50,
                        "total_amount": 36450,
                        "items": [
                          {
                            "id": "ordli_103c8af3c09ea311b5",
                            "object": "order_item",
                            "source_id": "adv-scks",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 1500,
                            "price": 1500,
                            "subtotal_amount": 1500
                          },
                          {
                            "id": "ordli_103c8af3c09ea311b6",
                            "object": "order_item",
                            "source_id": "adv-tshirt",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 5000,
                            "price": 2500,
                            "subtotal_amount": 5000
                          },
                          {
                            "id": "ordli_103c8af3c09ea311b7",
                            "object": "order_item",
                            "source_id": "adv-poster",
                            "related_object": "product",
                            "quantity": 10,
                            "amount": 25000,
                            "price": 2500,
                            "subtotal_amount": 25000
                          },
                          {
                            "id": "ordli_103c8af3c09ea311b8",
                            "object": "order_item",
                            "source_id": "adv-poster",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 2500,
                            "price": 2500,
                            "subtotal_amount": 2500
                          },
                          {
                            "id": "ordli_103c8af3c09ea311b9",
                            "object": "order_item",
                            "source_id": "adv-poster",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 2500,
                            "price": 2500,
                            "subtotal_amount": 2500
                          }
                        ],
                        "metadata": {},
                        "created_at": "2025-03-06T11:34:24.301Z",
                        "updated_at": "2025-03-06T11:34:24.366Z",
                        "object": "order"
                      },
                      "pending_points": {
                        "id": "lopp_103dd48adba7591619",
                        "voucher_id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                        "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                        "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "order_id": "ord_103c8af3c09ea311b4",
                        "points": 35,
                        "activates_at": "2025-03-07",
                        "details": {
                          "holder_loyalty_tier": {
                            "id": "ltr_0e30613ad01f044517",
                            "name": "Loyal Star Platinum"
                          },
                          "event": {
                            "id": "evcus_103c8af3cedea311c3",
                            "type": "customer.order.paid",
                            "group_id": "v-103c8af396ae968360",
                            "entity_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                            "created_at": "2025-03-06T11:34:24.302Z",
                            "category": "EFFECT",
                            "event_source": {
                              "channel": "API",
                              "api_key": {
                                "name": "Primary",
                                "app_id": "12abc345-678d-901e-f234-gh5i6j7k8901"
                              }
                            }
                          },
                          "earning_rule": {
                            "id": "ern_F8RCTaDdMTUo0pOBQBBHr5el",
                            "source": {
                              "banner": "Earn points and wait"
                            }
                          },
                          "order": {
                            "id": "ord_103c8af3c09ea311b4",
                            "source_id": null
                          }
                        },
                        "created_at": "2025-03-06T11:34:24.483Z",
                        "updated_at": "2025-03-06T11:39:53.395Z"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-voucher-loyalty_card-pending_points-updated"
      }
    },
    "/EVENTS.VOUCHER.LOYALTY_CARD.POINTS_ADDED": {
      "post": {
        "summary": "Loyalty_card points_added",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Indicates that points have been added to a loyalty card.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventVoucherLoyaltyCardPointsAddedData"
                },
                "examples": {
                  "voucher.loyalty_card.points_added": {
                    "value": {
                      "voucher": {
                        "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                        "code": "L0y4L",
                        "loyalty_card": {
                          "points": 1370,
                          "balance": 1020
                        },
                        "type": "LOYALTY_CARD",
                        "campaign": "Loyalty programme",
                        "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                        "is_referral_code": false,
                        "holder_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "category_id": null,
                        "active": true,
                        "created_at": "2024-01-18T15:18:39.015000Z",
                        "updated_at": "2024-01-24T08:28:37.621033Z",
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 5,
                          "redeemed_points": 350
                        },
                        "object": "voucher"
                      },
                      "balance": {
                        "type": "loyalty_card",
                        "total": 1370,
                        "object": "balance",
                        "points": 50,
                        "balance": 1020,
                        "operation_type": "MANUAL",
                        "related_object": {
                          "id": "v_hjQhSsitD6lAATASbRV1Ef7dUCjpy0iw",
                          "type": "voucher"
                        }
                      },
                      "campaign": {
                        "id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                        "name": "Loyalty programme",
                        "campaign_type": "LOYALTY_PROGRAM",
                        "type": "AUTO_UPDATE",
                        "is_referral_code": false,
                        "voucher": {
                          "type": "LOYALTY_CARD",
                          "loyalty_card": {
                            "points": 0
                          },
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0
                          },
                          "code_config": {
                            "length": 8,
                            "prefix": "",
                            "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                            "pattern": "########",
                            "postfix": ""
                          }
                        },
                        "auto_join": true,
                        "join_once": true,
                        "active": true,
                        "category_id": null,
                        "created_at": "2024-01-18T15:18:38.577044Z",
                        "object": "campaign"
                      },
                      "customer": {
                        "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "name": "Jack Webhook",
                        "email": null,
                        "source_id": "jck-wbhk",
                        "metadata": {
                          "region": "EMEA"
                        },
                        "object": "customer"
                      },
                      "transaction": {
                        "id": "vtx_0e30615d5ed9b7011b",
                        "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                        "type": "POINTS_ADDITION",
                        "details": null,
                        "created_at": "2024-01-24T08:28:37.621033Z"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-voucher-loyalty_card-points_added"
      }
    },
    "/EVENTS.VOUCHER.LOYALTY_CARD.POINTS_EXPIRED": {
      "post": {
        "summary": "Loyalty_card points_expired",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Indicates that points have expired on a loyalty card.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventVoucherLoyaltyCardPointsExpiredData"
                },
                "examples": {
                  "voucher.loyalty_card.points_expired": {
                    "value": {
                      "voucher": {
                        "id": "v_66qyRgwumJomTSV2NvkCBa05lP0UOn82",
                        "code": "vyOsbgzj",
                        "loyalty_card": {
                          "points": 1000,
                          "balance": 970,
                          "next_expiration_points": 970
                        },
                        "type": "LOYALTY_CARD",
                        "campaign": "Loyalty program",
                        "campaign_id": "camp_s2Ui43Pk2JMuON3hA7CfwGpa",
                        "is_referral_code": false,
                        "holder_id": "cust_FGtYypgEx2tBL5jB6PuYfSES",
                        "category_id": null,
                        "active": true,
                        "created_at": "2024-07-09T07:23:14.897Z",
                        "updated_at": "2024-07-09T08:36:55.237Z",
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 3,
                          "redeemed_points": 30
                        },
                        "start_date": null,
                        "expiration_date": null,
                        "metadata": {},
                        "object": "voucher"
                      },
                      "points": 10,
                      "campaign": {
                        "id": "camp_s2Ui43Pk2JMuON3hA7CfwGpa",
                        "name": "Loyalty program",
                        "campaign_type": "LOYALTY_PROGRAM",
                        "type": "AUTO_UPDATE",
                        "voucher": {
                          "type": "LOYALTY_CARD",
                          "loyalty_card": {
                            "points": 0
                          },
                          "redemption": {
                            "quantity": null
                          },
                          "code_config": {
                            "length": 8,
                            "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                            "pattern": "########"
                          }
                        },
                        "auto_join": false,
                        "join_once": true,
                        "active": true,
                        "category_id": null,
                        "categories": [],
                        "metadata": {},
                        "created_at": "2024-07-09T07:22:16.139Z",
                        "updated_at": "2024-07-09T07:39:39.707Z",
                        "object": "campaign"
                      },
                      "customer": {
                        "id": "cust_FGtYypgEx2tBL5jB6PuYfSES",
                        "name": "Łukasz",
                        "email": "lukasz.kulig@voucherify.io",
                        "source_id": "charlie",
                        "metadata": {
                          "isTrade": true
                        },
                        "object": "customer"
                      },
                      "buckets": [
                        {
                          "id": "lopb_m3gpvB4WLF1a443feIDm2q9i",
                          "voucher_id": "v_66qyRgwumJomTSV2NvkCBa05lP0UOn82",
                          "campaign_id": "camp_s2Ui43Pk2JMuON3hA7CfwGpa",
                          "bucket": {
                            "total_points": 10
                          },
                          "status": "ACTIVE",
                          "expires_at": "2024-07-08",
                          "created_at": "2024-07-09T08:30:25.671Z",
                          "object": "loyalty_points_bucket"
                        }
                      ],
                      "transaction": {
                        "id": "vtx_0f0764c45fd232ef8e",
                        "source_id": null,
                        "voucher_id": "v_66qyRgwumJomTSV2NvkCBa05lP0UOn82",
                        "campaign_id": "camp_s2Ui43Pk2JMuON3hA7CfwGpa",
                        "source": "Automation",
                        "reason": null,
                        "type": "POINTS_EXPIRATION",
                        "details": {
                          "balance": {
                            "type": "loyalty_card",
                            "total": 1000,
                            "object": "balance",
                            "points": -10,
                            "balance": 970,
                            "related_object": {
                              "id": "v_66qyRgwumJomTSV2NvkCBa05lP0UOn82",
                              "type": "voucher"
                            }
                          }
                        },
                        "related_transaction_id": null,
                        "created_at": "2024-07-09T08:36:55.237Z"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-voucher-loyalty_card-points_expired"
      }
    },
    "/EVENTS.VOUCHER.GIFT.TRANSACTION.CREATED": {
      "post": {
        "summary": "Gift transaction created",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a transaction has been created for a gift card.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventVoucherGiftTransactionCreatedData"
                },
                "examples": {
                  "voucher.gift.transaction.created": {
                    "value": {
                      "transaction": {
                        "id": "vtx_0f1c4589b8cd1c07b2",
                        "source_id": null,
                        "voucher_id": "v_Wi8kP8EW4f1L2yT2N7tfFXxMzZOp7EsS",
                        "campaign_id": "camp_gYFHS8RZw9seypbbBPXmRboq",
                        "source": "voucherify-web-ui",
                        "reason": null,
                        "type": "CREDITS_ADDITION",
                        "details": {
                          "balance": {
                            "type": "gift_voucher",
                            "total": 2000,
                            "amount": 1000,
                            "object": "balance",
                            "balance": 2000,
                            "operation_type": "MANUAL",
                            "related_object": {
                              "id": "v_Wi8kP8EW4f1L2yT2N7tfFXxMzZOp7EsS",
                              "type": "voucher"
                            }
                          }
                        },
                        "related_transaction_id": null,
                        "created_at": "2024-07-25T13:48:34.908Z"
                      },
                      "voucher": {
                        "id": "v_Wi8kP8EW4f1L2yT2N7tfFXxMzZOp7EsS",
                        "code": "3HgJNUlD",
                        "campaign": "test gift 1807",
                        "campaign_id": "camp_gYFHS8RZw9seypbbBPXmRboq",
                        "category": null,
                        "category_id": null,
                        "categories": [],
                        "type": "GIFT_VOUCHER",
                        "discount": null,
                        "gift": {
                          "amount": 2000,
                          "balance": 2000,
                          "effect": "APPLY_TO_ORDER"
                        },
                        "loyalty_card": null,
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_hours": null,
                        "validity_day_of_week": null,
                        "active": true,
                        "additional_info": null,
                        "metadata": {},
                        "assets": {
                          "qr": {
                            "id": "8d3ddf23-a85b-477d-aa11-d1c2c917f632",
                            "url": "{{voucher_qr_code.url}}"
                          },
                          "barcode": {
                            "id": "c47dc508-6ca8-4697-bf1d-e9d2082b6c53",
                            "url": "{{voucher_barcode.url}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2024-07-23T10:01:01.848Z",
                        "updated_at": "2024-07-25T13:48:34.908Z",
                        "holder_id": "cust_PL4iqfS8K5Ej2LuBNV1RqlfJ",
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0,
                          "redeemed_amount": 0,
                          "object": "list",
                          "url": "/v1/vouchers/3HgJNUlD/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 1,
                          "url": "/v1/vouchers/3HgJNUlD/publications?page=1&limit=10"
                        },
                        "object": "voucher"
                      },
                      "campaign": {
                        "id": "camp_gYFHS8RZw9seypbbBPXmRboq",
                        "name": "test gift 1807",
                        "campaign_type": "GIFT_VOUCHERS",
                        "type": "AUTO_UPDATE",
                        "is_referral_code": false,
                        "voucher": {
                          "type": "GIFT_VOUCHER",
                          "discount": null,
                          "gift": {
                            "amount": 0,
                            "effect": "APPLY_TO_ORDER"
                          },
                          "loyalty_card": null,
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0
                          },
                          "code_config": {
                            "pattern": "########",
                            "length": 8,
                            "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                            "prefix": "",
                            "postfix": ""
                          }
                        },
                        "auto_join": false,
                        "join_once": false,
                        "active": true,
                        "category_id": null,
                        "category": null,
                        "metadata": {},
                        "start_date": null,
                        "expiration_date": null,
                        "description": null,
                        "created_at": "2024-07-18T13:22:42.429Z",
                        "object": "campaign"
                      },
                      "holder": {
                        "id": "cust_PL4iqfS8K5Ej2LuBNV1RqlfJ",
                        "name": "John Demo 23-01",
                        "email": null,
                        "source_id": "230724-01",
                        "metadata": {},
                        "object": "customer"
                      },
                      "balance": {
                        "amount": 1000,
                        "total": 2000,
                        "balance": 2000,
                        "type": "gift_voucher",
                        "object": "balance",
                        "related_object": {
                          "type": "voucher",
                          "id": "v_Wi8kP8EW4f1L2yT2N7tfFXxMzZOp7EsS"
                        },
                        "operation_type": "MANUAL"
                      },
                      "order": null,
                      "redemption": null,
                      "rollback": null
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-voucher-gift-transaction-created"
      }
    },
    "/EVENTS.VOUCHER.GIFT.BALANCE_ADDED": {
      "post": {
        "summary": "Gift balance_added",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Indicates that balance has been added to a gift card.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventVoucherGiftBalanceAddedData"
                },
                "examples": {
                  "voucher.loyalty_card.points_added": {
                    "value": {
                      "balance": {
                        "type": "gift_voucher",
                        "total": 16200,
                        "amount": 1200,
                        "object": "balance",
                        "balance": 11500,
                        "operation_type": "MANUAL",
                        "related_object": {
                          "id": "v_oNia4nTFDqYZOWYJiMpX8ocB6p6ZaEBm",
                          "type": "voucher"
                        }
                      },
                      "voucher": {
                        "id": "v_oNia4nTFDqYZOWYJiMpX8ocB6p6ZaEBm",
                        "code": "Gift-for-you-0",
                        "gift": {
                          "amount": 16200,
                          "effect": "APPLY_TO_ORDER",
                          "balance": 11500
                        },
                        "type": "GIFT_VOUCHER",
                        "active": true,
                        "object": "voucher",
                        "campaign": "Gift programme",
                        "metadata": {},
                        "holder_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "created_at": "2024-01-24T12:07:36.501Z",
                        "redemption": {
                          "quantity": null,
                          "redeemed_amount": 4700,
                          "redeemed_quantity": 2
                        },
                        "updated_at": "2024-02-09T13:27:46.844Z",
                        "campaign_id": "camp_bfrwAVsP6Q1EM1ZjgHwheKYr",
                        "category_id": "cat_0e1d0ba99c2fff2b51",
                        "is_referral_code": false
                      },
                      "campaign": {
                        "id": "camp_bfrwAVsP6Q1EM1ZjgHwheKYr",
                        "name": "Gift programme",
                        "type": "AUTO_UPDATE",
                        "active": true,
                        "object": "campaign",
                        "voucher": {
                          "gift": {
                            "amount": 5000,
                            "effect": "APPLY_TO_ORDER"
                          },
                          "type": "GIFT_VOUCHER",
                          "discount": null,
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0
                          },
                          "code_config": {
                            "length": 1,
                            "prefix": "Gift-for-you-",
                            "charset": "0123456789",
                            "pattern": "#",
                            "postfix": ""
                          },
                          "loyalty_card": null
                        },
                        "metadata": {},
                        "auto_join": false,
                        "join_once": false,
                        "created_at": "2024-01-24T12:07:35.835Z",
                        "updated_at": "2024-02-07T11:17:53.712Z",
                        "category_id": "cat_0e1d0ba99c2fff2b51",
                        "campaign_type": "GIFT_VOUCHERS",
                        "is_referral_code": false
                      },
                      "transaction": {
                        "id": "vtx_0e453f45e82ef51f2a",
                        "type": "CREDITS_ADDITION",
                        "details": null,
                        "created_at": "2024-02-09T13:27:46.844Z",
                        "campaign_id": "camp_bfrwAVsP6Q1EM1ZjgHwheKYr"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-voucher-gift-balance_added"
      }
    },
    "/EVENTS.VOUCHER.DELETED": {
      "post": {
        "summary": "Deleted",
        "tags": [
          "Events voucher"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a voucher has been deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventVoucherDeletedData"
                },
                "examples": {
                  "voucher.deleted": {
                    "value": {
                      "voucher": {
                        "id": "v_48SKO3XotBsaHBVGXIdgcGSb684cbyrO",
                        "code": "SPRING-2024-Ke5",
                        "gift": null,
                        "type": "DISCOUNT_VOUCHER",
                        "active": true,
                        "assets": {
                          "qr": {
                            "id": "4eb4397e-74b7-4272-85ce-8009699bb216",
                            "url": "{{voucher_qr_code.url}}"
                          },
                          "barcode": {
                            "id": "abb5691b-92f7-413a-ad22-ca492ac9df8a",
                            "url": "{{voucher_barcode.url}}"
                          }
                        },
                        "object": "voucher",
                        "publish": {
                          "url": "/v1/vouchers/SPRING-2024-Ke5/publications?page=1&limit=10",
                          "count": 1,
                          "object": "list"
                        },
                        "campaign": "Spring Discounts",
                        "category": "Star Platinum",
                        "discount": {
                          "type": "PERCENT",
                          "effect": "APPLY_TO_ORDER",
                          "percent_off": 10,
                          "amount_limit": 3000,
                          "percent_off_formula": "IF(ORDER_AMOUNT > 150;15;10)"
                        },
                        "metadata": {
                          "brand": "Adventure"
                        },
                        "holder_id": "cust_ufwK2qUNGDYxa1aji7XKzuHm",
                        "categories": [
                          {
                            "id": "cat_0e156dab8f2e43873a",
                            "name": "Star Platinum",
                            "object": "category",
                            "hierarchy": 10,
                            "created_at": "2024-01-03T10:03:24.092Z"
                          }
                        ],
                        "created_at": "2024-02-21T10:01:24.456Z",
                        "redemption": {
                          "url": "/v1/vouchers/SPRING-2024-Ke5/redemptions?page=1&limit=10",
                          "object": "list",
                          "quantity": 1,
                          "redeemed_quantity": 0
                        },
                        "start_date": null,
                        "updated_at": "2024-03-29T07:38:38.643Z",
                        "campaign_id": "camp_iRMdcq07g9W4dOSRXuTovupi",
                        "category_id": "cat_0e156dab8f2e43873a",
                        "loyalty_card": null,
                        "validity_hours": null,
                        "additional_info": null,
                        "expiration_date": null,
                        "is_referral_code": false,
                        "validity_timeframe": null,
                        "validity_day_of_week": null
                      },
                      "campaign": {
                        "id": "camp_iRMdcq07g9W4dOSRXuTovupi",
                        "name": "Spring Discounts",
                        "type": "AUTO_UPDATE",
                        "active": true,
                        "object": "campaign",
                        "voucher": {
                          "gift": null,
                          "type": "DISCOUNT_VOUCHER",
                          "discount": {
                            "type": "PERCENT",
                            "units": null,
                            "effect": "APPLY_TO_ORDER",
                            "percent_off": 10,
                            "amount_limit": 3000,
                            "percent_off_formula": "IF(ORDER_AMOUNT > 150;15;10)"
                          },
                          "redemption": {
                            "quantity": 1,
                            "redeemed_quantity": 0
                          },
                          "code_config": {
                            "length": 3,
                            "prefix": "SPRING-2024-",
                            "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                            "pattern": "###",
                            "postfix": ""
                          },
                          "loyalty_card": null
                        },
                        "category": null,
                        "metadata": {},
                        "auto_join": false,
                        "join_once": false,
                        "created_at": "2024-02-21T10:01:24.102Z",
                        "start_date": null,
                        "updated_at": "2024-03-13T17:35:51.314Z",
                        "category_id": "cat_0e156dab8f2e43873a",
                        "description": "Spring 2024 big campaign",
                        "campaign_type": "DISCOUNT_COUPONS",
                        "expiration_date": null,
                        "is_referral_code": false
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-voucher-deleted"
      }
    },
    "/EVENTS.CAMPAIGN.CREATED": {
      "post": {
        "summary": "Created",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a campaign has been created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventCampaignCreatedData"
                },
                "examples": {
                  "campaign.created": {
                    "value": {
                      "campaign": {
                        "id": "camp_iRMdcq07g9W4dOSRXuTovupi",
                        "name": "Spring Discounts",
                        "type": "AUTO_UPDATE",
                        "active": true,
                        "object": "campaign",
                        "voucher": {
                          "type": "DISCOUNT_VOUCHER",
                          "discount": {
                            "type": "PERCENT",
                            "effect": "APPLY_TO_ORDER",
                            "percent_off": 10,
                            "amount_limit": 3000,
                            "percent_off_formula": "IF(ORDER_AMOUNT > 150;15;10)"
                          },
                          "redemption": {
                            "quantity": 1
                          },
                          "start_date": "2024-03-01T00:00:00.000Z",
                          "code_config": {
                            "length": 3,
                            "prefix": "SPRING-2024-",
                            "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                            "pattern": "###"
                          },
                          "expiration_date": "2024-03-31T00:00:00.000Z",
                          "is_referral_code": false
                        },
                        "category": "Star Platinum",
                        "metadata": {},
                        "auto_join": false,
                        "join_once": false,
                        "protected": false,
                        "categories": [
                          {
                            "id": "cat_0e156dab8f2e43873a",
                            "name": "Star Platinum",
                            "object": "category",
                            "hierarchy": 10,
                            "created_at": "2024-01-03T10:03:24.092Z"
                          }
                        ],
                        "created_at": "2024-02-21T10:01:24.102Z",
                        "start_date": "2024-03-01T00:00:00.000Z",
                        "category_id": "cat_0e156dab8f2e43873a",
                        "description": "Spring 2024 discount",
                        "campaign_type": "DISCOUNT_COUPONS",
                        "vouchers_count": 0,
                        "creation_status": "IN_PROGRESS",
                        "expiration_date": "2024-03-31T00:00:00.000Z",
                        "validity_day_of_week": [
                          5,
                          6,
                          0
                        ],
                        "vouchers_generation_status": "IN_PROGRESS",
                        "use_voucher_metadata_schema": true
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-campaign-created"
      }
    },
    "/EVENTS.CAMPAIGN.VOUCHERS.GENERATION.COMPLETED": {
      "post": {
        "summary": "Vouchers generation completed",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Indicates that the generation of campaign vouchers has been completed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventCampaignVouchersGenerationCompletedData"
                },
                "examples": {
                  "campaign.created": {
                    "value": {
                      "count": 5,
                      "campaign": {
                        "id": "camp_18NCNUkQIaXnqbHqhtQnt355",
                        "name": "Test-campaign-applicable-to",
                        "type": "AUTO_UPDATE",
                        "active": true,
                        "object": "campaign",
                        "voucher": {
                          "gift": null,
                          "type": "DISCOUNT_VOUCHER",
                          "discount": {
                            "type": "PERCENT",
                            "units": null,
                            "effect": "APPLY_TO_ITEMS",
                            "percent_off": 5,
                            "amount_limit": 15000,
                            "aggregated_amount_limit": 30000
                          },
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0
                          },
                          "code_config": {
                            "length": 1,
                            "prefix": "Test-applicable-",
                            "charset": "0123456789",
                            "pattern": "#",
                            "postfix": ""
                          },
                          "loyalty_card": null
                        },
                        "metadata": {},
                        "auto_join": false,
                        "join_once": false,
                        "created_at": "2024-02-09T10:16:04.352Z",
                        "category_id": null,
                        "campaign_type": "DISCOUNT_COUPONS",
                        "is_referral_code": false
                      },
                      "completed_at": "2024-02-09T10:16:04.787Z"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-campaign-vouchers-generation-completed"
      }
    },
    "/EVENTS.CAMPAIGN.DISABLED": {
      "post": {
        "summary": "Disabled",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a campaign has been disabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventCampaignDisabledData"
                },
                "examples": {
                  "campaign.disabled": {
                    "value": {
                      "campaign": {
                        "id": "camp_s2tD4F3yQhGTKuXjKasSNeP6",
                        "name": "Promotion Spring 2024",
                        "type": "STATIC",
                        "active": false,
                        "object": "campaign",
                        "metadata": {
                          "region": "EMEA"
                        },
                        "auto_join": false,
                        "join_once": false,
                        "protected": false,
                        "categories": [],
                        "created_at": "2024-02-21T12:34:04.667Z",
                        "updated_at": "2024-02-21T14:15:02.111Z",
                        "category_id": "cat_0e156dab8f2e43873a",
                        "campaign_type": "PROMOTION",
                        "creation_status": "DONE",
                        "expiration_date": "2024-02-29T00:00:00.000Z",
                        "vouchers_generation_status": "DONE",
                        "use_voucher_metadata_schema": false
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-campaign-disabled"
      }
    },
    "/EVENTS.CAMPAIGN.ENABLED": {
      "post": {
        "summary": "Enabled",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a campaign has been enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventCampaignEnabledData"
                },
                "examples": {
                  "campaign.enabled": {
                    "value": {
                      "campaign": {
                        "id": "camp_s2tD4F3yQhGTKuXjKasSNeP6",
                        "name": "Promotion Spring 2024",
                        "type": "STATIC",
                        "active": true,
                        "object": "campaign",
                        "metadata": {
                          "region": "EMEA"
                        },
                        "auto_join": false,
                        "join_once": false,
                        "protected": false,
                        "categories": [],
                        "created_at": "2024-02-21T12:34:04.667Z",
                        "updated_at": "2024-02-21T15:09:57.706Z",
                        "category_id": "cat_0e156dab8f2e43873a",
                        "campaign_type": "PROMOTION",
                        "creation_status": "DONE",
                        "expiration_date": "2024-02-29T00:00:00.000Z",
                        "vouchers_generation_status": "DONE",
                        "use_voucher_metadata_schema": false
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-campaign-enabled"
      }
    },
    "/EVENTS.CAMPAIGN.UPDATED": {
      "post": {
        "summary": "Updated",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a campaign has been updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventCampaignUpdatedData"
                },
                "examples": {
                  "campaign.updated": {
                    "value": {
                      "campaign": {
                        "id": "camp_s2tD4F3yQhGTKuXjKasSNeP6",
                        "name": "Promotion Spring 2024",
                        "type": "STATIC",
                        "active": true,
                        "object": "campaign",
                        "metadata": {
                          "region": "EMEA"
                        },
                        "auto_join": false,
                        "join_once": false,
                        "protected": false,
                        "categories": [],
                        "created_at": "2024-02-21T12:34:04.667Z",
                        "updated_at": "2024-02-21T13:10:09.727Z",
                        "category_id": "cat_0e156dab8f2e43873a",
                        "campaign_type": "PROMOTION",
                        "creation_status": "DONE",
                        "expiration_date": "2024-02-29T00:00:00.000Z",
                        "vouchers_generation_status": "DONE",
                        "use_voucher_metadata_schema": false
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-campaign-updated"
      }
    },
    "/EVENTS.CAMPAIGN.DELETED": {
      "post": {
        "summary": "Deleted",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a campaign has been deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventCampaignDeletedData"
                },
                "examples": {
                  "campaign.deleted": {
                    "value": {
                      "campaign": {
                        "id": "camp_duuYvm09BNsf274eQVp1ZO43",
                        "name": "Loyalty Spring",
                        "type": "AUTO_UPDATE",
                        "active": true,
                        "object": "campaign",
                        "voucher": {
                          "type": "LOYALTY_CARD",
                          "redemption": {
                            "quantity": null
                          },
                          "start_date": "2024-02-29T00:00:00.000Z",
                          "code_config": {
                            "length": 5,
                            "prefix": "Loyal-To-Spring",
                            "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                            "pattern": "#####"
                          },
                          "loyalty_card": {
                            "points": 0,
                            "expiration_rules": {
                              "period_type": "MONTH",
                              "period_value": 2,
                              "rounding_type": "END_OF_QUARTER"
                            }
                          },
                          "expiration_date": "2024-03-31T00:00:00.000Z",
                          "is_referral_code": false
                        },
                        "metadata": {},
                        "auto_join": false,
                        "join_once": true,
                        "protected": false,
                        "categories": [],
                        "created_at": "2024-02-21T11:35:17.510Z",
                        "start_date": "2024-02-29T00:00:00.000Z",
                        "updated_at": "2024-02-21T12:16:13.271Z",
                        "category_id": "cat_0e156dab8f2e43873a",
                        "campaign_type": "LOYALTY_PROGRAM",
                        "vouchers_count": 1,
                        "creation_status": "DONE",
                        "expiration_date": "2024-03-31T00:00:00.000Z",
                        "validity_day_of_week": [
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "loyalty_tiers_expiration": {
                          "start_date": {
                            "type": "IMMEDIATE"
                          },
                          "expiration_date": {
                            "type": "CUSTOM",
                            "extend": "P2M",
                            "rounding": {
                              "type": "MONTH",
                              "strategy": "END"
                            }
                          },
                          "qualification_type": "BALANCE"
                        },
                        "vouchers_generation_status": "DONE",
                        "use_voucher_metadata_schema": true
                      },
                      "deleted_at": "2024-02-21T15:29:30.663Z"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-campaign-deleted"
      }
    },
    "/EVENTS.CAMPAIGN.LOYALTY_TIER.CREATED": {
      "post": {
        "summary": "Loyalty_tier created",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a campaign loyalty tier has been created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventCampaignLoyaltyTierCreatedData"
                },
                "examples": {
                  "campaign.loyalty_tier.created": {
                    "value": {
                      "campaign": {
                        "id": "camp_il5QS3YhzAMyd45UNXT7euX7",
                        "name": "Loyalty 2025",
                        "campaign_type": "LOYALTY_PROGRAM",
                        "type": "AUTO_UPDATE",
                        "is_referral_code": false,
                        "voucher": {
                          "type": "LOYALTY_CARD",
                          "discount": null,
                          "gift": null,
                          "loyalty_card": {
                            "points": 0,
                            "expiration_rules": {
                              "period_type": "MONTH",
                              "period_value": 1
                            }
                          },
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0
                          },
                          "code_config": {
                            "pattern": "#",
                            "length": 1,
                            "charset": "0123456789",
                            "prefix": "loyal-",
                            "postfix": ""
                          }
                        },
                        "auto_join": false,
                        "join_once": true,
                        "active": true,
                        "category_id": null,
                        "category": null,
                        "metadata": {},
                        "start_date": null,
                        "expiration_date": null,
                        "description": null,
                        "created_at": "2023-10-16T09:54:56.394Z",
                        "updated_at": "2024-01-22T13:37:57.586Z",
                        "object": "campaign"
                      },
                      "loyalty_tier": {
                        "id": "ltr_10445f698e4abcf607",
                        "name": "Loyalty-tier-03",
                        "campaign_id": "camp_il5QS3YhzAMyd45UNXT7euX7",
                        "metadata": {},
                        "created_at": "2025-03-12T13:32:01.465Z",
                        "updated_at": null,
                        "earning_rules": {
                          "ern_6SR1DBtjFql71aXr71TaJfrq": {
                            "type": "MULTIPLY",
                            "multiplier": 1
                          }
                        },
                        "rewards": {
                          "rewa_mcn5Lp8texqmbgQbadLMqSoQ": {
                            "type": "MULTIPLY",
                            "multiplier": 1
                          }
                        },
                        "config": {
                          "points": {
                            "from": 200,
                            "to": 299
                          }
                        },
                        "points": {
                          "from": 200,
                          "to": 299
                        },
                        "object": "loyalty_tier"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-campaign-loyalty_tier-created"
      }
    },
    "/EVENTS.CAMPAIGN.LOYALTY_TIER.DELETED": {
      "post": {
        "summary": "Loyalty_tier deleted",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a campaign loyalty tier has been deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventCampaignLoyaltyTierDeletedData"
                },
                "examples": {
                  "campaign.loyalty_tier.deleted": {
                    "value": {
                      "campaign": {
                        "id": "camp_il5QS3YhzAMyd45UNXT7euX7",
                        "name": "Loyalty 2025",
                        "campaign_type": "LOYALTY_PROGRAM",
                        "type": "AUTO_UPDATE",
                        "is_referral_code": false,
                        "voucher": {
                          "type": "LOYALTY_CARD",
                          "discount": null,
                          "gift": null,
                          "loyalty_card": {
                            "points": 0,
                            "expiration_rules": {
                              "period_type": "MONTH",
                              "period_value": 1
                            }
                          },
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0
                          },
                          "code_config": {
                            "pattern": "#",
                            "length": 1,
                            "charset": "0123456789",
                            "prefix": "loyal-",
                            "postfix": ""
                          }
                        },
                        "auto_join": false,
                        "join_once": true,
                        "active": true,
                        "category_id": null,
                        "category": null,
                        "metadata": {},
                        "start_date": null,
                        "expiration_date": null,
                        "description": null,
                        "created_at": "2023-10-16T09:54:56.394Z",
                        "updated_at": "2024-01-22T13:37:57.586Z",
                        "object": "campaign"
                      },
                      "loyalty_tier": {
                        "id": "ltr_10445a39f9c148a9d8",
                        "name": "Loyalty-tier-03",
                        "campaign_id": "camp_il5QS3YhzAMyd45UNXT7euX7",
                        "metadata": {},
                        "created_at": "2025-03-12T13:09:22.023Z",
                        "updated_at": null,
                        "earning_rules": {},
                        "rewards": {},
                        "config": {
                          "points": {
                            "from": 200
                          }
                        },
                        "points": {
                          "from": 200
                        },
                        "object": "loyalty_tier"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-campaign-loyalty_tier-deleted"
      }
    },
    "/EVENTS.CAMPAIGN.LOYALTY_TIER.UPDATED": {
      "post": {
        "summary": "Loyalty_tier updated",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a campaign loyalty tier has been updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventCampaignLoyaltyTierUpdatedData"
                },
                "examples": {
                  "campaign.loyalty_tier.updated": {
                    "value": {
                      "campaign": {
                        "id": "camp_il5QS3YhzAMyd45UNXT7euX7",
                        "name": "Loyalty 2025",
                        "campaign_type": "LOYALTY_PROGRAM",
                        "type": "AUTO_UPDATE",
                        "is_referral_code": false,
                        "voucher": {
                          "type": "LOYALTY_CARD",
                          "discount": null,
                          "gift": null,
                          "loyalty_card": {
                            "points": 0,
                            "expiration_rules": {
                              "period_type": "MONTH",
                              "period_value": 1
                            }
                          },
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0
                          },
                          "code_config": {
                            "pattern": "#",
                            "length": 1,
                            "charset": "0123456789",
                            "prefix": "loyal-",
                            "postfix": ""
                          }
                        },
                        "auto_join": false,
                        "join_once": true,
                        "active": true,
                        "category_id": null,
                        "category": null,
                        "metadata": {},
                        "start_date": null,
                        "expiration_date": null,
                        "description": null,
                        "created_at": "2023-10-16T09:54:56.394Z",
                        "updated_at": "2024-01-22T13:37:57.586Z",
                        "object": "campaign"
                      },
                      "loyalty_tier": {
                        "id": "ltr_10445a39f9c148a9d6",
                        "name": "Loyalty-tier-01",
                        "campaign_id": "camp_il5QS3YhzAMyd45UNXT7euX7",
                        "metadata": {
                          "region": "EMEA"
                        },
                        "created_at": "2025-03-12T13:09:22.023Z",
                        "updated_at": "2025-03-12T13:10:19.880Z",
                        "earning_rules": {},
                        "rewards": {},
                        "config": {
                          "points": {
                            "from": 0,
                            "to": 99
                          }
                        },
                        "points": {
                          "from": 0,
                          "to": 99
                        },
                        "object": "loyalty_tier"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-campaign-loyalty_tier-updated"
      }
    },
    "/EVENTS.CAMPAIGN.PROMOTION_TIER.CREATED": {
      "post": {
        "summary": "Promotion_tier created",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a campaign promotion tier has been created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventCampaignPromotionTierCreatedData"
                },
                "examples": {
                  "campaign.promotion_tier.created": {
                    "value": {
                      "campaign": {
                        "id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                        "name": "Promo tier",
                        "type": "STATIC",
                        "active": true,
                        "object": "campaign",
                        "category": null,
                        "metadata": {},
                        "auto_join": false,
                        "join_once": false,
                        "created_at": "2024-05-22T11:53:41.984Z",
                        "start_date": null,
                        "category_id": null,
                        "description": null,
                        "campaign_type": "PROMOTION",
                        "expiration_date": null,
                        "is_referral_code": false
                      },
                      "promotion_tier": {
                        "id": "promo_ngk5uklWrv3rEzatxoJmE36d",
                        "name": "Webhook tier",
                        "action": {
                          "discount": {
                            "type": "AMOUNT",
                            "effect": "APPLY_TO_ORDER",
                            "amount_off": 2000
                          }
                        },
                        "active": true,
                        "banner": null,
                        "object": "promotion_tier",
                        "summary": {
                          "orders": {
                            "total_amount": 0,
                            "total_discount_amount": 0
                          },
                          "redemptions": {
                            "total_redeemed": 0
                          }
                        },
                        "campaign": {
                          "id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                          "active": true,
                          "object": "campaign",
                          "start_date": null,
                          "expiration_date": null
                        },
                        "metadata": {},
                        "hierarchy": 1,
                        "categories": [],
                        "created_at": "2024-05-22T11:53:42.153Z",
                        "campaign_id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                        "category_id": null,
                        "validation_rule_assignments": null
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-campaign-promotion_tier-created"
      }
    },
    "/EVENTS.CAMPAIGN.PROMOTION_TIER.DISABLED": {
      "post": {
        "summary": "Promotion_tier disabled",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a campaign promotion tier has been disabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventCampaignPromotionTierDisabledData"
                },
                "examples": {
                  "campaign.promotion_tier.disabled": {
                    "value": {
                      "campaign": {
                        "id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                        "name": "Promo tier",
                        "type": "STATIC",
                        "active": true,
                        "object": "campaign",
                        "category": null,
                        "metadata": {},
                        "auto_join": false,
                        "join_once": false,
                        "created_at": "2024-05-22T11:53:41.984Z",
                        "start_date": null,
                        "category_id": null,
                        "description": null,
                        "campaign_type": "PROMOTION",
                        "expiration_date": null,
                        "is_referral_code": false
                      },
                      "promotion_tier": {
                        "id": "promo_ngk5uklWrv3rEzatxoJmE36d",
                        "name": "Webhook tier",
                        "action": {
                          "discount": {
                            "type": "AMOUNT",
                            "effect": "APPLY_TO_ORDER",
                            "amount_off": 2000
                          }
                        },
                        "active": false,
                        "banner": null,
                        "object": "promotion_tier",
                        "summary": {
                          "orders": {
                            "total_amount": 0,
                            "total_discount_amount": 0
                          },
                          "redemptions": {
                            "total_redeemed": 0
                          }
                        },
                        "campaign": {
                          "id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                          "active": true,
                          "object": "campaign",
                          "start_date": null,
                          "expiration_date": null
                        },
                        "metadata": {},
                        "hierarchy": 1,
                        "categories": [],
                        "created_at": "2024-05-22T11:53:42.153Z",
                        "updated_at": "2024-05-22T11:54:14.825Z",
                        "campaign_id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                        "category_id": null,
                        "validation_rule_assignments": null
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-campaign-promotion_tier-disabled"
      }
    },
    "/EVENTS.CAMPAIGN.PROMOTION_TIER.ENABLED": {
      "post": {
        "summary": "Promotion_tier enabled",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a campaign promotion tier has been enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventCampaignPromotionTierEnabledData"
                },
                "examples": {
                  "campaign.promotion_tier.enabled": {
                    "value": {
                      "campaign": {
                        "id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                        "name": "Promo tier",
                        "type": "STATIC",
                        "active": true,
                        "object": "campaign",
                        "category": null,
                        "metadata": {},
                        "auto_join": false,
                        "join_once": false,
                        "created_at": "2024-05-22T11:53:41.984Z",
                        "start_date": null,
                        "category_id": null,
                        "description": null,
                        "campaign_type": "PROMOTION",
                        "expiration_date": null,
                        "is_referral_code": false
                      },
                      "promotion_tier": {
                        "id": "promo_ngk5uklWrv3rEzatxoJmE36d",
                        "name": "Webhook tier",
                        "action": {
                          "discount": {
                            "type": "AMOUNT",
                            "effect": "APPLY_TO_ORDER",
                            "amount_off": 2000
                          }
                        },
                        "active": true,
                        "banner": null,
                        "object": "promotion_tier",
                        "summary": {
                          "orders": {
                            "total_amount": 0,
                            "total_discount_amount": 0
                          },
                          "redemptions": {
                            "total_redeemed": 0
                          }
                        },
                        "campaign": {
                          "id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                          "active": true,
                          "object": "campaign",
                          "start_date": null,
                          "expiration_date": null
                        },
                        "metadata": {},
                        "hierarchy": 1,
                        "categories": [],
                        "created_at": "2024-05-22T11:53:42.153Z",
                        "updated_at": "2024-05-22T11:54:19.754Z",
                        "campaign_id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                        "category_id": null,
                        "validation_rule_assignments": null
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-campaign-promotion_tier-enabled"
      }
    },
    "/EVENTS.CAMPAIGN.PROMOTION_TIER.UPDATED": {
      "post": {
        "summary": "Promotion_tier updated",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a campaign promotion tier has been updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventCampaignPromotionTierUpdatedData"
                },
                "examples": {
                  "campaign.promotion_tier.updated": {
                    "value": {
                      "campaign": {
                        "id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                        "name": "Promo tier",
                        "campaign_type": "PROMOTION",
                        "type": "STATIC",
                        "is_referral_code": false,
                        "auto_join": false,
                        "join_once": false,
                        "active": true,
                        "category_id": null,
                        "category": null,
                        "metadata": {},
                        "start_date": null,
                        "expiration_date": null,
                        "description": null,
                        "created_at": "2024-05-22T11:53:41.984Z",
                        "object": "campaign"
                      },
                      "promotion_tier": {
                        "id": "promo_ngk5uklWrv3rEzatxoJmE36d",
                        "created_at": "2024-05-22T11:53:42.153Z",
                        "updated_at": "2024-05-22T15:32:16.659Z",
                        "name": "Webhook tier",
                        "banner": null,
                        "action": {
                          "discount": {
                            "type": "AMOUNT",
                            "amount_off": 2000,
                            "effect": "APPLY_TO_ORDER"
                          }
                        },
                        "metadata": {},
                        "hierarchy": 1,
                        "campaign": {
                          "id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                          "start_date": null,
                          "expiration_date": null,
                          "active": true,
                          "object": "campaign"
                        },
                        "campaign_id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                        "active": true,
                        "summary": {
                          "redemptions": {
                            "total_redeemed": 0
                          },
                          "orders": {
                            "total_amount": 0,
                            "total_discount_amount": 0
                          }
                        },
                        "object": "promotion_tier",
                        "validation_rule_assignments": null,
                        "category_id": "cat_0d8549688e92d8e643",
                        "categories": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-campaign-promotion_tier-updated"
      }
    },
    "/EVENTS.CAMPAIGN.PROMOTION_TIER.DELETED": {
      "post": {
        "summary": "Promotion_tier deleted",
        "tags": [
          "Events campaign"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a campaign promotion tier has been deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventCampaignPromotionTierDeletedData"
                },
                "examples": {
                  "campaign.promotion_tier.deleted": {
                    "value": {
                      "campaign": {
                        "id": "camp_RY00xpbAEXXGQszBDFve6hAP",
                        "name": "Promo tier",
                        "campaign_type": "PROMOTION",
                        "type": "STATIC",
                        "is_referral_code": false,
                        "auto_join": false,
                        "join_once": false,
                        "active": true,
                        "category_id": null,
                        "category": null,
                        "metadata": {},
                        "start_date": null,
                        "expiration_date": null,
                        "description": null,
                        "created_at": "2024-05-22T11:53:41.984Z",
                        "object": "campaign"
                      },
                      "promotion_tier": {
                        "id": "promo_ngk5uklWrv3rEzatxoJmE36d",
                        "created_at": "2024-05-22T11:53:42.153Z",
                        "updated_at": "2024-05-22T15:32:16.659Z",
                        "name": "Webhook tier",
                        "banner": null,
                        "action": {
                          "discount": {
                            "type": "AMOUNT",
                            "amount_off": 2000,
                            "effect": "APPLY_TO_ORDER"
                          }
                        },
                        "metadata": {},
                        "hierarchy": 1,
                        "active": true,
                        "summary": {
                          "redemptions": {
                            "total_redeemed": 0
                          },
                          "orders": {
                            "total_amount": 0,
                            "total_discount_amount": 0
                          }
                        },
                        "object": "promotion_tier",
                        "validation_rule_assignments": null,
                        "category_id": "cat_0d8549688e92d8e643",
                        "categories": []
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-campaign-promotion_tier-deleted"
      }
    },
    "/EVENTS.BUS_VAL_RULE.CREATED": {
      "post": {
        "summary": "Created",
        "tags": [
          "Events bus_val_rule"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a validation rule has been created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventBusValRuleCreatedData"
                },
                "examples": {
                  "business_validation_rule.created": {
                    "value": {
                      "rule": {
                        "id": "val_rfuNf5qDB9xg",
                        "name": "Business Validation Rule - 2/15/2024",
                        "type": "expression",
                        "rules": {
                          "1": {
                            "name": "customer.segment",
                            "error": {
                              "message": "Incorrect segment"
                            },
                            "rules": {},
                            "conditions": {
                              "$is": [
                                "seg_n3vVcU5t0m3rs4rEPr3C1oU5"
                              ]
                            }
                          },
                          "2": {
                            "name": "order.initial_amount",
                            "rules": {},
                            "conditions": {
                              "$more_than": [
                                9900
                              ]
                            }
                          },
                          "3": {
                            "name": "order.items.count",
                            "rules": {},
                            "conditions": {
                              "$more_than": [
                                3
                              ]
                            }
                          },
                          "4": {
                            "name": "order.items.price_each",
                            "rules": {},
                            "conditions": {
                              "$more_than": [
                                500
                              ]
                            }
                          },
                          "logic": " 1 AND 2 AND (  3 AND 4 )"
                        },
                        "object": "validation_rules",
                        "created_at": "2024-02-15T11:04:01.856Z",
                        "context_type": "campaign.promotion",
                        "applicable_to": {
                          "excluded": [],
                          "included": [],
                          "included_all": false
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-bus_val_rule-created"
      }
    },
    "/EVENTS.BUS_VAL_RULE.UPDATED": {
      "post": {
        "summary": "Updated",
        "tags": [
          "Events bus_val_rule"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a validation rule has been updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventBusValRuleUpdatedData"
                },
                "examples": {
                  "business_validation_rule.updated": {
                    "value": {
                      "rule": {
                        "id": "val_WmgZXBqwCZrv",
                        "name": "Business Validation Rule - 2/9/2024",
                        "type": "expression",
                        "rules": {
                          "1": {
                            "name": "order.initial_amount",
                            "rules": {},
                            "conditions": {
                              "$more_than": [
                                9900
                              ]
                            }
                          },
                          "logic": " 1"
                        },
                        "object": "validation_rules",
                        "created_at": "2024-02-09T10:15:49.306Z",
                        "updated_at": "2024-02-09T10:16:47.426Z",
                        "context_type": "campaign.discount_coupons.discount.percent.apply_to_items",
                        "applicable_to": {
                          "excluded": [
                            {
                              "id": "prod_0df14b7e7d8975079d",
                              "effect": "APPLY_TO_EVERY",
                              "object": "product",
                              "strict": false
                            },
                            {
                              "id": "pc_vmP8CPV6dC2X4a4ouI2bAJAP",
                              "effect": "APPLY_TO_EVERY",
                              "object": "products_collection",
                              "strict": false
                            }
                          ],
                          "included": [
                            {
                              "id": "prod_0de0c540ad917bb410",
                              "effect": "APPLY_TO_EVERY",
                              "object": "product",
                              "strict": false,
                              "amount_limit": 500,
                              "quantity_limit": 2,
                              "aggregated_amount_limit": 10000,
                              "aggregated_quantity_limit": 4
                            },
                            {
                              "id": "pc_Pz9rI3FroSYacwobgNT5uiNN",
                              "effect": "APPLY_TO_EVERY",
                              "object": "products_collection",
                              "strict": false,
                              "amount_limit": 5000,
                              "quantity_limit": 3,
                              "aggregated_amount_limit": 50000,
                              "aggregated_quantity_limit": 10
                            }
                          ],
                          "included_all": false
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-bus_val_rule-updated"
      }
    },
    "/EVENTS.BUS_VAL_RULE.ASSIGNMENT.CREATED": {
      "post": {
        "summary": "Assignment created",
        "tags": [
          "Events bus_val_rule"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a validation rule has been assigned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventBusValRuleAssignmentCreatedData"
                },
                "examples": {
                  "business_validation_rule.assignment.created": {
                    "value": {
                      "rule": {
                        "id": "val_WmgZXBqwCZrv",
                        "name": "Business Validation Rule - 2/9/2024",
                        "type": "expression",
                        "rules": {
                          "1": {
                            "name": "order.initial_amount",
                            "rules": {},
                            "conditions": {
                              "$more_than": [
                                9900
                              ]
                            }
                          },
                          "logic": " 1"
                        },
                        "object": "validation_rules",
                        "created_at": "2024-02-09T10:15:49.306Z",
                        "updated_at": "2024-02-09T10:16:47.426Z",
                        "context_type": "campaign.discount_coupons.discount.percent.apply_to_items",
                        "applicable_to": {
                          "excluded": [
                            {
                              "id": "prod_0df14b7e7d8975079d",
                              "effect": "APPLY_TO_EVERY",
                              "object": "product",
                              "strict": false
                            },
                            {
                              "id": "pc_vmP8CPV6dC2X4a4ouI2bAJAP",
                              "effect": "APPLY_TO_EVERY",
                              "object": "products_collection",
                              "strict": false
                            }
                          ],
                          "included": [
                            {
                              "id": "prod_0de0c540ad917bb410",
                              "effect": "APPLY_TO_EVERY",
                              "object": "product",
                              "strict": false,
                              "amount_limit": 500,
                              "quantity_limit": 2,
                              "aggregated_amount_limit": 10000,
                              "aggregated_quantity_limit": 4
                            },
                            {
                              "id": "pc_Pz9rI3FroSYacwobgNT5uiNN",
                              "effect": "APPLY_TO_EVERY",
                              "object": "products_collection",
                              "strict": false,
                              "amount_limit": 5000,
                              "quantity_limit": 3,
                              "aggregated_amount_limit": 50000,
                              "aggregated_quantity_limit": 10
                            }
                          ],
                          "included_all": false
                        }
                      },
                      "voucher": {
                        "id": "v_sgi3vqxJZ4rg1WHS1iyyTVskoRqoMpUp",
                        "code": "Test-applicable-1",
                        "type": "DISCOUNT_VOUCHER",
                        "active": true,
                        "object": "voucher",
                        "campaign": "Test-campaign-applicable-to",
                        "discount": {
                          "type": "PERCENT",
                          "effect": "APPLY_TO_ITEMS",
                          "percent_off": 5,
                          "amount_limit": 15000,
                          "aggregated_amount_limit": 30000
                        },
                        "metadata": {},
                        "created_at": "2024-02-09T10:16:04.749Z",
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 0
                        },
                        "campaign_id": "camp_18NCNUkQIaXnqbHqhtQnt355",
                        "category_id": null,
                        "is_referral_code": false
                      },
                      "campaign": {
                        "id": "camp_18NCNUkQIaXnqbHqhtQnt355",
                        "object": "campaign"
                      },
                      "assignment": {
                        "id": "asgm_6wuh8m2Ic1aT3NHD",
                        "object": "validation_rules_assignment",
                        "rule_id": "val_WmgZXBqwCZrv",
                        "created_at": "2024-02-09T10:16:47.835Z",
                        "related_object_id": "v_sgi3vqxJZ4rg1WHS1iyyTVskoRqoMpUp",
                        "related_object_type": "voucher"
                      },
                      "distribution": null,
                      "earning_rule": null,
                      "promotion_tier": null
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-bus_val_rule-assignment-created"
      }
    },
    "/EVENTS.BUS_VAL_RULE.ASSIGNMENT.DELETED": {
      "post": {
        "summary": "Assignment deleted",
        "tags": [
          "Events bus_val_rule"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a validation rule has been unassigned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventBusValRuleAssignmentDeletedData"
                },
                "examples": {
                  "business_validation_rule.assignment.deleted": {
                    "value": {
                      "rule": {
                        "id": "val_w59dYLHbkcn5",
                        "name": "Initial amount more than 99",
                        "type": "expression",
                        "error": {
                          "message": "The initial amount is too low"
                        },
                        "rules": {
                          "1": {
                            "name": "order.initial_amount",
                            "rules": {},
                            "conditions": {
                              "$more_than": [
                                9900
                              ]
                            }
                          },
                          "logic": " 1"
                        },
                        "object": "validation_rules",
                        "created_at": "2024-02-12T10:19:09.557Z",
                        "context_type": "global",
                        "applicable_to": {
                          "excluded": [],
                          "included": [],
                          "included_all": false
                        }
                      },
                      "campaign": {
                        "id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                        "object": "campaign"
                      },
                      "assignment": {
                        "id": "asgm_zlMpWI5mPVG6x3dg",
                        "object": "validation_rules_assignment",
                        "rule_id": "val_w59dYLHbkcn5",
                        "created_at": "2024-02-15T12:46:57.959Z",
                        "updated_at": "2024-02-15T14:02:47.889Z",
                        "related_object_id": "ern_FQxftbKUq9E93k00Z3qkC0sX",
                        "related_object_type": "earning_rule"
                      },
                      "distribution": null,
                      "earning_rule": {
                        "id": "ern_FQxftbKUq9E93k00Z3qkC0sX",
                        "active": true,
                        "metadata": {},
                        "parameters": {
                          "event": "order.paid",
                          "banner": "Order-paid",
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "order": {
                              "total_amount": {
                                "every": 500,
                                "points": 10
                              }
                            },
                            "calculation_type": "ORDER_TOTAL_AMOUNT"
                          }
                        },
                        "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                        "automation_id": "auto_sRc6onPl70seyfrGOXhwDxYE",
                        "validation_rule_id": null
                      },
                      "promotion_tier": null
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-bus_val_rule-assignment-deleted"
      }
    },
    "/EVENTS.BUS_VAL_RULE.DELETED": {
      "post": {
        "summary": "Deleted",
        "tags": [
          "Events bus_val_rule"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a validation rule has been deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventBusValRuleDeletedData"
                },
                "examples": {
                  "business_validation_rule.deleted": {
                    "value": {
                      "rule": {
                        "id": "val_rfuNf5qDB9xg",
                        "name": "Business Validation Rule - 2/15/2024",
                        "type": "expression",
                        "rules": {
                          "1": {
                            "name": "customer.segment",
                            "error": {
                              "message": "Incorrect segment"
                            },
                            "rules": {},
                            "conditions": {
                              "$is": [
                                "seg_n3vVcU5t0m3rs4rEPr3C1oU5"
                              ]
                            }
                          },
                          "2": {
                            "name": "order.initial_amount",
                            "rules": {},
                            "conditions": {
                              "$more_than": [
                                9900
                              ]
                            }
                          },
                          "3": {
                            "name": "order.items.count",
                            "rules": {},
                            "conditions": {
                              "$more_than": [
                                3
                              ]
                            }
                          },
                          "4": {
                            "name": "order.items.price_each",
                            "rules": {},
                            "conditions": {
                              "$more_than": [
                                500
                              ]
                            }
                          },
                          "logic": " 1 AND 2 AND (  3 AND 4 )"
                        },
                        "object": "validation_rules",
                        "created_at": "2024-02-15T11:04:01.856Z",
                        "updated_at": "2024-02-15T11:06:04.849Z",
                        "context_type": "campaign.promotion",
                        "applicable_to": {
                          "excluded": [],
                          "included": [],
                          "included_all": false
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-bus_val_rule-deleted"
      }
    },
    "/EVENTS.DISTRIBUTION.MANUAL_DISTRIBUTION_SCHEDULE": {
      "post": {
        "summary": "Manual_distribution_schedule",
        "description": "",
        "tags": [
          "Events distribution"
        ],
        "responses": {
          "200": {
            "description": "Indicates that a manual distribution has been scheduled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventDistributionData"
                },
                "examples": {
                  "manual_distribution_schedule": {
                    "value": {
                      "distribution": {
                        "id": "distr_3oun3MaJpcqzxYmHN0PReck1k8",
                        "created_at": "2024-03-13T13:37:39.250Z",
                        "updated_at": null,
                        "status": "TO SEND",
                        "consents": {
                          "disabled": true
                        },
                        "set_live_at": null,
                        "distribution_channels": [
                          "webhook"
                        ]
                      },
                      "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",
                            "amount_limit": 3000,
                            "percent_off": 10,
                            "percent_off_formula": "IF(ORDER_AMOUNT > 150;15;10)",
                            "units": null,
                            "effect": "APPLY_TO_ORDER"
                          },
                          "gift": null,
                          "loyalty_card": null,
                          "redemption": {
                            "quantity": 1,
                            "redeemed_quantity": 0
                          },
                          "code_config": {
                            "pattern": "###",
                            "length": 3,
                            "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                            "prefix": "SPRING-2024-",
                            "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"
                      },
                      "voucher": {
                        "id": "v_ae1exRSLU9I4ncJjY5heHvVTE189Y3NB",
                        "code": "SPRING-2024-osO",
                        "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:46:48.140Z",
                        "redemption": {
                          "quantity": 1,
                          "redeemed_quantity": 0
                        },
                        "start_date": null,
                        "expiration_date": null,
                        "metadata": {},
                        "object": "voucher"
                      },
                      "customer": {
                        "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "name": "Jack Webhook",
                        "email": null,
                        "source_id": "jck-wbhk",
                        "metadata": {
                          "region": "EMEA",
                          "sign-up": "true"
                        },
                        "object": "customer"
                      },
                      "publication": {
                        "id": "pub_eB4okLT7vHrFoajHJGeoKir285dBxY1z",
                        "object": "publication",
                        "created_at": "2024-03-13T13:46:48.136Z",
                        "customer_id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                        "tracking_id": "jck-wbhk",
                        "metadata": {
                          "source_type": "distribution",
                          "source_id": "distr_3oun3MaJpcqzxYmHN0PReck1k8",
                          "distribution_id": "distr_3oun3MaJpcqzxYmHN0PReck1k8"
                        },
                        "channel": "Dashboard",
                        "source_id": null,
                        "result": "SUCCESS",
                        "customer": {
                          "id": "cust_IdgAFZxYwwHctOk9pPuMu308",
                          "source_id": "jck-wbhk",
                          "name": "Jack Webhook",
                          "address": null,
                          "summary": null,
                          "loyalty": null,
                          "referrals": null,
                          "metadata": {
                            "region": "EMEA",
                            "sign-up": "true"
                          },
                          "object": "customer"
                        },
                        "vouchers_id": [
                          "v_ae1exRSLU9I4ncJjY5heHvVTE189Y3NB"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "events-distribution-manual_distribution_schedule"
      }
    }
  },
  "components": {
    "schemas": {
      "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_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"
        ]
      },
      "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"
              }
            }
          }
        }
      },
      "AccessSettingsAssignmentsList": {
        "title": "Access Settings Assignments List",
        "type": "object",
        "description": "Lists all assignments of the campaign to areas and stores if the Areas and Stores feature is enabled (Enterprise feature).",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. Default is `list`. This object stores information about campaign assignments to areas and stores",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of campaign assignments.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Contains an array of campaign assignments.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique identifier of the campaign assignment.",
                  "example": "arsca_0ef5ee192117ae2416"
                },
                "area_id": {
                  "type": "string",
                  "description": "Unique identifier of the area to which the campaign is assigned.",
                  "example": "ar_0ea6cd7b781b8f857f"
                },
                "all_stores": {
                  "type": "boolean",
                  "description": "Determines if the campaign is assigned to all of the stores in the area."
                },
                "area_store_id": {
                  "type": "string",
                  "description": "Unique identifier of the store to which the campaign is assigned.",
                  "example": "ars_0ec347e2016bed85f4"
                },
                "created_at": {
                  "type": "string",
                  "description": "Date and time when the assignment was made. The value is shown in the ISO 8601 format.",
                  "format": "date-time",
                  "example": "2024-06-25T19:04:16.260Z"
                },
                "object": {
                  "type": "string",
                  "description": "The type of the object represented by JSON. This object stores information about the campaign assignment to areas or stores.",
                  "example": "area_store_campaign_assignment"
                }
              },
              "required": [
                "id",
                "area_id",
                "created_at",
                "object"
              ]
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of areas and stores to which the campaign is assigned.",
            "min": 0
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "Any": {
        "oneOf": [
          {
            "title": "array",
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "title": "string",
                  "type": "string"
                },
                {
                  "title": "number",
                  "type": "number"
                },
                {
                  "title": "object",
                  "type": "object"
                }
              ]
            }
          },
          {
            "title": "string",
            "type": "string"
          },
          {
            "title": "number",
            "type": "number"
          },
          {
            "title": "object",
            "type": "object"
          }
        ],
        "title": "Any"
      },
      "AnyOne": {
        "title": "Any",
        "type": "array",
        "items": {
          "oneOf": [
            {
              "title": "string",
              "type": "string"
            },
            {
              "title": "string - date",
              "type": "string",
              "format": "date"
            },
            {
              "title": "string - date-time",
              "type": "string",
              "format": "date-time"
            },
            {
              "title": "number",
              "type": "number"
            },
            {
              "title": "object",
              "type": "object"
            }
          ]
        },
        "maxItems": 1
      },
      "AnyNumber": {
        "title": "Any Number",
        "type": "array",
        "items": {
          "type": "number",
          "minimum": 0
        },
        "maxItems": 1
      },
      "AnyString": {
        "title": "Any String",
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "AnyDateDateTime": {
        "title": "Any Date and Date-Time",
        "type": "array",
        "items": {
          "oneOf": [
            {
              "type": "string",
              "title": "Date",
              "format": "date"
            },
            {
              "type": "string",
              "title": "Date-time",
              "format": "date-time"
            }
          ]
        },
        "maxItems": 1
      },
      "ApplicableTo": {
        "title": "Applicable To",
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "product",
              "sku",
              "products_collection"
            ],
            "description": "This object stores information about the resource to which the discount is applicable."
          },
          "id": {
            "type": "string",
            "description": "Unique product collection, product, or SKU identifier assigned by Voucherify."
          },
          "source_id": {
            "type": "string",
            "description": "The source identifier from your inventory system."
          },
          "product_id": {
            "type": "string",
            "description": "Parent product's unique ID assigned by Voucherify."
          },
          "product_source_id": {
            "type": "string",
            "description": "Parent product's source ID from your inventory system."
          },
          "strict": {
            "type": "boolean"
          },
          "price": {
            "type": "number",
            "description": "New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the price_formula parameter is present in the fixed price definition, this value becomes the fallback value. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price."
          },
          "price_formula": {
            "type": "number",
            "description": "Formula used to calculate the discounted price of an item."
          },
          "effect": {
            "description": "Defines how the discount is applied to the customer's order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ApplicableToEffect"
              }
            ]
          },
          "quantity_limit": {
            "type": "integer",
            "description": "The maximum number of units allowed to be discounted per order line item."
          },
          "aggregated_quantity_limit": {
            "type": "integer",
            "description": "The maximum number of units allowed to be discounted combined across all matched order line items."
          },
          "amount_limit": {
            "type": "integer",
            "description": "Upper limit allowed to be applied as a discount per order line item. 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. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects:\n- `APPLY_TO_ITEMS` (each item subtotal is discounted equally)\n- `APPLY_TO_ITEMS_BY_QUANTITY` (each unit of matched products has the same discount value)"
          },
          "order_item_indices": {
            "type": "array",
            "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.",
            "items": {
              "type": "integer"
            }
          },
          "order_item_units": {
            "type": "array",
            "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer",
                  "description": "Number assigned to the order line item in accordance with the order sent in the request."
                },
                "units": {
                  "type": "array",
                  "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.",
                  "items": {
                    "type": "integer"
                  }
                }
              }
            }
          },
          "repeat": {
            "type": "integer",
            "description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item."
          },
          "skip_initially": {
            "type": "integer",
            "description": "Determines how many items are skipped before the discount is applied."
          },
          "target": {
            "type": "string",
            "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.",
            "enum": [
              "ITEM",
              "UNIT"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "strict",
          "effect"
        ]
      },
      "ApplicableToEffect": {
        "title": "Applicable To Effect",
        "type": "string",
        "enum": [
          "APPLY_TO_EVERY",
          "APPLY_TO_CHEAPEST",
          "APPLY_FROM_CHEAPEST",
          "APPLY_TO_MOST_EXPENSIVE",
          "APPLY_FROM_MOST_EXPENSIVE"
        ]
      },
      "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"
        ]
      },
      "BusValRuleAssignmentDistribution": {
        "type": "object",
        "description": "Assign a validation rule to a distribution.",
        "title": "Distribution",
        "properties": {
          "distribution": {
            "type": "string",
            "description": "Unique identifier of the distribution to which the validation rule is assigned.",
            "example": "distr_2nUIekYnS9L1Vm1I55vmC7kSvd"
          }
        }
      },
      "Campaign": {
        "title": "Campaign",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignBase"
          },
          {
            "title": "Campaign Additional Data",
            "type": "object",
            "properties": {
              "promotion": {
                "$ref": "#/components/schemas/PromotionTiersList"
              },
              "validation_rules_assignments": {
                "$ref": "#/components/schemas/ValidationRulesAssignmentsList"
              },
              "access_settings_assignments": {
                "$ref": "#/components/schemas/AccessSettingsAssignmentsList"
              }
            }
          }
        ]
      },
      "CampaignBase": {
        "type": "object",
        "title": "Campaign Base",
        "description": "Object representing a campaign.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique campaign ID, assigned by Voucherify.",
            "example": "camp_f7fBbQxUuTN7dI7tGOo5XMDA"
          },
          "name": {
            "type": "string",
            "description": "Campaign name."
          },
          "description": {
            "type": "string",
            "description": "An optional field to keep extra textual information about the campaign such as a campaign description and details."
          },
          "campaign_type": {
            "type": "string",
            "enum": [
              "LOYALTY_PROGRAM",
              "GIFT_VOUCHERS",
              "DISCOUNT_COUPONS",
              "PROMOTION",
              "REFERRAL_PROGRAM"
            ],
            "description": "Type of campaign."
          },
          "type": {
            "type": "string",
            "description": "Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers.\n\n- `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria\n-  `STATIC`: vouchers need to be manually published\n- `STANDALONE`: campaign for single vouchers",
            "enum": [
              "AUTO_UPDATE",
              "STATIC",
              "STANDALONE"
            ]
          },
          "voucher": {
            "$ref": "#/components/schemas/CampaignVoucher"
          },
          "auto_join": {
            "type": "boolean",
            "description": "If set to `true`, customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled."
          },
          "join_once": {
            "type": "boolean",
            "description": "If set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them. It is always `true` for loyalty campaigns."
          },
          "use_voucher_metadata_schema": {
            "type": "boolean",
            "description": "Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema."
          },
          "validity_timeframe": {
            "type": "object",
            "description": "Indicates recurrent time periods when the campaign is valid.",
            "properties": {
              "interval": {
                "type": "string",
                "description": "Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day."
              },
              "duration": {
                "type": "string",
                "description": "Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day."
              }
            }
          },
          "validity_day_of_week": {
            "type": "array",
            "description": "Integer array corresponding to the particular days of the week in which the campaign is valid.\n\n- `0` Sunday\n- `1` Monday\n- `2` Tuesday\n- `3` Wednesday\n- `4` Thursday\n- `5` Friday\n- `6` Saturday",
            "items": {
              "type": "integer",
              "enum": [
                0,
                1,
                2,
                3,
                4,
                5,
                6
              ]
            }
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "activity_duration_after_publishing": {
            "type": "string",
            "description": "Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days."
          },
          "vouchers_count": {
            "type": "integer",
            "description": "Total number of unique vouchers in campaign."
          },
          "start_date": {
            "type": "string",
            "format": "date-time",
            "description": "Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive *before* this date. ",
            "example": "2022-09-20T00:00:00.000Z"
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "description": "Expiration timestamp defines when the campaign expires in ISO 8601 format.  Campaign is inactive *after* this date.",
            "example": "2022-09-30T00:00:00.000Z"
          },
          "active": {
            "type": "boolean",
            "description": "Indicates if the campaign is active."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2021-12-01T08:00:50.038Z",
            "description": "Timestamp representing the date and time when the campaign was created in ISO 8601 format."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-09-20T09:18:19.623Z",
            "description": "Timestamp representing the date and time when the campaign was updated in ISO 8601 format."
          },
          "category": {
            "type": "string",
            "description": "Unique category name."
          },
          "creation_status": {
            "type": "string",
            "enum": [
              "DONE",
              "IN_PROGRESS",
              "FAILED",
              "DRAFT",
              "MODIFYING"
            ],
            "description": "Indicates the status of the campaign creation."
          },
          "vouchers_generation_status": {
            "type": "string",
            "description": "Indicates the status of the campaign's voucher generation.",
            "enum": [
              "DONE",
              "IN_PROGRESS",
              "FAILED",
              "DRAFT",
              "MODIFYING"
            ]
          },
          "protected": {
            "type": "boolean",
            "description": "Indicates whether the resource can be deleted."
          },
          "category_id": {
            "type": "string",
            "nullable": true,
            "description": "Unique category ID that this campaign belongs to.",
            "example": "cat_0b688929a2476386a7"
          },
          "categories": {
            "type": "array",
            "description": "Contains details about the category.",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          },
          "object": {
            "type": "string",
            "default": "campaign",
            "description": "The type of the object represented by JSON. This object stores information about the campaign."
          },
          "referral_program": {
            "$ref": "#/components/schemas/ReferralProgram"
          },
          "loyalty_tiers_expiration": {
            "$ref": "#/components/schemas/LoyaltyTiersExpirationAll"
          }
        },
        "required": [
          "id",
          "name",
          "campaign_type",
          "type",
          "auto_join",
          "join_once",
          "use_voucher_metadata_schema",
          "created_at",
          "creation_status",
          "vouchers_generation_status",
          "protected",
          "category_id",
          "categories",
          "object"
        ]
      },
      "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"
        ]
      },
      "CampaignVoucher": {
        "type": "object",
        "description": "Schema model for a campaign voucher.",
        "title": "Campaign Voucher",
        "properties": {
          "type": {
            "type": "string",
            "default": "DISCOUNT_VOUCHER",
            "description": "Type of voucher."
          },
          "discount": {
            "description": "Defines the voucher discount type and details.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Discount"
              }
            ]
          },
          "gift": {
            "description": "Defines the voucher gift details.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Gift"
              }
            ]
          },
          "loyalty_card": {
            "description": "Defines the voucher loyalty card details.",
            "allOf": [
              {
                "$ref": "#/components/schemas/CampaignLoyaltyCard"
              }
            ]
          },
          "redemption": {
            "type": "object",
            "description": "Defines the redemption limits on vouchers.",
            "properties": {
              "quantity": {
                "type": "integer",
                "nullable": true,
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              }
            },
            "required": [
              "quantity"
            ]
          },
          "code_config": {
            "$ref": "#/components/schemas/CodeConfigRequiredLengthCharsetPattern"
          },
          "is_referral_code": {
            "type": "boolean",
            "description": "Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`."
          },
          "start_date": {
            "type": "string",
            "format": "date-time",
            "description": "Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. ",
            "example": "2022-09-20T00:00:00.000Z"
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "description": "Expiration timestamp defines when the campaign expires in ISO 8601 format.  Campaign is *inactive after* this date.",
            "example": "2022-09-30T00:00:00.000Z"
          },
          "validity_timeframe": {
            "type": "object",
            "description": "Set recurrent time periods when the campaign is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.",
            "properties": {
              "interval": {
                "type": "string",
                "description": "Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day."
              },
              "duration": {
                "type": "string",
                "description": "Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day."
              }
            }
          },
          "validity_day_of_week": {
            "type": "array",
            "description": "Integer array corresponding to the particular days of the week in which the voucher is valid.\n\n- `0` Sunday\n- `1` Monday\n- `2` Tuesday\n- `3` Wednesday\n- `4` Thursday\n- `5` Friday\n- `6` Saturday",
            "items": {
              "type": "integer",
              "enum": [
                0,
                1,
                2,
                3,
                4,
                5,
                6
              ]
            }
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          }
        },
        "required": [
          "type",
          "redemption",
          "code_config",
          "is_referral_code"
        ]
      },
      "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"
        ]
      },
      "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."
          }
        }
      },
      "CodeConfigRequiredLengthCharsetPattern": {
        "title": "Code Config Settings",
        "allOf": [
          {
            "$ref": "#/components/schemas/CodeConfig"
          }
        ],
        "required": [
          "length",
          "prefix",
          "charset",
          "pattern",
          "postfix"
        ]
      },
      "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"
        ]
      },
      "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."
          }
        }
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "CustomerSummary": {
        "title": "Customer Summary",
        "type": "object",
        "properties": {
          "redemptions": {
            "$ref": "#/components/schemas/CustomerSummaryRedemptions"
          },
          "orders": {
            "$ref": "#/components/schemas/CustomerSummaryOrders"
          }
        },
        "required": [
          "redemptions",
          "orders"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
            ]
          }
        ]
      },
      "DefaultPayloadData1": {
        "type": "object",
        "required": [
          "id",
          "project_id",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the sendout for this webhook.",
            "example": "whs_0e16e42bc6e0c65b57"
          },
          "project_id": {
            "type": "string",
            "description": "Unique identifier of the Voucherify project.",
            "example": "proj_5T4Rpl4T1nuM"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "The exact moment when the webhook was created.",
            "example": "2024-01-01T11:11:11.111Z"
          }
        }
      },
      "DefaultPayloadData2": {
        "type": "object",
        "required": [
          "source",
          "event"
        ],
        "properties": {
          "source": {
            "type": "object",
            "description": "Webhook ID of the distribution for which the distribution has been initiated.",
            "properties": {
              "id": {
                "type": "string",
                "description": "ID number of the webhook.",
                "example": "wh_j56Vfy47Vx9YOX7QYD1fzHnc"
              },
              "object": {
                "type": "string",
                "description": "Determines the type of the object.",
                "enum": [
                  "webhook",
                  "distribution"
                ],
                "example": "webhook"
              },
              "target_url": {
                "type": "string",
                "description": "The address where the webhook will be sent."
              }
            },
            "required": [
              "id",
              "object",
              "target_url"
            ]
          },
          "event": {
            "type": "object",
            "description": "Contains other data of the event that triggered the sendout.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the event that triggered the sendout.",
                "example": "evred_1f3611301g3127begb"
              },
              "type": {
                "type": "string",
                "description": "Determines the type of the object.",
                "example": "redemption.succeeded"
              },
              "created_at": {
                "type": "string",
                "description": "The exact moment when the event was created.",
                "example": "2024-01-01T11:11:11.111Z",
                "format": "date-time"
              },
              "entity_id": {
                "type": "string",
                "description": "Unique identifier of the entity that triggered the sendout.",
                "example": "r_1f3611302bf107befb"
              },
              "group_id": {
                "type": "string",
                "description": "Unique identifier of the request that triggered the event.",
                "example": "v-1f36113948e50fc4ge"
              },
              "event_source": {
                "$ref": "#/components/schemas/EventSource"
              }
            },
            "required": [
              "id",
              "type",
              "created_at",
              "entity_id",
              "group_id",
              "event_source"
            ]
          }
        }
      },
      "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"
          }
        ]
      },
      "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"
        ]
      },
      "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"
      },
      "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"
        ]
      },
      "DiscountFixedVouchersEffectTypes": {
        "title": "Discount Fixed Vouchers Effect Types",
        "enum": [
          "APPLY_TO_ORDER",
          "APPLY_TO_ITEMS"
        ],
        "type": "string"
      },
      "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"
        ]
      },
      "DiscountPercentVouchersEffectTypes": {
        "title": "Discount Percent Vouchers Effect Types",
        "enum": [
          "APPLY_TO_ORDER",
          "APPLY_TO_ITEMS"
        ],
        "type": "string"
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "DiscountUnitVouchersEffectTypes": {
        "title": "Discount Unit Vouchers Effect Types",
        "enum": [
          "ADD_MISSING_ITEMS",
          "ADD_NEW_ITEMS",
          "ADD_MANY_ITEMS"
        ],
        "type": "string"
      },
      "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"
            ]
          }
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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."
          }
        }
      },
      "EarningRuleObjectCustomEvent": {
        "description": "Object representing an earning rule triggered by a custom event.",
        "type": "object",
        "title": "Earning Rule Object for Custom Event",
        "properties": {
          "id": {
            "type": "string",
            "example": "ern_P6MWOFGsv63sbTaTZBp0IHGK",
            "description": "Unique identifier assigned by Voucherify."
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the earning rule was created in ISO 8601 format.",
            "example": "2022-02-02T13:18:32.557Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format.",
            "example": "2022-02-03T13:09:27.206Z",
            "format": "date-time"
          },
          "validation_rule_id": {
            "type": "string",
            "example": "val_248vs7tUjlIE",
            "description": "Unique identifier for the validation rule."
          },
          "loyalty": {
            "description": "An object that defines the number of points that will be added to a loyalty card and how the points will be added.\n\n- `FIXED` adds a fixed number of `points`\n- `PROPORTIONAL` adds points proportionally based on a pre-defined ratio",
            "oneOf": [
              {
                "$ref": "#/components/schemas/EarningRuleFixed"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportionalCustomEvent"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportionalCustomerMetadata"
              }
            ]
          },
          "custom_event": {
            "type": "object",
            "description": "Contains the schema id of a custom event. **Required** for the custom event option in `event`.",
            "properties": {
              "schema_id": {
                "type": "string",
                "description": "Unique identifier of a custom event schema. Assigned by Voucherify.",
                "example": "ms_gn4Qe4xsFPf7orCArCiNVY13"
              }
            }
          },
          "event": {
            "type": "string",
            "default": "custom_event_defined_in_EVENT_SCHEMA",
            "enum": [
              "custom_event_defined_in_EVENT_SCHEMA"
            ],
            "description": "Defines the event which triggers the earning rule to add points to a loyalty card."
          },
          "source": {
            "type": "object",
            "description": "Contains the custom earning rule name and parent campaign.",
            "properties": {
              "banner": {
                "type": "string",
                "example": "Order Paid - You will get 100 points",
                "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
              },
              "object_id": {
                "type": "string",
                "example": "camp_Pfja7X91b1GoyH5wnpzCwlP3",
                "description": "A unique campaign identifier assigned by the Voucherify API."
              },
              "object_type": {
                "type": "string",
                "default": "campaign",
                "description": "Defines the object associated with the earning rule. Defaults to `campaign`."
              }
            }
          },
          "active": {
            "type": "boolean",
            "description": "A flag to toggle the earning rule on or off."
          },
          "start_date": {
            "type": "string",
            "example": "2022-02-02T13:00:00.000Z",
            "format": "date-time",
            "description": "Start date defines when the earning rule starts to be active. Activation timestamp in ISO 8601 format. "
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-03-03T14:30:00.000Z",
            "description": "Expiration date defines when the earning rule expires. Expiration timestamp in ISO 8601 format."
          },
          "validity_timeframe": {
            "type": "object",
            "description": "Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.",
            "properties": {
              "duration": {
                "type": "string",
                "description": "Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a `duration` of `PT1H` will be valid for a duration of one hour.",
                "example": "PT1H"
              },
              "interval": {
                "type": "string",
                "description": "Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an `interval` of `P2D` will be valid every other day.",
                "example": "P2D"
              }
            }
          },
          "validity_day_of_week": {
            "type": "array",
            "description": "Integer array corresponding to the particular days of the week in which the earning rule is valid.\n\n- `0` Sunday\n- `1` Monday\n- `2` Tuesday\n- `3` Wednesday\n- `4` Thursday\n- `5` Friday\n- `6` Saturday",
            "items": {
              "type": "integer",
              "enum": [
                0,
                1,
                2,
                3,
                4,
                5,
                6
              ]
            }
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "object": {
            "type": "string",
            "default": "earning_rule",
            "description": "The type of the object represented by JSON. Default is `earning_rule`."
          },
          "automation_id": {
            "type": "string",
            "description": "For internal use by Voucherify.",
            "example": "auto_4jH1yq9WJS0oJ8suagCrltyb"
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format."
          }
        }
      },
      "EarningRuleObjectEnteredSegment": {
        "description": "Object representing an earning rule for entering a customer segment.",
        "type": "object",
        "title": "Earning Rule Object for Entered Segment",
        "properties": {
          "validation_rule_id": {
            "type": "string",
            "example": "val_248vs7tUjlIE",
            "description": "Unique identifier of the validation rule."
          },
          "loyalty": {
            "description": "An object that defines the number of points that will be added to a loyalty card and how the points will be added.\n\n- `FIXED` adds a fixed number of `points`\n- `PROPORTIONAL` adds points proportionally based on a pre-defined ratio",
            "oneOf": [
              {
                "$ref": "#/components/schemas/EarningRuleFixed"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportionalCustomerMetadata"
              }
            ]
          },
          "segment": {
            "type": "object",
            "description": "Contains the id of a customer segment. **Required** for the `customer.segment.entered` option in `event`.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Contains a unique identifier of a customer segment. Assigned by the Voucherify API."
              }
            }
          },
          "event": {
            "type": "string",
            "default": "customer.segment.entered",
            "enum": [
              "customer.segment.entered"
            ],
            "description": "Defines the event which triggers the earning rule to add points to a loyalty card.  \n\n- `customer.segment.entered` an event defined by the Voucherify API corresponding to a customer entering a pre-defined customer segment."
          },
          "source": {
            "type": "object",
            "description": "Contains the custom earning rule name and parent campaign.",
            "properties": {
              "banner": {
                "type": "string",
                "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
              }
            }
          },
          "active": {
            "type": "boolean",
            "description": "A flag to toggle the earning rule on or off."
          },
          "start_date": {
            "type": "string",
            "example": "2022-02-02T13:00:00.000Z",
            "format": "date-time",
            "description": "Start date defines when the earning rule starts to be active. Activation timestamp in ISO 8601 format."
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-03-03T14:30:00.000Z",
            "description": "Expiration date defines when the earning rule expires. Expiration timestamp in ISO 8601 format."
          },
          "validity_timeframe": {
            "type": "object",
            "description": "Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.",
            "properties": {
              "duration": {
                "type": "string",
                "description": "Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a `duration` of `PT1H` will be valid for a duration of one hour.",
                "example": "PT1H"
              },
              "interval": {
                "type": "string",
                "description": "Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an `interval` of `P2D` will be valid every other day.",
                "example": "P2D"
              }
            }
          },
          "validity_day_of_week": {
            "type": "array",
            "description": "Integer array corresponding to the particular days of the week in which the earning rule is valid.\n\n- `0` Sunday\n- `1` Monday\n- `2` Tuesday\n- `3` Wednesday\n- `4` Thursday\n- `5` Friday\n- `6` Saturday",
            "items": {
              "type": "integer",
              "enum": [
                0,
                1,
                2,
                3,
                4,
                5,
                6
              ]
            }
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format."
          }
        }
      },
      "EarningRuleObjectOrderPaid": {
        "description": "Object representing an earning rule for a paid order.",
        "type": "object",
        "title": "Earning Rule Object for Order Paid",
        "properties": {
          "event": {
            "type": "string",
            "default": "order.paid",
            "enum": [
              "order.paid"
            ],
            "description": "Defines the event which triggers the earning rule to add points to a loyalty card.  \n\n- `order.paid` an event defined by the Voucherify API corresponding to an order status `PAID`. "
          },
          "banner": {
            "type": "string",
            "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
          },
          "loyalty": {
            "description": "An object that defines the number of points that will be added to a loyalty card and how the points will be added.\n\n- `FIXED` adds a fixed number of `points`\n- `PROPORTIONAL` adds points proportionally based on a pre-defined ratio",
            "oneOf": [
              {
                "$ref": "#/components/schemas/EarningRuleFixed"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportional"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportionalOrderItems"
              }
            ]
          }
        }
      },
      "EarningRuleObjectTier": {
        "description": "Object representing an earning rule for tiers.",
        "type": "object",
        "title": "Earning Rule Object for Tiers",
        "properties": {
          "id": {
            "type": "string",
            "example": "ern_P6MWOFGsv63sbTaTZBp0IHGK",
            "description": "Unique identifier of the earning rule."
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the earning rule was created in ISO 8601 format.",
            "example": "2022-02-02T13:18:32.557Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format.",
            "example": "2022-02-03T13:09:27.206Z",
            "format": "date-time"
          },
          "validation_rule_id": {
            "type": "string",
            "example": "val_248vs7tUjlIE",
            "description": "Unique identifier of the validation rule."
          },
          "loyalty": {
            "description": "An object that defines the number of points that will be added to a loyalty card and how the points will be added.\n\n- `FIXED` adds a fixed number of `points`\n- `PROPORTIONAL` adds points proportionally based on a pre-defined ratio",
            "oneOf": [
              {
                "$ref": "#/components/schemas/EarningRuleFixed"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportionalCustomerMetadata"
              }
            ]
          },
          "event": {
            "type": "string",
            "description": "Defines the event which triggers the earning rule to add points to a loyalty card.",
            "enum": [
              "customer.loyalty.tier.joined",
              "customer.loyalty.tier.left",
              "customer.loyalty.tier.upgraded",
              "customer.loyalty.tier.downgraded",
              "customer.loyalty.tier.prolonged"
            ]
          },
          "loyalty_tier": {
            "type": "object",
            "description": "Defines the tier associated with the earning rule definition.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the loyalty tier associated with the earning rule.",
                "example": "ltr_pudTGWasuIqxdiDM0go31OV1"
              }
            }
          },
          "source": {
            "type": "object",
            "description": "Contains the custom earning rule name and parent campaign.",
            "properties": {
              "banner": {
                "type": "string",
                "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
              },
              "object_id": {
                "type": "string",
                "example": "camp_Pfja7X91b1GoyH5wnpzCwlP3",
                "description": "Unique identifier of the campaign."
              },
              "object_type": {
                "type": "string",
                "default": "campaign",
                "description": "Defines the object associated with the earning rule. Defaults to `campaign`."
              }
            }
          },
          "active": {
            "type": "boolean",
            "description": "A flag to toggle the earning rule on or off."
          },
          "start_date": {
            "type": "string",
            "example": "2022-02-02T13:00:00.000Z",
            "format": "date-time",
            "description": "Start date defines when the earning rule starts to be active. Activation timestamp in ISO 8601 format."
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-03-03T14:30:00.000Z",
            "description": "Expiration date defines when the earning rule expires. Expiration timestamp in ISO 8601 format."
          },
          "validity_timeframe": {
            "type": "object",
            "description": "Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.",
            "properties": {
              "duration": {
                "type": "string",
                "description": "Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a `duration` of `PT1H` will be valid for a duration of one hour.",
                "example": "PT1H"
              },
              "interval": {
                "type": "string",
                "description": "Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an `interval` of `P2D` will be valid every other day.",
                "example": "P2D"
              }
            }
          },
          "validity_day_of_week": {
            "type": "array",
            "description": "Integer array corresponding to the particular days of the week in which the earning rule is valid.\n\n- `0` Sunday\n- `1` Monday\n- `2` Tuesday\n- `3` Wednesday\n- `4` Thursday\n- `5` Friday\n- `6` Saturday",
            "items": {
              "type": "integer",
              "enum": [
                0,
                1,
                2,
                3,
                4,
                5,
                6
              ]
            }
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "object": {
            "type": "string",
            "default": "earning_rule",
            "description": "The type of the object represented by JSON. Default is `earning_rule`."
          },
          "automation_id": {
            "type": "string",
            "description": "For internal use by Voucherify.",
            "example": "auto_4jH1yq9WJS0oJ8suagCrltyb"
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format."
          }
        }
      },
      "EarningRuleProportional": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrder"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderItems"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalCustomerMetadata"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalCustomEvent"
          }
        ],
        "title": "Calculate points proportionally"
      },
      "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"
        ]
      },
      "EarningRuleProportionalOrder": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderAmount"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderTotalAmount"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderMetadata"
          }
        ],
        "title": "Order"
      },
      "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"
        ]
      },
      "EarningRuleProportionalOrderItems": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderItemsQuantity"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderItemsAmount"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderItemsSubtotalAmount"
          }
        ],
        "title": "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"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "EventBusValRuleAssignmentCreated": {
        "type": "object",
        "title": "Event Business Validation Rule Assignment Created",
        "description": "Event data object schema for `EVENTS.BUS_VAL_RULE.ASSIGNMENT.CREATED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "business_validation_rule.assignment.created"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventBusValRuleAssignmentCreatedData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventBusValRuleAssignmentCreatedData": {
        "title": "Event Business Validation Rule Assignment Created",
        "type": "object",
        "description": "Event data object schema for `bus_val_rule.assignment.created`.",
        "properties": {
          "rule": {
            "nullable": true,
            "$ref": "#/components/schemas/ValidationRule"
          },
          "assignment": {
            "nullable": true,
            "$ref": "#/components/schemas/BusValRuleAssignment"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "campaign": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "distribution": {
            "nullable": true,
            "$ref": "#/components/schemas/BusValRuleAssignmentDistribution"
          },
          "promotion_tier": {
            "nullable": true,
            "$ref": "#/components/schemas/SimplePromotionTier"
          },
          "earning_rule": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleEarningRule"
          }
        }
      },
      "EventBusValRuleAssignmentDeleted": {
        "type": "object",
        "title": "Event Business Validation Rule Assignment Deleted",
        "description": "Event data object schema for `EVENTS.BUS_VAL_RULE.ASSIGNMENT.DELETED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "business_validation_rule.assignment.deleted"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventBusValRuleAssignmentDeletedData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventBusValRuleAssignmentDeletedData": {
        "title": "Event Business Validation Rule Assignment Deleted",
        "type": "object",
        "description": "Event data object schema for `bus_val_rule.assignment.deleted`.",
        "properties": {
          "rule": {
            "nullable": true,
            "$ref": "#/components/schemas/ValidationRule"
          },
          "assignment": {
            "nullable": true,
            "$ref": "#/components/schemas/BusValRuleAssignment"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "campaign": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "distribution": {
            "nullable": true,
            "$ref": "#/components/schemas/BusValRuleAssignmentDistribution"
          },
          "promotion_tier": {
            "nullable": true,
            "$ref": "#/components/schemas/SimplePromotionTier"
          },
          "earning_rule": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleEarningRule"
          }
        }
      },
      "EventBusValRuleCreated": {
        "type": "object",
        "title": "Event Business Validation Rule Created",
        "description": "Event data object schema for `EVENTS.BUS_VAL_RULE.CREATED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "business_validation_rule.created"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventBusValRuleCreatedData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventBusValRuleCreatedData": {
        "title": "Event Business Validation Rule Created",
        "type": "object",
        "description": "Event data object schema for `bus_val_rule.created`.",
        "properties": {
          "rule": {
            "nullable": true,
            "$ref": "#/components/schemas/ValidationRule"
          },
          "created_at": {
            "type": "string",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the validation rule was created in the ISO 8601 format.",
            "format": "date-time"
          }
        }
      },
      "EventBusValRuleDeleted": {
        "type": "object",
        "title": "Event Business Validation Rule Deleted",
        "description": "Event data object schema for `EVENTS.BUS_VAL_RULE.DELETED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "business_validation_rule.deleted"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventBusValRuleDeletedData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventBusValRuleDeletedData": {
        "title": "Event Business Validation Rule Deleted",
        "type": "object",
        "description": "Event data object schema for `bus_val_rule.deleted`.",
        "properties": {
          "rule": {
            "nullable": true,
            "$ref": "#/components/schemas/ValidationRule"
          },
          "deleted_at": {
            "type": "string",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the validation rule was deleted in the ISO 8601 format.",
            "format": "date-time"
          }
        }
      },
      "EventBusValRuleUpdated": {
        "type": "object",
        "title": "Event Business Validation Rule Updated",
        "description": "Event data object schema for `EVENTS.BUS_VAL_RULE.UPDATED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "business_validation_rule.updated"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventBusValRuleUpdatedData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventBusValRuleUpdatedData": {
        "title": "Event Business Validation Rule Updated",
        "type": "object",
        "description": "Event data object schema for `bus_val_rule.updated`.",
        "properties": {
          "rule": {
            "nullable": true,
            "$ref": "#/components/schemas/ValidationRule"
          },
          "updated_at": {
            "type": "string",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the validation rule was updated in the ISO 8601 format.",
            "format": "date-time"
          }
        }
      },
      "EventCampaignCreated": {
        "type": "object",
        "title": "Event Campaign Created",
        "description": "Event data object schema for `EVENTS.CAMPAIGN.CREATED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "campaign.created"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventCampaignCreatedData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventCampaignCreatedData": {
        "title": "Event Campaign Created",
        "type": "object",
        "description": "Event data object schema for `campaign.created`.",
        "properties": {
          "campaign": {
            "nullable": true,
            "$ref": "#/components/schemas/Campaign"
          },
          "created_at": {
            "type": "string",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the campaign was created in the ISO 8601 format.",
            "format": "date-time"
          }
        }
      },
      "EventCampaignDeleted": {
        "type": "object",
        "title": "Event Campaign Deleted",
        "description": "Event data object schema for `EVENTS.CAMPAIGN.DELETED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "campaign.deleted"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventCampaignDeletedData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventCampaignDeletedData": {
        "title": "Event Campaign Deleted",
        "type": "object",
        "description": "Event data object schema for `campaign.deleted`.",
        "properties": {
          "campaign": {
            "nullable": true,
            "$ref": "#/components/schemas/Campaign"
          },
          "deleted_at": {
            "type": "string",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the campaign was deleted in the ISO 8601 format.",
            "format": "date-time"
          }
        }
      },
      "EventCampaignDisabled": {
        "type": "object",
        "title": "Event Campaign Disabled",
        "description": "Event data object schema for `EVENTS.CAMPAIGN.DISABLED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "campaign.disabled"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventCampaignDisabledData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventCampaignDisabledData": {
        "title": "Event Campaign Disabled",
        "type": "object",
        "description": "Event data object schema for `campaign.disabled`.",
        "properties": {
          "campaign": {
            "nullable": true,
            "$ref": "#/components/schemas/Campaign"
          }
        }
      },
      "EventCampaignEnabled": {
        "type": "object",
        "title": "Event Campaign Enabled",
        "description": "Event data object schema for `EVENTS.CAMPAIGN.ENABLED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "campaign.enabled"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventCampaignEnabledData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventCampaignEnabledData": {
        "title": "Event Campaign Enabled",
        "type": "object",
        "description": "Event data object schema for `campaign.enabled`.",
        "properties": {
          "campaign": {
            "nullable": true,
            "$ref": "#/components/schemas/Campaign"
          }
        }
      },
      "EventCampaignLoyaltyTierCreatedData": {
        "type": "object",
        "title": "Loyalty Tier Created",
        "description": "Event data object schema for a created loyalty tier.",
        "properties": {
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "loyalty_tier": {
            "$ref": "#/components/schemas/LoyaltyTier"
          }
        }
      },
      "EventCampaignLoyaltyTierDeletedData": {
        "type": "object",
        "title": "Loyalty Tier Deleted",
        "description": "Event data object schema for a deleted loyalty tier.",
        "properties": {
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "loyalty_tier": {
            "$ref": "#/components/schemas/LoyaltyTier"
          }
        }
      },
      "EventCampaignLoyaltyTierUpdatedData": {
        "type": "object",
        "title": "Loyalty Tier Updated",
        "description": "Event data object schema for an updated loyalty tier.",
        "properties": {
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "loyalty_tier": {
            "$ref": "#/components/schemas/LoyaltyTier"
          }
        }
      },
      "EventCampaignPromotionTier": {
        "type": "object",
        "title": "Promotion Tier",
        "description": "Event data object schema for activities related to campaign promotion tiers.",
        "properties": {
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "promotion_tier": {
            "$ref": "#/components/schemas/PromotionTier"
          }
        }
      },
      "EventCampaignPromotionTierCreatedData": {
        "type": "object",
        "title": "Event Campaign Promotion Tier Created",
        "description": "Event data object schema for `campaign.promotion_tier.created`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCampaignPromotionTier"
          }
        ]
      },
      "EventCampaignPromotionTierEnabledData": {
        "type": "object",
        "title": "Event Campaign Promotion Tier Enabled",
        "description": "Event data object schema for `campaign.promotion_tier.enabled`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCampaignPromotionTier"
          }
        ]
      },
      "EventCampaignPromotionTierDisabledData": {
        "type": "object",
        "title": "Event Campaign Promotion Tier Disabled",
        "description": "Event data object schema for `campaign.promotion_tier.disabled`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCampaignPromotionTier"
          }
        ]
      },
      "EventCampaignPromotionTierUpdatedData": {
        "type": "object",
        "title": "Event Campaign Promotion Tier Updated",
        "description": "Event data object schema for `campaign.promotion_tier.updated`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCampaignPromotionTier"
          }
        ]
      },
      "EventCampaignPromotionTierDeletedData": {
        "type": "object",
        "title": "Event Campaign Promotion Tier Deleted",
        "description": "Event data object schema for `campaign.promotion_tier.deleted`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCampaignPromotionTier"
          }
        ]
      },
      "EventCampaignUpdated": {
        "type": "object",
        "title": "Event Campaign Updated",
        "description": "Event data object schema for `EVENTS.CAMPAIGN.UPDATED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "campaign.updated"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventCampaignUpdatedData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventCampaignUpdatedData": {
        "title": "Event Campaign Updated",
        "type": "object",
        "description": "Event data object schema for `campaign.updated`.",
        "properties": {
          "campaign": {
            "nullable": true,
            "$ref": "#/components/schemas/Campaign"
          }
        }
      },
      "EventCampaignVouchersGenerationCompleted": {
        "type": "object",
        "title": "Event Campaign Vouchers Generation Completed",
        "description": "Event data object schema for `EVENTS.CAMPAIGN.VOUCHERS.GENERATION.COMPLETED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "campaign.vouchers.generation.completed"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventCampaignVouchersGenerationCompletedData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventCampaignVouchersGenerationCompletedData": {
        "title": "Event Campaign Vouchers Generation Completed",
        "type": "object",
        "description": "Event data object schema for `campaign.vouchers.generation.completed`.",
        "properties": {
          "campaign": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "count": {
            "type": "integer",
            "description": "Number of generated vouchers."
          },
          "completed_at": {
            "type": "string",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the generation of the campaign vouchers was completed in the ISO 8601 format.",
            "format": "date-time"
          }
        }
      },
      "EventCustomerCreated": {
        "type": "object",
        "title": "Event Customer Created",
        "description": "Event data object schema for `EVENTS.CUSTOMER.CREATED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "customer.created"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventCustomerCreatedData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventCustomerCreatedData": {
        "type": "object",
        "title": "Event Customer Created",
        "description": "Event data object schema for `customer.created`.",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
          }
        }
      },
      "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"
        ]
      },
      "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"
          }
        ]
      },
      "EventCustomerDeleted": {
        "type": "object",
        "title": "Event Customer Deleted",
        "description": "Event data object schema for `EVENTS.CUSTOMER.DELETED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "customer.deleted"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventCustomerDeletedData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventCustomerDeletedData": {
        "title": "Event Customer Deleted",
        "description": "Event data object schema for `customer.deleted`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
          }
        }
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
            ]
          }
        ]
      },
      "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"
            ]
          }
        ]
      },
      "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"
            ]
          }
        ]
      },
      "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"
            ]
          }
        ]
      },
      "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"
            ]
          }
        ]
      },
      "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"
          }
        }
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
          }
        }
      },
      "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"
              }
            }
          }
        ]
      },
      "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"
              }
            }
          }
        ]
      },
      "EventCustomerRewardRedemptionsCreatedData": {
        "type": "object",
        "title": "Event Customer Rewarded",
        "description": "Event data object schema for `EVENTS.CUSTOMER.REWARD_REDEMPTIONS.CREATED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRewardRedemptionsBase"
          },
          {
            "type": "object",
            "properties": {
              "event_source": {
                "type": "object",
                "description": "",
                "properties": {
                  "channel": {
                    "type": "string",
                    "description": "Determines the channel that triggered the event.",
                    "enum": [
                      "USER_PORTAL",
                      "API",
                      "CLIENT_API",
                      "INTERNAL"
                    ]
                  }
                }
              }
            }
          }
        ]
      },
      "EventCustomerRewardRedemptionsPendingData": {
        "type": "object",
        "title": "Event Customer Rewarded",
        "description": "Event data object schema for `EVENTS.CUSTOMER.REWARD_REDEMPTIONS.PENDING`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRewardRedemptionsBase"
          },
          {
            "type": "object",
            "properties": {
              "event_source": {
                "type": "object",
                "description": "",
                "properties": {
                  "channel": {
                    "type": "string",
                    "description": "Determines the channel that triggered the event.",
                    "enum": [
                      "USER_PORTAL",
                      "API",
                      "CLIENT_API",
                      "INTERNAL"
                    ]
                  }
                }
              }
            }
          }
        ]
      },
      "EventCustomerRewarded": {
        "type": "object",
        "title": "Event Customer Rewarded",
        "description": "Event data object schema for `EVENTS.CUSTOMER.REWARDED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "customer.rewarded"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventCustomerRewardedData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "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."
              }
            }
          }
        }
      },
      "EventCustomerRewardedLoyaltyPoints": {
        "type": "object",
        "title": "Event Customer Rewarded Loyalty Points",
        "description": "Event data object schema for `EVENTS.CUSTOMER.REWARDED.LOYALTY_POINTS`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "customer.rewarded.loyalty_points"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventCustomerRewardedLoyaltyPointsData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "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"
          }
        }
      },
      "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"
        ]
      },
      "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"
          }
        }
      },
      "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"
        ]
      },
      "EventDistributionData": {
        "title": "Manual Distribution Scheduled",
        "type": "object",
        "description": "Indicates that distribution has been scheduled.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "distribution": {
                "$ref": "#/components/schemas/SimpleDistribution"
              }
            }
          },
          {
            "$ref": "#/components/schemas/EventDistributionScenariosPromotionSendCode"
          },
          {
            "type": "object",
            "properties": {
              "customer": {
                "description": "Details about the customer related to the distribution with a promotion or send voucher purpose.",
                "$ref": "#/components/schemas/SimpleCustomer"
              }
            }
          }
        ],
        "required": [
          "distribution"
        ]
      },
      "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"
          }
        }
      },
      "EventOrder": {
        "title": "Event Order",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "referrer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "order": {
            "$ref": "#/components/schemas/OrderCalculated"
          },
          "redemption": {
            "$ref": "#/components/schemas/RedemptionInternal"
          }
        }
      },
      "EventOrderPaidData": {
        "title": "Event Order Paid",
        "description": "Event data object schema for `order.paid`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventOrder"
          },
          {
            "$ref": "#/components/schemas/EventDistributionScenariosPromotionSendCode"
          }
        ],
        "required": [
          "customer",
          "referrer",
          "order",
          "redemption"
        ]
      },
      "EventPublicationBase": {
        "title": "Publication",
        "description": "Publication details.",
        "type": "object",
        "properties": {
          "customer": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "publication": {
            "nullable": true,
            "$ref": "#/components/schemas/ListPublicationsItemBase"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          }
        }
      },
      "EventPublicationSucceededWebhook": {
        "title": "Event Publication Succeeded Webhook",
        "description": "Event data object schema for `EVENTS.PUBLICATION.SUCCEEDED` webhook.",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "publication.succeeded"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "object",
                "properties": {
                  "data": {
                    "$ref": "#/components/schemas/EventPublicationSucceededData"
                  }
                }
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventPublicationSucceededData": {
        "title": "Event Publication",
        "description": "Event data object schema for `publication.succeeded`.",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventPublicationBase"
          },
          {
            "type": "object",
            "properties": {
              "user": {
                "nullable": true,
                "type": "object",
                "description": "Details about the user who triggered the publication.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique identifier of the user."
                  }
                }
              }
            }
          }
        ]
      },
      "EventRedemptionFailedWebhook": {
        "title": "Event Redemption Failed Webhook",
        "type": "object",
        "description": "Event data object schema for `EVENTS.REDEMPTION.FAILED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "redemption.failed"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventRedemptionFailedData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventRedemptionFailedData": {
        "title": "Event Redemption Failed",
        "type": "object",
        "description": "Event data object schema for `redemption.failed`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRedemption"
          },
          {
            "type": "object",
            "properties": {
              "created_at": {
                "type": "string",
                "example": "2024-01-01T11:11:11.111Z",
                "description": "Timestamp representing the date and time when the redemption failed in the ISO 8601 format.",
                "format": "date-time"
              }
            }
          }
        ]
      },
      "EventRedemptionRollbackFailedWebhook": {
        "type": "object",
        "title": "Event Redemption Rollback Failed Webhook",
        "description": "Event data object schema for `EVENTS.REDEMPTION.ROLLBACK.FAILED` webhook.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "redemption.rollback.failed"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventRedemptionRollbackFailedData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventRedemptionRollbackFailedData": {
        "type": "object",
        "title": "Event Redemption Rollback Failed",
        "description": "Event data object schema for `redemption.rollback.failed`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRedemption"
          },
          {
            "type": "object",
            "properties": {
              "redemption_rollback": {
                "$ref": "#/components/schemas/SimpleRedemption"
              }
            }
          }
        ]
      },
      "EventRedemptionRollbackSucceededWebhook": {
        "type": "object",
        "title": "Event Redemption Rollback Succeeded Webhook",
        "description": "Event data object schema for `EVENTS.REDEMPTION.ROLLBACK.SUCCEEDED` webhook.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "redemption.rollback.succeeded"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventRedemptionRollbackSucceededData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventRedemptionRollbackSucceededData": {
        "type": "object",
        "title": "Event Redemption Rollback Succeeded",
        "description": "Event data object schema for `redemption.rollback.succeeded`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRedemption"
          },
          {
            "type": "object",
            "properties": {
              "redemption_rollback": {
                "$ref": "#/components/schemas/SimpleRedemption"
              }
            }
          }
        ]
      },
      "EventRedemptionSucceededWebhook": {
        "type": "object",
        "title": "Event Redemption Succeeded Webhook",
        "description": "Event data object schema for `EVENTS.REDEMPTION.SUCCEEDED` webhook.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "redemption.succeeded"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventRedemptionSucceededData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventRedemptionSucceededData": {
        "title": "Event Redemption Succeeded",
        "description": "Event data object schema for `redemption.succeeded`.",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRedemption"
          },
          {
            "type": "object",
            "properties": {
              "created_at": {
                "type": "string",
                "example": "2024-01-01T11:11:11.111Z",
                "description": "Timestamp representing the date and time when the redemption succeeded in the ISO 8601 format.",
                "format": "date-time"
              }
            }
          }
        ]
      },
      "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"
              }
            }
          }
        }
      },
      "EventVoucherCreated": {
        "type": "object",
        "title": "Voucher Created",
        "description": "Event data object schema for `EVENTS.VOUCHER.CREATED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "voucher.created"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventVoucherCreatedData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventVoucherCreatedData": {
        "title": "Event Voucher Created",
        "type": "object",
        "description": "Event data object schema for `voucher.created`.",
        "properties": {
          "voucher": {
            "type": "object",
            "nullable": true,
            "$ref": "#/components/schemas/Voucher"
          },
          "campaign": {
            "type": "object",
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCampaign"
          }
        }
      },
      "EventVoucherDeleted": {
        "type": "object",
        "title": "Voucher Deleted",
        "description": "Event data object schema for `EVENTS.VOUCHER.DELETED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "voucher.deleted"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventVoucherDeletedData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventVoucherDeletedData": {
        "title": "Event Voucher Deleted",
        "type": "object",
        "description": "Event data object schema for `voucher.deleted`.",
        "properties": {
          "voucher": {
            "type": "object",
            "nullable": true,
            "$ref": "#/components/schemas/Voucher"
          },
          "campaign": {
            "type": "object",
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCampaign"
          }
        }
      },
      "EventVoucherDisabled": {
        "type": "object",
        "title": "Voucher Disabled",
        "description": "Event data object schema for `EVENTS.VOUCHER.DISABLED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "voucher.disabled"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventVoucherDisabledData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventVoucherDisabledData": {
        "title": "Event Voucher Disabled",
        "description": "Event data object schema for `voucher.disabled`.",
        "type": "object",
        "properties": {
          "voucher": {
            "type": "object",
            "nullable": true,
            "$ref": "#/components/schemas/Voucher"
          },
          "campaign": {
            "type": "object",
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCampaign"
          }
        }
      },
      "EventVoucherEnabled": {
        "type": "object",
        "title": "Voucher Enabled",
        "description": "Event data object schema for `EVENTS.VOUCHER.ENABLED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "voucher.enabled"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventVoucherEnabledData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventVoucherEnabledData": {
        "title": "Event Voucher Enabled",
        "description": "Event data object schema for `voucher.enabled`.",
        "type": "object",
        "properties": {
          "voucher": {
            "type": "object",
            "nullable": true,
            "$ref": "#/components/schemas/Voucher"
          },
          "campaign": {
            "type": "object",
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCampaign"
          }
        }
      },
      "EventVoucherGiftBalanceAdded": {
        "type": "object",
        "title": "Voucher Gift Balance Added",
        "description": "Event data object schema for `EVENTS.VOUCHER.GIFT.BALANCE_ADDED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "voucher.gift.balance_added"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventVoucherGiftBalanceAddedData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventVoucherGiftBalanceAddedData": {
        "title": "Event Voucher Gift Balance Added",
        "type": "object",
        "description": "Event data object schema for `voucher.gift.balance_added`.",
        "properties": {
          "voucher": {
            "type": "object",
            "nullable": true,
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "balance": {
            "type": "object",
            "$ref": "#/components/schemas/VouchersBalanceUpdateResponseBody"
          },
          "campaign": {
            "type": "object",
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "transaction": {
            "type": "object",
            "nullable": true,
            "$ref": "#/components/schemas/VoucherTransaction"
          }
        }
      },
      "EventVoucherGiftTransactionCreatedData": {
        "title": "Event Voucher Gift Transaction Created",
        "type": "object",
        "description": "Event data object schema for `voucher.gift.transaction.created`.",
        "properties": {
          "transaction": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/VoucherTransaction"
              }
            ]
          },
          "voucher": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Voucher"
              }
            ]
          },
          "campaign": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleCampaign"
              }
            ]
          },
          "holder": {
            "nullable": true,
            "allOf": [
              {
                "description": "Details about the redeemable holder.",
                "$ref": "#/components/schemas/SimpleCustomer"
              }
            ]
          },
          "balance": {
            "allOf": [
              {
                "$ref": "#/components/schemas/VouchersBalanceUpdateResponseBody"
              }
            ]
          },
          "order": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleOrder"
              }
            ]
          },
          "redemption": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleRedemption"
              }
            ]
          },
          "rollback": {
            "nullable": true,
            "allOf": [
              {
                "description": "Details about the redemption rollback. Shown only for a redemption rollback.",
                "$ref": "#/components/schemas/SimpleRedemption"
              }
            ]
          }
        }
      },
      "EventVoucherLoyaltyCardPendingPointsActivatedData": {
        "title": "Event Voucher Loyalty Card Pending Points Activated",
        "description": "Event data object schema for `voucher.loyalty_card.pending_points.activated`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "balance": {
            "$ref": "#/components/schemas/VoucherBalance"
          },
          "order": {
            "$ref": "#/components/schemas/SimpleOrder"
          },
          "transaction": {
            "$ref": "#/components/schemas/VoucherTransaction"
          },
          "pending_points": {
            "$ref": "#/components/schemas/LoyaltyPendingPoints"
          }
        },
        "required": [
          "customer",
          "campaign",
          "voucher",
          "balance",
          "order",
          "transaction",
          "pending_points"
        ]
      },
      "EventVoucherLoyaltyCardPendingPointsAddedData": {
        "title": "Event Voucher Loyalty Card Pending Points Added",
        "description": "Event data object schema for `voucher.loyalty_card.pending_points.added`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "voucher_pending_points_balance": {
            "$ref": "#/components/schemas/VoucherBalance"
          },
          "order": {
            "$ref": "#/components/schemas/SimpleOrder"
          },
          "pending_points": {
            "$ref": "#/components/schemas/LoyaltyPendingPoints"
          }
        },
        "required": [
          "customer",
          "campaign",
          "voucher",
          "voucher_pending_points_balance",
          "order",
          "pending_points"
        ]
      },
      "EventVoucherLoyaltyCardPendingPointsCanceledData": {
        "title": "Event Voucher Loyalty Card Pending Points Canceled",
        "description": "Event data object schema for `voucher.loyalty_card.pending_points.canceled`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "voucher_pending_points_balance": {
            "$ref": "#/components/schemas/VoucherBalance"
          },
          "order": {
            "$ref": "#/components/schemas/SimpleOrder"
          },
          "pending_points": {
            "$ref": "#/components/schemas/LoyaltyPendingPoints"
          }
        },
        "required": [
          "customer",
          "campaign",
          "voucher",
          "voucher_pending_points_balance",
          "order",
          "pending_points"
        ]
      },
      "EventVoucherLoyaltyCardPendingPointsUpdatedData": {
        "title": "Event Voucher Loyalty Card Pending Points Updated",
        "description": "Event data object schema for `voucher.loyalty_card.pending_points.updated`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "voucher_pending_points_balance": {
            "$ref": "#/components/schemas/VoucherBalance"
          },
          "order": {
            "$ref": "#/components/schemas/SimpleOrder"
          },
          "pending_points": {
            "$ref": "#/components/schemas/LoyaltyPendingPoints"
          }
        },
        "required": [
          "customer",
          "campaign",
          "voucher",
          "voucher_pending_points_balance",
          "order",
          "pending_points"
        ]
      },
      "EventVoucherLoyaltyCardPointsAdded": {
        "type": "object",
        "title": "Voucher Loyalty Card Points Added",
        "description": "Event data object schema for `EVENTS.VOUCHER.LOYALTY_CARD.POINTS_ADDED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "voucher.loyalty_card.points_added"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventVoucherLoyaltyCardPointsAddedData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventVoucherLoyaltyCardPointsAddedData": {
        "title": "Event Voucher Loyalty Card Points Added",
        "type": "object",
        "description": "Event data object schema for `voucher.loyalty_card.points_added`.",
        "properties": {
          "voucher": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleVoucher"
              }
            ]
          },
          "balance": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LoyaltiesMembersBalanceUpdateResponseBody"
              },
              {
                "type": "object",
                "properties": {
                  "operation_type": {
                    "type": "string",
                    "description": "The type of the operation being performed. The operation type is `AUTOMATIC` if it is an automatic redemption.",
                    "enum": [
                      "MANUAL",
                      "AUTOMATIC"
                    ]
                  }
                }
              }
            ]
          },
          "campaign": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleCampaign"
              }
            ]
          },
          "customer": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleCustomer"
              }
            ]
          },
          "transaction": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/VoucherTransaction"
              }
            ]
          }
        }
      },
      "EventVoucherLoyaltyCardPointsExpiredData": {
        "title": "Event Voucher Loyalty Card Points Expired",
        "type": "object",
        "description": "Event data object schema for `voucher.loyalty_card.points_expired`.",
        "properties": {
          "voucher": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleVoucher"
              }
            ]
          },
          "points": {
            "type": "integer",
            "description": "Indicates the number of points that expired."
          },
          "campaign": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleCampaign"
              }
            ]
          },
          "customer": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleCustomer"
              }
            ]
          },
          "buckets": {
            "$ref": "#/components/schemas/LoyaltyPointsBucket"
          },
          "transaction": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/VoucherTransaction"
              }
            ]
          }
        },
        "required": [
          "customer",
          "campaign",
          "points",
          "voucher",
          "buckets",
          "transaction"
        ]
      },
      "EventVoucherLoyaltyCardTransactionCreatedData": {
        "title": "Event Voucher Loyalty Card Transaction Created",
        "type": "object",
        "description": "Event data object schema for `voucher.loyalty_card.transaction.created`.",
        "properties": {
          "transaction": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/VoucherTransaction"
              }
            ]
          },
          "voucher": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Voucher"
              }
            ]
          },
          "campaign": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleCampaign"
              }
            ]
          },
          "holder": {
            "nullable": true,
            "allOf": [
              {
                "description": "Details about the redeemable holder.",
                "$ref": "#/components/schemas/SimpleCustomer"
              }
            ]
          },
          "holder_loyalty_tier": {
            "nullable": true,
            "allOf": [
              {
                "description": "Card holder's current loyalty tier.",
                "$ref": "#/components/schemas/LoyaltyTier"
              }
            ]
          },
          "balance": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/LoyaltiesMembersBalanceUpdateResponseBody"
              }
            ]
          },
          "order": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleOrder"
              }
            ]
          },
          "event": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleEvent"
              }
            ]
          },
          "earning_rule": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleEarningRule"
              }
            ]
          },
          "segment": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleSegment"
              }
            ]
          },
          "loyalty_tier": {
            "nullable": true,
            "allOf": [
              {
                "description": "The loyalty tier which is used to calculate points if custom mapping is made. It can be the same as `holder_loyalty_tier`.",
                "$ref": "#/components/schemas/LoyaltyTier"
              }
            ]
          },
          "redemption": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleRedemption"
              }
            ]
          },
          "rollback": {
            "nullable": true,
            "allOf": [
              {
                "description": "Details about the redemption rollback.",
                "$ref": "#/components/schemas/SimpleRedemption"
              }
            ]
          },
          "reward": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Reward"
              }
            ]
          },
          "custom_event": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomEvent"
              }
            ]
          },
          "source_voucher": {
            "nullable": true,
            "allOf": [
              {
                "description": "Designates the voucher for the `IN` transfer type.",
                "$ref": "#/components/schemas/SimpleVoucher"
              }
            ]
          },
          "destination_voucher": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "description": "Designates the voucher for the `OUT` transfer type.",
                "$ref": "#/components/schemas/SimpleVoucher"
              }
            ]
          }
        },
        "required": [
          "transaction",
          "voucher",
          "campaign",
          "holder",
          "holder_loyalty_tier",
          "balance",
          "order",
          "event",
          "earning_rule",
          "segment",
          "loyalty_tier",
          "redemption",
          "rollback",
          "reward",
          "custom_event",
          "source_voucher",
          "destination_voucher"
        ]
      },
      "EventVoucherPublished": {
        "type": "object",
        "title": "Voucher Published",
        "description": "Event data object schema for `EVENTS.VOUCHER.PUBLISHED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "voucher.published"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventVoucherPublishedData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventVoucherPublishedData": {
        "title": "Event Voucher Published",
        "type": "object",
        "description": "Event data object schema for `voucher.published`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventPublicationBase"
          },
          {
            "type": "object",
            "properties": {
              "created_at": {
                "type": "string",
                "example": "2024-01-01T11:11:11.111Z",
                "description": "Timestamp representing the date and time when the redemption succeeded in the ISO 8601 format.",
                "format": "date-time"
              }
            }
          }
        ]
      },
      "EventVoucherUpdated": {
        "type": "object",
        "title": "Voucher updated",
        "description": "Event data object schema for `EVENTS.VOUCHER.UPDATED`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DefaultPayloadData1"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "voucher.updated"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventVoucherUpdatedData"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DefaultPayloadData2"
          }
        ],
        "required": [
          "id",
          "name",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "EventVoucherUpdatedData": {
        "title": "Event Voucher Updated",
        "type": "object",
        "description": "Event data object schema for `voucher.updated`.",
        "properties": {
          "voucher": {
            "type": "object",
            "nullable": true,
            "$ref": "#/components/schemas/Voucher"
          },
          "campaign": {
            "type": "object",
            "nullable": true,
            "$ref": "#/components/schemas/SimpleCampaign"
          }
        }
      },
      "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"
        ]
      },
      "GiftCardTransactionsType": {
        "title": "Gift Card Transaction Type",
        "type": "string",
        "enum": [
          "CREDITS_REDEMPTION",
          "CREDITS_REFUND",
          "CREDITS_ADDITION",
          "CREDITS_REMOVAL"
        ]
      },
      "ListPublicationsItemBase": {
        "title": "List Publications Item Base",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "pub_BbjAXnmm8e0SIm3zG8qvvFCP0KuLywtp",
            "description": "Unique identifier of the publication assigned by Voucherify."
          },
          "object": {
            "type": "string",
            "default": "publication",
            "enum": [
              "publication"
            ],
            "description": "The type of the object represented by the JSON. This object stores information about the `publication`."
          },
          "created_at": {
            "type": "string",
            "example": "2022-09-23T09:57:00.434Z",
            "description": "Timestamp representing the date and time when the publication was created in the ISO 8601 format.",
            "format": "date-time"
          },
          "customer_id": {
            "type": "string",
            "example": "cust_eWgXlBBiY6THFRJwX45Iakv4",
            "description": "Unique identifier of the customer receiving the publication."
          },
          "tracking_id": {
            "type": "string",
            "description": "Customer's `source_id`."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object."
          },
          "channel": {
            "type": "string",
            "description": "How the publication was originated."
          },
          "source_id": {
            "type": "string",
            "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"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
            ]
          }
        ]
      },
      "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"
        ]
      },
      "LoyaltyTiersExpirationAll": {
        "title": "Loyalty Tiers Expiration",
        "type": "object",
        "description": "Defines the Loyalty Tiers Expiration.",
        "properties": {
          "qualification_type": {
            "type": "string",
            "enum": [
              "BALANCE",
              "POINTS_IN_PERIOD"
            ],
            "description": "Tier qualification.   \n\n`BALANCE`: Points balance is based on the customer's current points balance. Customers qualify for the tier if their points balance is in the points range of the tier. \n `POINTS_IN_PERIOD`: A customer qualifies for the tier only if the sum of the accumulated points in a **defined time interval** reaches the tier threshold."
          },
          "qualification_period": {
            "type": "string",
            "description": "Customers qualify for the tier if they collected enough points in a given time period.",
            "enum": [
              "MONTH",
              "QUARTER",
              "HALF_YEAR",
              "YEAR"
            ]
          },
          "start_date": {
            "type": "object",
            "description": "Defines the conditions for the start date of the tier.",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "IMMEDIATE",
                  "NEXT_PERIOD"
                ],
                "description": "What triggers the tier to be valid for a customer.    \n`IMMEDIATE`: After reaching the minimum required points. \n`NEXT_PERIOD`: When the next qualification period starts."
              }
            },
            "required": [
              "type"
            ]
          },
          "expiration_date": {
            "type": "object",
            "description": "Defines the conditions for the expiration date of a tier.",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "END_OF_PERIOD",
                  "END_OF_NEXT_PERIOD",
                  "BALANCE_DROP",
                  "CUSTOM"
                ],
                "description": "What triggers the tier to expire for a customer.    \n`END_OF_PERIOD`: Expire tier at the end of the period.    \n`END_OF_NEXT_PERIOD`:  Expire tier at the end of the next period. \n `BALANCE_DROP`: Tier expires when the points balance drops below the required range of the tier. \n `CUSTOM`: Tier expires after a certain time period passes following the instance the points balance drops below the required range of the tier."
              },
              "extend": {
                "type": "string",
                "description": "Extend the expiration by adding extra months or days in ISO 8601 format. The tier will remain active even though it reaches its expiration time period. For example, a tier with a duration of `P3M` will be valid for an additional duration of 3 months and a tier with a duration of `P1D` will be valid for an additional duration of 1 day."
              },
              "rounding": {
                "description": "Defines the rounding mechanism for the tier expiration.",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "MONTH",
                      "QUARTER",
                      "HALF_YEAR",
                      "YEAR",
                      "CUSTOM"
                    ],
                    "description": "Describes a custom rounding for the expiration date."
                  },
                  "strategy": {
                    "type": "string",
                    "enum": [
                      "START",
                      "END"
                    ],
                    "description": "Describes a rounding strategy for the expiration date."
                  },
                  "unit": {
                    "type": "string",
                    "description": "Defines the type of unit of time in which the rounding period is counted.",
                    "default": "MONTH",
                    "enum": [
                      "MONTH"
                    ]
                  },
                  "value": {
                    "type": "integer",
                    "description": "Value for the unit of time that the rounding applies to. Units for this parameter are defined by the `rounding.unit` parameter.    \n- `0`: January\n- `1`: February\n- `2`: March\n- `3`: April\n- `4`: May\n- `5`: June\n- `6`: July\n- `7`: August\n- `8`: September\n- `9`: October\n- `10`: November\n- `11`: December"
                  }
                }
              }
            },
            "required": [
              "type",
              "extend"
            ]
          }
        },
        "required": [
          "qualification_type",
          "start_date",
          "expiration_date"
        ]
      },
      "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."
          }
        }
      },
      "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."
          }
        }
      },
      "MappingPoints": {
        "title": "MappingPoints",
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/MappingMultiply"
          },
          {
            "$ref": "#/components/schemas/MappingFixed"
          }
        ]
      },
      "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"
                  }
                ]
              }
            }
          }
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "OrderItemProduct": {
        "type": "object",
        "additionalProperties": false,
        "description": "An object containing details of the related product.",
        "properties": {
          "id": {
            "type": "string",
            "description": "A unique identifier that represents the product and is assigned by Voucherify."
          },
          "source_id": {
            "type": "string",
            "description": "The merchant's product ID (if it is different than Voucherify's product ID)."
          },
          "name": {
            "type": "string",
            "description": "Product name."
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format."
          },
          "price": {
            "type": "number",
            "description": "Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "override": {
            "type": "boolean",
            "description": "The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a `source_id`; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system."
          }
        }
      },
      "OrderItemSku": {
        "type": "object",
        "additionalProperties": false,
        "description": "An object containing details of the related SKU.",
        "properties": {
          "id": {
            "type": "string",
            "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
          },
          "source_id": {
            "type": "string",
            "description": "The merchant’s SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service."
          },
          "sku": {
            "type": "string",
            "description": "The SKU name."
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format."
          },
          "price": {
            "type": "number",
            "description": "SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "override": {
            "type": "boolean",
            "description": "The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system."
          }
        }
      },
      "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"
            }
          }
        }
      },
      "Product": {
        "type": "object",
        "description": "Object representing a product.",
        "title": "Product",
        "allOf": [
          {
            "$ref": "#/components/schemas/ProductWithoutSkus"
          },
          {
            "type": "object",
            "properties": {
              "skus": {
                "$ref": "#/components/schemas/SkusListForProduct"
              }
            }
          }
        ]
      },
      "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"
        ]
      },
      "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](OpenAPI.json/paths/~1campaigns~1{campaignId}~1disable) -->[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"
            }
          }
        }
      },
      "PromotionTiersList": {
        "type": "object",
        "description": "Promotion Tiers",
        "title": "Promotion Tiers",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about promotion tiers in a dictionary."
          },
          "data_ref": {
            "type": "string",
            "default": "tiers",
            "description": "Identifies the name of the attribute that contains the array of promotion tier objects."
          },
          "tiers": {
            "type": "array",
            "description": "Contains array of promotion tier objects.",
            "items": {
              "$ref": "#/components/schemas/PromotionTier"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of promotion tiers."
          },
          "has_more": {
            "type": "boolean",
            "description": "As query results are always limited (by the limit parameter), the `has_more` flag indicates whether there are more records for given filter parameters. This lets you know if you are able to run another request (with a different page or a different start date filter) to get more records returned in the results."
          }
        }
      },
      "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"
        ]
      },
      "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"
            ]
          }
        ]
      },
      "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"
              }
            ]
          }
        }
      },
      "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"
        ]
      },
      "ReferrerId": {
        "title": "Referrer Id",
        "allOf": [
          {
            "$ref": "#/components/schemas/CustomerId"
          }
        ]
      },
      "ReferrerWithSummaryLoyaltyReferrals": {
        "title": "Referrer With Summary Loyalty Referrals",
        "allOf": [
          {
            "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
          }
        ]
      },
      "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."
              }
            }
          }
        }
      },
      "Reward": {
        "type": "object",
        "title": "Reward",
        "properties": {
          "id": {
            "type": "string",
            "example": "rew_nIy4gHpQHle2c3pNMwuj7G6j",
            "description": "Unique reward ID assigned by Voucherify."
          },
          "name": {
            "type": "string",
            "description": "Reward name."
          },
          "stock": {
            "type": "integer",
            "nullable": true,
            "description": "Configurable for **material rewards**. The number of units of the product that you want to share as reward."
          },
          "redeemed": {
            "type": "integer",
            "nullable": true,
            "description": "Defines the number of already invoked (successful) reward redemptions.\t"
          },
          "attributes": {
            "type": "object",
            "description": "These properties are configurable for **material rewards**.",
            "properties": {
              "image_url": {
                "type": "string",
                "description": "The HTTPS URL pointing to the .png or .jpg file."
              },
              "description": {
                "type": "string",
                "description": "An arbitrary string that you can attach to a material reward."
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the reward. A set of key/value pairs that you can attach to a reward object. It can be useful for storing additional information about the reward in a structured format."
          },
          "type": {
            "type": "string",
            "enum": [
              "CAMPAIGN",
              "COIN",
              "MATERIAL"
            ],
            "description": "Reward type."
          },
          "parameters": {
            "description": "Defines how the reward is generated.",
            "allOf": [
              {
                "$ref": "#/components/schemas/RewardType"
              }
            ]
          },
          "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": "2022-08-11T16:01:34.885Z",
            "format": "date-time"
          },
          "object": {
            "description": "The type of the object represented by the JSON. This object stores information about the reward.",
            "default": "reward",
            "enum": [
              "reward"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "type",
          "stock",
          "redeemed",
          "metadata",
          "created_at",
          "updated_at",
          "object"
        ]
      },
      "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"
            ]
          }
        }
      },
      "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."
          }
        }
      },
      "RewardType": {
        "title": "Reward type",
        "oneOf": [
          {
            "$ref": "#/components/schemas/RewardTypeCampaign"
          },
          {
            "$ref": "#/components/schemas/RewardTypeCoin"
          },
          {
            "$ref": "#/components/schemas/RewardTypeMaterial"
          }
        ]
      },
      "RewardTypeCampaign": {
        "title": "Digital",
        "type": "object",
        "properties": {
          "campaign": {
            "type": "object",
            "required": [
              "id",
              "type"
            ],
            "description": "Objects stores information about the campaign related to the reward.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the campaign."
              },
              "balance": {
                "type": "integer",
                "description": "The incremental amout to be added to the current balance on the gift card. The value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000."
              },
              "type": {
                "type": "string",
                "enum": [
                  "DISCOUNT_COUPONS",
                  "PROMOTION",
                  "GIFT_VOUCHERS",
                  "REFERRAL_PROGRAM",
                  "LOYALTY_PROGRAM"
                ],
                "description": "Campaign type."
              }
            }
          }
        },
        "required": [
          "campaign"
        ]
      },
      "RewardTypeCoin": {
        "title": "Pay with Points",
        "type": "object",
        "properties": {
          "coin": {
            "type": "object",
            "required": [
              "exchange_ratio"
            ],
            "description": "Defines the ratio by mapping the number of loyalty points in points_ratio to a predefined cash amount in exchange_ratio.",
            "properties": {
              "exchange_ratio": {
                "type": "number",
                "description": "The cash equivalent of the points defined in the points_ratio property."
              },
              "points_ratio": {
                "type": "integer",
                "description": "The number of loyalty points that will map to the predefined cash amount defined by the exchange_ratio property."
              }
            }
          }
        },
        "required": [
          "coin"
        ]
      },
      "RewardTypeMaterial": {
        "title": "Material",
        "type": "object",
        "properties": {
          "product": {
            "type": "object",
            "required": [
              "id",
              "sku_id"
            ],
            "description": "Contains information about the product given as a reward.",
            "properties": {
              "id": {
                "type": "string",
                "example": "prod_0b7d7dfb05cbe5c616",
                "description": "Unique product ID assigned by Voucherify."
              },
              "sku_id": {
                "type": "string",
                "nullable": true,
                "example": "sku_0b7d7dfb090be5c619",
                "description": "Unique SKU ID assigned by Voucherify, of the SKU given as a reward."
              }
            }
          }
        },
        "required": [
          "product"
        ]
      },
      "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."
          }
        }
      },
      "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"
        ]
      },
      "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."
          }
        }
      },
      "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"
            ]
          }
        }
      },
      "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"
        ]
      },
      "SimpleDistribution": {
        "title": "Simple Distribution",
        "type": "object",
        "description": "Simple distribution data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the distribution."
          },
          "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",
            "nullable": true,
            "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"
          },
          "status": {
            "type": "string",
            "description": "Indicates the status of the distribution.",
            "enum": [
              "TO SEND",
              "PAUSED",
              "DONE",
              "DRAFT"
            ]
          },
          "parameters": {
            "type": "object",
            "description": "Defines the parameters of the distribution",
            "properties": {
              "method": {
                "type": "string",
                "description": "Indicates the method of the distribution.",
                "enum": [
                  "direct"
                ]
              },
              "subject": {
                "type": "string",
                "description": "Subject of the message."
              },
              "customer": {
                "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
              },
              "campaign_id": {
                "type": "string",
                "description": "Unique identifier of the campaign linked to the distribution."
              },
              "promotion_tier_id": {
                "type": "string",
                "description": "Unique identifier of the promotion tier referred to in the message."
              }
            }
          },
          "consents": {
            "type": "object",
            "description": "Determines the details about the consents",
            "properties": {
              "disabled": {
                "type": "boolean",
                "description": "Determines if the consents are disabled. Always returns `true`."
              }
            }
          },
          "set_live_at": {
            "nullable": true,
            "type": "string",
            "description": "Determines the date and time when the distribution will go live.",
            "format": "date-time"
          },
          "distribution_channels": {
            "type": "array",
            "description": "Defines the channels of the distribution.",
            "enum": [
              "activecampaign",
              "batch",
              "braze",
              "email",
              "intercom",
              "klaviyo",
              "mailchimp",
              "shopify",
              "sms",
              "webhook"
            ]
          }
        }
      },
      "SimpleEarningRule": {
        "title": "Simple Earning Rule",
        "type": "object",
        "description": "Simplified earning rule data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique earning rule identifier assigned by Voucherify."
          },
          "campaign_id": {
            "type": "string",
            "description": "Unique identifier of the parent campaign assigned by Voucherify."
          },
          "validation_rule_id": {
            "type": "string",
            "description": "A unique validation rule identifier assigned by Voucherify."
          },
          "parameters": {
            "type": "object",
            "oneOf": [
              {
                "$ref": "#/components/schemas/EarningRuleObjectOrderPaid"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportionalCustomEvent"
              },
              {
                "$ref": "#/components/schemas/EarningRuleObjectEnteredSegment"
              },
              {
                "$ref": "#/components/schemas/EarningRuleObjectTier"
              }
            ]
          },
          "automation_id": {
            "type": "string",
            "description": "For internal use by Voucherify."
          },
          "active": {
            "type": "boolean",
            "description": "A flag to toggle the earning rule on or off."
          },
          "source": {
            "type": "object",
            "required": [
              "object_id",
              "object_type"
            ],
            "description": "Contains the custom earning rule name and parent campaign.",
            "properties": {
              "banner": {
                "type": "string",
                "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
              },
              "object_id": {
                "type": "string",
                "description": "A unique campaign identifier assigned by Voucherify."
              },
              "object_type": {
                "type": "string",
                "description": "Defines the object associated with the earning rule. Defaults to `campaign`.",
                "default": "campaign",
                "enum": [
                  "campaign"
                ]
              }
            }
          },
          "loyalty": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EarningRuleFixed"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportional"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportionalOrderItems"
              }
            ]
          },
          "segment": {
            "type": "object",
            "description": "Contains the id of a customer segment. Required for the `customer.segment.entered` option in event.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of a customer segment assigned by Voucherify."
              }
            },
            "required": [
              "id"
            ]
          },
          "loyalty_tier": {
            "type": "string",
            "example": "ltr_UJ5Q54Q0OvEhua87Qfv2Ki5x",
            "description": "Customer's loyalty tier within the campaign."
          },
          "custom_event": {
            "type": "object",
            "properties": {
              "schema_id": {
                "type": "string"
              }
            },
            "required": [
              "schema_id"
            ]
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that is attached to an earning rule object."
          },
          "event": {
            "description": "Defines the event which triggers the earning rule to add points to a loyalty card.",
            "allOf": [
              {
                "$ref": "#/components/schemas/EarningRuleEvent"
              }
            ]
          }
        },
        "required": [
          "id"
        ]
      },
      "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"
          }
        }
      },
      "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."
          }
        }
      },
      "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"
        ]
      },
      "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."
          }
        }
      },
      "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."
          }
        }
      },
      "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"
        ]
      },
      "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"
                ]
              }
            }
          }
        }
      },
      "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."
          }
        }
      },
      "SimplePromotionTierCampaign": {
        "title": "Simple Promotion Tier Campaign",
        "type": "object",
        "description": "Simplified promotion tier campaign data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the 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"
        ]
      },
      "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"
        ]
      },
      "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."
                  }
                }
              }
            }
          }
        }
      },
      "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"
        ]
      },
      "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."
          }
        }
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "ValidationRule": {
        "title": "Validation Rule",
        "allOf": [
          {
            "$ref": "#/components/schemas/ValidationRuleBase"
          },
          {
            "title": "Validation Rule",
            "type": "object",
            "description": "This is an object representing a response validation rule.",
            "properties": {
              "id": {
                "type": "string",
                "example": "val_eR1c41hu0vUU",
                "description": "Unique validation rule ID."
              },
              "created_at": {
                "type": "string",
                "example": "2022-03-23T07:44:00.444Z",
                "description": "Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format.",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "example": "2022-04-26T08:35:54.960Z",
                "description": "Timestamp representing the date and time when the validation rule was updated. The value is shown in the ISO 8601 format.",
                "format": "date-time"
              },
              "assignments_count": {
                "description": "The number of instances the validation rule has been assigned to different types of redeemables.",
                "type": "integer"
              },
              "object": {
                "type": "string",
                "default": "validation_rules",
                "description": "The type of the object represented by JSON. This object stores information about the validation rule."
              }
            },
            "required": [
              "id",
              "name",
              "rules",
              "applicable_to",
              "created_at",
              "type",
              "context_type",
              "object"
            ]
          }
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "ValidationRuleBase": {
        "title": "Validation Rule Base",
        "type": "object",
        "description": "This is an object representing a request validation rule.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Custom, unique name for set of validation rules.",
            "example": "Business Validation Rule"
          },
          "rules": {
            "$ref": "#/components/schemas/ValidationRuleRules"
          },
          "bundle_rules": {
            "$ref": "#/components/schemas/ValidationRuleBundleRules"
          },
          "error": {
            "type": "object",
            "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rules.",
            "properties": {
              "message": {
                "type": "string",
                "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rules."
              }
            }
          },
          "applicable_to": {
            "type": "object",
            "properties": {
              "excluded": {
                "type": "array",
                "description": "Defines which items are excluded from a discount.",
                "items": {
                  "$ref": "#/components/schemas/ApplicableTo"
                }
              },
              "included": {
                "type": "array",
                "description": "Defines which items are included in a discount.",
                "items": {
                  "$ref": "#/components/schemas/ApplicableTo"
                }
              },
              "included_all": {
                "type": "boolean",
                "description": "Indicates whether all items are included in the discount."
              }
            }
          },
          "type": {
            "type": "string",
            "enum": [
              "expression",
              "basic",
              "advanced",
              "complex"
            ],
            "default": "expression",
            "description": "Type of validation rule."
          },
          "context_type": {
            "type": "string",
            "default": "global",
            "enum": [
              "earning_rule.order.paid",
              "earning_rule.custom_event",
              "earning_rule.customer.segment.entered",
              "earning_rule.customer.tier.joined",
              "earning_rule.customer.tier.left",
              "earning_rule.customer.tier.upgraded",
              "earning_rule.customer.tier.downgraded",
              "earning_rule.customer.tier.prolonged",
              "campaign.discount_coupons",
              "campaign.discount_coupons.discount.apply_to_order",
              "campaign.discount_coupons.discount.apply_to_items",
              "campaign.discount_coupons.discount.apply_to_items_proportionally",
              "campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity",
              "campaign.discount_coupons.discount.apply_to_items_by_quantity",
              "campaign.discount_coupons.discount.fixed.apply_to_items",
              "campaign.discount_coupons.discount.percent.apply_to_items",
              "campaign.gift_vouchers",
              "campaign.gift_vouchers.gift.apply_to_order",
              "campaign.gift_vouchers.gift.apply_to_items",
              "campaign.referral_program",
              "campaign.referral_program.discount.apply_to_order",
              "campaign.referral_program.discount.apply_to_items",
              "campaign.referral_program.discount.apply_to_items_proportionally",
              "campaign.referral_program.discount.apply_to_items_proportionally_by_quantity",
              "campaign.referral_program.discount.apply_to_items_by_quantity",
              "campaign.referral_program.discount.fixed.apply_to_items",
              "campaign.referral_program.discount.percent.apply_to_items",
              "campaign.promotion",
              "campaign.promotion.discount.apply_to_order",
              "campaign.promotion.discount.apply_to_items",
              "campaign.promotion.discount.apply_to_items_proportionally",
              "campaign.promotion.discount.apply_to_items_proportionally_by_quantity",
              "campaign.promotion.discount.apply_to_items_by_quantity",
              "campaign.promotion.discount.fixed.apply_to_items",
              "campaign.promotion.discount.percent.apply_to_items",
              "campaign.loyalty_program",
              "voucher.discount_voucher",
              "voucher.discount_voucher.discount.apply_to_order",
              "voucher.discount_voucher.discount.apply_to_items",
              "voucher.discount_voucher.discount.apply_to_items_proportionally",
              "voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity",
              "voucher.discount_voucher.discount.apply_to_items_by_quantity",
              "voucher.discount_voucher.discount.fixed.apply_to_items",
              "voucher.discount_voucher.discount.percent.apply_to_items",
              "voucher.gift_voucher",
              "voucher.gift_voucher.gift.apply_to_order",
              "voucher.gift_voucher.gift.apply_to_items",
              "voucher.loyalty_card",
              "distribution.custom_event",
              "distribution.order.paid",
              "distribution.order.created",
              "distribution.order.canceled",
              "distribution.order.updated",
              "reward_assignment.pay_with_points",
              "global"
            ],
            "description": "Validation rule context type.  \n\n| **Context Type** | **Definition** |\n|:---|:---|\n| earning_rule.order.paid |  |\n| earning_rule.custom_event |  |\n| earning_rule.customer.segment.entered |  |\n| campaign.discount_coupons |  |\n| campaign.discount_coupons.discount.apply_to_order |  |\n| campaign.discount_coupons.discount.apply_to_items |  |\n| campaign.discount_coupons.discount.apply_to_items_proportionally |  |\n| campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity |  |\n| campaign.discount_coupons.discount.fixed.apply_to_items |  |\n| campaign.gift_vouchers |  |\n| campaign.gift_vouchers.gift.apply_to_order |  |\n| campaign.gift_vouchers.gift.apply_to_items |  |\n| campaign.referral_program |  |\n| campaign.referral_program.discount.apply_to_order |  |\n| campaign.referral_program.discount.apply_to_items |  |\n| campaign.referral_program.discount.apply_to_items_proportionally |  |\n| campaign.referral_program.discount.apply_to_items_proportionally_by_quantity |  |\n| campaign.referral_program.discount.fixed.apply_to_items |  |\n| campaign.promotion |  |\n| campaign.promotion.discount.apply_to_order |  |\n| campaign.promotion.discount.apply_to_items |  |\n| campaign.promotion.discount.apply_to_items_proportionally |  |\n| campaign.promotion.discount.apply_to_items_proportionally_by_quantity |  |\n| campaign.promotion.discount.fixed.apply_to_items |  |\n| campaign.loyalty_program |  |\n| voucher.discount_voucher |  |\n| voucher.discount_voucher.discount.apply_to_order |  |\n| voucher.discount_voucher.discount.apply_to_items |  |\n| voucher.discount_voucher.discount.apply_to_items_proportionally |  |\n| voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity |  |\n| voucher.discount_voucher.discount.fixed.apply_to_items |  |\n| voucher.gift_voucher |  |\n| voucher.gift_voucher.gift.apply_to_order |  |\n| voucher.gift_voucher.gift.apply_to_items |  |\n| voucher.loyalty_card |  |\n| distribution.custom_event |  |\n| reward_assignment.pay_with_points |  |\n| global |  |"
          }
        }
      },
      "ValidationRuleBundleRules": {
        "title": "Validation Rule Bundle Rules",
        "type": "object",
        "description": "Contains all the definitions for the bundle rules. It is a set of key value pairs representing the rules and logic between them. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.\n\nWhile updating with the PUT method, you can pass `\"bundle_rules\": null` to delete the configuration; in the response, an empty object is then returned.",
        "properties": {
          "logic": {
            "type": "string",
            "example": "(1 and 2) and (3)",
            "description": "Defines the logic between the rules."
          }
        },
        "additionalProperties": {
          "type": "object",
          "description": "Contains the name of the bundle rule.",
          "properties": {
            "name": {
              "type": "string",
              "description": "Voucherify's specific bundle rule name. Currently, it is only `order.items.any`.",
              "enum": [
                "order.items.any"
              ]
            },
            "conditions": {
              "type": "object",
              "description": "Defines the conditions of the bundle rule. The order items in the customer's cart must meet the conditions. Because the rule concerns order items, the only permissible condition is `$is`.",
              "properties": {
                "$is": {
                  "type": "array",
                  "maxItems": 1,
                  "items": {
                    "type": "object",
                    "description": "",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique identifier of the product, SKU, or collection assigned by Voucherify."
                      },
                      "type": {
                        "type": "string",
                        "description": "Type of the order item. It can be a `product_or_sku` or `products_collection`",
                        "enum": [
                          "product_or_sku",
                          "products_collection"
                        ]
                      },
                      "object": {
                        "type": "string",
                        "description": "Object used in the bundle rule. It can be a `products_collection`, `product`, or `sku`.",
                        "enum": [
                          "products_collection",
                          "product",
                          "sku"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "type",
                      "object"
                    ]
                  }
                }
              }
            },
            "rules": {
              "properties": {
                "logic": {
                  "type": "string",
                  "example": "(1 and 2) and (3)",
                  "description": "Defines the logic between the sub-rules."
                }
              },
              "additionalProperties": {
                "type": "object",
                "description": "Contains the name of the validation sub-rule.",
                "maxProperties": 1,
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Voucherify's specific sub-rule name. Currently, it is only `order.items.aggregated_quantity`.",
                    "enum": [
                      "order.items.aggregated_quantity"
                    ]
                  },
                  "conditions": {
                    "type": "object",
                    "description": "Defines the conditions of the bundle rule. The quantity of order items in the customer's cart must meet the conditions.",
                    "properties": {
                      "$is": {
                        "type": "array",
                        "maxItems": 1,
                        "items": {
                          "type": "number",
                          "minimum": 1,
                          "description": "The number of units in the customer's cart must be equal or higher than the defined number."
                        }
                      }
                    }
                  },
                  "rules": {
                    "type": "object",
                    "description": "An empty object."
                  }
                }
              }
            },
            "error": {
              "type": "object",
              "description": "**CURRENTLY UNSUPPORTED**. Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule."
                }
              }
            }
          }
        }
      },
      "ValidationRuleRules": {
        "title": "Validation Rule Rules",
        "type": "object",
        "description": "Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.",
        "properties": {
          "logic": {
            "type": "string",
            "example": "(1 and 2) and (3)",
            "description": "Defines the logic between the rules."
          }
        },
        "additionalProperties": {
          "type": "object",
          "description": "Contains the name of the validation rule.",
          "properties": {
            "name": {
              "type": "string",
              "description": "Voucherify's specific rule name.  The list of available names is provided below.  \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment<br>customer.metadata* |\n|**Order** |order.amount<br>order.initial_amount<br>order.items.count<br>order.items.price_any<br>order.items.price_each<br>order.items.metadata_any<br>order.items.metadata_each<br>order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted<br>campaign.orders.amount<br>campaign.redemptions.count<br>campaign.redemptions.count.daily<br>campaign.redemptions.count.monthly<br>campaign.redemptions.customers_count<br>campaign.redemptions.customers_count.daily<br>campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount<br>redemption.count.daily<br>redemption.count.monthly<br>redemption.count.per_customer<br>redemption.count.per_customer.daily<br>redemption.count.per_customer.monthly<br>redemption.api_key<br>redemption.count.per_api_key<br>redemption.user.login<br>redemption.count.per_user<br>redemption.metadata<br>redemption.reward.pay_with_points.points_used |\n| **Product** | product.id<br>product.price<br>product.quantity<br>product.discount_applicable<br>product.metadata*<br>product.metadata.aggregated_quantity<br>product.metadata.aggregated_amount<br>product.metadata.discount_applicable<br>product.metadata.match_all |\n| **SKU** | sku.id<br>sku.price<br>sku.quantity<br>sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every<br>order.items.any<br>order.items.none<br>order.items.cheapest<br>order.items.most_expensive | order.items.quantity<br>order.items.aggregated_quantity<br>order.items.price<br>order.items.aggregated_amount<br>order.items.metadata* |  \n\n\n\n*Requires the `property` field to be defined."
            },
            "property": {
              "type": "string",
              "nullable": true,
              "description": "Custom name for a metadata property associated with the condition to be satisfied. **Required** if the property `name` is any of the following: \n customer_metadata<br>custom_event_metadata<br>order_items_metadata<br>order_metadata<br>product_metadata<br>redemption_metadata"
            },
            "conditions": {
              "$ref": "#/components/schemas/ValidationRuleConditions"
            },
            "rules": {
              "$ref": "#/components/schemas/ValidationRuleRules01"
            },
            "error": {
              "type": "object",
              "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule."
                }
              }
            }
          }
        }
      },
      "ValidationRuleRules01": {
        "title": "Validation Rule Rules",
        "type": "object",
        "description": "Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.",
        "properties": {
          "logic": {
            "type": "string",
            "example": "(1 and 2) and (3)",
            "description": "Defines the logic between the rules."
          }
        },
        "additionalProperties": {
          "type": "object",
          "description": "Contains the name of the validation rule.",
          "properties": {
            "name": {
              "type": "string",
              "description": "Voucherify's specific rule name.  The list of available names is provided below.  \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment<br>customer.metadata* |\n|**Order** |order.amount<br>order.initial_amount<br>order.items.count<br>order.items.price_any<br>order.items.price_each<br>order.items.metadata_any<br>order.items.metadata_each<br>order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted<br>campaign.orders.amount<br>campaign.redemptions.count<br>campaign.redemptions.count.daily<br>campaign.redemptions.count.monthly<br>campaign.redemptions.customers_count<br>campaign.redemptions.customers_count.daily<br>campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount<br>redemption.count.daily<br>redemption.count.monthly<br>redemption.count.per_customer<br>redemption.count.per_customer.daily<br>redemption.count.per_customer.monthly<br>redemption.api_key<br>redemption.count.per_api_key<br>redemption.user.login<br>redemption.count.per_user<br>redemption.metadata<br>redemption.reward.pay_with_points.points_used |\n| **Product** | product.id<br>product.price<br>product.quantity<br>product.discount_applicable<br>product.metadata*<br>product.metadata.aggregated_quantity<br>product.metadata.aggregated_amount<br>product.metadata.discount_applicable<br>product.metadata.match_all |\n| **SKU** | sku.id<br>sku.price<br>sku.quantity<br>sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every<br>order.items.any<br>order.items.none<br>order.items.cheapest<br>order.items.most_expensive | order.items.quantity<br>order.items.aggregated_quantity<br>order.items.price<br>order.items.aggregated_amount<br>order.items.metadata* |  \n\n\n\n*Requires the `property` field to be defined."
            },
            "property": {
              "type": "string",
              "nullable": true,
              "description": "Custom name for a metadata property associated with the condition to be satisfied. **Required** if the property `name` is any of the following: \n customer_metadata<br>custom_event_metadata<br>order_items_metadata<br>order_metadata<br>product_metadata<br>redemption_metadata"
            },
            "conditions": {
              "$ref": "#/components/schemas/ValidationRuleConditions"
            },
            "rules": {
              "$ref": "#/components/schemas/ValidationRuleRules02"
            },
            "error": {
              "type": "object",
              "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule."
                }
              }
            }
          }
        }
      },
      "ValidationRuleRules02": {
        "title": "Validation Rule Rules",
        "type": "object",
        "description": "Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.",
        "properties": {
          "logic": {
            "type": "string",
            "example": "(1 and 2) and (3)",
            "description": "Defines the logic between the rules."
          }
        },
        "additionalProperties": {
          "type": "object",
          "description": "Contains the name of the validation rule.",
          "properties": {
            "name": {
              "type": "string",
              "description": "Voucherify's specific rule name.  The list of available names is provided below.  \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment<br>customer.metadata* |\n|**Order** |order.amount<br>order.initial_amount<br>order.items.count<br>order.items.price_any<br>order.items.price_each<br>order.items.metadata_any<br>order.items.metadata_each<br>order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted<br>campaign.orders.amount<br>campaign.redemptions.count<br>campaign.redemptions.count.daily<br>campaign.redemptions.count.monthly<br>campaign.redemptions.customers_count<br>campaign.redemptions.customers_count.daily<br>campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount<br>redemption.count.daily<br>redemption.count.monthly<br>redemption.count.per_customer<br>redemption.count.per_customer.daily<br>redemption.count.per_customer.monthly<br>redemption.api_key<br>redemption.count.per_api_key<br>redemption.user.login<br>redemption.count.per_user<br>redemption.metadata<br>redemption.reward.pay_with_points.points_used |\n| **Product** | product.id<br>product.price<br>product.quantity<br>product.discount_applicable<br>product.metadata*<br>product.metadata.aggregated_quantity<br>product.metadata.aggregated_amount<br>product.metadata.discount_applicable<br>product.metadata.match_all |\n| **SKU** | sku.id<br>sku.price<br>sku.quantity<br>sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every<br>order.items.any<br>order.items.none<br>order.items.cheapest<br>order.items.most_expensive | order.items.quantity<br>order.items.aggregated_quantity<br>order.items.price<br>order.items.aggregated_amount<br>order.items.metadata* |  \n\n\n\n*Requires the `property` field to be defined."
            },
            "property": {
              "type": "string",
              "nullable": true,
              "description": "Custom name for a metadata property associated with the condition to be satisfied. **Required** if the property `name` is any of the following: \n customer_metadata<br>custom_event_metadata<br>order_items_metadata<br>order_metadata<br>product_metadata<br>redemption_metadata"
            },
            "conditions": {
              "$ref": "#/components/schemas/ValidationRuleConditions"
            },
            "rules": {
              "$ref": "#/components/schemas/ValidationRuleRules03"
            },
            "error": {
              "type": "object",
              "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule."
                }
              }
            }
          }
        }
      },
      "ValidationRuleRules03": {
        "title": "Validation Rule Rules",
        "type": "object",
        "description": "Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.",
        "properties": {
          "logic": {
            "type": "string",
            "example": "(1 and 2) and (3)",
            "description": "Defines the logic between the rules."
          }
        },
        "additionalProperties": {
          "type": "object",
          "description": "Contains the name of the validation rule.",
          "properties": {
            "name": {
              "type": "string",
              "description": "Voucherify's specific rule name.  The list of available names is provided below.  \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment<br>customer.metadata* |\n|**Order** |order.amount<br>order.initial_amount<br>order.items.count<br>order.items.price_any<br>order.items.price_each<br>order.items.metadata_any<br>order.items.metadata_each<br>order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted<br>campaign.orders.amount<br>campaign.redemptions.count<br>campaign.redemptions.count.daily<br>campaign.redemptions.count.monthly<br>campaign.redemptions.customers_count<br>campaign.redemptions.customers_count.daily<br>campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount<br>redemption.count.daily<br>redemption.count.monthly<br>redemption.count.per_customer<br>redemption.count.per_customer.daily<br>redemption.count.per_customer.monthly<br>redemption.api_key<br>redemption.count.per_api_key<br>redemption.user.login<br>redemption.count.per_user<br>redemption.metadata<br>redemption.reward.pay_with_points.points_used |\n| **Product** | product.id<br>product.price<br>product.quantity<br>product.discount_applicable<br>product.metadata*<br>product.metadata.aggregated_quantity<br>product.metadata.aggregated_amount<br>product.metadata.discount_applicable<br>product.metadata.match_all |\n| **SKU** | sku.id<br>sku.price<br>sku.quantity<br>sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every<br>order.items.any<br>order.items.none<br>order.items.cheapest<br>order.items.most_expensive | order.items.quantity<br>order.items.aggregated_quantity<br>order.items.price<br>order.items.aggregated_amount<br>order.items.metadata* |  \n\n\n\n*Requires the `property` field to be defined."
            },
            "property": {
              "type": "string",
              "nullable": true,
              "description": "Custom name for a metadata property associated with the condition to be satisfied. **Required** if the property `name` is any of the following: \n customer_metadata<br>custom_event_metadata<br>order_items_metadata<br>order_metadata<br>product_metadata<br>redemption_metadata"
            },
            "conditions": {
              "$ref": "#/components/schemas/ValidationRuleConditions"
            },
            "rules": {
              "type": "object",
              "description": "Another set of validation rules. If you need to create complex rules with more nested rules, use the validation rule builder in the dashboard."
            },
            "error": {
              "type": "object",
              "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule."
                }
              }
            }
          }
        }
      },
      "ValidationRuleConditions": {
        "title": "Validation Rule Conditions",
        "type": "object",
        "description": "A set of key value pairs representing the condition name and value. The list of available conditions is provided below: \n\n| **Condition (key)** | **Definition**                                                | \n|---------------------|---------------------------------------------------------------|\n| `$is`                 | A property is a predefined value.                             |                           \n| `$is_not`             | A property is not a predefined value.                         |                           \n| `$in`                 | A property is one value of the values in a predefined list of values.   |                          \n|`$not_in`                 | A property is not one of the values in a predefined list of values.   |                          \n| `$less_than`          | A property is less than a predefined value. Can be also used with datetime.                  |                     \n| `$less_than_or_equal` | A property is less than or equal to a predefined value. Can be also used with datetime.       | \n| `$more_than`          | A property is more than a predefined value. Can be also used with datetime.                  | \n| `$more_than_or_equal` | A property is more than or equal to a predefined value. Can be also used with datetime.      | \n| `$starts_with`        | A property starts with the predefined sequence of characters. | \n| `$ends_with `         | A property ends with the predefined sequence of characters.   | \n| `$contains`           | A property contains the predefined sequence of characters.    | \n| `$timeframe`          | A property occurs within the time frame, i.e. every 1 day for 1 hour, e.g. `$timeframe: [\"2024-11-12T14:59:23.019Z;P1D;PT1H\"]`                                                       | \n| `$timeframe_absolute` | A property occurs between two dates and times, e.g. `2024-11-14T16:02:00.000Z;2024-11-28T16:02:00.000Z`                                                        | \n| `$timeframe_daily_hours` | A property occurs between selected hours on selected days of the week, e.g. `18:00;20:01;2,3`, where `0` equals Sunday, `1` equals Monday, `2` equals Tuesday, `3` equals Wednesday, `4` equals Thursday, `5` equals Friday, and `6` equals Saturday.                                                       | \n| `$dow`                | A property occurs within given days of the week, where `0` equals Sunday, `1` equals Monday, `2` equals Tuesday, `3` equals Wednesday, `4` equals Thursday, `5` equals Friday, and `6` equals Saturday.                                                        | \n| `$count`              | For array metadata; the property must have exactly the defined number of elements.                                                        | \n| `$count_more`         | For array metadata; the property must have more elements than the defined number.                                                        | \n| `$count_less`         | For array metadata; the property must have less elements than the defined number.                                                        | \n| `$from`               | The property must belong to the predefined value. Related to product collections and best used together with the `$is` condition.                                                        | \n | `$after`               | The value is after the date.                                                        | \n| `$before`               | The value is before the date.                                                        | \n| `$more_than_ago`               | The date is more than the defined value ago expressed in number of days, relative to today, e.g. more than 3 days ago.                                                        | \n| `$less_than_ago`               | The date is less than the defined value ago expressed in number of days, relative to today, less than 3 days ago.                                                        | \n| `is_days_ago`               | The date is exactly the defined value ago expressed in number of days, relative to today, e.g. exactly 3 days ago.                                                        | \n| `$more_than_future`               | The date is more than the defined value in the future expressed in number of days, relative to today, e.g. more than 3 days in the future.                                                        | \n| `$less_than_ago`               | The date is less than the defined value in the future expressed in number of days, relative to today, e.g. less than 3 days in the future.                                                        | \n| `$is_days_in_future`               | The date is exactly the defined value in the future expressed in number of days, relative to today, e.g. exactly 3 days in the future.                                                        | \n",
        "properties": {
          "$is": {
            "$ref": "#/components/schemas/AnyOne"
          },
          "$is_not": {
            "$ref": "#/components/schemas/AnyOne"
          },
          "$in": {
            "$ref": "#/components/schemas/Any"
          },
          "$not_in": {
            "$ref": "#/components/schemas/Any"
          },
          "$less_than": {
            "$ref": "#/components/schemas/AnyOne"
          },
          "$less_than_or_equal": {
            "$ref": "#/components/schemas/AnyOne"
          },
          "$more_than": {
            "$ref": "#/components/schemas/AnyOne"
          },
          "$more_than_or_equal": {
            "$ref": "#/components/schemas/AnyOne"
          },
          "$starts_with": {
            "$ref": "#/components/schemas/AnyString"
          },
          "$ends_with": {
            "$ref": "#/components/schemas/AnyString"
          },
          "$contains": {
            "$ref": "#/components/schemas/AnyString"
          },
          "$timeframe": {
            "$ref": "#/components/schemas/AnyString"
          },
          "$timeframe_absolute": {
            "$ref": "#/components/schemas/AnyString"
          },
          "$timeframe_daily_hours": {
            "$ref": "#/components/schemas/AnyString"
          },
          "$dow": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6
            }
          },
          "$count": {
            "$ref": "#/components/schemas/AnyNumber"
          },
          "$count_more": {
            "$ref": "#/components/schemas/AnyNumber"
          },
          "$count_less": {
            "$ref": "#/components/schemas/AnyNumber"
          },
          "$not_differ": {
            "$ref": "#/components/schemas/Any"
          },
          "$not_intersect": {
            "$ref": "#/components/schemas/Any"
          },
          "$from": {
            "$ref": "#/components/schemas/Any"
          },
          "$after": {
            "$ref": "#/components/schemas/AnyDateDateTime"
          },
          "$before": {
            "$ref": "#/components/schemas/AnyDateDateTime"
          },
          "$more_than_ago": {
            "$ref": "#/components/schemas/AnyNumber"
          },
          "$less_than_ago": {
            "$ref": "#/components/schemas/AnyNumber"
          },
          "$is_days_ago": {
            "$ref": "#/components/schemas/AnyNumber"
          },
          "$more_than_future": {
            "$ref": "#/components/schemas/AnyNumber"
          },
          "$less_than_future": {
            "$ref": "#/components/schemas/AnyNumber"
          },
          "$is_days_in_future": {
            "$ref": "#/components/schemas/AnyNumber"
          }
        }
      },
      "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"
                }
              }
            }
          }
        }
      },
      "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`"
              }
            }
          }
        }
      },
      "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."
              }
            }
          }
        }
      },
      "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"
            ]
          },
          "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"
        ]
      },
      "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"
              }
            }
          }
        }
      },
      "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"
        ]
      },
      "WebhookDistributionPayload": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the sendout for this webhook.",
            "example": "whs_0e16e42bc6e0c65b57"
          },
          "project_id": {
            "type": "string",
            "description": "Unique identifier of the Voucherify project.",
            "example": "proj_5T4Rpl4T1nuM"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "The exact moment when the webhook was created.",
            "example": "2024-01-01T11:11:11.111Z"
          },
          "type": {
            "type": "string",
            "description": "Displays the name entered in the `Event name` field in the distribution creator."
          },
          "data": {
            "type": "object",
            "description": "Payload depends on the event covered by the distribution."
          },
          "source": {
            "type": "object",
            "description": "Contains details about the source of the webhook sendout.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the distribution that sent the webhook.",
                "example": "distr_TrJj0lHV44EMt6HvLa2pyNlHTF"
              },
              "object": {
                "type": "string",
                "description": "Determines the type of the object.",
                "enum": [
                  "distribution"
                ],
                "example": "distribution"
              },
              "target_url": {
                "type": "string",
                "description": "The address where the webhook is be sent."
              }
            },
            "required": [
              "id",
              "object",
              "target_url"
            ]
          },
          "event": {
            "type": "object",
            "description": "Contains other data of the event that triggered the sendout.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the event that triggered the sendout.",
                "example": "evred_1f3611301g3127begb"
              },
              "type": {
                "type": "string",
                "description": "Determines the type of the event.",
                "example": "customer.order.paid"
              },
              "created_at": {
                "type": "string",
                "description": "The exact moment when the event was created.",
                "example": "2024-01-01T11:11:11.111Z",
                "format": "date-time"
              },
              "entity_id": {
                "type": "string",
                "description": "Unique identifier of the entity that triggered the sendout.",
                "example": "r_1f3611302bf107befb"
              },
              "group_id": {
                "type": "string",
                "description": "Unique identifier of the request that triggered the event.",
                "example": "v-1f36113948e50fc4ge"
              },
              "event_source": {
                "$ref": "#/components/schemas/EventSource"
              }
            },
            "required": [
              "id",
              "type",
              "created_at",
              "group_id",
              "event_source"
            ]
          }
        },
        "required": [
          "id",
          "project_id",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      },
      "WebhookProjectSettingPayload": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the sendout for this webhook.",
            "example": "whs_0e16e42bc6e0c65b57"
          },
          "project_id": {
            "type": "string",
            "description": "Unique identifier of the Voucherify project.",
            "example": "proj_5T4Rpl4T1nuM"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "The exact moment when the webhook was created.",
            "example": "2024-01-01T11:11:11.111Z"
          },
          "type": {
            "type": "string",
            "description": "Name of the event that triggerered the webhook sendout.",
            "enum": [
              "business_validation_rule.assignment.created",
              "business_validation_rule.assignment.deleted",
              "business_validation_rule.created",
              "business_validation_rule.deleted",
              "business_validation_rule.updated",
              "campaign.created",
              "campaign.deleted",
              "campaign.disabled",
              "campaign.enabled",
              "campaign.updated",
              "campaign.vouchers.generation.completed",
              "customer.created",
              "customer.deleted",
              "customer.rewarded",
              "customer.rewarded.loyalty_points",
              "publication.succeeded",
              "redemption.failed",
              "redemption.rollback.failed",
              "redemption.rollback.succeeded",
              "redemption.succeeded",
              "voucher.created",
              "voucher.deleted",
              "voucher.disabled",
              "voucher.enabled",
              "voucher.gift.balance_added",
              "voucher.loyalty_card.points_added",
              "voucher.published",
              "voucher.updated"
            ]
          },
          "data": {
            "type": "object",
            "description": "Payload depends on the event that triggered the webhook sendout. Project settings cover the following events:\n - [`business_validation_rule.assignment.created`](ref:events-bus_val_rule-assignment-created)\n - [`business_validation_rule.assignment.deleted`](ref:events-bus_val_rule-assignment-deleted)\n - [`business_validation_rule.created`](ref:events-bus_val_rule-created)\n - [`business_validation_rule.deleted`](ref:events-bus_val_rule-deleted)\n - [`business_validation_rule.updated`](ref:events-bus_val_rule-updated)\n - [`campaign.created`](ref:events-campaign-created)\n - [`campaign.deleted`](ref:events-campaign-deleted)\n - [`campaign.disabled`](ref:events-campaign-disabled)\n - [`campaign.enabled`](ref:events-campaign-enabled)\n - [`campaign.updated`](ref:events-campaign-updated)\n - [`campaign.vouchers.generation.completed`](ref:events-campaign-vouchers-generation-completed)\n - [`customer.created`](ref:events-customer-created)\n - [`customer.deleted`](ref:events-customer-deleted)\n - [`customer.rewarded`](ref:events-customer-rewarded-main)\n - [`customer.rewarded.loyalty_points`](ref:events-customer-rewarded-loyalty_points)\n - [`publication.succeeded`](ref:events-publication-succeeded)\n - [`redemption.failed`](ref:events-redemption-failed)\n - [`redemption.rollback.failed`](ref:events-redemption-rollback-failed)\n - [`redemption.rollback.succeeded`](ref:events-redemption-rollback-succeeded)\n - [`redemption.succeeded`](ref:events-redemption-succeeded)\n - [`voucher.created`](ref:events-voucher-created)\n - [`voucher.deleted`](ref:events-voucher-deleted)\n - [`voucher.disabled`](ref:events-voucher-disabled)\n - [`voucher.enabled`](ref:events-voucher-enabled)\n - [`voucher.gift.balance_added`](ref:events-voucher-gift-balance_added)\n - [`voucher.loyalty_card.points_added`](ref:events-voucher-loyalty_card-points_added)\n - [`voucher.published`](ref:events-voucher-published)\n - [`voucher.updated`](ref:events-voucher-updated)"
          },
          "source": {
            "type": "object",
            "description": "Contains details about the source of the webhook sendout.",
            "properties": {
              "id": {
                "type": "string",
                "description": "ID number of the webhook.",
                "example": "wh_j56Vfy47Vx9YOX7QYD1fzHnc"
              },
              "object": {
                "type": "string",
                "description": "Determines the type of the object.",
                "enum": [
                  "webhook"
                ],
                "example": "webhook"
              },
              "target_url": {
                "type": "string",
                "description": "The address where the webhook will be sent."
              }
            }
          },
          "event": {
            "type": "object",
            "description": "Contains other data of the event that triggered the sendout.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the event that triggered the sendout.",
                "example": "evred_1f3611301g3127begb"
              },
              "type": {
                "type": "string",
                "description": "Determines the type of the event.",
                "example": "customer.redemption.succeeded",
                "enum": [
                  "customer.custom_event",
                  "customer.entered.segment",
                  "customer.loyalty.tier.downgraded",
                  "customer.loyalty.tier.joined",
                  "customer.loyalty.tier.left",
                  "customer.loyalty.tier.prolonged",
                  "customer.loyalty.tier.upgraded",
                  "customer.order.canceled",
                  "customer.order.created",
                  "customer.order.paid",
                  "customer.order.updated",
                  "customer.publication.succeeded",
                  "customer.redemption.rollback.succeeded",
                  "customer.redemption.succeeded",
                  "customer.segment.left",
                  "customer.voucher.gift.balance_added",
                  "customer.voucher.loyalty_card.points_added",
                  "customer.voucher.loyalty_card.points_expired",
                  "manual_distribution_schedule"
                ]
              },
              "created_at": {
                "type": "string",
                "description": "The exact moment when the event was created.",
                "example": "2024-01-01T11:11:11.111Z",
                "format": "date-time"
              },
              "entity_id": {
                "type": "string",
                "description": "Unique identifier of the entity that triggered the sendout.",
                "example": "r_1f3611302bf107befb"
              },
              "group_id": {
                "type": "string",
                "description": "Unique identifier of the request that triggered the event.",
                "example": "v-1f36113948e50fc4ge"
              },
              "event_source": {
                "$ref": "#/components/schemas/EventSource"
              }
            },
            "required": [
              "id",
              "type",
              "created_at",
              "group_id",
              "event_source"
            ]
          }
        },
        "required": [
          "id",
          "project_id",
          "created_at",
          "type",
          "data",
          "source",
          "event"
        ]
      }
    }
  }
}