{
  "openapi": "3.0.1",
  "info": {
    "title": "Voucherify API - Vouchers",
    "version": "v2018-08-01",
    "description": "Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.",
    "contact": {
      "name": "Voucherify Team",
      "url": "https://www.voucherify.io/contact-support",
      "email": "support@voucherify.io"
    },
    "termsOfService": "https://www.voucherify.io/legal/subscription-agreement",
    "license": {
      "name": "MIT",
      "url": "https://github.com/voucherifyio/voucherify-js-sdk/blob/main/LICENSE"
    }
  },
  "servers": [
    {
      "url": "https://{cluster}.voucherify.io",
      "description": "Base URL",
      "variables": {
        "cluster": {
          "default": "api",
          "enum": [
            "api",
            "us1.api",
            "as1.api",
            "download",
            "us1.download",
            "as1.download"
          ]
        }
      }
    }
  ],
  "paths": {
    "/v1/vouchers": {
      "get": {
        "operationId": "list-vouchers",
        "tags": [
          "Vouchers"
        ],
        "summary": "List Vouchers",
        "description": "Returns a list of vouchers. By default, the vouchers are returned sorted by creation date, with the most recent vouchers appearing first. A maximum of 100 vouchers are returned in the response.\n\nWhen you get a list of vouchers, you can optionally specify query parameters to customize the number of vouchers returned per call using `limit`, which page of vouchers to return using `page`, sort the vouchers using the `order` query parameter and more.\n\nThis method will return an error when trying to return a limit of more than 100 vouchers.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ParameterPage99"
            },
            "description": "Which page of results to return. The lowest value is `1`, the highest value is `99`."
          },
          {
            "$ref": "#/components/parameters/category"
          },
          {
            "in": "query",
            "name": "campaign_id",
            "description": "Limit search results to vouchers within the specified campaign",
            "schema": {
              "$ref": "#/components/schemas/ParameterCampaignId"
            }
          },
          {
            "$ref": "#/components/parameters/customer"
          },
          {
            "$ref": "#/components/parameters/campaign"
          },
          {
            "$ref": "#/components/parameters/created_at"
          },
          {
            "$ref": "#/components/parameters/updated_at"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderVouchers"
            },
            "in": "query",
            "name": "order",
            "description": "Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order."
          },
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ParameterCode"
            }
          },
          {
            "$ref": "#/components/parameters/ids"
          },
          {
            "schema": {
              "type": "object"
            },
            "in": "query",
            "name": "filters",
            "description": "Object for setting voucher filters. Read [Advanced filters for fetching resources](/api-reference/listing#advanced-filters-for-fetching-resources) for filter examples.\n\nNote that **Try-it!** adds the opening `[` and closing `]` square brackets on its own, so paste your filter without them, for example `expiration_date][conditions][$before`.",
            "style": "deepObject",
            "explode": true
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary that contains an array of vouchers. Each entry in the array is a separate voucher object. If no more vouchers are available (query parameter `page` incremented over and above the voucher count), the resulting array will be empty. The result can be narrowed down according to specified (or default) filters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "vouchers",
                      "vouchers": [
                        {
                          "id": "v_hrMBBeT4sOP9VSGPmj5KAgJwX202UjiY",
                          "code": "LOYALTY-CARD-xLPbpbXR",
                          "campaign": "Loyalty Program Fall 2022",
                          "campaign_id": "camp_f7fBbQxUuTN7dI7tGOo5XMDA",
                          "category": "First",
                          "category_id": "cat_0bb343dee3cdb5ec0c",
                          "categories": [
                            {
                              "id": "cat_0bb343dee3cdb5ec0c",
                              "name": "First",
                              "hierarchy": 1,
                              "created_at": "2022-09-16T11:47:19.568Z",
                              "object": "category"
                            }
                          ],
                          "type": "LOYALTY_CARD",
                          "discount": null,
                          "gift": null,
                          "loyalty_card": {
                            "points": 110,
                            "balance": 100,
                            "next_expiration_date": "2023-12-31",
                            "next_expiration_points": 100
                          },
                          "start_date": null,
                          "expiration_date": null,
                          "validity_timeframe": null,
                          "validity_day_of_week": null,
                          "active": true,
                          "additional_info": null,
                          "metadata": {},
                          "assets": {
                            "qr": {
                              "id": "U2FsdGVkX19OrTPNyUztbNretF7tPRL4ZlUDPAUXVGL9e5UCPh6dic8zXEP8/6I6hUEqtz/F6IMIghWz1ljdjzpdizGHG3HZBw4c19fd8SD/DjhBRDSr8APqKGpZTLKe4QC2gislFTeDAq2lmJb6T1oOTBUGkUEwMgEX1Vlco9A=",
                              "url": "{{internalVoucherifyURL}}"
                            },
                            "barcode": {
                              "id": "U2FsdGVkX1/SpYuOrU9wd6/o1wzy6E/04wURHJ1xuMutzkIUx6OBTmHX5BO8XZRmEFHkgjC5eWJ27ArgAruJfwRXWuQfTNFD4raI9YvIiQNEzsZ0ydxwKBqJ/FJtiw69djuzQk1f4HdQo8s5gaZ7fd2U+1zbaeAvi9usyvRHZE4=",
                              "url": "{{internalVoucherifyURL}}"
                            }
                          },
                          "is_referral_code": false,
                          "created_at": "2022-09-19T07:56:22.355Z",
                          "updated_at": "2022-09-19T08:04:22.458Z",
                          "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 1,
                            "redeemed_points": 10,
                            "object": "list",
                            "url": "/v1/vouchers/LOYALTY-CARD-xLPbpbXR/redemptions?page=1&limit=10"
                          },
                          "publish": {
                            "object": "list",
                            "count": 1,
                            "url": "/v1/vouchers/LOYALTY-CARD-xLPbpbXR/publications?page=1&limit=10"
                          },
                          "object": "voucher"
                        },
                        {
                          "id": "v_OBVfpTVf24DBz0HZmKVZa5UEl1DUg2bn",
                          "code": "AmountDiscount",
                          "campaign": null,
                          "campaign_id": null,
                          "category": "First",
                          "category_id": "cat_0bb343dee3cdb5ec0c",
                          "categories": [
                            {
                              "id": "cat_0bb343dee3cdb5ec0c",
                              "name": "First",
                              "hierarchy": 1,
                              "created_at": "2022-09-16T11:47:19.568Z",
                              "object": "category"
                            }
                          ],
                          "type": "DISCOUNT_VOUCHER",
                          "discount": {
                            "type": "AMOUNT",
                            "amount_off": 400,
                            "amount_off_formula": "IF(CUSTOMER_METADATA(\"favorite_brands\") contains \"Nike\";20;CUSTOMER_METADATA(\"age\"))",
                            "effect": "APPLY_TO_ORDER"
                          },
                          "gift": null,
                          "loyalty_card": null,
                          "start_date": "2022-09-01T00:00:00.000Z",
                          "expiration_date": "2022-10-31T00:00:00.000Z",
                          "validity_timeframe": null,
                          "validity_day_of_week": [
                            1,
                            2,
                            3,
                            4,
                            5
                          ],
                          "active": true,
                          "additional_info": "This voucher discount is based on a formula, payment must be using VISA, and order must be over $100.",
                          "metadata": {},
                          "assets": {
                            "qr": {
                              "id": "U2FsdGVkX18tV6jdzxWPwEzjeiX4DoM06JpwaoKUNGMNx4Td5e8FwA68uIHQwPaRpJr9CUCpiP4IsSD8nEJn1YtEv6FnY83wIv7uljYoQOYmMPyhKec8Ct3zH7KurMGuj4Fhws3HNA3bqP5MYEy+aA==",
                              "url": "{{internalVoucherifyURL}}"
                            },
                            "barcode": {
                              "id": "U2FsdGVkX181+WljOgxIt9Jg1Urbuv226+8Ug0DIyZiI0WtThPNYKZZEodzqQpIsGSdrDGXr2chLo+4FH3Ey8G2YXCPM6nUhZRSMF5oL3+uNjcLtBvb7MF5+ynY5fIgpXolwUK0R/BuT4Pa8prhgTg==",
                              "url": "{{internalVoucherifyURL}}"
                            }
                          },
                          "is_referral_code": false,
                          "created_at": "2022-09-12T07:51:02.145Z",
                          "updated_at": "2022-09-19T08:29:12.566Z",
                          "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 2,
                            "object": "list",
                            "url": "/v1/vouchers/AmountDiscount/redemptions?page=1&limit=10"
                          },
                          "publish": {
                            "object": "list",
                            "count": 1,
                            "url": "/v1/vouchers/AmountDiscount/publications?page=1&limit=10"
                          },
                          "object": "voucher"
                        }
                      ],
                      "total": 2
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "generate-random-code",
        "tags": [
          "Vouchers"
        ],
        "summary": "Generate Random Code",
        "description": "Create a generic (standalone) vouchers. You can choose to create a `GIFT_VOUCHER`, a `DISCOUNT_VOUCHER`, or a `LOYALTY_CARD`. \n\nWhen you create a new voucher, you can specify a type to create it.\nCreating a new voucher will create a new generic (standalone) vouchers if no `campaign` name or `campaign_id` is provided. However, if an ID or name of a campaign with the `type` set to `STANDALONE` is provided, the voucher will be added to such campaign. In case of the loyalty card, a campaign name is required.\n\nYou can optionally use the `code` parameter to define a specific code or the `code_config` parameter to design rules for Voucherify API to create a random code. If neither of the two parameters are passed, then a random code is generated by the Voucherify API.\n\nThis method will return an error when trying to create a voucher that already exists.\n\n<Warning>\n\n<Badge color=\"yellow\">Standalone Vouchers and Campaigns</Badge>\n\nGeneric (standalone) vouchers created through the Voucherify dashboard always create a campaign for that voucher. The vouchers created with POST Create voucher and POST Generate random code endpoints do not have a campaign attached, so the values for `campaign` and `campaign_id` are `null`.\n\nTo create a generic (standalone) voucher with a `\"type\": \"STANDALONE\"`, use the [POST Create campaign](/api-reference/campaigns/create-campaign) endpoint.\n\n</Warning>",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the details of the voucher that you would like to create.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VouchersCreateRequestBody"
              },
              "examples": {
                "Percentage Discount": {
                  "value": {
                    "category": "New Customers",
                    "code": "NEW-WELCOME-COUPON",
                    "type": "DISCOUNT_VOUCHER",
                    "campaign_id": "camp_Y6dLsYIZloGqP8izufXY6SSJ",
                    "discount": {
                      "percent_off": 10,
                      "type": "PERCENT",
                      "effect": "APPLY_TO_ORDER"
                    },
                    "start_date": "2016-01-01T00:00:00Z",
                    "expiration_date": "2022-12-31T23:59:59Z",
                    "validity_timeframe": {
                      "duration": "PT1H",
                      "interval": "P2D"
                    },
                    "validity_day_of_week": [
                      1,
                      2,
                      3,
                      4,
                      5
                    ],
                    "active": false,
                    "additional_info": "This voucher will remain inactive until enabled.",
                    "redemption": {
                      "quantity": 10
                    },
                    "metadata": {
                      "test": true,
                      "locale": "de-en"
                    },
                    "validation_rules": [
                      "val_4j7DCRm2IS59"
                    ]
                  }
                },
                "Gift Card": {
                  "value": {
                    "category": "New Customers",
                    "type": "GIFT_VOUCHER",
                    "gift": {
                      "amount": 10000,
                      "effect": "APPLY_TO_ORDER"
                    },
                    "start_date": "2022-01-01T00:00:00Z",
                    "active": true,
                    "additional_info": "This gift card is enabled immediately upon creation.",
                    "metadata": {
                      "test": true,
                      "locale": "de-en"
                    },
                    "code_config": {
                      "pattern": "GIFT-CARD-##########",
                      "prefix": "New-",
                      "postfix": "0",
                      "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
                    }
                  }
                },
                "Loyalty Card": {
                  "value": {
                    "category": "New Customers",
                    "campaign": "camp_E87CubZLZ8eoQt3c4kAEZsx0",
                    "type": "LOYALTY_CARD",
                    "loyalty_card": {
                      "points": 10000
                    },
                    "additional_info": "This loyalty card is enabled immediately upon creation.",
                    "metadata": {
                      "test": true,
                      "locale": "de-en"
                    },
                    "code_config": {
                      "pattern": "LOYALTY-CARD-##",
                      "prefix": "New-",
                      "postfix": "1",
                      "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
                    }
                  }
                },
                "Unit Discount Multiple Items": {
                  "value": {
                    "category": "New Customers",
                    "code": "MultipleUnitTypesUnitDiscount",
                    "type": "DISCOUNT_VOUCHER",
                    "discount": {
                      "type": "UNIT",
                      "effect": "ADD_MANY_ITEMS",
                      "units": [
                        {
                          "unit_off": 1,
                          "unit_type": "prod_0a9f9ab4ab019a42d5",
                          "effect": "ADD_NEW_ITEMS"
                        },
                        {
                          "unit_off": 1,
                          "unit_type": "prod_0a9f9aeddb019a42db",
                          "effect": "ADD_MISSING_ITEMS"
                        }
                      ]
                    },
                    "start_date": "2020-01-01T00:00:00Z",
                    "expiration_date": "2022-12-31T23:59:59Z",
                    "validity_timeframe": {
                      "duration": "PT1H",
                      "interval": "P2D"
                    },
                    "validity_day_of_week": [
                      1,
                      2,
                      3,
                      4,
                      5
                    ],
                    "active": false,
                    "additional_info": "This voucher will remain inactive until enabled.",
                    "redemption": {
                      "quantity": 5
                    },
                    "metadata": {
                      "test": true,
                      "locale": "de-en"
                    }
                  }
                },
                "Unit Discount Single Item": {
                  "value": {
                    "category": "New Customers",
                    "code": "AddMissingItemDiscount",
                    "type": "DISCOUNT_VOUCHER",
                    "discount": {
                      "type": "UNIT",
                      "unit_off": 1,
                      "unit_type": "prod_0a9f9ab4ab019a42d5",
                      "effect": "ADD_MISSING_ITEMS"
                    },
                    "start_date": "2020-01-01T00:00:00Z",
                    "expiration_date": "2022-12-31T23:59:59Z",
                    "active": false,
                    "additional_info": "This voucher will remain inactive until enabled.",
                    "redemption": {
                      "quantity": 3
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns a voucher object if the call succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersCreateResponseBody"
                },
                "examples": {
                  "Percentage Discount": {
                    "value": {
                      "id": "v_YJYfeKoR0XAGIvaM7k51wTbDjU4WIpC5",
                      "code": "NEW-WELCOME-COUPON",
                      "campaign": "Bug fix",
                      "campaign_id": "camp_Y6dLsYIZloGqP8izufXY6SSJ",
                      "category": "New Customers",
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "PERCENT",
                        "percent_off": 10,
                        "effect": "APPLY_TO_ORDER"
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2016-01-01T00:00:00.000Z",
                      "expiration_date": "2022-12-31T23:59:59.000Z",
                      "validity_timeframe": {
                        "interval": "P2D",
                        "duration": "PT1H"
                      },
                      "validity_day_of_week": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "active": false,
                      "additional_info": "This voucher will remain inactive until enabled.",
                      "metadata": {
                        "test": true,
                        "locale": "de-en"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX180g6GhUA0kT47tHGvZ5thjCgY5nbsPtiecixkkEznFVg2v3SDG9dpCbXR6BSUdM/d78Wm/zru1ybT4+AQ2X0JnEy86N7TZ/aoezZORjcBRUfyVM/scUUF/vmD4Ezn+Elp2+V9AFcAXN/WthaRMl9e7xvEeIEQ5nao=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1/AynivxYCEIxfTnf3A1lO0xsNihOlbUMo6Y6873LQ2qpmkk90aUFnaFKd7pVumcirRweblzGVSxy24Phhd174VSPaLxxmSKp0FPv0dRos/XWBg8zu0Kta0pA/yvFK3WWGlNoPPPnvEhVWKKzOr09Gj94SMrr+TGlI=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-17T07:14:40.096Z",
                      "updated_at": null,
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [
                          {
                            "id": "asgm_COu5PJAsWmAwuCqR",
                            "rule_id": "val_4j7DCRm2IS59",
                            "related_object_id": "v_YJYfeKoR0XAGIvaM7k51wTbDjU4WIpC5",
                            "related_object_type": "voucher",
                            "created_at": "2022-02-17T07:14:40.280Z",
                            "object": "validation_rules_assignment"
                          }
                        ],
                        "total": 1
                      },
                      "redemption": {
                        "quantity": 10,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/NEW-WELCOME-COUPON/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/NEW-WELCOME-COUPON/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Gift Voucher": {
                    "value": {
                      "id": "v_yAZyBimXtF9yQ2C5BEF9WMhNzOMJNfz6",
                      "code": "New-GIFT-CARD-8tqB6FcyhE0",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "New Customers",
                      "type": "GIFT_VOUCHER",
                      "discount": null,
                      "gift": {
                        "amount": 10000,
                        "balance": 10000,
                        "effect": "APPLY_TO_ORDER"
                      },
                      "loyalty_card": null,
                      "start_date": "2022-01-01T00:00:00.000Z",
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": true,
                      "additional_info": "This gift card is enabled immediately upon creation.",
                      "metadata": {
                        "test": true,
                        "locale": "de-en"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX1+pm0q3U4i/KrjResuZpwDigEa5WcDOlwYS/bj3rsesZXDpJF5MNHMUsKqy0+wn5tY3QbjPGv0dwbqRn/OjrIRgNlP99azD0n0n9C/chiTABp8BxlJmMKKFo5AggBbQu4+Mw8Cv8V3+0Ga7ETzeehS+Yrj6c+3ioxg=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1/UaGX0zV8oXbpYah2G76V1ljYSy6hDSnWAZhpz5v10vRibGaOJUahyLcClMyxAsUhU9WXWi4BUGWIEEu510AxzxyGHOTDTjavJH0Q79PI0ciLHdujNFOgLOXWe9Ffwzj+Kvjmbhb22/SVZd/xzQlUBJcv7XboJYU0=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-17T07:49:10.834Z",
                      "updated_at": null,
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "redeemed_amount": 0,
                        "object": "list",
                        "url": "/v1/vouchers/New-GIFT-CARD-8tqB6FcyhE0/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/New-GIFT-CARD-8tqB6FcyhE0/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Loyalty Card": {
                    "value": {
                      "id": "v_tVkcOhjHCz9W7q8QnuJnTGPBR2hdaYrC",
                      "code": "New-LOYALTY-CARD-UC1",
                      "campaign": "Loyalty Campaign",
                      "campaign_id": "camp_E87CubZLZ8eoQt3c4kAEZsx0",
                      "category": "New Customers",
                      "type": "LOYALTY_CARD",
                      "discount": null,
                      "gift": null,
                      "loyalty_card": {
                        "points": 10000,
                        "balance": 10000
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": true,
                      "additional_info": "This loyalty card is enabled immediately upon creation.",
                      "metadata": {
                        "test": true,
                        "locale": "de-en"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX1+6lGBFlqtS9OoY2wbAsoSupV43qa+g5sGu+R0IDTq2k85LIfbKfV9sDSYv80pP9ucsazJ6qGI9ineqQyhv9VVHdsJ2qGRiuZzpw/vRkSA0a7J9N1MpANgzqpIULZHLjYtrCQ/2el72nZ6Hpr2NkWtk19JTpNwB8tk=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX180bvJVsyZvpAqwYXTnm4MvvH4Rur+ZhM+Mbmnva/fgYUcUbOttsFXPY/PMZ9Xi8pomVp26a7amIPguNimD8w4PMZLMavMtH7EtJ4k+0V0Wp7JUkudIKeRw2fDnQ3/0cgqvK6PMReUwFWb5nUT3ABpZDAdaOVoMDhE=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-17T08:06:41.091Z",
                      "updated_at": null,
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "redeemed_points": 0,
                        "object": "list",
                        "url": "/v1/vouchers/New-LOYALTY-CARD-UC1/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/New-LOYALTY-CARD-UC1/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Unit Discount Multiple Items": {
                    "value": {
                      "id": "v_cu8nyozvTDA413H17bH5BLha0cjxt7s8",
                      "code": "MultipleUnitTypesUnitDiscount",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "New Customers",
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "UNIT",
                        "effect": "ADD_MANY_ITEMS",
                        "units": [
                          {
                            "unit_off": 1,
                            "unit_type": "prod_0a9f9ab4ab019a42d5",
                            "effect": "ADD_NEW_ITEMS"
                          },
                          {
                            "unit_off": 1,
                            "unit_type": "prod_0a9f9aeddb019a42db",
                            "effect": "ADD_MISSING_ITEMS"
                          }
                        ]
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2020-01-01T00:00:00.000Z",
                      "expiration_date": "2022-12-31T23:59:59.000Z",
                      "validity_timeframe": {
                        "interval": "P2D",
                        "duration": "PT1H"
                      },
                      "validity_day_of_week": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "active": false,
                      "additional_info": "This voucher will remain inactive until enabled.",
                      "metadata": {
                        "test": true,
                        "locale": "de-en"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX1+ocJBtZ9NqT97gZ/QTfOz54TAoRoKO3tnCYBtHZWMghEHT0b2aFrPSL1lqMyf6fYy6DH2/DkH5p5Vd8dOozW1LV6wPVatWpa1lZMeMIB0OcARCW3q+3QydoW2KdliLKyksFwumH9C7Fsnj6HTaEbUjSttTZE/be+o=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1+Sly3IYj3EbZFHGGNxV6Ns4j76O8d0kRQe3WriJz5qY6s4GBIwlsdy13AciaQuiVt232HlOlZ4TzGaSSk3+ZMldwBGaTp/fIN9SGBW/NVUtfDOI2sIDLZCBBrdK7WVvtCQQ+1Y+6qClYg/QurJExCFRkDeKpKjDug=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-18T06:27:45.619Z",
                      "updated_at": null,
                      "redemption": {
                        "quantity": 5,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/MultipleUnitTypesUnitDiscount/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/MultipleUnitTypesUnitDiscount/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Unit Discount Single Item": {
                    "value": {
                      "id": "v_NQdraO4fXWYvMMWYL9OY22hRernr553n",
                      "code": "AddMissingItemDiscount",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "New Customers",
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "UNIT",
                        "unit_off": 1,
                        "unit_type": "prod_0a9f9ab4ab019a42d5",
                        "effect": "ADD_MISSING_ITEMS"
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2020-01-01T00:00:00.000Z",
                      "expiration_date": "2022-12-31T23:59:59.000Z",
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": false,
                      "additional_info": "This voucher will remain inactive until enabled.",
                      "metadata": {},
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX19Yh7LTNyOVKSXQ+ceTr023saElWAUeucwOgjTH50x1SoSF/PP1aoGBr6sSxHZNZOvBGumWNHjsF85y7cPY7La/4a0d1kWqnAiBWeWnGOgDFeQFqthGswypFOK1jdAzUPqLSbxW3O6q936N6Bsmoz4QHYE//kfWFhs=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1+RqzgyYsIJzAEBxmQt1OZLu4+PSUDQBldDKK1o5XsEoBSQEMPWHis1wJSg4ZNqJ9ZdJ0Ukc+K6X1fjg0ggDsCdXP2ZxpyGPD8/1ReggJZ/tq823ji7A5pzhG1TljA6+vmISuHvs2wkcum0djN9AWuAlB0F/vbXexo=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-18T06:46:44.536Z",
                      "updated_at": null,
                      "redemption": {
                        "quantity": 3,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/AddMissingItemDiscount/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/AddMissingItemDiscount/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the data is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Generating codes in a standalone campaign": {
                    "value": {
                      "code": 400,
                      "key": "invalid_campaign",
                      "message": "Invalid Campaign",
                      "details": "You can not generate vouchers for STANDALONE type campaign.",
                      "request_id": "v-0fb693bc77afe22320"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/{code}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCode"
          },
          "in": "path",
          "name": "code",
          "description": "A unique **code** that identifies the voucher.",
          "required": true
        }
      ],
      "get": {
        "operationId": "get-voucher",
        "tags": [
          "Vouchers"
        ],
        "summary": "Get Voucher",
        "description": "Retrieves the voucher with the given `code` or unique Voucherify ID. You can either pass the voucher ID which was assigned by Voucherify, e.g., `v_7HxHkf4VAkMuc8u4lZs78lyRwhRze5UE`, or the `code` of the voucher as the path parameter value, e.g., `7fjWdr`.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a voucher object if a valid identifier was provided. \n\nAdditionally, the response returns validation rules related to the voucher object. They can be inherited from a campaign.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersGetResponseBody"
                },
                "examples": {
                  "Loyalty Card": {
                    "value": {
                      "id": "v_hrMBBeT4sOP9VSGPmj5KAgJwX202UjiY",
                      "code": "LOYALTY-CARD-xLPbpbXR",
                      "campaign": "Loyalty Program Fall 2022",
                      "campaign_id": "camp_f7fBbQxUuTN7dI7tGOo5XMDA",
                      "category": "First",
                      "category_id": "cat_0bb343dee3cdb5ec0c",
                      "categories": [
                        {
                          "id": "cat_0bb343dee3cdb5ec0c",
                          "name": "First",
                          "hierarchy": 1,
                          "created_at": "2022-09-16T11:47:19.568Z",
                          "object": "category"
                        }
                      ],
                      "type": "LOYALTY_CARD",
                      "discount": null,
                      "gift": null,
                      "loyalty_card": {
                        "points": 110,
                        "balance": 100,
                        "next_expiration_date": "2023-12-31",
                        "next_expiration_points": 100
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": true,
                      "additional_info": null,
                      "metadata": {},
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX19OrTPNyUztbNretF7tPRL4ZlUDPAUXVGL9e5UCPh6dic8zXEP8/6I6hUEqtz/F6IMIghWz1ljdjzpdizGHG3HZBw4c19fd8SD/DjhBRDSr8APqKGpZTLKe4QC2gislFTeDAq2lmJb6T1oOTBUGkUEwMgEX1Vlco9A=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1/SpYuOrU9wd6/o1wzy6E/04wURHJ1xuMutzkIUx6OBTmHX5BO8XZRmEFHkgjC5eWJ27ArgAruJfwRXWuQfTNFD4raI9YvIiQNEzsZ0ydxwKBqJ/FJtiw69djuzQk1f4HdQo8s5gaZ7fd2U+1zbaeAvi9usyvRHZE4=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-19T07:56:22.355Z",
                      "updated_at": "2022-09-19T08:04:22.458Z",
                      "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 1,
                        "redeemed_points": 10,
                        "object": "list",
                        "url": "/v1/vouchers/LOYALTY-CARD-xLPbpbXR/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 1,
                        "url": "/v1/vouchers/LOYALTY-CARD-xLPbpbXR/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Gift Card": {
                    "value": {
                      "id": "v_hS8JFl8S6lNcd1L69wLIoXgTio7eWEgk",
                      "code": "GIFT-CARD-xwc6X7Tk",
                      "campaign": "Gift Cards",
                      "campaign_id": "camp_kdxp3vf1clQ9CFs1jpqv3tZe",
                      "category": null,
                      "category_id": null,
                      "type": "GIFT_VOUCHER",
                      "discount": null,
                      "gift": {
                        "amount": 55000,
                        "balance": 44700,
                        "effect": "APPLY_TO_ORDER"
                      },
                      "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": "U2FsdGVkX19SdT2kQZokSFsMRa5NmGvsHunHReeb4gF9b5LtLA4rCTM/aTyHCYfr7kRWb2vv08WIgY/Tv53SJGW+k2keqfsTq/Ohb5shkCN3FTFsaI8gulTp616sEGn/JJoIInIoNkO9Vd1+AfrKiAjmirCmekE6cz2SVCyNAXs=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX18vWc/qplwajJz4RIIy2wDUcAXVo1KEmyXx2IJy44xxHg608po3RizU9OYOzKelOAEjXFf7E4BS5Q01s4dds8Du70LGAp3idYMKAaXIjMTcFjMNczNO6ULK7r4eDx2Np8jvO/199U+zicnFNWqg/jF5ZCQW+6jO1q8=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-07-08T09:44:33.179Z",
                      "updated_at": "2022-08-29T09:37:20.185Z",
                      "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 7,
                        "redeemed_amount": 10300,
                        "object": "list",
                        "url": "/v1/vouchers/GIFT-CARD-xwc6X7Tk/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 1,
                        "url": "/v1/vouchers/GIFT-CARD-xwc6X7Tk/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Amount Discount": {
                    "value": {
                      "id": "v_OBVfpTVf24DBz0HZmKVZa5UEl1DUg2bn",
                      "code": "AMOUNTDISCOUNTUSINGFORMULA",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "First",
                      "category_id": "cat_0bb343dee3cdb5ec0c",
                      "categories": [
                        {
                          "id": "cat_0bb343dee3cdb5ec0c",
                          "name": "First",
                          "hierarchy": 1,
                          "created_at": "2022-09-16T11:47:19.568Z",
                          "object": "category"
                        }
                      ],
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "AMOUNT",
                        "amount_off": 400,
                        "amount_off_formula": "IF(CUSTOMER_METADATA(\"favorite_brands\") contains \"Nike\";20;CUSTOMER_METADATA(\"age\"))",
                        "effect": "APPLY_TO_ORDER"
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2022-09-01T00:00:00.000Z",
                      "expiration_date": "2022-10-31T00:00:00.000Z",
                      "validity_timeframe": null,
                      "validity_day_of_week": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "active": true,
                      "additional_info": "This voucher discount is based on a formula, payment must be using VISA, and order must be over $100.",
                      "metadata": {},
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX18tV6jdzxWPwEzjeiX4DoM06JpwaoKUNGMNx4Td5e8FwA68uIHQwPaRpJr9CUCpiP4IsSD8nEJn1YtEv6FnY83wIv7uljYoQOYmMPyhKec8Ct3zH7KurMGuj4Fhws3HNA3bqP5MYEy+aA==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX181+WljOgxIt9Jg1Urbuv226+8Ug0DIyZiI0WtThPNYKZZEodzqQpIsGSdrDGXr2chLo+4FH3Ey8G2YXCPM6nUhZRSMF5oL3+uNjcLtBvb7MF5+ynY5fIgpXolwUK0R/BuT4Pa8prhgTg==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-12T07:51:02.145Z",
                      "updated_at": "2022-09-19T08:29:12.566Z",
                      "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [
                          {
                            "id": "asgm_tO5AuzXIkkNPTC50",
                            "rule_id": "val_5h0wc453_2",
                            "related_object_id": "v_OBVfpTVf24DBz0HZmKVZa5UEl1DUg2bn",
                            "related_object_type": "voucher",
                            "created_at": "2022-09-19T08:27:59.160Z",
                            "object": "validation_rules_assignment"
                          }
                        ],
                        "total": 1
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 2,
                        "object": "list",
                        "url": "/v1/vouchers/AMOUNTDISCOUNTUSINGFORMULA/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 1,
                        "url": "/v1/vouchers/AMOUNTDISCOUNTUSINGFORMULA/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Percent Discount": {
                    "value": {
                      "id": "v_2LcXRN4X0TNNgPoBceXIsE4LYs13kta1",
                      "code": "PercentDiscountUsingFormula",
                      "campaign": null,
                      "campaign_id": null,
                      "category": null,
                      "category_id": null,
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "PERCENT",
                        "percent_off": 3,
                        "percent_off_formula": "CUSTOMER_METADATA(\"age\")",
                        "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": "U2FsdGVkX1+74dNbbuHNdVR+5SXVrdo6Zp2tUInlseZtheoYEvrayBBDEoJFaeDuC1BzQr+j8ayuFU7+BtCdNe25YRae4Mp+3Y1HsrkVudshKRzMBdS/43GT9Qi6tOXQDsYjHh70zNz13lMOC9bnaX6WZCVU0vRWM/VDXbYNxGZH6V1wpcGOkmkhkEYPSuIXBDF65FsgHOAwIPvKBxa/aQ==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX19t8/dJWDNnnwPtxt3e0kZTDAELYiQcSHWIEO5wr6uLeDbM2KKbGYUfkKKtZRsWtiKhOQQc7zmNoCqR82UB+p0gzGM0tyXa/npbPUTe0Y5Y/arDPnomb9AaUFjK9Uq5OUBYbxi1ERqEhy/20Owr0m0e0E2I3jQmgAxkNokRm1g31zX4zheea8gTtiFwb6ZrYvGbaOhj5IxYWg==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-15T10:20:46.467Z",
                      "updated_at": "2022-09-15T10:43:51.116Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [
                          {
                            "id": "asgm_EuYasM5fyDR9G2r4",
                            "rule_id": "val_0k19OQHjNZRT",
                            "related_object_id": "v_2LcXRN4X0TNNgPoBceXIsE4LYs13kta1",
                            "related_object_type": "voucher",
                            "created_at": "2022-09-15T10:20:46.460Z",
                            "object": "validation_rules_assignment"
                          }
                        ],
                        "total": 1
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 3,
                        "object": "list",
                        "url": "/v1/vouchers/PercentDiscountUsingFormula/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/PercentDiscountUsingFormula/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Fixed Discount": {
                    "value": {
                      "id": "v_zXQtyi5FYQYoRXv459hmK8M5Gi2lLoDl",
                      "code": "FixedDiscountUsingFormula",
                      "campaign": null,
                      "campaign_id": null,
                      "category": null,
                      "category_id": null,
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "FIXED",
                        "effect": "APPLY_TO_ORDER",
                        "fixed_amount": 200,
                        "fixed_amount_formula": "IF(ORDER_UNITS_QUANTITY > 3;CUSTOMER_METADATA(\"age\") + 2;CUSTOMER_METADATA(\"age\") - 2)"
                      },
                      "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": "U2FsdGVkX1+sY8iWRFMrrPOjY6pS7JZSqJUPIzAgFO5oy5GvTj27KrukNxucE4wrA4n9QL7pua3CfJzGWe0Hc5J6XXU2m5ktik4iUNRO6pxZmL4ZuR96C1XHJAGaIiI7lM17OjJD2b72/hyyDUi8DflzcYixFdXTOR3o1rcaPoY=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1+af+iouhzUVUL0IocB7BAWR8rB0z8/9/OgYi32EHQ9salEEtE3XYPWtseOAxi5keMRp6K3JLDyx4RvYpw3Fe5SN0ed7PEcWr4fLUoUBntHtH0lOPFOtWxpY3tAjnyWpE/CYTR/S135KZ6GIfCS/+VQNrzbS/bFXgY=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-15T12:46:55.818Z",
                      "updated_at": "2022-09-16T10:03:25.057Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 5,
                        "object": "list",
                        "url": "/v1/vouchers/FixedDiscountUsingFormula/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/FixedDiscountUsingFormula/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Unit Discount": {
                    "value": {
                      "id": "v_JkjV4v9OKTsaIuHoqXGrkGijNaRGYNzm",
                      "code": "UnitDiscountUsingFormula",
                      "campaign": null,
                      "campaign_id": null,
                      "category": null,
                      "category_id": null,
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "UNIT",
                        "unit_off": 1,
                        "unit_off_formula": "IF(ORDER_UNITS_QUANTITY > 3;CUSTOMER_METADATA(\"age\") / 5;CUSTOMER_METADATA(\"age\") / 10)",
                        "unit_type": "sku_0b661e41eccd35a8e9",
                        "effect": "ADD_MISSING_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": "U2FsdGVkX1+6okuUQBKDcu0jGGg0jOU3kwYUFhX79TdwYKjXyV14BX74z/lehzciL0vdtutoiMVf8Nzl+B278gSHI5TiecPsTXChbGKSjH9gYUxZkdQev0qfmR4frKHjKKHHfT9DEcRWCLwKDJ9V+b89EAmbMouLlaDvkD63bZI=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX19E7POETWB9YO+S4gkbGFQSm4VDNXEvqdlln6cWiyWTplnWkiUbs/2XMIva3q2rHDFP4toeKrLOGeS5mqhJcdd3yVsWXjHaALwCJIis2D4l5soDvz+Ka/vTqJdFWQzqsIl0BqEpr1tLLy8JFMGN7MY5nY3nr/ciSN8=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-15T13:36:27.838Z",
                      "updated_at": "2022-09-16T10:03:25.057Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 5,
                        "object": "list",
                        "url": "/v1/vouchers/UnitDiscountUsingFormula/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/UnitDiscountUsingFormula/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Multiple Unit Discount": {
                    "value": {
                      "id": "v_5Xgi5ht4sw432LQ7bwmyjKnUAYtOrJAh",
                      "code": "UnitDiscountUsingFormulaForMultipleProductVariants",
                      "campaign": null,
                      "campaign_id": null,
                      "category": null,
                      "category_id": null,
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "UNIT",
                        "effect": "ADD_MANY_ITEMS",
                        "units": [
                          {
                            "unit_off": 3,
                            "unit_off_formula": "IF(ORDER_AMOUNT > 100;CUSTOMER_METADATA(\"age\");CUSTOMER_METADATA(\"age\") / 2)",
                            "unit_type": "sku_0b661e41fc8d35a8f7",
                            "effect": "ADD_MISSING_ITEMS"
                          },
                          {
                            "unit_off": 4,
                            "unit_off_formula": "IF(ORDER_AMOUNT > 100;CUSTOMER_METADATA(\"age\") + 2;CUSTOMER_METADATA(\"age\") - -2)",
                            "unit_type": "sku_0b661e41fc8d35a8f6",
                            "effect": "ADD_NEW_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": "U2FsdGVkX1+qkwm+Yu29uhfotQxirJftPuWjA1P9WGxHqqmOHsU9esf6R5Ln7AeiqX8l9iIpy+D3yav5GmF2UrY6PD6fS9Y+yu+7yTVQu+agFZqdN1jvWw4DBOCHKPgynaMiNS29Cv4EIOFCY9Ux+4Lp8aVdalItCVCEH25DxWD+HUKq1lE31Y0DfWssg95oO2m73ZeGa8je7zd09eW7cg==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1+poCeZMw207p8HWtpoeokpaPfUQQoRIxpGXmqi5ic2ZPhQwKrUnujPDW4Sw1ODgHV6nLWQQQ9g7j3S4793YfzHDi1H8L3kZroH0TwWFNBgzQkV/QLqc387xUUckr0fvmhTBCarpsB+dWPOwlaNuVivTVB+Yyh/1FcbGbjvbj1Sm12wVNom2KZ3m1K/lJ6vBoGkXqq0jutytA==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-16T05:44:50.722Z",
                      "updated_at": "2022-09-19T09:25:17.303Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 3,
                        "object": "list",
                        "url": "/v1/vouchers/UnitDiscountUsingFormulaForMultipleProductVariants/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/UnitDiscountUsingFormulaForMultipleProductVariants/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Free Shipping": {
                    "value": {
                      "id": "v_gO13ON60WqVmP1DASWuJRF83Xt5KrVNL",
                      "code": "FreeShipping",
                      "campaign": null,
                      "campaign_id": null,
                      "category": null,
                      "category_id": null,
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "UNIT",
                        "unit_off": 1,
                        "unit_type": "prod_5h1pp1ng",
                        "effect": "ADD_MISSING_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": "U2FsdGVkX19R0AaZSL8eog8GYSGvRcADkJ24Hhr52Awb2KNF11CE7oyTHVBq+S3gexrVR8PxHgEz/jR1Hh2YfM5h0k5CYPD24I/pXJYQVTa1CpXFBrrxVET9QyK48z5hxu2nsHHBsV7g0zK1nIVibsw06db8x1F1zaR7Un9oq6A=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX19XHGrCUHCfcSz/VLWmN1UU13QmDsH9ezEYtzHAUAeaLvN12Yv5eBJ7h7R2Og2pNm7mdHxfMR8gBJWEgHuBkodwXch1llhO6hNy9KXebNU+McRx9iEB/DqSzagjaxCiUNB1xitLgXDlUH5cH9naOCOtCHGMrEQW4h0=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-16T07:19:53.945Z",
                      "updated_at": "2022-09-16T07:26:35.361Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 2,
                        "object": "list",
                        "url": "/v1/vouchers/FreeShipping/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/FreeShipping/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when requesting the code of a voucher that has been deleted or does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id v_OBVfpTVf24DBz0HZmKVZa5UEl1DUg2b",
                      "request_id": "v-0bb3403b9a158c87b2",
                      "resource_id": "v_OBVfpTVf24DBz0HZmKVZa5UEl1DUg2b",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-voucher",
        "tags": [
          "Vouchers"
        ],
        "summary": "Update Voucher",
        "description": "Updates the specified voucher by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged.\n\nFields other than the ones listed in the request body won't be modified. Even if provided, they will be silently skipped.\n\nIf you want to change the amount on a gift card or the number of points on a loyalty card, use the [Adjust voucher balance](/api-reference/vouchers/adjust-voucher-balance) endpoint.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Specify the parameters to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VouchersUpdateRequestBody"
              },
              "examples": {
                "Percent Discount": {
                  "value": {
                    "category": "Second",
                    "type": "DISCOUNT_VOUCHER",
                    "discount": {
                      "type": "PERCENT",
                      "percent_off": 45,
                      "percent_off_formula": "IF(ORDER_AMOUNT > 100;CUSTOMER_METADATA(\"age\");CUSTOMER_METADATA(\"age\") / 2)",
                      "amount_limit": 1800,
                      "effect": "APPLY_TO_ORDER"
                    },
                    "start_date": "2020-02-01T00:00:00Z",
                    "expiration_date": "2023-12-31T23:59:59Z",
                    "validity_timeframe": {
                      "duration": "PT2H",
                      "interval": "P3D"
                    },
                    "validity_day_of_week": [
                      0,
                      1,
                      2
                    ],
                    "active": false,
                    "additional_info": "This voucher can be used with other coupons. Please feel free to do so.",
                    "metadata": {
                      "Season": "Winter"
                    }
                  }
                },
                "Gift Card": {
                  "value": {
                    "category": "Existing Customers",
                    "gift": {
                      "amount": 20000,
                      "effect": "APPLY_TO_ITEMS"
                    },
                    "start_date": "2021-01-01T00:00:00Z",
                    "active": false,
                    "additional_info": "This gift card is disabled.",
                    "metadata": {
                      "test": false,
                      "locale": "de-en-pl"
                    }
                  }
                },
                "Loyalty Card": {
                  "value": {
                    "category": "Existing Customers",
                    "loyalty_card": {
                      "points": 20000
                    },
                    "active": false,
                    "additional_info": "This loyalty card is being deactivated and points updated.",
                    "metadata": {
                      "test": false,
                      "locale": "de-en-pl"
                    }
                  }
                },
                "Amount Discount": {
                  "value": {
                    "category": "Existing Customers",
                    "discount": {
                      "amount_off": 2000,
                      "type": "AMOUNT",
                      "effect": "APPLY_TO_ITEMS"
                    },
                    "start_date": "2021-01-01T00:00:00Z"
                  }
                },
                "Fixed Discount": {
                  "value": {
                    "category": "Existing Customers",
                    "discount": {
                      "type": "FIXED",
                      "fixed_amount": 2000,
                      "effect": "APPLY_TO_ITEMS"
                    },
                    "start_date": "2021-01-01T00:00:00Z"
                  }
                },
                "Unit Discount": {
                  "value": {
                    "discount": {
                      "type": "UNIT",
                      "effect": "ADD_MANY_ITEMS",
                      "units": [
                        {
                          "unit_off": 2,
                          "unit_type": "prod_0a9f9ab4ab019a42d5",
                          "effect": "ADD_MISSING_ITEMS"
                        },
                        {
                          "unit_off": 1,
                          "unit_type": "prod_0a9f9aeddb019a42db",
                          "effect": "ADD_MISSING_ITEMS"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the voucher object if the update succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersUpdateResponseBody"
                },
                "examples": {
                  "Percent Discount": {
                    "value": {
                      "id": "v_9PbXndxO3S8xfztwMtIvuMXReonF248m",
                      "code": "percent1",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "Second",
                      "category_id": "cat_0bb81a481615a37b5e",
                      "categories": [
                        {
                          "id": "cat_0bb81a481615a37b5e",
                          "name": "Second",
                          "hierarchy": 2,
                          "created_at": "2022-09-20T05:58:01.561Z",
                          "object": "category"
                        }
                      ],
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "PERCENT",
                        "amount_limit": 1800,
                        "percent_off": 45,
                        "percent_off_formula": "IF(ORDER_AMOUNT > 100;CUSTOMER_METADATA(\"age\");CUSTOMER_METADATA(\"age\") / 2)",
                        "effect": "APPLY_TO_ORDER"
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2020-02-01T00:00:00.000Z",
                      "expiration_date": "2023-12-31T23:59:59.000Z",
                      "validity_timeframe": {
                        "interval": "P3D",
                        "duration": "PT2H"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2
                      ],
                      "active": false,
                      "additional_info": "This voucher can be used with other coupons. Please feel free to do so.",
                      "metadata": {
                        "Season": "Winter"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX19MPtNCPjoG/pKloolK+BZH/OCIpjYqj+B6IVJJmTYKeBINcB0JioL/tSw3iuK4FvgF8VyDyTfL26IpzbT81DDOnKeFIDUJraQDJiKxWcrG/RCFsVky4olBJ+GZFb9pLpN5gC/rn0pqYw==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1/J73XXWgMf2BsVM21kpnFLQak5dpGzThYNTYPT62U6q+5RDlh/CXylkTrhegRnWJw1HA7iehT8iUoV4M4cV0KBdp5WgJ3lXeFZcpX3Mpu0T02PRcYbdCIiSO1kO50Y8Hg/heHcshw22Q==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-19T14:41:30.976Z",
                      "updated_at": "2022-09-20T06:00:50.202Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "redemption": {
                        "quantity": 101,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/percent1/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/percent1/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Gift Card": {
                    "value": {
                      "id": "v_7xaObxyK5LG62Rp0Xqpez7lqiBFL62pL",
                      "code": "welcomegiftcard",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "Existing Customers",
                      "type": "GIFT_VOUCHER",
                      "discount": null,
                      "gift": {
                        "amount": 20000,
                        "balance": 20000,
                        "effect": "APPLY_TO_ITEMS"
                      },
                      "loyalty_card": null,
                      "start_date": "2021-01-01T00:00:00.000Z",
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": false,
                      "additional_info": "This gift card is disabled.",
                      "metadata": {
                        "test": false,
                        "locale": "de-en-pl"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX1+mTbI2MdzBdMJ7AsOPKvGGgRB7O4oHZv5qq8I3M/OBPJm4PV8bTtBgR+oXOU4Jv1ucbIV7yg1mzC86LVFKjO7Ptnj+63mS9QdHvvILEAulBuZZQ+hZ0HmFXjDl4Quz/kUqGwffKGTziQ==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX184KgQ11OfpqB4WkJuH9ushSwZb0YrcN+8OaGPHxBQMiBr2axwnvQlZYv6YhqWtnc5iHByHrkg+6qYHxOLBPRMWCysIhcuUEB57IDhgYUHRPyM2bWjQadVHngGfVGCQ0CUy4PO/71RdMw==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-17T09:09:49.665Z",
                      "updated_at": "2022-02-17T11:11:48.071Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "redeemed_amount": 0,
                        "object": "list",
                        "url": "/v1/vouchers/welcomegiftcard/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/welcomegiftcard/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Loyalty Card": {
                    "value": {
                      "id": "v_l84t3fy3keMUiOeaHbN1cbTdW8O5eUlm",
                      "code": "welcomeloyalty",
                      "campaign": "Loyalty Campaign",
                      "campaign_id": "camp_E87CubZLZ8eoQt3c4kAEZsx0",
                      "category": "Existing Customers",
                      "type": "LOYALTY_CARD",
                      "discount": null,
                      "gift": null,
                      "loyalty_card": {
                        "points": 20000,
                        "balance": 20000
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": false,
                      "additional_info": "This loyalty card is being deactivated and points updated.",
                      "metadata": {
                        "test": false,
                        "locale": "de-en-pl"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX186PCWooyrNsjfI+nb+Y9ziUZ1k7xe+nJQ53Ms1ynNJOX6JXC6SwxS1WDhYwAKX5FxaDoKyuPf5MkQrkeB6u5bSx333ldAyLypNnqwBD2N17S64WFnTqV7eXUk3hS30wDYcz0cQAJFDcQ==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1/FWUg0RbOU7R7Zqg7/8Ba6oYuXrmIl7EdXGgaPMPfpePNGRzxBu4LP2dNEUO9h1Sh37MR1PxOoaemPwlgTDo/1G8dX1JjSppNoaTHhkzk2w4yutNhP7o8cq3ZBbT3TNMTKb2H3fUMc7A==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-17T09:12:01.428Z",
                      "updated_at": "2022-02-17T11:20:12.447Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "redeemed_points": 0,
                        "object": "list",
                        "url": "/v1/vouchers/welcomeloyalty/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/welcomeloyalty/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Amount Discount": {
                    "value": {
                      "id": "v_jMIjKfG2oJ7vCwIPhsLsbXYGTdPLlbJd",
                      "code": "WelcomeDiscountAmount",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "Existing Customers",
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "AMOUNT",
                        "amount_off": 2000,
                        "effect": "APPLY_TO_ITEMS"
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2021-01-01T00:00:00.000Z",
                      "expiration_date": "2022-12-31T23:59:59.000Z",
                      "validity_timeframe": {
                        "interval": "P2D",
                        "duration": "PT1H"
                      },
                      "validity_day_of_week": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "active": false,
                      "additional_info": "This voucher will remain inactive until enabled.",
                      "metadata": {
                        "test": true,
                        "locale": "de-en"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX1+TcEE9sZP6aMfAW3NZv9GWlCnUNn+SiK4FIbMRWWjN5hzTR7Yc/73yfldUb6SMgIvUNL551Nz/nPjrMY2iauia1MSWX21MItsSPfy8qccrC+WAlvpGK/1ZklnxYaeKqxTqwSXl7ppSlgcuEejbFiaqEDajvYUZsF4=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1/AhpZMq/h+Phi8JZF9m4qL8/U/Z5AST82jaAOnnhdHdbaGjB1+/0VFIdGBA8w2+3JX5qd61Dfk6yfiLCraVw7lYjQddCHF5SKtJs4hqsLHZevQTCzpZkeIHC3ThsG/fLZTsaNn8tjewd/W4qn/2Cc5NgTdv7fqui4=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-17T11:41:05.236Z",
                      "updated_at": "2022-02-17T11:45:29.269Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [
                          {
                            "id": "asgm_tDN7MJNayjrf1wyn",
                            "rule_id": "val_4j7DCRm2IS59",
                            "related_object_id": "v_jMIjKfG2oJ7vCwIPhsLsbXYGTdPLlbJd",
                            "related_object_type": "voucher",
                            "created_at": "2022-02-17T11:41:05.210Z",
                            "object": "validation_rules_assignment"
                          }
                        ],
                        "total": 1
                      },
                      "redemption": {
                        "quantity": 10,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/WelcomeDiscountAmount/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/WelcomeDiscountAmount/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Fixed Discount": {
                    "value": {
                      "id": "v_B1Pe7QPTjXCHm8IcDkJAQs4g6Zc08UlK",
                      "code": "wou4w1Og",
                      "campaign": "Fixed",
                      "campaign_id": "camp_2jVA6EKGSAe6scyc3i1q9ROD",
                      "category": "Existing Customers",
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "FIXED",
                        "effect": "APPLY_TO_ITEMS",
                        "fixed_amount": 2000
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2021-01-01T00:00:00.000Z",
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": true,
                      "additional_info": null,
                      "metadata": {},
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX18zxYPpRIYeGHCoCAp3ZAPEUM0qacHQIIW/82oGOW24bFMA06kahjkZKVA/1mqqJsqh83C29Jhdz82KrRsM2zl9nzplu5hrmn7m0twnf5NQaTTcovEvnBV8Kej9tGhzc/dPwqE+xEKuDg==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX18tsK1tz0X2IQWbFHCY4wZBDjoysFt1fBlWo/9bm/HNTci1Q3bSFuIzqIQqlU2TkSacFBgOWGuVG08XboZsqNSXXsAgST9tyoxpaOJ22B2EwWspdvuwJqvZh4PpEyh3BBDS7eOWsr3+Sw==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-17T11:54:37.766Z",
                      "updated_at": "2022-02-17T12:04:53.346Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "redemption": {
                        "quantity": 1,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/wou4w1Og/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/wou4w1Og/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Unit Discount": {
                    "value": {
                      "id": "v_cu8nyozvTDA413H17bH5BLha0cjxt7s8",
                      "code": "MultipleUnitTypesUnitDiscount",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "New Customers",
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "UNIT",
                        "effect": "ADD_MANY_ITEMS",
                        "units": [
                          {
                            "unit_off": 2,
                            "unit_type": "prod_0a9f9ab4ab019a42d5",
                            "effect": "ADD_MISSING_ITEMS"
                          },
                          {
                            "unit_off": 1,
                            "unit_type": "prod_0a9f9aeddb019a42db",
                            "effect": "ADD_MISSING_ITEMS"
                          }
                        ]
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2020-01-01T00:00:00.000Z",
                      "expiration_date": "2022-12-31T23:59:59.000Z",
                      "validity_timeframe": {
                        "interval": "P2D",
                        "duration": "PT1H"
                      },
                      "validity_day_of_week": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "active": false,
                      "additional_info": "This voucher will remain inactive until enabled.",
                      "metadata": {
                        "test": true,
                        "locale": "de-en"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX1+ocJBtZ9NqT97gZ/QTfOz54TAoRoKO3tnCYBtHZWMghEHT0b2aFrPSL1lqMyf6fYy6DH2/DkH5p5Vd8dOozW1LV6wPVatWpa1lZMeMIB0OcARCW3q+3QydoW2KdliLKyksFwumH9C7Fsnj6HTaEbUjSttTZE/be+o=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1+Sly3IYj3EbZFHGGNxV6Ns4j76O8d0kRQe3WriJz5qY6s4GBIwlsdy13AciaQuiVt232HlOlZ4TzGaSSk3+ZMldwBGaTp/fIN9SGBW/NVUtfDOI2sIDLZCBBrdK7WVvtCQQ+1Y+6qClYg/QurJExCFRkDeKpKjDug=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-18T06:27:45.619Z",
                      "updated_at": "2022-02-18T06:31:08.630Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "redemption": {
                        "quantity": 5,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/MultipleUnitTypesUnitDiscount/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/MultipleUnitTypesUnitDiscount/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if, for example, the AMOUNT type discount doesn't have the `type` attribute defined.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Invalid Voucher": {
                    "value": {
                      "code": 400,
                      "key": "invalid_voucher",
                      "message": "Invalid Voucher",
                      "details": "It is not possible to change Voucher discount type",
                      "request_id": "b7f5149d-83e5-46ef-93ad-ef191a87b185"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-voucher",
        "tags": [
          "Vouchers"
        ],
        "summary": "Delete Voucher",
        "description": "Deletes a voucher. This operation cannot be undone. Additionally, this operation removes any redemptions on the voucher.\n\nIf the `force` parameter is set to `false` or not set at all, the voucher will be moved to [the bin](/api-reference/bin/list-bin-entries).",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterBoolean"
            },
            "in": "query",
            "name": "force",
            "description": "If this flag is set to `true`, the voucher will be removed permanently. If it is set to `false` or not set at all, the voucher will be moved to the bin. Going forward, the user will be able to create another voucher with exactly the same code."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if deletion is successful."
          },
          "404": {
            "description": "Returns an error indicating that the voucher with given ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Voucher Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id 10OFF",
                      "request_id": "v-0ae28d3cec96bb1b7e",
                      "resource_id": "10OFF",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-voucher",
        "tags": [
          "Vouchers"
        ],
        "summary": "Create Voucher",
        "description": "Create a generic (standalone) voucher or a voucher in a campaign. You can choose to create a `GIFT_VOUCHER`, a `DISCOUNT_VOUCHER`, or a `LOYALTY_CARD`. The code path parameter can use all letters of the English alphabet, Arabic numerals and special characters.\n\nWhen you create a new voucher, you can specify a type to create it.\nIf no `campaign` name or `campaign_id` is provided, the new voucher will be a generic (standalone) one. However, if an ID or name of a campaign with the `type` set to `STANDALONE` is provided, the voucher will be added to this campaign. For a loyalty card, a campaign name or ID is required.\n\n<Warning>\n\n<Badge color=\"yellow\">Standalone Vouchers and Campaigns</Badge>\n\nGeneric (standalone) vouchers created through the Voucherify dashboard always create a campaign for that voucher. However, vouchers created through The vouchers created with POST Create voucher and POST Generate random code endpoints do not have a campaign attached, so the values for `campaign` and `campaign_id` are `null`.\n\nTo create a generic (standalone) voucher with a `\"type\": \"STANDALONE\"`, use the [POST Create campaign](/api-reference/campaigns/create-campaign) endpoint.\n\n</Warning>",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the details of the voucher that you would like to create.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VouchersCreateWithSpecificCodeRequestBody"
              },
              "examples": {
                "Percentage Discount": {
                  "value": {
                    "category": "New Customers",
                    "type": "DISCOUNT_VOUCHER",
                    "discount": {
                      "percent_off": 10,
                      "type": "PERCENT",
                      "effect": "APPLY_TO_ORDER"
                    },
                    "start_date": "2022-01-01T00:00:00Z",
                    "expiration_date": "2022-12-31T23:59:59Z",
                    "validity_timeframe": {
                      "duration": "PT1H",
                      "interval": "P2D"
                    },
                    "validity_day_of_week": [
                      1,
                      2,
                      3,
                      4,
                      5
                    ],
                    "active": false,
                    "additional_info": "This voucher will remain inactive until enabled.",
                    "redemption": {
                      "quantity": 10
                    },
                    "metadata": {
                      "test": true,
                      "locale": "de-en"
                    },
                    "validation_rules": [
                      "val_4j7DCRm2IS59"
                    ]
                  }
                },
                "Gift Card": {
                  "value": {
                    "category": "New Customers",
                    "type": "GIFT_VOUCHER",
                    "gift": {
                      "amount": 10000,
                      "effect": "APPLY_TO_ORDER"
                    },
                    "start_date": "2022-01-01T00:00:00Z",
                    "active": true,
                    "additional_info": "This gift card is enabled immediately upon creation.",
                    "metadata": {
                      "test": true,
                      "locale": "de-en"
                    }
                  }
                },
                "Loyalty Card": {
                  "value": {
                    "category": "New Customers",
                    "campaign": "camp_E87CubZLZ8eoQt3c4kAEZsx0",
                    "type": "LOYALTY_CARD",
                    "loyalty_card": {
                      "points": 10000
                    },
                    "additional_info": "This loyalty card is enabled immediately upon creation.",
                    "metadata": {
                      "test": true,
                      "locale": "de-en"
                    }
                  }
                },
                "Amount Discount with Formula": {
                  "value": {
                    "category": "First",
                    "type": "DISCOUNT_VOUCHER",
                    "discount": {
                      "type": "AMOUNT",
                      "amount_off": 100,
                      "amount_off_formula": "IF(CUSTOMER_METADATA(\"favorite_brands\") contains \"Nike\";20;CUSTOMER_METADATA(\"age\"))",
                      "effect": "APPLY_TO_ORDER"
                    },
                    "start_date": "2020-01-01T00:00:00Z",
                    "expiration_date": "2022-12-31T23:59:59Z",
                    "validity_timeframe": {
                      "duration": "PT1H",
                      "interval": "P2D"
                    },
                    "validity_day_of_week": [
                      1,
                      2,
                      3,
                      4,
                      5
                    ],
                    "active": true,
                    "additional_info": "This voucher can be used with other coupons.",
                    "redemption": {
                      "quantity": 100
                    },
                    "metadata": {
                      "Season": "Spring"
                    }
                  }
                },
                "Percent Discount with Formula": {
                  "value": {
                    "category": "First",
                    "type": "DISCOUNT_VOUCHER",
                    "discount": {
                      "type": "PERCENT",
                      "percent_off": 40,
                      "percent_off_formula": "IF(CUSTOMER_METADATA(\"favorite_brands\") contains \"Nike\";20;CUSTOMER_METADATA(\"age\"))",
                      "amount_limit": 1700,
                      "effect": "APPLY_TO_ORDER"
                    },
                    "start_date": "2020-01-01T00:00:00Z",
                    "expiration_date": "2022-12-31T23:59:59Z",
                    "validity_timeframe": {
                      "duration": "PT1H",
                      "interval": "P2D"
                    },
                    "validity_day_of_week": [
                      0,
                      1
                    ],
                    "active": true,
                    "additional_info": "This voucher can be used with other coupons.",
                    "redemption": {
                      "quantity": 101
                    },
                    "metadata": {
                      "Season": "Fall"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns a voucher object if the call succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersCreateResponseBody"
                },
                "examples": {
                  "Percentage Discount": {
                    "value": {
                      "id": "v_MBOEmHelKwvykVZ8JcT4TE5Kla5IMJyc",
                      "code": "welcome",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "New Customers",
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "PERCENT",
                        "percent_off": 10,
                        "effect": "APPLY_TO_ORDER"
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2022-01-01T00:00:00.000Z",
                      "expiration_date": "2022-12-31T23:59:59.000Z",
                      "validity_timeframe": {
                        "interval": "P2D",
                        "duration": "PT1H"
                      },
                      "validity_day_of_week": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "active": false,
                      "additional_info": "This voucher will remain inactive until enabled.",
                      "metadata": {
                        "test": true,
                        "locale": "de-en"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX1+by33CNzWu6xXjCrLKRr1+H9K3I9wOSa7idiHrMYJe0HlrWiy7INhaJf1BnaKJjLKcUC+4/hCbILtJ9lHXZWhewG5q5rmx29gK0IH2eRauw1qCZKIlXfqeGTG2T5ftPsEl1D4xf8W2MA==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX19wOdFeXYXZ4Xu22L0Ummk03Urz/ZTnXUFeHeehtK4L6RTvNgVeSR+McTZR4DYNLEGydZ+Fo2xEqqM1UWyl8Bx22Pi1CxghADOcy3bAvSca7EEPpvKrCY403UWUDvaO/OEAjvVoiEuaHA==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-17T09:05:34.668Z",
                      "updated_at": null,
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [
                          {
                            "id": "asgm_74F7QZoYbUoljwQO",
                            "rule_id": "val_4j7DCRm2IS59",
                            "related_object_id": "v_MBOEmHelKwvykVZ8JcT4TE5Kla5IMJyc",
                            "related_object_type": "voucher",
                            "created_at": "2022-02-17T09:05:34.642Z",
                            "object": "validation_rules_assignment"
                          }
                        ],
                        "total": 1
                      },
                      "redemption": {
                        "quantity": 10,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/welcome/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/welcome/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Gift Card": {
                    "value": {
                      "id": "v_7xaObxyK5LG62Rp0Xqpez7lqiBFL62pL",
                      "code": "welcomegiftcard",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "New Customers",
                      "type": "GIFT_VOUCHER",
                      "discount": null,
                      "gift": {
                        "amount": 10000,
                        "balance": 10000,
                        "effect": "APPLY_TO_ORDER"
                      },
                      "loyalty_card": null,
                      "start_date": "2022-01-01T00:00:00.000Z",
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": true,
                      "additional_info": "This gift card is enabled immediately upon creation.",
                      "metadata": {
                        "test": true,
                        "locale": "de-en"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX1+mTbI2MdzBdMJ7AsOPKvGGgRB7O4oHZv5qq8I3M/OBPJm4PV8bTtBgR+oXOU4Jv1ucbIV7yg1mzC86LVFKjO7Ptnj+63mS9QdHvvILEAulBuZZQ+hZ0HmFXjDl4Quz/kUqGwffKGTziQ==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX184KgQ11OfpqB4WkJuH9ushSwZb0YrcN+8OaGPHxBQMiBr2axwnvQlZYv6YhqWtnc5iHByHrkg+6qYHxOLBPRMWCysIhcuUEB57IDhgYUHRPyM2bWjQadVHngGfVGCQ0CUy4PO/71RdMw==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-17T09:09:49.665Z",
                      "updated_at": null,
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "redeemed_amount": 0,
                        "object": "list",
                        "url": "/v1/vouchers/welcomegiftcard/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/welcomegiftcard/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Loyalty Card": {
                    "value": {
                      "id": "v_l84t3fy3keMUiOeaHbN1cbTdW8O5eUlm",
                      "code": "welcomeloyalty",
                      "campaign": "Loyalty Campaign",
                      "campaign_id": "camp_E87CubZLZ8eoQt3c4kAEZsx0",
                      "category": "New Customers",
                      "type": "LOYALTY_CARD",
                      "discount": null,
                      "gift": null,
                      "loyalty_card": {
                        "points": 10000,
                        "balance": 10000
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": true,
                      "additional_info": "This loyalty card is enabled immediately upon creation.",
                      "metadata": {
                        "test": true,
                        "locale": "de-en"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX186PCWooyrNsjfI+nb+Y9ziUZ1k7xe+nJQ53Ms1ynNJOX6JXC6SwxS1WDhYwAKX5FxaDoKyuPf5MkQrkeB6u5bSx333ldAyLypNnqwBD2N17S64WFnTqV7eXUk3hS30wDYcz0cQAJFDcQ==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1/FWUg0RbOU7R7Zqg7/8Ba6oYuXrmIl7EdXGgaPMPfpePNGRzxBu4LP2dNEUO9h1Sh37MR1PxOoaemPwlgTDo/1G8dX1JjSppNoaTHhkzk2w4yutNhP7o8cq3ZBbT3TNMTKb2H3fUMc7A==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-17T09:12:01.428Z",
                      "updated_at": null,
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "redeemed_points": 0,
                        "object": "list",
                        "url": "/v1/vouchers/welcomeloyalty/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/welcomeloyalty/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Amount Discount with Formula": {
                    "value": {
                      "id": "v_pmjVYKEDFzMqwNroHTlFcI1yKLqUcVVS",
                      "code": "amount1",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "First",
                      "category_id": "cat_0bb343dee3cdb5ec0c",
                      "categories": [
                        {
                          "id": "cat_0bb343dee3cdb5ec0c",
                          "name": "First",
                          "hierarchy": 1,
                          "created_at": "2022-09-16T11:47:19.568Z",
                          "object": "category"
                        }
                      ],
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "AMOUNT",
                        "amount_off": 100,
                        "amount_off_formula": "IF(CUSTOMER_METADATA(\"favorite_brands\") contains \"Nike\";20;CUSTOMER_METADATA(\"age\"))",
                        "effect": "APPLY_TO_ORDER"
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2020-01-01T00:00:00.000Z",
                      "expiration_date": "2022-12-31T23:59:59.000Z",
                      "validity_timeframe": {
                        "interval": "P2D",
                        "duration": "PT1H"
                      },
                      "validity_day_of_week": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "active": true,
                      "additional_info": "This voucher can be used with other coupons.",
                      "metadata": {
                        "Season": "Spring"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX1+aMFY2yoGxlWkhulvTPR8RlMZtfOaWXnL6PCnegsV73aCTsue+JlUrQsbh+dmp2gJigaVixgvyC7/zUxQjf8tnVT4R79G4LmUkltHMqHsaf++fsP1G07nDl9/2WHh/QVb6z4KP/DX5Dw==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1+X2OimwSCEmGvGrZXXK+b4OrStQELVsHRup8Su+uISCOBz7xWdbpoLVJlSFepcRxSNUUdjcbpgKH7YNfaclrta8Ig6/GK/4YFlh0cPKCGOG5WWyXWzxxmVgVqRdI7KR8/hdaq2FCQeWA==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-19T14:22:50.552Z",
                      "updated_at": null,
                      "redemption": {
                        "quantity": 100,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/amount1/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/amount1/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Percent Discount with Formula": {
                    "value": {
                      "id": "v_9PbXndxO3S8xfztwMtIvuMXReonF248m",
                      "code": "percent1",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "First",
                      "category_id": "cat_0bb343dee3cdb5ec0c",
                      "categories": [
                        {
                          "id": "cat_0bb343dee3cdb5ec0c",
                          "name": "First",
                          "hierarchy": 1,
                          "created_at": "2022-09-16T11:47:19.568Z",
                          "object": "category"
                        }
                      ],
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "PERCENT",
                        "amount_limit": 1700,
                        "percent_off": 40,
                        "percent_off_formula": "IF(CUSTOMER_METADATA(\"favorite_brands\") contains \"Nike\";20;CUSTOMER_METADATA(\"age\"))",
                        "effect": "APPLY_TO_ORDER"
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2020-01-01T00:00:00.000Z",
                      "expiration_date": "2022-12-31T23:59:59.000Z",
                      "validity_timeframe": {
                        "interval": "P2D",
                        "duration": "PT1H"
                      },
                      "validity_day_of_week": [
                        0,
                        1
                      ],
                      "active": true,
                      "additional_info": "This voucher can be used with other coupons.",
                      "metadata": {
                        "Season": "Fall"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX19MPtNCPjoG/pKloolK+BZH/OCIpjYqj+B6IVJJmTYKeBINcB0JioL/tSw3iuK4FvgF8VyDyTfL26IpzbT81DDOnKeFIDUJraQDJiKxWcrG/RCFsVky4olBJ+GZFb9pLpN5gC/rn0pqYw==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1/J73XXWgMf2BsVM21kpnFLQak5dpGzThYNTYPT62U6q+5RDlh/CXylkTrhegRnWJw1HA7iehT8iUoV4M4cV0KBdp5WgJ3lXeFZcpX3Mpu0T02PRcYbdCIiSO1kO50Y8Hg/heHcshw22Q==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-19T14:41:30.976Z",
                      "updated_at": null,
                      "redemption": {
                        "quantity": 101,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/percent1/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/percent1/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if a voucher code already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Duplicate Code": {
                    "value": {
                      "code": 409,
                      "key": "duplicate_found",
                      "message": "Duplicated resource found",
                      "details": "Duplicated voucher exists with id CODE",
                      "request_id": "v-0ae786a8f786b73dfa",
                      "resource_id": "CODE",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/{code}/enable": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCode"
          },
          "name": "code",
          "in": "path",
          "description": "A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. `v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u`.",
          "required": true
        }
      ],
      "post": {
        "operationId": "enable-voucher",
        "tags": [
          "Vouchers"
        ],
        "summary": "Enable Voucher",
        "description": "The method sets the voucher state to **active**. The voucher can be redeemed - only if the redemption occurs after the start date and the voucher is not expired.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a voucher object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersEnableResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u",
                      "code": "2CpRCE2c",
                      "campaign": null,
                      "campaign_id": null,
                      "category": null,
                      "category_id": null,
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "AMOUNT",
                        "amount_off": 300,
                        "effect": "APPLY_TO_ITEMS_PROPORTIONALLY"
                      },
                      "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": "U2FsdGVkX1+ro/6HLsfI9E/rz0QEoYv+rcVIEERdbV3gB4104zYyGfpydtSxS1WfpbuiDUfMizQAl1EMzoYsud5XTKBBwUkGkI5IPl84lPz+WQtg4nKpjUS0wcA7AuIbz2zb870YfJO/r5UBS5gCqQ==",
                          "url": "{{internalVoucherifyURL}}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX19SWjP3ZUbFh26gCGb4xm3K95jhzfk1XXlKcYlHPtDTYR3/4dYbig4xxRmkgpQLa93Woz9Hq3h4JBQ+aTlftkEzL4D4OSAWi1aWlfxVikrJd6TMFLh9mmbmskodjs4MIdOFlluDWyarlw==",
                          "url": "{{internalVoucherifyURL}}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-19T10:06:07.932Z",
                      "updated_at": "2022-09-19T11:54:17.248Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [
                          {
                            "id": "asgm_HesdqEzt5e9c0T56",
                            "rule_id": "val_gZft0NKZSUWK",
                            "related_object_id": "v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u",
                            "related_object_type": "voucher",
                            "created_at": "2022-09-19T10:06:07.934Z",
                            "object": "validation_rules_assignment"
                          }
                        ],
                        "total": 1
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/2CpRCE2c/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/2CpRCE2c/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the voucher code does not exist or has been deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id IrKORhS",
                      "request_id": "v-0a96cd820301c0483a",
                      "resource_id": "IrKORhS",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/{code}/disable": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCode"
          },
          "name": "code",
          "in": "path",
          "required": true,
          "description": "A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. `v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u`."
        }
      ],
      "post": {
        "operationId": "disable-voucher",
        "tags": [
          "Vouchers"
        ],
        "summary": "Disable Voucher",
        "description": "This method sets the voucher state to **inactive**. The voucher cannot be redeemed.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a voucher object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersDisableResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u",
                      "code": "2CpRCE2c",
                      "campaign": null,
                      "campaign_id": null,
                      "category": null,
                      "category_id": null,
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "AMOUNT",
                        "amount_off": 300,
                        "effect": "APPLY_TO_ITEMS_PROPORTIONALLY"
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": null,
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": false,
                      "additional_info": null,
                      "metadata": {},
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX1+ro/6HLsfI9E/rz0QEoYv+rcVIEERdbV3gB4104zYyGfpydtSxS1WfpbuiDUfMizQAl1EMzoYsud5XTKBBwUkGkI5IPl84lPz+WQtg4nKpjUS0wcA7AuIbz2zb870YfJO/r5UBS5gCqQ==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX19SWjP3ZUbFh26gCGb4xm3K95jhzfk1XXlKcYlHPtDTYR3/4dYbig4xxRmkgpQLa93Woz9Hq3h4JBQ+aTlftkEzL4D4OSAWi1aWlfxVikrJd6TMFLh9mmbmskodjs4MIdOFlluDWyarlw==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-19T10:06:07.932Z",
                      "updated_at": "2022-09-19T11:53:23.452Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [
                          {
                            "id": "asgm_HesdqEzt5e9c0T56",
                            "rule_id": "val_gZft0NKZSUWK",
                            "related_object_id": "v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u",
                            "related_object_type": "voucher",
                            "created_at": "2022-09-19T10:06:07.934Z",
                            "object": "validation_rules_assignment"
                          }
                        ],
                        "total": 1
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/2CpRCE2c/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/2CpRCE2c/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the voucher code does not exist or has been deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id IrKORhS",
                      "request_id": "v-0a96cd820301c0483a",
                      "resource_id": "IrKORhS",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/{code}/balance": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCode"
          },
          "name": "code",
          "in": "path",
          "required": true,
          "description": "A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. `v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u`."
        }
      ],
      "post": {
        "operationId": "update-voucher-balance",
        "tags": [
          "Vouchers"
        ],
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "summary": "Adjust Voucher Balance",
        "description": "Add balance to an existing gift card or loyalty card. For loyalty cards, it must be assigned to a holder.",
        "requestBody": {
          "required": true,
          "description": "Provide the amount to be added to/subtracted from the voucher.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VouchersBalanceUpdateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "amount": 10000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a balance object if the operation succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersBalanceUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "amount": 10000,
                      "total": 20100,
                      "balance": 20100,
                      "type": "gift_voucher",
                      "object": "balance",
                      "related_object": {
                        "type": "voucher",
                        "id": "v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the voucher code does not exist or has been deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id IrKORhS",
                      "request_id": "v-0a96cd820301c0483a",
                      "resource_id": "IrKORhS",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/{code}/transactions": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCode"
          },
          "name": "code",
          "in": "path",
          "required": true,
          "description": "A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. `v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u`."
        }
      ],
      "get": {
        "operationId": "list-voucher-transactions",
        "tags": [
          "Vouchers"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListTransactions"
            },
            "in": "query",
            "name": "order",
            "description": "Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "starting_after_id",
            "description": "A cursor for pagination. It retrieves the transactions starting after a transaction with the given ID."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "summary": "List Voucher Transactions",
        "description": "List transactions that are associated with credit movements on a gift card or loyalty card.",
        "responses": {
          "200": {
            "description": "Returns a dictionary of transaction objects",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersTransactionsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "vtx_0c9dccc4d5813e71bd",
                          "source_id": "20230317_subtract_1",
                          "voucher_id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                          "campaign_id": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
                          "source": "API",
                          "reason": "Subtracting credits from card",
                          "type": "CREDITS_REMOVAL",
                          "details": {
                            "balance": {
                              "type": "gift_voucher",
                              "total": 128020,
                              "amount": -2000,
                              "object": "balance",
                              "balance": 121020,
                              "related_object": {
                                "id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                                "type": "voucher"
                              }
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-17T15:50:00.786Z"
                        },
                        {
                          "id": "vtx_0c9dcc920ac0e9ef82",
                          "source_id": "20230317_add_1",
                          "voucher_id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                          "campaign_id": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
                          "source": "API",
                          "reason": "Adding more points to card",
                          "type": "CREDITS_ADDITION",
                          "details": {
                            "balance": {
                              "type": "gift_voucher",
                              "total": 130020,
                              "amount": 20,
                              "object": "balance",
                              "balance": 123020,
                              "related_object": {
                                "id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                                "type": "voucher"
                              }
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-17T15:49:08.768Z"
                        },
                        {
                          "id": "vtx_0c94f018d30bef6689",
                          "source_id": "HRwc0oHz_reward",
                          "voucher_id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                          "campaign_id": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
                          "source": "voucherify-web-ui",
                          "reason": "cash reward",
                          "type": "CREDITS_ADDITION",
                          "details": {
                            "balance": {
                              "type": "gift_voucher",
                              "total": 130000,
                              "amount": 2000,
                              "object": "balance",
                              "balance": 123000,
                              "related_object": {
                                "id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                                "type": "voucher"
                              }
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-10T18:38:02.055Z"
                        },
                        {
                          "id": "vtx_0c94edbbaccbef5db6",
                          "source_id": null,
                          "voucher_id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                          "campaign_id": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
                          "source": null,
                          "reason": null,
                          "type": "CREDITS_REFUND",
                          "details": {
                            "balance": {
                              "type": "gift_voucher",
                              "total": 128000,
                              "amount": 44,
                              "object": "balance",
                              "balance": 121000,
                              "related_object": {
                                "id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                                "type": "voucher"
                              }
                            },
                            "order": {
                              "id": "ord_jj5EzDxDOd2xFPsAJJ18IaZK",
                              "source_id": null
                            },
                            "redemption": {
                              "id": "r_0c94ed583fcafc31c1"
                            },
                            "rollback": {
                              "id": "rr_0c94edbb8d0bef5d9e"
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-10T18:27:42.389Z"
                        },
                        {
                          "id": "vtx_0c94ed584f4afc31da",
                          "source_id": null,
                          "voucher_id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                          "campaign_id": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
                          "source": null,
                          "reason": null,
                          "type": "CREDITS_REDEMPTION",
                          "details": {
                            "balance": {
                              "type": "gift_voucher",
                              "total": 128000,
                              "amount": -44,
                              "object": "balance",
                              "balance": 120956,
                              "related_object": {
                                "id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                                "type": "voucher"
                              }
                            },
                            "order": {
                              "id": "ord_jj5EzDxDOd2xFPsAJJ18IaZK",
                              "source_id": null
                            },
                            "redemption": {
                              "id": "r_0c94ed583fcafc31c1"
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-10T18:26:00.640Z"
                        },
                        {
                          "id": "vtx_0c94e9432c4afc2134",
                          "source_id": "HRwc0oHz_removal",
                          "voucher_id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                          "campaign_id": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
                          "source": "voucherify-web-ui",
                          "reason": "removal",
                          "type": "CREDITS_REMOVAL",
                          "details": {
                            "balance": {
                              "type": "gift_voucher",
                              "total": 128000,
                              "amount": -2000,
                              "object": "balance",
                              "balance": 121000,
                              "related_object": {
                                "id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                                "type": "voucher"
                              }
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-10T18:08:10.413Z"
                        },
                        {
                          "id": "vtx_0c94e8100f8afc1c6c",
                          "source_id": null,
                          "voucher_id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                          "campaign_id": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
                          "source": null,
                          "reason": null,
                          "type": "CREDITS_REDEMPTION",
                          "details": {
                            "balance": {
                              "type": "gift_voucher",
                              "total": 130000,
                              "amount": -7000,
                              "object": "balance",
                              "balance": 123000,
                              "related_object": {
                                "id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                                "type": "voucher"
                              }
                            },
                            "order": {
                              "id": "ord_qZX3pEt5rFf5W23qRMDQcVt9",
                              "source_id": null
                            },
                            "redemption": {
                              "id": "r_0c94e80fda4afc1c59"
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-10T18:02:55.935Z"
                        },
                        {
                          "id": "vtx_0c94e6b82a4bef406c",
                          "source_id": "walmart",
                          "voucher_id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                          "campaign_id": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
                          "source": "voucherify-web-ui",
                          "reason": "return",
                          "type": "CREDITS_ADDITION",
                          "details": {
                            "balance": {
                              "type": "gift_voucher",
                              "total": 130000,
                              "amount": 5000,
                              "object": "balance",
                              "balance": 130000,
                              "related_object": {
                                "id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                                "type": "voucher"
                              }
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-10T17:57:03.758Z"
                        }
                      ],
                      "has_more": true,
                      "more_starting_after": "vtx_0c94e6b82a4bef406c"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the voucher code does not exist or has been deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id IrKORhS",
                      "request_id": "v-0a96cd820301c0483a",
                      "resource_id": "IrKORhS",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/{code}/transactions/export": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCode"
          },
          "example": "GIFT-CARD-1",
          "name": "code",
          "in": "path",
          "required": true,
          "description": "A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. `v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u`."
        }
      ],
      "post": {
        "operationId": "export-voucher-transactions",
        "tags": [
          "Vouchers"
        ],
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "summary": "Export Voucher Transactions",
        "description": "Export transactions that are associated with credit movements on a gift card or loyalty card.\n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| id | Unique transaction ID. | vtx_0cb7811f1c07765800 |\n| type | Transaction type. | - `CREDITS_REMOVAL` <br /> - `CREDITS_ADDITION` <br /> - `CREDITS_REFUND` <br /> - `CREDITS_REDEMPTION` <br /> - `POINTS_ACCRUAL` <br /> - `POINTS_REDEMPTION`<br /> - `POINTS_REFUND`<br /> - `POINTS_ADDITION`<br /> - `POINTS_REMOVAL`<br /> - `POINTS_EXPIRATION`<br /> - `POINTS_TRANSFER_IN`<br /> - `POINTS_TRANSFER_OUT` |\n| source_id | Unique transaction source ID. | 8638 |\n| reason | Contains the reason for the transaction if one was included originally. |  |\n| balance | The gift card or loyalty card balance after the transaction. |  |\n| amount | The amount of gift card or loyalty card credits being allocated during the transaction. This value can either be negative or positive depending on the nature of the transaction. |  |\n| created_at | Timestamp in ISO 8601 format representing the date and time when the transaction was created. | 2022-03-09T09:16:32.521Z  |\n| voucher_id | Unique Voucher ID. | v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp |\n| campaign_id | Parent campaign ID. | camp_FNYR4jhqZBM9xTptxDGgeNBV |\n| source|  Channel through which the transaction was initiated. | API |\n| details | More detailed information stored in the form of a JSON. | Provides more details related to the transaction in the form of an object. |\n| related_transaction_id | Unique transaction ID related to a receiver/donor card in the case of a points transfer from/to another card. | vtx_0c9afe802593b34b80 |",
        "requestBody": {
          "description": "Specify the parameters for the camapign transaction export.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VouchersTransactionsExportCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "parameters": {
                      "order": "-created_at",
                      "fields": [
                        "id",
                        "type",
                        "source_id",
                        "reason",
                        "balance",
                        "amount",
                        "created_at",
                        "voucher_id",
                        "campaign_id",
                        "details",
                        "source"
                      ]
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns an export object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersTransactionsExportCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "exp_ARi2UbRjgfrHQJoVcKFrBUgA",
                      "object": "export",
                      "created_at": "2023-05-16T08:30:21.496Z",
                      "status": "SCHEDULED",
                      "channel": "API",
                      "exported_object": "voucher_transactions",
                      "parameters": {
                        "order": "-created_at",
                        "fields": [
                          "id",
                          "type",
                          "source_id",
                          "reason",
                          "balance",
                          "amount",
                          "created_at",
                          "voucher_id",
                          "campaign_id",
                          "details",
                          "related_transaction_id",
                          "source"
                        ],
                        "filters": {
                          "voucher_id": {
                            "conditions": {
                              "$in": [
                                "HRwc0oHz"
                              ]
                            }
                          }
                        }
                      },
                      "result": null,
                      "user_id": null
                    }
                  },
                  "No request body": {
                    "value": {
                      "id": "exp_ExEE5A6OIK4tssuNswr5O6SU",
                      "object": "export",
                      "created_at": "2023-03-21T13:34:57.034Z",
                      "status": "SCHEDULED",
                      "channel": "API",
                      "exported_object": "voucher_transactions",
                      "parameters": {
                        "filters": {
                          "voucher_id": {
                            "conditions": {
                              "$in": [
                                "HRwc0oHz"
                              ]
                            }
                          }
                        }
                      },
                      "result": null,
                      "user_id": null
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the voucher code does not exist or has been deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id IrKORhS",
                      "request_id": "v-0a96cd820301c0483a",
                      "resource_id": "IrKORhS",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/import": {
      "post": {
        "operationId": "import-vouchers",
        "tags": [
          "Vouchers"
        ],
        "summary": "Import Vouchers",
        "description": "Import generic (standalone) vouchers and gift cards into the repository.\nYou can upload up to 100,000 codes to a campaign, as a campaign can have up to 100,000 codes by default. \n Also, the request can include up to **10 MB** of data.\n\n\n<Note>\n\n<Badge color=\"blue\">Important notes</Badge>\n\n- **Start and expiration dates** need to be provided in compliance with the ISO 8601 standard. For example, 2020-03-11T09:00:00.000Z.\n- Custom code attributes (not supported by-default) need to be added as code **metadata**.\n- You **cannot import the same codes** to a single Voucherify Project.\n\n</Note>\n\nAny parameters not provided in the payload will be left blank or null.\n\nFor both **standalone discount vouchers and gift cards**, you can import the following fields:  \n\n- code\n- category\n- active\n- type\n- start_date\n- expiration_date\n- redemption.quantity\n- additional_info\n- metadata\n\nFor **gift cards**, you can also import the following field:\n\n- gift.amount\n\nFor **discount vouchers**, you can import the `discount` object. The object will slightly vary depending on the type of discount. Each discount type **requires** the `type` to be defined in the import.\n\n| **Discount Type** | **Required fields** |\n|:---|:---|\n| Amount | amount_off, effect |\n| Percent | percent_off, effect |\n| Fixed | fixed_amount, effect |\n| Unit - One item | unit_off, unit_type, effect |\n| Unit - Multiple items | unit_off, unit_type, effect |\n| Shipping | unit_off, unit_type, effect |\n\nFields other than the ones listed above won't be imported. Even if provided, they will be silently skipped.\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](/api-reference/async-actions/get-async-action).\n\n<Warning>\n\n<Badge color=\"yellow\">Standalone Vouchers and Campaigns</Badge>\n\nGeneric (standalone) vouchers created through the Voucherify dashboard always create a campaign for that voucher. However, vouchers imported through the dashboard in the Vouchers section or through the API do not have a campaign attached, so the values for `campaign` and `campaign_id` are `null`.\n\nTo create a generic (standalone) voucher with a `\"type\": \"STANDALONE\"`, use the [POST Create campaign](/api-reference/campaigns/create-campaign) endpoint.\n\n</Warning>",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The request body is an array of objects. Each object contains details about a specific voucher. ",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VouchersImportCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": [
                    {
                      "code": "PROMO-CODE30OFF-NO-EFFECT",
                      "category": "new customer acquisition",
                      "type": "DISCOUNT_VOUCHER",
                      "active": true,
                      "discount": {
                        "amount_off": 3000,
                        "type": "AMOUNT"
                      },
                      "start_date": "2020-12-01T23:00:00Z",
                      "expiration_date": "2023-12-19T23:00:00Z",
                      "redemption": {
                        "quantity": 1
                      },
                      "metadata": {
                        "unit": "EUR"
                      },
                      "additional_info": "secret-code1"
                    },
                    {
                      "code": "PROMO-CODE30-PERCENT-NO-EFFECT",
                      "type": "DISCOUNT_VOUCHER",
                      "active": false,
                      "discount": {
                        "percent_off": 30,
                        "type": "PERCENT"
                      },
                      "start_date": "2020-12-10T23:00:00Z",
                      "expiration_date": "2023-12-31T23:00:00Z",
                      "redemption": {
                        "quantity": 1
                      },
                      "metadata": {
                        "unit": "EUR"
                      },
                      "additional_info": "secret-code2"
                    },
                    {
                      "code": "GIFT-CARD-100",
                      "type": "GIFT_VOUCHER",
                      "active": true,
                      "category": "new customer acquisition",
                      "gift": {
                        "amount": 10000
                      },
                      "start_date": "2020-12-10T23:00:00Z",
                      "expiration_date": "2023-12-31T23:00:00Z",
                      "redemption": {
                        "quantity": 5
                      },
                      "metadata": {
                        "unit": "EUR"
                      },
                      "additional_info": "secret-GIFT-code2"
                    },
                    {
                      "code": "PROMO-CODE1-PERCENT-EFFECT-ORDER",
                      "type": "DISCOUNT_VOUCHER",
                      "active": false,
                      "discount": {
                        "percent_off": 30,
                        "type": "PERCENT",
                        "effect": "APPLY_TO_ORDER"
                      },
                      "start_date": "2020-12-10T23:00:00Z",
                      "expiration_date": "2023-12-31T23:00:00Z",
                      "redemption": {
                        "quantity": 1
                      },
                      "metadata": {
                        "unit": "EUR"
                      },
                      "additional_info": "secret-code2"
                    },
                    {
                      "code": "PROMO-CODE2-PERCENT-EFFECT-ITEM",
                      "type": "DISCOUNT_VOUCHER",
                      "active": false,
                      "discount": {
                        "percent_off": 30,
                        "type": "PERCENT",
                        "effect": "APPLY_TO_ITEMS"
                      },
                      "start_date": "2020-12-10T23:00:00Z",
                      "expiration_date": "2023-12-31T23:00:00Z",
                      "redemption": {
                        "quantity": 1
                      },
                      "metadata": {
                        "unit": "EUR"
                      },
                      "additional_info": "secret-code2"
                    },
                    {
                      "code": "PROMO-CODE1-PERCENT-NO-EFFECT-REDEEMED-QUANTITY-ATTRIBUTE-DOESNT-GET-PASSED",
                      "type": "DISCOUNT_VOUCHER",
                      "active": false,
                      "discount": {
                        "percent_off": 30,
                        "type": "PERCENT"
                      },
                      "start_date": "2020-12-10T23:00:00Z",
                      "expiration_date": "2023-12-31T23:00:00Z",
                      "redemption": {
                        "quantity": 1,
                        "redeemed_quantity": 1
                      },
                      "metadata": {
                        "unit": "EUR"
                      },
                      "additional_info": "secret-code2"
                    },
                    {
                      "code": "PROMO-CODE1-AMOUNT-EFFECT-ITEMS-PROPORTIONALLY",
                      "type": "DISCOUNT_VOUCHER",
                      "active": false,
                      "discount": {
                        "amount_off": 30,
                        "type": "AMOUNT",
                        "effect": "APPLY_TO_ITEMS_PROPORTIONALLY"
                      },
                      "start_date": "2020-12-10T23:00:00Z",
                      "expiration_date": "2023-12-31T23:00:00Z",
                      "redemption": {
                        "quantity": 1
                      },
                      "metadata": {
                        "unit": "EUR"
                      },
                      "additional_info": "secret-code2"
                    },
                    {
                      "code": "PROMO-CODE1-FIXED-EFFECT-ORDER",
                      "type": "DISCOUNT_VOUCHER",
                      "active": false,
                      "discount": {
                        "fixed_amount": 30,
                        "type": "FIXED",
                        "effect": "APPLY_TO_ORDER"
                      },
                      "start_date": "2020-12-10T23:00:00Z",
                      "expiration_date": "2023-12-31T23:00:00Z",
                      "redemption": {
                        "quantity": 1
                      },
                      "metadata": {
                        "unit": "EUR"
                      },
                      "additional_info": "secret-code2"
                    },
                    {
                      "code": "PROMO-CODE1-UNIT-SINGLE-ITEM-EFFECT-MISSING",
                      "type": "DISCOUNT_VOUCHER",
                      "active": false,
                      "discount": {
                        "unit_off": 1,
                        "unit_type": "prod_0a9f9aeddb019a42db",
                        "type": "UNIT",
                        "effect": "ADD_MISSING_ITEMS"
                      },
                      "start_date": "2020-12-10T23:00:00Z",
                      "expiration_date": "2023-12-31T23:00:00Z",
                      "redemption": {
                        "quantity": 1
                      },
                      "metadata": {
                        "unit": "EUR"
                      },
                      "additional_info": "secret-code2"
                    },
                    {
                      "code": "PROMO-CODE2-UNIT-MULTIPLE-ITEMS",
                      "type": "DISCOUNT_VOUCHER",
                      "active": true,
                      "discount": {
                        "type": "UNIT",
                        "effect": "ADD_MANY_ITEMS",
                        "units": [
                          {
                            "unit_off": 1,
                            "unit_type": "prod_0a9f9aeddb019a42db",
                            "effect": "ADD_MISSING_ITEMS"
                          },
                          {
                            "unit_off": 1,
                            "unit_type": "prod_0a9f9aeddb019a42db",
                            "effect": "ADD_NEW_ITEMS"
                          }
                        ]
                      },
                      "start_date": "2020-12-10T23:00:00Z",
                      "expiration_date": "2023-12-31T23:00:00Z",
                      "redemption": {
                        "quantity": 1
                      },
                      "metadata": {
                        "unit": "EUR"
                      },
                      "additional_info": "secret-code2"
                    },
                    {
                      "code": "PROMO-CODE1-SHIPPING",
                      "type": "DISCOUNT_VOUCHER",
                      "active": false,
                      "discount": {
                        "type": "UNIT",
                        "unit_off": 1,
                        "unit_type": "prod_5h1pp1ng",
                        "effect": "ADD_MISSING_ITEMS"
                      },
                      "start_date": "2020-12-10T23:00:00Z",
                      "expiration_date": "2023-12-31T23:00:00Z",
                      "redemption": {
                        "quantity": 1
                      },
                      "metadata": {
                        "unit": "EUR"
                      },
                      "additional_info": "secret-code2"
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Returns ID of the scheduled async action. The response informs you that your request has been accepted and vouchers will be added to the repository asynchronously. To check the import status and result, copy the `async_action_id` from the response and pass it using the [Get Async Action](/api-reference/async-actions/get-async-action) endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersImportCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "async_action_id": "aa_0aac93c6af84485df3"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/importCSV": {
      "post": {
        "operationId": "import-vouchers-using-csv",
        "tags": [
          "Vouchers"
        ],
        "summary": "Import Vouchers using CSV",
        "description": "Import generic (standalone) vouchers into the repository using a CSV file.\n\nThe CSV file has to include headers in the first line. All properties listed in the file headers that cannot be mapped to standard voucher fields will be added to the metadata object.\nYou can upload up to 100,000 codes to a campaign, as a campaign can have up to 100,000 codes by default. \n Also, the request can include a max. **10 MB** CSV file.\n\nYou can find an example CSV file [here](/build/discount-code-import).\n___\n\n```cURL cURL example\ncurl -X **POST** \\\n  https://api.voucherify.io/v1/vouchers/importCSV \\\n  -F file=@/path/to/vouchers.csv \\\n  -F webhooks_enable=true\\\n  -H \"X-App-Id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\" \\\n  -H \"X-App-Token: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\n```\n\n\n\n<Note>\n\n<Badge color=\"blue\">Standard voucher fields mapping</Badge>\n\n- Go to the [import vouchers](/api-reference/vouchers/import-vouchers) endpoint to see all standard CSV fields description (body params section).\n- Supported CSV file headers: Code,Voucher Type,Value,Discount Type,Category,Start Date,Expiration Date,Redemption Limit,Redeemed Quantity, Redeemed Amount,Active,Additional Info,Custom Metadata Property Name\n- **Start and expiration dates** need to be provided in compliance with the ISO 8601 standard. For example, 2020-03-11T09:00:00.000Z.\n   - `YYYY-MM-DD`\n   - `YYYY-MM-DDTHH`\n   - `YYYY-MM-DDTHH:mm`\n   - `YYYY-MM-DDTHH:mm:ss`\n   - `YYYY-MM-DDTHH:mm:ssZ`\n   - `YYYY-MM-DDTHH:mm:ssZ`\n   - `YYYY-MM-DDTHH:mm:ss.SSSZ`\n- Custom code attributes (not supported by-default) need to be added as code **metadata**.\n- You **cannot import the same codes** to a single Voucherify project.\n- You can, however, upload the same codes to update them.\n\n</Note>\n\n\n\n<Note>\n\n<Badge color=\"blue\">Categories</Badge>\n\nIn the structure representing your data, you can define a category that the voucher belongs to. You can later use the category of a voucher to group and search by specific criteria in the Dashboard and using the [List Vouchers](/api-reference/vouchers/list-vouchers) endpoint.\n\n</Note>\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](/api-reference/async-actions/get-async-action).\n\nYou can pass the `webhooks_enable=true` parameter to trigger a webhook sendout for created or updated vouchers. Configure the [respective webhooks](/api-reference/introduction-to-webhooks) in Project settings. For updated webhooks, a webhook is sent even if the voucher hasn't been changed in the CSV file.\n\n<Warning>\n\n<Badge color=\"yellow\">Generic (standalone) vouchers and campaigns</Badge>\n\nGeneric (standalone) vouchers created through the Voucherify dashboard always create a campaign for that voucher. However, vouchers imported through the dashboard in the Vouchers section or through the API do not have a campaign attached, so the values for `campaign` and `campaign_id` are `null`.\n\n</Warning>",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "requestBody": {
          "description": "The file path is stored in the form `file` header.",
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/VouchersImportCSVRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Returns ID of the scheduled async action. The response informs you that your request has been accepted and vouchers will be added to the repository asynchronously. To check the import status and result, copy the `async_action_id` from the **response** and pass it using the [Get Async Action](/api-reference/async-actions/get-async-action) endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersImportCsvCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "async_action_id": "aa_0a875d56c805df6601"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload. You may receive this error if you have incorrectly or have not specified the content type as `multipart/form-data` in the headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Payload should have required property 'file'",
                      "request_id": "74e4bb71-5b6d-49b9-98eb-239691c9d67a"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/bulk/async": {
      "post": {
        "operationId": "update-vouchers-in-bulk",
        "tags": [
          "Vouchers"
        ],
        "summary": "Update Vouchers in Bulk",
        "description": "Updates specific metadata parameters for each code, respectively, in one asynchronous operation.\n\nThe request can include up to **10 MB** of data.\n\nUpserts are not supported.\n\n<Warning>\n\nCurrently, only **metadata** updates are supported.\n\n</Warning>\n\nThe response returns a unique asynchronous action ID. Use this ID in the query paramater of the [GET Async Action](/api-reference/async-actions/get-async-action) endpoint to check, e.g.:\n\n- The status of your request (in queue, in progress, done, or failed)\n\n- Resources that failed to be updated\n\n- The report file with details about the update\n\n\n\nThis API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "List the codes to be updated with the metadata key/value pairs for that code.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VouchersUpdateInBulkRequestBody"
              },
              "examples": {
                "Example": {
                  "value": [
                    {
                      "code": "example_code",
                      "metadata": {
                        "lang": "en",
                        "test": false,
                        "MetadataTest": "Update metadata",
                        "update_value": 1,
                        "next_update_date": "2022-11-11T09:00:00.000Z"
                      }
                    },
                    {
                      "code": "example_code2",
                      "metadata": {
                        "lang": "pl",
                        "test": false,
                        "MetadataTest": "Update metadata",
                        "update_value": 2
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Returns the ID of the scheduled asynchronous action. The response informs you that the request has been accepted and the resources will be updated in the repository asynchronously. To check the status and result, copy the `async_action_id` from the response and use it as a query parameter in the [GET Async Action](/api-reference/async-actions/get-async-action) endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersUpdateInBulkResponseBody"
                },
                "examples": {
                  "Example": {
                    "$ref": "#/components/examples/res_async_actions"
                  }
                }
              }
            }
          },
          "413": {
            "description": "Returns an error if the payload exceeds 10 MB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                },
                "examples": {
                  "Request Entity Too Large": {
                    "value": {
                      "statusCode": 413,
                      "error": "Request Entity Too Large",
                      "message": "Payload content length greater than maximum allowed: 10485760"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/metadata/async": {
      "post": {
        "operationId": "update-vouchers-metadata-in-bulk",
        "tags": [
          "Vouchers"
        ],
        "summary": "Update Vouchers' Metadata in Bulk",
        "description": "Updates metadata parameters for a list of codes. Every resource in the list will receive the metadata defined in the request.\n\nThe request can include up to **10 MB** of data.\n\nUpserts are not supported.\n\nThe response returns a unique asynchronous action ID. Use this ID in the query paramater of the [GET Async Action](/api-reference/async-actions/get-async-action) endpoint to check, e.g.:\n\n- The status of your request (in queue, in progress, done, or failed)\n\n- Resources that failed to be updated\n\n- The report file with details about the update\n\n\n\nThis API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "List the `codes` of the vouchers you would like to update with the metadata key/value pairs.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VouchersMetadataUpdateInBulkRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "codes": [
                      "PROMO-CODE810",
                      "PROMO-CODE726"
                    ],
                    "metadata": {
                      "lang": "en",
                      "authorized_internally": true
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Returns the ID of the scheduled asynchronous action. The response informs you that the request has been accepted and the resources will be updated in the repository asynchronously. To check the status and result, copy the `async_action_id` from the response and use it as a query parameter in the [GET Async Action](/api-reference/async-actions/get-async-action) endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersMetadataUpdateInBulkResponseBody"
                },
                "examples": {
                  "Example": {
                    "$ref": "#/components/examples/res_async_actions"
                  }
                }
              }
            }
          },
          "413": {
            "description": "Returns an error if the payload exceeds 10 MB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                },
                "examples": {
                  "Request Entity Too Large": {
                    "value": {
                      "statusCode": 413,
                      "error": "Request Entity Too Large",
                      "message": "Payload content length greater than maximum allowed: 10485760"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/{code}/sessions/{sessionKey}": {
      "parameters": [
        {
          "name": "code",
          "in": "path",
          "schema": {
            "$ref": "#/components/schemas/ParameterCode"
          },
          "description": "A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify.",
          "required": true
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterString"
          },
          "example": "ssn_yQGMTeKBSw8OOuFPwlBEjzGy8d8VA9Ts",
          "name": "sessionKey",
          "in": "path",
          "required": true,
          "description": "A unique session identifier."
        }
      ],
      "delete": {
        "operationId": "release-validation-session",
        "tags": [
          "Vouchers"
        ],
        "summary": "Release Validation Session",
        "description": "Manually release a validation session that has been set up for the voucher. This method undoes the actions that are explained in the [Locking validation session](/guides/locking-validation-session) guide. \n\n<Note>\n\n<Badge color=\"blue\">Release session in the Dashboard</Badge>\n\nYou can also use the [Validations Manager](/optimize/validations-and-redemptions#sessions) in the Dashboard to unlock sessions.\n\n</Note>",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if the validation session was released successfully."
          },
          "404": {
            "description": "Returns an error if a voucher or validation session ID is not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Voucher not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id Enigma-Voucher",
                      "request_id": "v-10cba70aef56d727d0",
                      "resource_id": "Enigma-Voucher",
                      "resource_type": "voucher"
                    }
                  },
                  "Session not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find session with id Enigma-Session",
                      "request_id": "v-10cba72f7256d72803",
                      "resource_id": "Enigma-Session",
                      "resource_type": "session"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/qualification": {
      "post": {
        "operationId": "examine-vouchers-qualification",
        "deprecated": true,
        "tags": [
          "Vouchers"
        ],
        "summary": "Examine Voucher Qualification",
        "description": "\n<Danger>\n\n<Badge color=\"red\">Deprecated</Badge>\n\nThis endpoint represents the deprecated version of the API responsible for qualification, and we do not recommend using it. The new [Qualifications API](/api-reference/qualifications/check-eligibility) introduces additional features and improvements while maintaining backward compatibility. Developers are encouraged to migrate to the latest version to take advantage of the latest enhancements and bug fixes. No updates will be provided to the deprecated endpoint.\n\n</Danger>\n\nDisplay vouchers qualified to the given customer and context (e.g., order, loyalty reward). Checks up to 50 **generic (standalone) vouchers**. \n\n<Tip>\n\n<Badge color=\"green\">Prevailing assumption</Badge>\n\nYou data is synced with Voucherify.\n\n</Tip>\n\n ## How does this endpoint work? \n\n A property's value that does not meet a validation rule requirement will disqualify that particular voucher and it will not be listed in the results.\n\nAs a sample use case, you can imagine a requirement of displaying coupons available for the customer below the shopping cart. The customer can choose and apply the proposed voucher.\n\n ## What's excluded? \n\n The verification logic won't run against _coupons from bulk unique code campaigns_. For campaigns with multiple unique codes, you should run a [dedicated function](/api-reference/campaigns/examine-campaign-qualification) for searching and identifying qualified campaigns.\n\n ## Customizing the response\n\n<Note>\n\n<Badge color=\"blue\">Query parameters let you sort and filter the returned vouchers</Badge>\n\nCustomize your response:\n\n- If you only care about verifying a customer, use `audienceRulesOnly` set to `true`.\n- If you want to limit the number of vouchers to be returned from the entire pool of eligible vouchers, set a `limit`. This will return vouchers sorted by `-created_at`, by default beginning with the most recent vouchers listed at the top.\n- If you have a preference on the sorting order of the returned vouchers, you can use `order` to customize your response.\n\n</Note>\n\n ## Sending the request body payload\n\n\n ## Customer\n\nYou have the option of sending customer data via the dedicated `customer` object in the request body or a nested `customer` object within the `order` object.\n ### Available options:\n\n - You can either pass a customer `id` (Voucherify system generated),\n\n - a `source_id` (your own unique internal customer identifier e.g., email, database ID, CRM id), \n\n - a combination of the remaining parameters in the customer object, \n\n - a combination of customer `id` and remaining parameters excluding `source_id`, or\n\n - a combination of `source_id` and remaining parameters excluding `id`\n\n #### Note:\n\n For the latter two options, if you pass the `source_id` or the `id` with the other parameters, the logic will run independently for parameters explicitly passed in the request body versus those not explicitly passed in the request body. For _parameters not explicitly listed in the payload_, the verification will be against the data stored for that customer in the system. On the other hand, for any _parameter values explicitly passed in the payload_, the logic will ignore those stored in the system and will use the new values provided in the qualification request body. \n\n The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard. [Read more](/personalize/create-validation-rules). \n\n## Order\n\n  ### Available options:\n\n - You can either pass an order `id` (Voucherify system generated),\n\n - a `source_id` (your own unique internal order identifier), \n\n - a combination of the remaining parameters in the order object, \n\n - a combination of order `id` and remaining parameters excluding `source_id`, or\n\n - a combination of `source_id` and remaining parameters excluding `id`\n\n #### Note:\n\n For the latter two options, if you pass the `source_id` or the `id` with the other parameters, the logic will run independently for parameters explicitly passed in the request body versus those not explicitly passed in the request body. For _parameters not explicitly listed in the payload_, the verification will be against the data stored for that order in the system. On the other hand, for any _parameter values explicitly passed in the payload_, the logic will ignore those stored in the system and will use the new values provided in the qualification request body. \n\n The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard. [Read more](/personalize/create-validation-rules).\n\n## Guidelines:\n\nTo validate against vouchers with total order `amount` requirements, make sure to include the total order `amount` in the order object or alternatively the `amount` for _every_ order item (the application will then add each amount to get the total and perform the qualification checks). If the total order `amount` is provided along with the individual items' amounts, the total order `amount` will take precedence.\n\n\n| **Case** | **Order-Level Parameter Included** | **Item-Level Parameter Included** | **Precedence** | **Calculation Result** | **Parameter included in payload accounts for checks against requirements in these validation rules** |\n|:---:|:---:|:---:|:---:|---|---|\n| **1** | `amount` | `amount` | Order-level | Uses order-level `amount` | - Total order amount |\n| **2** |  | `amount` | Item-level | Sums each item-level `amount` | - Total order amount  <br />- subtotal of matched items |\n| **3** |  | `price`<br />`quantity` | Item-level | Multiplies each item's (`price` x `quantity`) to get item `amount` and then adds each item's `amount` to get total order `amount`  | - Total order amount<br />- Subtotal of matched items<br />- Unit price of any matching order line<br />- Price of each item/Price of any item |\n| **4** |  | `amount`  <br />`price`    <br />`quantity` | Item-level `amount` | Uses item-level `amount` for  total order `amount` calculation, ignores (`price` x `quantity`) calculation | - Total order amount (uses item `amount` if provided or `price` x `quantity` for items without `amount` property; `amount` takes precedence in case all 3 properties are provided for an item)<br />- Subtotal of matched items (uses item `amount`, takes precedence if all 3 properties are provided)<br />- Unit price of any matching order line<br />- Price of each item/Price of any item |\n| **5** | `amount` | `amount`  <br />`price`  <br />`quantity` | Order-level  | Uses order-level `amount` for total order `amount` | - Total order amount (uses order-level `amount`). <br />- Subtotal of matched items (see case **4** for details). <br />- Unit price of any matching order line  <br />- Price of each item/Price of any item |",
        "parameters": [
          {
            "$ref": "#/components/parameters/audienceRulesOnly"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterLimitExamineVouchersQualification"
            },
            "in": "query",
            "name": "limit",
            "description": "The number of vouchers to be qualified."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderExamineVouchersQualification"
            },
            "in": "query",
            "name": "order",
            "description": "Sorts the results using one of the filtering options, where the dash `-` means sorting in a descending order."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Should contain given customer and context such as an order.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/1_req_vouchers_qualification"
              },
              "examples": {
                "Example": {
                  "value": {
                    "customer": {
                      "source_id": "source-id",
                      "metadata": {
                        "key": "value"
                      }
                    },
                    "order": {
                      "amount": 10000,
                      "items": [
                        {
                          "product_id": "product-id",
                          "quantity": "1",
                          "price": 10000,
                          "related_object": "product",
                          "product": {
                            "metadata": {
                              "key": "value"
                            }
                          }
                        }
                      ]
                    },
                    "metadata": {
                      "key": "value"
                    }
                  }
                },
                "Qualify product using product_id": {
                  "value": {
                    "customer": {
                      "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                      "source_id": "firstname.lastname@mycompany.com",
                      "name": "FirstName LastName",
                      "email": "firstname.lastname@mycompany.com",
                      "phone": "string",
                      "address": {
                        "city": "New York",
                        "country": "United States of America",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {},
                      "birthdate": "YYYY-MM-DD"
                    },
                    "order": {
                      "id": "ord_gqj1QYW2j2A1E3Ula2YjdPf4",
                      "source_id": "string",
                      "amount": 10000,
                      "items": [
                        {
                          "source_id": "product_1234",
                          "product_id": "prod_0a9f9aeddb019a42db",
                          "amount": 10000,
                          "quantity": 1,
                          "price": 10000,
                          "metadata": {},
                          "related_object": "product",
                          "product": {
                            "source_id": "product_1234",
                            "name": "Phone",
                            "price": 10000,
                            "metadata": {}
                          }
                        }
                      ],
                      "customer": {
                        "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                        "source_id": "firstname.lastname@mycompany.com",
                        "name": "FirstName LastName",
                        "email": "firstname.lastname@mycompany.com",
                        "phone": "string",
                        "address": {
                          "city": "New York",
                          "country": "United States of America",
                          "postal_code": "10001",
                          "state": "NY"
                        },
                        "metadata": {},
                        "birthdate": "YYYY-MM-DD"
                      },
                      "referrer": {},
                      "metadata": "string"
                    },
                    "reward": {
                      "points": 0,
                      "assignment_id": "string",
                      "id": "string"
                    },
                    "metadata": {}
                  }
                },
                "Qualify product using source_id": {
                  "value": {
                    "customer": {
                      "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                      "source_id": "firstname.lastname@mycompany.com",
                      "name": "FirstName LastName",
                      "email": "firstname.lastname@mycompany.com",
                      "phone": "string",
                      "address": {
                        "city": "New York",
                        "country": "United States of America",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {},
                      "birthdate": "YYYY-MM-DD"
                    },
                    "order": {
                      "id": "ord_gqj1QYW2j2A1E3Ula2YjdPf4",
                      "source_id": "string",
                      "amount": 10000,
                      "items": [
                        {
                          "source_id": "product_1234",
                          "product_id": "prod_0a9f9aeddb019a42db",
                          "amount": 10000,
                          "quantity": 1,
                          "price": 10000,
                          "metadata": {},
                          "related_object": "product",
                          "product": {
                            "source_id": "product_1234",
                            "name": "Phone",
                            "price": 10000,
                            "metadata": {}
                          }
                        }
                      ],
                      "customer": {
                        "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                        "source_id": "firstname.lastname@mycompany.com",
                        "name": "FirstName LastName",
                        "email": "firstname.lastname@mycompany.com",
                        "phone": "string",
                        "address": {
                          "city": "New York",
                          "country": "United States of America",
                          "postal_code": "10001",
                          "state": "NY"
                        },
                        "metadata": {},
                        "birthdate": "YYYY-MM-DD"
                      },
                      "referrer": {},
                      "metadata": "string"
                    },
                    "reward": {
                      "points": 0,
                      "assignment_id": "string",
                      "id": "string"
                    },
                    "metadata": {}
                  }
                },
                "Qualify SKU using sku_id": {
                  "value": {
                    "customer": {
                      "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                      "source_id": "firstname.lastname@mycompany.com",
                      "name": "FirstName LastName",
                      "email": "firstname.lastname@mycompany.com",
                      "phone": "string",
                      "address": {
                        "city": "New York",
                        "country": "United States of America",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {},
                      "birthdate": "YYYY-MM-DD"
                    },
                    "order": {
                      "id": "ord_gqj1QYW2j2A1E3Ula2YjdPf4",
                      "source_id": "string",
                      "amount": 10000,
                      "items": [
                        {
                          "source_id": "product_1234",
                          "product_id": "prod_0a9f9aeddb019a42db",
                          "amount": 10000,
                          "quantity": 1,
                          "price": 10000,
                          "metadata": {},
                          "related_object": "product",
                          "product": {
                            "source_id": "product_1234",
                            "name": "Phone",
                            "price": 10000,
                            "metadata": {}
                          }
                        }
                      ],
                      "customer": {
                        "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                        "source_id": "firstname.lastname@mycompany.com",
                        "name": "FirstName LastName",
                        "email": "firstname.lastname@mycompany.com",
                        "phone": "string",
                        "address": {
                          "city": "New York",
                          "country": "United States of America",
                          "postal_code": "10001",
                          "state": "NY"
                        },
                        "metadata": {},
                        "birthdate": "YYYY-MM-DD"
                      },
                      "referrer": {},
                      "metadata": "string"
                    },
                    "reward": {
                      "points": 0,
                      "assignment_id": "string",
                      "id": "string"
                    },
                    "metadata": {}
                  }
                },
                "Qualify SKU using source_id": {
                  "value": {
                    "customer": {
                      "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                      "source_id": "firstname.lastname@mycompany.com",
                      "name": "FirstName LastName",
                      "email": "firstname.lastname@mycompany.com",
                      "phone": "string",
                      "address": {
                        "city": "New York",
                        "country": "United States of America",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {},
                      "birthdate": "YYYY-MM-DD"
                    },
                    "order": {
                      "id": "ord_gqj1QYW2j2A1E3Ula2YjdPf4",
                      "source_id": "string",
                      "amount": 10000,
                      "items": [
                        {
                          "source_id": "product_1234",
                          "product_id": "prod_0a9f9aeddb019a42db",
                          "amount": 10000,
                          "quantity": 1,
                          "price": 10000,
                          "metadata": {},
                          "related_object": "product",
                          "product": {
                            "source_id": "product_1234",
                            "name": "Phone",
                            "price": 10000,
                            "metadata": {}
                          }
                        }
                      ],
                      "customer": {
                        "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                        "source_id": "firstname.lastname@mycompany.com",
                        "name": "FirstName LastName",
                        "email": "firstname.lastname@mycompany.com",
                        "phone": "string",
                        "address": {
                          "city": "New York",
                          "country": "United States of America",
                          "postal_code": "10001",
                          "state": "NY"
                        },
                        "metadata": {},
                        "birthdate": "YYYY-MM-DD"
                      },
                      "referrer": {},
                      "metadata": "string"
                    },
                    "reward": {
                      "points": 0,
                      "assignment_id": "string",
                      "id": "string"
                    },
                    "metadata": {}
                  }
                },
                "Qualify redemption metadata": {
                  "value": {
                    "customer": {
                      "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                      "source_id": "firstname.lastname@mycompany.com",
                      "name": "FirstName LastName",
                      "email": "firstname.lastname@mycompany.com",
                      "phone": "string",
                      "address": {
                        "city": "New York",
                        "country": "United States of America",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {},
                      "birthdate": "YYYY-MM-DD"
                    },
                    "order": {
                      "id": "ord_gqj1QYW2j2A1E3Ula2YjdPf4",
                      "source_id": "string",
                      "amount": 10000,
                      "items": [
                        {
                          "source_id": "product_1234",
                          "product_id": "prod_0a9f9aeddb019a42db",
                          "amount": 10000,
                          "quantity": 1,
                          "price": 10000,
                          "metadata": {},
                          "related_object": "product",
                          "product": {
                            "source_id": "product_1234",
                            "name": "Phone",
                            "price": 10000,
                            "metadata": {}
                          }
                        }
                      ],
                      "customer": {
                        "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                        "source_id": "firstname.lastname@mycompany.com",
                        "name": "FirstName LastName",
                        "email": "firstname.lastname@mycompany.com",
                        "phone": "string",
                        "address": {
                          "city": "New York",
                          "country": "United States of America",
                          "postal_code": "10001",
                          "state": "NY"
                        },
                        "metadata": {},
                        "birthdate": "YYYY-MM-DD"
                      },
                      "referrer": {},
                      "metadata": "string"
                    },
                    "reward": {
                      "points": 0,
                      "assignment_id": "string",
                      "id": "string"
                    },
                    "metadata": {}
                  }
                },
                "Qualify order line item metadata": {
                  "value": {
                    "customer": {
                      "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                      "source_id": "firstname.lastname@mycompany.com",
                      "name": "FirstName LastName",
                      "email": "firstname.lastname@mycompany.com",
                      "phone": "string",
                      "address": {
                        "city": "New York",
                        "country": "United States of America",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {},
                      "birthdate": "YYYY-MM-DD"
                    },
                    "order": {
                      "id": "ord_gqj1QYW2j2A1E3Ula2YjdPf4",
                      "source_id": "string",
                      "amount": 10000,
                      "items": [
                        {
                          "source_id": "product_1234",
                          "product_id": "prod_0a9f9aeddb019a42db",
                          "amount": 10000,
                          "quantity": 1,
                          "price": 10000,
                          "metadata": {},
                          "related_object": "product",
                          "product": {
                            "source_id": "product_1234",
                            "name": "Phone",
                            "price": 10000,
                            "metadata": {}
                          }
                        }
                      ],
                      "customer": {
                        "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                        "source_id": "firstname.lastname@mycompany.com",
                        "name": "FirstName LastName",
                        "email": "firstname.lastname@mycompany.com",
                        "phone": "string",
                        "address": {
                          "city": "New York",
                          "country": "United States of America",
                          "postal_code": "10001",
                          "state": "NY"
                        },
                        "metadata": {},
                        "birthdate": "YYYY-MM-DD"
                      },
                      "referrer": {},
                      "metadata": "string"
                    },
                    "reward": {
                      "points": 0,
                      "assignment_id": "string",
                      "id": "string"
                    },
                    "metadata": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "This operation returns the list of valid and active vouchers based on the qualification of given context (e.g., customer profile, redemptions metadata, order).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/1_res_vouchers_qualification"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/ParameterLimit"
        },
        "description": "Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items."
      },
      "category": {
        "name": "category",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/ParameterString"
        },
        "description": "Limit search results to vouchers within the specified category."
      },
      "customer": {
        "name": "customer",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/ParameterCustomerId"
        },
        "description": "A tracking identifier of a customer who is the holder of the vouchers. It can be an `id` generated by Voucherify or the `source_id`. Remember to use the proper URL escape codes if the `source_id` contains special characters."
      },
      "campaign": {
        "name": "campaign",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/ParameterCampaignId"
        },
        "description": "A unique campaign name, identifies the parent campaign."
      },
      "created_at": {
        "name": "created_at",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/ParameterCreatedBeforeAfter"
        },
        "description": "A filter on the list based on the object `created_at` field. The value is a dictionary with the following options: `before`, `after`. A date value must be presented in ISO 8601 format (`2016-11-16T14:14:31Z` or `2016-11-16`). An example: `[created_at][before]=2017-09-08T13:52:18.227Z`",
        "style": "deepObject",
        "explode": true
      },
      "updated_at": {
        "name": "updated_at",
        "in": "query",
        "schema": {
          "$ref": "#/components/schemas/ParameterUpdatedBeforeAfter"
        },
        "description": "A filter on the list based on the object `updated_at` field. The value is a dictionary with the following options: `before`, `after`. A date value must be presented in ISO 8601 format (`2016-11-16T14:14:31Z` or `2016-11-16`). An example: `[updated_at][before]=2017-09-08T13:52:18.227Z`",
        "style": "deepObject",
        "explode": true
      },
      "ids": {
        "name": "ids",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/ParameterIds"
        }
      },
      "audienceRulesOnly": {
        "name": "audienceRulesOnly",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/ParameterBoolean"
        },
        "description": "This parameter set to true will ask only for verifying vouchers' validation rules only against conditions applied to audiences' attributes (belonging into segment, customer metadata, customer redemption count). The remaining checks against limits and rules will be omitted during validation."
      }
    },
    "schemas": {
      "ParameterPage99": {
        "type": "integer",
        "minimum": 1,
        "maximum": 99
      },
      "ParameterCampaignId": {
        "type": "string",
        "example": "camp_rRsfatlwN7unSeUIJDCYedal"
      },
      "ParameterOrderVouchers": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "updated_at",
          "-updated_at",
          "code",
          "-code"
        ]
      },
      "ParameterCode": {
        "type": "string",
        "example": "2CpRCE2c"
      },
      "VouchersListResponseBody": {
        "title": "Vouchers List Response Body",
        "type": "object",
        "description": "Response body schema for **GET** `v1/vouchers`.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "enum": [
              "list"
            ],
            "description": "The type of the object represented by JSON."
          },
          "data_ref": {
            "type": "string",
            "default": "vouchers",
            "enum": [
              "vouchers"
            ],
            "description": "Identifies the name of the attribute that contains the array of voucher objects."
          },
          "vouchers": {
            "type": "array",
            "description": "A dictionary that contains an array of  vouchers. Each entry in the array is a separate voucher object.",
            "items": {
              "$ref": "#/components/schemas/VoucherWithCategories"
            }
          },
          "total": {
            "type": "integer",
            "example": 20,
            "description": "Returns how many vouchers in the project meet the limits defined by the query parameter definitions."
          }
        }
      },
      "VouchersCreateRequestBody": {
        "title": "Vouchers Create Request Body",
        "type": "object",
        "description": "Request body schema for **POST** `v1/vouchers`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/VoucherCreateLoyaltyCardWithSpecificCodeOrCodeConfig"
          },
          {
            "$ref": "#/components/schemas/VoucherCreateGiftWithSpecificCodeOrCodeConfig"
          },
          {
            "$ref": "#/components/schemas/VoucherCreateDiscountWithSpecificCodeOrCodeConfig"
          }
        ]
      },
      "VouchersCreateResponseBody": {
        "type": "object",
        "title": "Vouchers Create Response Body",
        "description": "Response body schema for **POST** `v1/vouchers` and `/vouchers/{code}`",
        "allOf": [
          {
            "$ref": "#/components/schemas/Voucher"
          }
        ]
      },
      "Error": {
        "title": "Error Object",
        "type": "object",
        "description": "Error details",
        "properties": {
          "code": {
            "type": "integer",
            "description": "Error's HTTP status code."
          },
          "key": {
            "type": "string",
            "description": "Short string describing the kind of error which occurred."
          },
          "message": {
            "type": "string",
            "description": "A human-readable message providing a short description of the error."
          },
          "details": {
            "type": "string",
            "description": "A human-readable message providing more details about the error."
          },
          "request_id": {
            "type": "string",
            "example": "v-0a885062c80375740f",
            "description": "This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team."
          },
          "resource_id": {
            "type": "string",
            "description": "Unique resource ID that can be used in another endpoint to get more details.",
            "example": "rf_0c5d710a87c8a31f86"
          },
          "resource_type": {
            "type": "string",
            "description": "The resource type.",
            "example": "voucher"
          },
          "error": {
            "type": "object",
            "description": "Includes additional information about the error.",
            "properties": {
              "message": {
                "type": "string",
                "description": "The message configured by the user in a validation rule."
              }
            }
          }
        },
        "required": [
          "code",
          "message"
        ]
      },
      "VouchersGetResponseBody": {
        "type": "object",
        "title": "Vouchers Get Response Body",
        "description": "Response body schema for **GET** `v1/vouchers/{code}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Voucher"
          }
        ]
      },
      "VouchersUpdateRequestBody": {
        "title": "Update Voucher Request Body",
        "type": "object",
        "description": "Request body schema for **PUT** `v1/vouchers/{code}`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/VoucherUpdateLoyaltyCard"
          },
          {
            "$ref": "#/components/schemas/VoucherUpdateGift"
          },
          {
            "$ref": "#/components/schemas/VoucherUpdateDiscount"
          }
        ]
      },
      "VouchersUpdateResponseBody": {
        "type": "object",
        "title": "Vouchers Update Response Body",
        "description": "Response body schema for **PUT** `v1/vouchers/{code}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Voucher"
          }
        ]
      },
      "ParameterBoolean": {
        "type": "boolean"
      },
      "VouchersCreateWithSpecificCodeRequestBody": {
        "title": "Vouchers Create With Specific Code Request Body",
        "type": "object",
        "description": "Request body schema for **POST** `v1/vouchers/{code}`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/VoucherCreateLoyaltyCard"
          },
          {
            "$ref": "#/components/schemas/VoucherCreateGift"
          },
          {
            "$ref": "#/components/schemas/VoucherCreateDiscount"
          }
        ]
      },
      "VouchersEnableResponseBody": {
        "type": "object",
        "title": "Vouchers Enable Response Body",
        "description": "Response body schema for **POST** `v1/vouchers/{code}/enable`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Voucher"
          }
        ]
      },
      "VouchersDisableResponseBody": {
        "type": "object",
        "title": "Vouchers Disable Response Body",
        "description": "Response body schema for **POST** `v1/vouchers/{code}/disable`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Voucher"
          }
        ]
      },
      "VouchersBalanceUpdateRequestBody": {
        "title": "Vouchers Balance Update Request Body",
        "type": "object",
        "description": "Request body schema for `vouchers/{code}/balance`.",
        "properties": {
          "amount": {
            "type": "integer",
            "description": "The incremental amount to be added to or removed from the current balance on the gift card or loyalty card. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`. To remove balance, simply add a minus sign before the value, i.e. to remove $20, use -2000."
          },
          "source_id": {
            "type": "string",
            "description": "The merchant's transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service."
          },
          "reason": {
            "type": "string",
            "description": "Reason why the transaction occurred."
          }
        },
        "required": [
          "amount"
        ]
      },
      "VouchersBalanceUpdateResponseBody": {
        "description": "Response body schema for `vouchers/{code}/balance.`",
        "type": "object",
        "title": "Vouchers Balance Update Response Body",
        "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 card or loyalty card. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "total": {
            "type": "integer",
            "description": "Total income incurred over the lifespan of the gift card or loyalty card."
          },
          "balance": {
            "type": "integer",
            "description": "The balance after adding or subtracting a specified amount. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "type": {
            "type": "string",
            "description": "The type of voucher being modified.",
            "enum": [
              "gift_voucher",
              "loyalty_card"
            ]
          },
          "operation_type": {
            "type": "string",
            "description": "The type of the operation being performed.",
            "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": "Identifies the voucher that is being modified, this is the ID that was assigned by the Voucherify API.",
                "example": "v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc"
              }
            }
          }
        }
      },
      "ParameterOrderListTransactions": {
        "type": "string",
        "enum": [
          "id",
          "-id"
        ]
      },
      "ParameterString": {
        "type": "string"
      },
      "VouchersTransactionsListResponseBody": {
        "title": "Vouchers Transactions List Response Body",
        "type": "object",
        "description": "Response body schema for **GET** `v1/vouchers/{code}/transactions`.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of transaction objects.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VoucherTransaction"
            },
            "description": "A dictionary that contains an array of transactions. Each entry in the array is a separate transaction object."
          },
          "has_more": {
            "type": "boolean",
            "description": "As query results are always limited (by the limit parameter), the `has_more` flag indicates if there are more records for given filter parameters. This lets you know if you can run another request (with a different paging or a different start date filter) to get more records returned in the results."
          },
          "more_starting_after": {
            "type": "string",
            "description": "Returns an ID that can be used to return another page of results. Use the transaction ID in the `starting_after_id` query parameter to display another page of the results starting after the transaction with that ID."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "has_more"
        ]
      },
      "VouchersTransactionsExportCreateRequestBody": {
        "description": "Request body schema for **POST** `v1/vouchers/transactions/export`.",
        "type": "object",
        "title": "Vouchers Transactions Export Create Request Body",
        "properties": {
          "parameters": {
            "description": "Contains the parameters that define the data to be exported.",
            "allOf": [
              {
                "$ref": "#/components/schemas/VoucherTransactionsExportParameters"
              }
            ]
          }
        }
      },
      "VouchersTransactionsExportCreateResponseBody": {
        "type": "object",
        "title": "Vouchers Transactions Export Create Response Body",
        "description": "Response body schema for **POST** `v1/vouchers/{code}/transactions/export`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherTransactionsExport"
          }
        ]
      },
      "VouchersImportCreateRequestBody": {
        "title": "Vouchers Import Request Body",
        "type": "array",
        "description": "Request body schema for **POST** `v1/vouchers/import`.",
        "items": {
          "$ref": "#/components/schemas/VouchersImportCreateItemRequestBody"
        }
      },
      "VouchersImportCreateResponseBody": {
        "title": "Vouchers Import Create Response Body",
        "description": "Response body schema for **POST** `v1/vouchers/import`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActions"
          }
        ]
      },
      "VouchersImportCSVRequestBody": {
        "type": "object",
        "title": "Vouchers Import CSV Request Body",
        "description": "Request body schema for **POST** `v1/vouchers/importCSV`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ImportCSVRequestBody"
          },
          {
            "type": "object",
            "properties": {
              "webhooks_enable": {
                "type": "boolean",
                "description": "Triggers a webhook sendout for new and updated vouchers if the voucher created and voucher updated webhooks are configured in Project settings."
              }
            }
          }
        ]
      },
      "VouchersImportCsvCreateResponseBody": {
        "type": "object",
        "title": "Vouchers Import Csv Create Response Body",
        "description": "Response body schema for **POST** `v1/vouchers/importCSV`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActions"
          }
        ]
      },
      "VouchersUpdateInBulkRequestBody": {
        "title": "Vouchers Update In Bulk Request Body",
        "type": "array",
        "description": "Request body schema for **POST** `v1/vouchers/bulk/async`.",
        "items": {
          "$ref": "#/components/schemas/VouchersUpdateInBulkItemRequestBody"
        }
      },
      "VouchersUpdateInBulkResponseBody": {
        "title": "Vouchers Update In Bulk Response Body",
        "description": "Response body schema for **POST** `v1/vouchers/bulk/async`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActions"
          }
        ]
      },
      "BadRequest": {
        "title": "Error Object",
        "type": "object",
        "description": "Error details",
        "properties": {
          "statusCode": {
            "type": "integer",
            "description": "Error's HTTP status code."
          },
          "error": {
            "type": "string",
            "description": "A human-readable message providing a short description of the error."
          },
          "message": {
            "type": "string",
            "description": "A human-readable message providing more details about the error."
          }
        }
      },
      "VouchersMetadataUpdateInBulkRequestBody": {
        "title": "Update Vouchers' Metadata in Bulk Request Body",
        "type": "object",
        "description": "Request body schema for `vouchers/metadata/async`.",
        "x-examples": {
          "example-1": {
            "$ref": "#/components/examples/req_vouchers_metadata_1"
          },
          "example-2": {
            "$ref": "#/components/examples/req_vouchers_metadata_2"
          }
        },
        "properties": {
          "codes": {
            "type": "array",
            "description": "An array of voucher codes.",
            "items": {
              "type": "string"
            }
          },
          "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.",
            "example": {
              "lang": "en",
              "authorized_internally": true
            }
          }
        },
        "required": [
          "codes",
          "metadata"
        ]
      },
      "VouchersMetadataUpdateInBulkResponseBody": {
        "title": "Vouchers Metadata Update In Bulk Response Body",
        "description": "Response body schema for **POST** `v1/vouchers/metadata/async`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActions"
          }
        ]
      },
      "ParameterLimitExamineVouchersQualification": {
        "type": "integer",
        "maximum": 50,
        "minimum": 1
      },
      "ParameterOrderExamineVouchersQualification": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "updated_at",
          "-updated_at",
          "code",
          "-code"
        ]
      },
      "1_req_vouchers_qualification": {
        "title": "Vouchers Qualification Request Body",
        "type": "object",
        "description": "Request body schema for /vouchers/qualification.",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/1_req_obj_vouchers_qualification_customer"
          },
          "order": {
            "type": "object",
            "description": "Tracks purchase transactions. You can send the order in the request body to check against vouchers requiring specific order validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure/Order volume_ or _Basic Builder_ &rarr; _Order_. [Read more](/personalize/create-validation-rules).",
            "properties": {
              "id": {
                "type": "string",
                "description": "The ID of an existing order in Voucherify's system that will be linked to the redemption of this request. This ID was assigned by the Voucherify API. You can send the order id in the request body to check against vouchers requiring specific order validation rules to be satisfied.",
                "example": "ord_gqj1QYW2j2A1E3Ula2YjdPf4"
              },
              "source_id": {
                "type": "string",
                "description": "The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of an integration between multiple systems. It can be an order ID from a CRM system, database or 3rd-party service."
              },
              "amount": {
                "type": "integer",
                "minimum": 0,
                "description": "Pre-discount order amount represents the total amount of order items' amounts (sum of each item's `amount` property). You can send the total order amount or the amount of each item individually in the request body to check against vouchers requiring specific total order amount validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order volume_ &rarr; _Total amount_ \n\nThe value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
                "example": 10000
              },
              "items": {
                "type": "array",
                "description": "List of Order Items constituting the order. Order items can be defined either by `product_id` or `sku_id`. For every item, you must define the quantity.",
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/1_req_obj_vouchers_qualification_product"
                    },
                    {
                      "$ref": "#/components/schemas/1_req_obj_vouchers_qualification_sku"
                    },
                    {
                      "$ref": "#/components/schemas/1_req_obj_vouchers_qualification_product_using_product_id"
                    },
                    {
                      "$ref": "#/components/schemas/1_req_obj_vouchers_qualification_product_using_source_id"
                    }
                  ]
                }
              },
              "customer": {
                "$ref": "#/components/schemas/1_req_obj_vouchers_qualification_customer"
              },
              "referrer": {
                "description": "The person who referred the customer to make the order.",
                "type": "object"
              },
              "metadata": {
                "type": "object",
                "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **order** metadata validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Order metadata satisfy_ or _Basic Builder_ &rarr; _Attributes match_ &rarr; _ORDER METADATA_. [Read more](/personalize/create-validation-rules)."
              }
            }
          },
          "reward": {
            "type": "object",
            "properties": {
              "points": {
                "type": "integer"
              },
              "assignment_id": {
                "type": "string"
              },
              "id": {
                "type": "string"
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **redemption** metadata validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Advanced_ &rarr; _Redemption metadata satisfy_ or _Basic Builder_ &rarr; _Attributes match_ &rarr; _REDEMPTION METADATA_. [Read more](/personalize/create-validation-rules)."
          }
        }
      },
      "1_res_vouchers_qualification": {
        "title": "Vouchers Qualification Response Body",
        "type": "object",
        "description": "Response body schema for vouchers/qualification",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. Default is `list`."
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of qualified vouchers."
          },
          "data": {
            "type": "array",
            "description": "Array of qualified vouchers.",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Voucher"
                },
                {
                  "$ref": "#/components/schemas/1_res_obj_vouchers_qualification_applicable_to"
                },
                {
                  "$ref": "#/components/schemas/1_res_obj_vouchers_qualification_inapplicable_to"
                }
              ]
            }
          },
          "total": {
            "type": "integer",
            "example": 37,
            "description": "Total valid and active vouchers matching the qualification criteria in given context. "
          },
          "id": {
            "type": "string",
            "example": "qfl_nAMVLoxIqSLh9O6YmfoAXRPG",
            "description": "Unique qualification ID."
          },
          "created_at": {
            "type": "string",
            "example": "2022-02-25T13:32:08.734Z",
            "description": "Timestamp representing the date and time when the qualification was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed customer source ID."
          }
        }
      },
      "ParameterLimit": {
        "type": "integer",
        "maximum": 100,
        "minimum": 1
      },
      "ParameterCustomerId": {
        "type": "string",
        "example": "cust_nk0N1uNQ1YnupAoJGOgvsODC"
      },
      "ParameterCreatedBeforeAfter": {
        "type": "object",
        "properties": {
          "before": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time before the voucher was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "after": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time after the voucher was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          }
        }
      },
      "ParameterUpdatedBeforeAfter": {
        "type": "object",
        "properties": {
          "before": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time before the voucher was updated. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "after": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time after the voucher was updated. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          }
        }
      },
      "ParameterIds": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "VoucherWithCategories": {
        "title": "Voucher With Categories",
        "description": "This is an object representing a voucher with categories.",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherBase"
          },
          {
            "type": "object",
            "properties": {
              "categories": {
                "type": "array",
                "description": "Contains details about the category.",
                "items": {
                  "$ref": "#/components/schemas/Category"
                }
              }
            }
          }
        ]
      },
      "VoucherCreateLoyaltyCardWithSpecificCodeOrCodeConfig": {
        "title": "Create loyalty card",
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/VoucherCreateLoyaltyCardWithSpecificCode"
          },
          {
            "$ref": "#/components/schemas/VoucherCreateLoyaltyCardWithCodeConfig"
          }
        ]
      },
      "VoucherCreateGiftWithSpecificCodeOrCodeConfig": {
        "title": "Create gift card",
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/VoucherCreateGiftWithSpecificCode"
          },
          {
            "$ref": "#/components/schemas/VoucherCreateGiftWithCodeConfig"
          }
        ]
      },
      "VoucherCreateDiscountWithSpecificCodeOrCodeConfig": {
        "title": "Create voucher in a discount campaign",
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/VoucherCreateDiscountWithSpecificCode"
          },
          {
            "$ref": "#/components/schemas/VoucherCreateDiscountWithCodeConfig"
          }
        ]
      },
      "Voucher": {
        "title": "Voucher",
        "description": "This is an object representing a voucher with categories and validation rules assignments.",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherBase"
          },
          {
            "type": "object",
            "properties": {
              "categories": {
                "type": "array",
                "description": "Contains details about the category.",
                "items": {
                  "$ref": "#/components/schemas/Category"
                }
              },
              "validation_rules_assignments": {
                "$ref": "#/components/schemas/ValidationRulesAssignmentsList"
              }
            }
          }
        ]
      },
      "VoucherUpdateLoyaltyCard": {
        "title": "Update loyalty card",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherUpdateBase"
          }
        ]
      },
      "VoucherUpdateGift": {
        "title": "Update gift card",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherUpdateBase"
          }
        ]
      },
      "VoucherUpdateDiscount": {
        "title": "Update voucher in a discount campaign",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherUpdateBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "DISCOUNT_VOUCHER"
                ],
                "description": "Defines the type of the voucher. "
              },
              "discount": {
                "$ref": "#/components/schemas/Discount"
              }
            }
          }
        ]
      },
      "VoucherCreateLoyaltyCard": {
        "title": "Create loyalty card",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherCreateBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "LOYALTY_CARD"
                ],
                "description": "Defines the type of the voucher. "
              },
              "loyalty_card": {
                "$ref": "#/components/schemas/SimpleLoyaltyCard"
              }
            },
            "required": [
              "type",
              "loyalty_card"
            ]
          }
        ]
      },
      "VoucherCreateGift": {
        "title": "Create gift card",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherCreateBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "GIFT_VOUCHER"
                ],
                "description": "Defines the type of the voucher. "
              },
              "gift": {
                "$ref": "#/components/schemas/Gift"
              }
            },
            "required": [
              "type",
              "gift"
            ]
          }
        ]
      },
      "VoucherCreateDiscount": {
        "title": "Create voucher in a discount campaign",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherCreateBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "DISCOUNT_VOUCHER"
                ],
                "description": "Defines the type of the voucher. "
              },
              "discount": {
                "$ref": "#/components/schemas/Discount"
              }
            },
            "required": [
              "type",
              "discount"
            ]
          }
        ]
      },
      "VoucherTransaction": {
        "title": "Voucher Transaction",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherTransactionBase"
          },
          {
            "type": "object",
            "properties": {
              "details": {
                "type": "object",
                "description": "Contains the detailed information about the transaction.",
                "properties": {
                  "balance": {
                    "$ref": "#/components/schemas/VoucherBalance"
                  },
                  "order": {
                    "type": "object",
                    "description": "Contains information about the original order.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique order ID."
                      },
                      "source_id": {
                        "type": "string",
                        "description": "The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service."
                      }
                    },
                    "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"
                      }
                    ]
                  }
                }
              },
              "type": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/GiftVoucherTransactionsType"
                  },
                  {
                    "$ref": "#/components/schemas/LoyaltyCardTransactionsType"
                  }
                ]
              }
            }
          }
        ]
      },
      "VoucherTransactionsExportParameters": {
        "description": "List of available fields and filters that can be exported with a gift card or loyalty card transactions export along with the sorting order of the returned data.",
        "title": "Export Transactions",
        "type": "object",
        "properties": {
          "order": {
            "type": "string",
            "description": "How the export is filtered, where the dash `-` preceding a sorting option means sorting in a descending order.",
            "enum": [
              "-created_at",
              "created_at"
            ]
          },
          "fields": {
            "type": "array",
            "description": "Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields:\n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| id | Unique transaction ID. | vtx_0cb7811f1c07765800 |\n| type | Transaction type. | - `CREDITS_REMOVAL` <br /> - `CREDITS_ADDITION` <br /> - `CREDITS_REFUND` <br /> - `CREDITS_REDEMPTION` <br /> - `POINTS_ACCRUAL` <br /> - `POINTS_REDEMPTION`<br /> - `POINTS_REFUND`<br /> - `POINTS_ADDITION`<br /> - `POINTS_REMOVAL`<br /> - `POINTS_EXPIRATION`<br /> - `POINTS_TRANSFER_IN`<br /> - `POINTS_TRANSFER_OUT` |\n| source_id | Unique transaction source ID. | 8638 |\n| reason | Contains the reason for the transaction if one was included originally. |  |\n| balance | The gift card or loyalty card balance after the transaction. |  |\n| amount | The amount of gift card or loyalty card credits being allocated during the transaction. This value can either be negative or positive depending on the nature of the transaction. |  |\n| created_at | Timestamp in ISO 8601 format representing the date and time when the transaction was created. | 2022-03-09T09:16:32.521Z  |\n| voucher_id | Unique Voucher ID. | v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp |\n| campaign_id | Parent campaign ID. | camp_FNYR4jhqZBM9xTptxDGgeNBV |\n| source|  Channel through which the transaction was initiated. | API |\n| details | More detailed information stored in the form of a JSON. | Provides more details related to the transaction in the form of an object. |\n| related_transaction_id | Unique transaction ID related to a receiver/donor card in the case of a points transfer from/to another card. | vtx_0c9afe802593b34b80 |",
            "items": {
              "type": "string",
              "enum": [
                "id",
                "type",
                "source_id",
                "reason",
                "balance",
                "amount",
                "created_at",
                "voucher_id",
                "campaign_id",
                "source",
                "details",
                "related_transaction_id"
              ]
            }
          }
        }
      },
      "VoucherTransactionsExport": {
        "title": "Voucher Transactions Export",
        "type": "object",
        "description": "This is an object representing an export. \n\n Using this endpoint, you can export voucher transactions as a CSV file. This functionality works asynchronously and comes down to the following steps: create an export object and return its id so you can track its status, trigger a CSV file generation, change the status to SCHEDULED when the generation is over, store the file in S3 and change the status to DONE. Now you can download it.\n\nWith parameters you can select which fields will be exported. An export request will almost always result in a single file being generated by the system. However, when your volume of data is large, the system may split the results into multiple chunks.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique export ID.",
            "example": "exp_FFfp9o7daWuJqJCKp5xqqli4"
          },
          "object": {
            "type": "string",
            "default": "export",
            "description": "The type of object being represented. This object stores information about the `export`.",
            "enum": [
              "export"
            ]
          },
          "created_at": {
            "type": "string",
            "example": "2022-04-28T11:23:20.922Z",
            "description": "Timestamp representing the date and time when the export was scheduled in ISO 8601 format.",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "description": "Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated.",
            "default": "SCHEDULED",
            "enum": [
              "SCHEDULED"
            ]
          },
          "channel": {
            "type": "string",
            "description": "The channel through which the export was triggered.",
            "default": "API"
          },
          "exported_object": {
            "type": "string",
            "description": "The type of exported object.",
            "default": "voucher_transactions",
            "enum": [
              "voucher_transactions"
            ]
          },
          "parameters": {
            "$ref": "#/components/schemas/VoucherTransactionsFilters"
          },
          "result": {
            "type": "object",
            "nullable": true,
            "description": "Contains the URL of the CSV file.",
            "required": [
              "url"
            ],
            "properties": {
              "url": {
                "type": "string",
                "description": "URL of the CSV file location. It contains the `token` used for authorization in the [Download export](/api-reference/exports/download-export) method."
              }
            }
          },
          "user_id": {
            "type": "string",
            "nullable": true,
            "description": "Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the `channel` value is `WEBSITE`.",
            "example": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH"
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "status",
          "channel",
          "exported_object",
          "parameters",
          "result",
          "user_id"
        ]
      },
      "VouchersImportCreateItemRequestBody": {
        "title": "Vouchers Import Request Body Item",
        "oneOf": [
          {
            "$ref": "#/components/schemas/VoucherImportGift"
          },
          {
            "$ref": "#/components/schemas/VoucherImportDiscount"
          }
        ]
      },
      "AsyncActions": {
        "type": "object",
        "title": "Asynchronous Actions",
        "description": "Response to requests that are processed asynchronously.",
        "properties": {
          "async_action_id": {
            "type": "string",
            "example": "aa_0a875d56c805df6601",
            "description": "The ID of the scheduled asynchronous action."
          }
        },
        "required": [
          "async_action_id"
        ]
      },
      "ImportCSVRequestBody": {
        "type": "object",
        "title": "Import CSV file",
        "description": "Request body schema for importing data using a CSV file.",
        "format": "binary",
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "description": "File path."
          }
        },
        "required": [
          "file"
        ]
      },
      "VouchersUpdateInBulkItemRequestBody": {
        "title": "Vouchers Update In Bulk Request Body Item",
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Unique voucher code."
          },
          "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."
          }
        },
        "required": [
          "code",
          "metadata"
        ]
      },
      "1_req_obj_vouchers_qualification_customer": {
        "title": "Customer Object",
        "type": "object",
        "description": "This object stores customer details. You can send this object in the request body to check against vouchers requiring specific customer validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Audience_ &rarr; _Customer segment_ or _Basic Builder_ &rarr; _Customer Activity_. [Read more](/personalize/create-validation-rules). ",
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of an existing customer that will be linked to the redemption in this request. This ID was assigned by the Voucherify API.",
            "example": "cust_J1CDUdbqn5Exva8ASWk1Fq0j"
          },
          "source_id": {
            "type": "string",
            "description": "A unique customer identifier. This is a tracking identifier of a user that is validating a voucher. The `source_id` is built based on your internal id (e.g., email, database ID). If you also pass a customer ID, the source ID will be ignored. Otherwise, if you do not pass a customer ID, the source ID you provide must either be a token, like the one returned in the original voucher validation method done by a specific customer, or a string identifying the customer (e.g., email, database ID, CRM ID).",
            "example": "firstname.lastname@mycompany.com"
          },
          "name": {
            "type": "string",
            "description": "First and Last Name. You can send the name in the request body to check against vouchers requiring specific name validation rules to be satisfied.",
            "example": "FirstName LastName"
          },
          "email": {
            "type": "string",
            "description": "You can send the email in the request body to check against vouchers requiring specific email validation rules to be satisfied.",
            "example": "firstname.lastname@mycompany.com"
          },
          "phone": {
            "type": "string",
            "minLength": 1,
            "maxLength": 30,
            "pattern": "^[-+.() 0-9]",
            "description": "You can send the phone in the request body to check against vouchers requiring specific phone validation rules to be satisfied."
          },
          "address": {
            "type": "object",
            "description": "A set of key/value pairs which describes the address. You can send the address in the request body to check against vouchers requiring specific address validation rules to be satisfied.",
            "properties": {
              "city": {
                "type": "string",
                "description": "You can send the city in the request body to check against vouchers requiring specific city validation rules to be satisfied.",
                "example": "New York"
              },
              "country": {
                "type": "string",
                "description": "You can send the country in the request body to check against vouchers requiring specific country validation rules to be satisfied.",
                "example": "United States of America"
              },
              "postal_code": {
                "type": "string",
                "description": "You can send the postal code in the request body to check against vouchers requiring specific postal code validation rules to be satisfied.",
                "example": "10001"
              },
              "state": {
                "type": "string",
                "description": "You can send the state in the request body to check against vouchers requiring specific state validation rules to be satisfied.",
                "example": "NY"
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **customer** metadata validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Audience_ &rarr; _Customer metadata satisfy_. [Read more](/personalize/create-validation-rules)."
          },
          "birthdate": {
            "type": "string",
            "example": "2022-01-01",
            "format": "date",
            "description": "You can send the birthdate in the request body to check against vouchers requiring specific birthdate validation rules to be satisfied."
          }
        }
      },
      "1_req_obj_vouchers_qualification_product": {
        "title": "Product Item",
        "type": "object",
        "description": "Schema model for a product item. You can send this object in the request body to check against vouchers requiring specific product validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure/Order volume_ or _Basic Builder_ &rarr; _Order_. [Read more](/personalize/create-validation-rules).",
        "properties": {
          "source_id": {
            "type": "string",
            "description": "A unique product identifier from your inventory system. __Requires__ the `related_object` property to be defined. \n\n The qualification runs against rules that are defined through the Create Validation Rules endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order Structure_ &rarr; _Every order item/Any order item/None of the order items_ &rarr; _Select a product collection or create a new product collection based on Source Id filters_ . [Read more](/personalize/validation-rules-reference).",
            "example": "product_1234"
          },
          "product_id": {
            "type": "string",
            "description": "A unique identifier that represents the product and is assigned by Voucherify.",
            "example": "prod_0a9f9aeddb019a42db"
          },
          "amount": {
            "type": "integer",
            "description": "Represents a total pre-discount amount of order item (`price` * `quantity`). You can send the total item amount to check against vouchers requiring specific order amount validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order volume_ &rarr; _Total amount_. The qualification adds the individual amounts of the items and checks whether the sum meets the limits set by the _Total amount_. Additionally, another rule checked is one that is defined in _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item_ &rarr; _Subtotal of matched items_.  \n\nThe value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
            "example": 10000
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity of the item in the cart. \n\nThe qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order Volume_ &rarr; _Items quantity_. The qualification adds the individual quantities of the items and checks whether the sum meets the limits set by _Items quantity_ validation rule. Another validation rule against which the qualification does the checks is defined in the _Advanced Rule Builder_ &rarr; _Order Structure_ &rarr; _Every order item/Any order item_ &rarr; _Quantity of matched items_. [Read more](/personalize/validation-rules-reference).",
            "example": 1
          },
          "price": {
            "type": "integer",
            "description": "Unit price of an item. [This is not true in the case of using sourceid what was the case that this happened.]This `price` property takes precedence. If you provide a value at this level, then a price property defined once again in the `related_object` will be ignored. If this property will not be defined here, then the `price` property in the `related_object` will be used in the qualification.\n\n The qualification runs against rules that are defined through the Create Validation Rules endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order Structure_ &rarr; _Every order item/Any order item_ &rarr; _Unit Price of any matching order line_ and also _Order Volume_ &rarr; _Price of each item/Price of any item_. [Read more](/personalize/validation-rules-reference).\n\n The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
            "example": 10000
          },
          "metadata": {
            "type": "object",
            "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **order line item** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item_ &rarr; _Metadata of matched items_. [Read more](/personalize/create-validation-rules)."
          },
          "related_object": {
            "type": "string",
            "default": "product",
            "enum": [
              "product"
            ],
            "description": "A reference to the object containing details of the related product. __Required__ when sending `source_id` in payload."
          },
          "product": {
            "type": "object",
            "description": "An object containing details of the related product. __Required__ when sending `source_id` in payload. These details will be used for qualification on top of details already stored in the system.",
            "properties": {
              "source_id": {
                "type": "string",
                "description": "A unique product identifier from your inventory system.",
                "example": "product_1234"
              },
              "name": {
                "type": "string",
                "description": "Product name.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item/None of the order items_ &rarr; _Select a product collection or create a new product collection based on name filters_.",
                "example": "Phone"
              },
              "price": {
                "type": "integer",
                "description": "Unit price of an item. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
                "example": 10000
              },
              "metadata": {
                "type": "object",
                "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **product** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item/None of the order items_ &rarr; _Select a product collection or create a new product collection based on metadata filters_. [Read more](/personalize/create-validation-rules)."
              }
            }
          }
        }
      },
      "1_req_obj_vouchers_qualification_sku": {
        "title": "SKU Item",
        "type": "object",
        "description": "Schema model for a SKU item.",
        "properties": {
          "source_id": {
            "type": "string",
            "description": "A unique sku identifier from your inventory system. __Requires__ the `related_object` property to be defined. \n\n The qualification runs against rules that are defined through the Create Validation Rules endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order Structure_ &rarr; _Every order item/Any order item/None of the order items_ &rarr; _Select a product collection or create a new product collection based on Source Id filters_ . [Read more](/personalize/validation-rules-reference).",
            "example": "product_1234"
          },
          "sku_id": {
            "type": "string",
            "example": "sku_0a41e31c7b41c28358",
            "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
          },
          "amount": {
            "type": "integer",
            "description": "Represents a total amount of order item (price * quantity).\n\nYou should provide it to retrieve `discount_amount` if the discount is applied only to this item.[I'm not sure what this means here, it's from the original docs]",
            "example": 10000
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity of the item in the cart. The qualification runs against rules that are defined through the Create Validation Rules endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order Volume_ &rarr; _Items quantity_. The qualification adds the individual quantities of the items and checks whether the sum meets the limits set by _Items quantity_ validation rule. [Read more](/personalize/validation-rules-reference).",
            "example": 1
          },
          "related_object": {
            "type": "string",
            "enum": [
              "product",
              "sku"
            ],
            "description": "A reference to the object containing details of the related product/sku. __Required__ when sending `source_id` in payload."
          },
          "product": {
            "type": "object",
            "description": "An object containing details of the related product. __Required__ when sending `source_id` in payload. These details will be used for qualification on top of details already stored in the system.",
            "properties": {
              "source_id": {
                "type": "string",
                "description": "A unique product identifier from your inventory system.",
                "example": "product_1234"
              },
              "name": {
                "type": "string",
                "description": "Product name.",
                "example": "Phone"
              },
              "price": {
                "type": "integer",
                "description": "Unit price of an item. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
                "example": 10000
              },
              "metadata": {
                "type": "object",
                "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **product** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item/None of the order items_ &rarr; _Select a product collection or create a new product collection based on metadata filters_. [Read more](/personalize/create-validation-rules)."
              }
            }
          },
          "sku": {
            "type": "object",
            "description": "An object containing details of the related SKU. __Required__ when sending `source_id` in payload. These details will be used for qualification on top of details already stored in the system.",
            "properties": {
              "source_id": {
                "type": "string",
                "description": "A unique SKU identifier from your inventory system.",
                "example": "sku_1234"
              },
              "sku": {
                "type": "string",
                "description": "SKU name.",
                "example": "iPhone 12"
              },
              "price": {
                "type": "integer",
                "description": "Unit price of a SKU. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
                "example": 10000
              },
              "metadata": {
                "type": "object",
                "description": "A set of custom key/value pairs that you can attach to a SKU."
              }
            }
          }
        }
      },
      "1_req_obj_vouchers_qualification_product_using_product_id": {
        "title": "Product Item using product_id",
        "type": "object",
        "description": "Schema model for a product item sent using the `product_id`. \n\nYou can send this object in the request body to check against vouchers requiring specific product validation rules to be satisfied. \nThe qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure/Order volume_ or _Basic Builder_ &rarr; _Order_. [Read more](/personalize/create-validation-rules).",
        "properties": {
          "product_id": {
            "type": "string",
            "description": "A unique identifier that represents the product and is assigned by Voucherify.",
            "example": "prod_0a9f9aeddb019a42db"
          },
          "amount": {
            "type": "integer",
            "description": "Represents a total pre-discount amount of order item (`price` * `quantity`). You can send the total item amount to check against vouchers requiring specific order amount validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order volume_ &rarr; _Total amount_. The qualification adds the individual amounts of the items and checks whether the sum meets the limits set by the _Total amount_. Additionally, another rule checked is one that is defined in _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item_ &rarr; _Subtotal of matched items_.  \n\nThe value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
            "example": 10000
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity of the item in the cart. \n\nThe qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order Volume_ &rarr; _Items quantity_. The qualification adds the individual quantities of the items and checks whether the sum meets the limits set by _Items quantity_ validation rule. Another validation rule against which the qualification does the checks is defined in the _Advanced Rule Builder_ &rarr; _Order Structure_ &rarr; _Every order item/Any order item_ &rarr; _Quantity of matched items_. [Read more](/personalize/validation-rules-reference).",
            "example": 1
          },
          "price": {
            "type": "integer",
            "description": "Unit price of an item. [This is not true in the case of using sourceid what was the case that this happened.]This `price` property takes precedence. If you provide a value at this level, then a price property defined once again in the `related_object` will be ignored. If this property will not be defined here, then the `price` property in the `related_object` will be used in the qualification.\n\n The qualification runs against rules that are defined through the Create Validation Rules endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order Structure_ &rarr; _Every order item/Any order item_ &rarr; _Unit Price of any matching order line_ and also _Order Volume_ &rarr; _Price of each item/Price of any item_. Even if this price is explicitly provided, it will not override the `price` when running qualifications against _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item/None of the order items_ &rarr; _Select/create a product collection filtered by a Price_.   [Read more](/personalize/validation-rules-reference).\n\n The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
            "example": 10000
          },
          "metadata": {
            "type": "object",
            "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **order line item** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item_ &rarr; _Metadata of matched items_. [Read more](/personalize/create-validation-rules)."
          },
          "product": {
            "type": "object",
            "description": "An object containing details of the related product. These details will be used for qualification on top of details already stored in the system.",
            "properties": {
              "name": {
                "type": "string",
                "description": "Product name.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item/None of the order items_ &rarr; _Select a product collection or create a new product collection based on name filters_.",
                "example": "Phone"
              },
              "price": {
                "type": "integer",
                "description": "Unit price of an item. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
                "example": 10000
              },
              "metadata": {
                "type": "object",
                "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **product** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item/None of the order items_ &rarr; _Select a product collection or create a new product collection based on metadata filters_. [Read more](/personalize/create-validation-rules)."
              }
            }
          }
        }
      },
      "1_req_obj_vouchers_qualification_product_using_source_id": {
        "title": "Product Item using source_id",
        "type": "object",
        "description": "Schema model for a product item. You can send this object in the request body to check against vouchers requiring specific product validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure/Order volume_ or _Basic Builder_ &rarr; _Order_. [Read more](/personalize/create-validation-rules).",
        "properties": {
          "source_id": {
            "type": "string",
            "description": "A unique product identifier from your inventory system. __Requires__ the `related_object` property to be defined. \n\n The qualification runs against rules that are defined through the Create Validation Rules endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order Structure_ &rarr; _Every order item/Any order item/None of the order items_ &rarr; _Select a product collection or create a new product collection based on Source Id filters_ . [Read more](/personalize/validation-rules-reference).",
            "example": "product_1234"
          },
          "amount": {
            "type": "integer",
            "description": "Represents a total pre-discount amount of order item (`price` * `quantity`). You can send the total item amount to check against vouchers requiring specific order amount validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order volume_ &rarr; _Total amount_. The qualification adds the individual amounts of the items and checks whether the sum meets the limits set by the _Total amount_. Additionally, another rule checked is one that is defined in _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item_ &rarr; _Subtotal of matched items_.  \n\nThe value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
            "example": 10000
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity of the item in the cart. \n\nThe qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order Volume_ &rarr; _Items quantity_. The qualification adds the individual quantities of the items and checks whether the sum meets the limits set by _Items quantity_ validation rule. Another validation rule against which the qualification does the checks is defined in the _Advanced Rule Builder_ &rarr; _Order Structure_ &rarr; _Every order item/Any order item_ &rarr; _Quantity of matched items_. [Read more](/personalize/validation-rules-reference).",
            "example": 1
          },
          "price": {
            "type": "integer",
            "description": "Unit price of an item. [This is not true in the case of using sourceid what was the case that this happened.]This `price` property takes precedence. If you provide a value at this level, then a price property defined once again in the `related_object` will be ignored. If this property will not be defined here, then the `price` property in the `related_object` will be used in the qualification.\n\n The qualification runs against rules that are defined through the Create Validation Rules endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order Structure_ &rarr; _Every order item/Any order item_ &rarr; _Unit Price of any matching order line_ and also _Order Volume_ &rarr; _Price of each item/Price of any item_. [Read more](/personalize/validation-rules-reference).\n\n The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
            "example": 10000
          },
          "metadata": {
            "type": "object",
            "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **order line item** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item_ &rarr; _Metadata of matched items_. [Read more](/personalize/create-validation-rules)."
          },
          "related_object": {
            "type": "string",
            "default": "product",
            "enum": [
              "product"
            ],
            "description": "A reference to the object containing details of the related product. __Required__ when sending `source_id` in payload."
          },
          "product": {
            "type": "object",
            "description": "An object containing details of the related product. __Required__ when sending `source_id` in payload. These details will be used for qualification on top of details already stored in the system.",
            "properties": {
              "source_id": {
                "type": "string",
                "description": "A unique product identifier from your inventory system.",
                "example": "product_1234"
              },
              "name": {
                "type": "string",
                "description": "Product name.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item/None of the order items_ &rarr; _Select a product collection or create a new product collection based on name filters_.",
                "example": "Phone"
              },
              "price": {
                "type": "integer",
                "description": "Unit price of an item. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
                "example": 10000
              },
              "metadata": {
                "type": "object",
                "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **product** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item/None of the order items_ &rarr; _Select a product collection or create a new product collection based on metadata filters_. [Read more](/personalize/create-validation-rules)."
              }
            }
          }
        },
        "required": [
          "source_id",
          "related_object"
        ]
      },
      "1_res_obj_vouchers_qualification_applicable_to": {
        "title": "ApplicableToObject",
        "type": "object",
        "description": "",
        "properties": {
          "applicable_to": {
            "$ref": "#/components/schemas/6_res_applicable_to_object"
          }
        }
      },
      "1_res_obj_vouchers_qualification_inapplicable_to": {
        "title": "InapplicableToObject",
        "type": "object",
        "properties": {
          "inapplicable_to": {
            "$ref": "#/components/schemas/6_res_inapplicable_to_object"
          }
        }
      },
      "VoucherBase": {
        "title": "Voucher Base",
        "description": "This is an object representing a voucher.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "v_mkZN9v7vjYUadXnHrMza8W5c34fE5KiV",
            "description": "Assigned by the Voucherify API, identifies the voucher."
          },
          "code": {
            "type": "string",
            "example": "WVPblOYX",
            "description": "A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters."
          },
          "campaign": {
            "type": "string",
            "example": "Gift Card Campaign",
            "description": "A unique campaign name, identifies the voucher's parent campaign."
          },
          "campaign_id": {
            "type": "string",
            "example": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
            "description": "Assigned by the Voucherify API, identifies the voucher's parent campaign."
          },
          "category": {
            "type": "string",
            "description": "Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint."
          },
          "category_id": {
            "type": "string",
            "description": "Unique category ID assigned by Voucherify.",
            "example": "cat_0bb343dee3cdb5ec0c"
          },
          "type": {
            "type": "string",
            "enum": [
              "GIFT_VOUCHER",
              "DISCOUNT_VOUCHER",
              "LOYALTY_CARD"
            ],
            "description": "Defines the type of the voucher. "
          },
          "discount": {
            "$ref": "#/components/schemas/Discount"
          },
          "gift": {
            "type": "object",
            "description": "Object representing gift parameters. Child attributes are present only if `type` is `GIFT_VOUCHER`. Defaults to `null`.",
            "properties": {
              "amount": {
                "type": "integer",
                "example": 10000,
                "description": "Total gift card income over the lifetime of the card. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
              },
              "subtracted_amount": {
                "type": "integer",
                "description": "Total amount of subtracted credits over the gift card lifetime. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
              },
              "balance": {
                "type": "integer",
                "example": 500,
                "description": "Available funds. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
              },
              "effect": {
                "type": "string",
                "enum": [
                  "APPLY_TO_ORDER",
                  "APPLY_TO_ITEMS"
                ],
                "description": "Defines how the credits are applied to the customer's order."
              }
            }
          },
          "loyalty_card": {
            "type": "object",
            "description": "Object representing loyalty card parameters. Child attributes are present only if `type` is `LOYALTY_CARD`. Defaults to `null`.",
            "properties": {
              "points": {
                "type": "integer",
                "example": 7000,
                "description": "Total number of points added to the loyalty card over its lifespan."
              },
              "balance": {
                "type": "integer",
                "example": 6970,
                "description": "Points available for reward redemption. This is calculated as follows: `balance` = `points` - `expired_points` - `subtracted_points` - `redemption.redeemed_points`."
              },
              "next_expiration_date": {
                "type": "string",
                "format": "date",
                "example": "2023-05-30",
                "description": "The next closest date when the next set of points are due to expire."
              },
              "next_expiration_points": {
                "type": "integer",
                "description": "The amount of points that are set to expire next."
              },
              "pending_points": {
                "type": "integer",
                "description": "Shows the number of pending points that will be added to the loyalty card when they are activated automatically or manually."
              },
              "expired_points": {
                "type": "integer",
                "description": "Shows the total number of expired points over the lifetime of the loyalty card."
              },
              "subtracted_points": {
                "type": "integer",
                "description": "Shows the total number of subtracted points over the lifetime of the loyalty card."
              }
            }
          },
          "start_date": {
            "type": "string",
            "example": "2021-12-01T00:00:00.000Z",
            "format": "date-time",
            "description": "Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. "
          },
          "expiration_date": {
            "type": "string",
            "example": "2021-12-31T00:00:00.000Z",
            "format": "date-time",
            "description": "Expiration timestamp defines when the code expires in ISO 8601 format.  Voucher is *inactive after* this date."
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "active": {
            "type": "boolean",
            "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. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "example": "2021-12-22T10:14:45.316Z",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the voucher was last updated in ISO 8601 format."
          },
          "holder_id": {
            "type": "string",
            "example": "cust_eWgXlBBiY6THFRJwX45Iakv4",
            "description": "Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify."
          },
          "referrer_id": {
            "type": "string",
            "description": "Unique identifier of the referring person.",
            "example": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. Default is `voucher`.",
            "default": "voucher"
          },
          "publish": {
            "type": "object",
            "description": "Stores a summary of publication events: an event counter and endpoint to return details of each event. Publication is an assignment of a code to a customer, e.g. through a distribution.",
            "properties": {
              "object": {
                "type": "string",
                "default": "list",
                "description": "The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute."
              },
              "count": {
                "type": "integer",
                "example": 0,
                "description": "Publication events counter."
              },
              "url": {
                "type": "string",
                "example": "/v1/vouchers/WVPblOYX/publications?page=1&limit=10",
                "description": "The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications`"
              }
            }
          },
          "redemption": {
            "type": "object",
            "description": "Stores a summary of redemptions that have been applied to the voucher.",
            "properties": {
              "quantity": {
                "type": "integer",
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              },
              "redeemed_quantity": {
                "type": "integer",
                "example": 1,
                "description": "How many times a voucher has already been redeemed."
              },
              "redeemed_points": {
                "type": "integer",
                "example": 100000,
                "description": "Total loyalty points redeemed."
              },
              "object": {
                "type": "string",
                "default": "list",
                "description": "The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute."
              },
              "url": {
                "type": "string",
                "example": "/v1/vouchers/WVPblOYX/redemptions?page=1&limit=10",
                "description": "The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions`"
              }
            }
          }
        }
      },
      "Category": {
        "title": "Category",
        "description": "This is an object representing a category.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique category ID assigned by Voucherify."
          },
          "name": {
            "type": "string",
            "description": "Category name."
          },
          "hierarchy": {
            "type": "integer",
            "description": "Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.",
            "minimum": 0
          },
          "object": {
            "type": "string",
            "default": "category",
            "enum": [
              "category"
            ],
            "description": "The type of the object represented by the JSON. This object stores information about the category."
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.",
            "example": "2022-07-14T10:45:13.156Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "example": "2022-08-16T10:52:08.094Z",
            "description": "Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "hierarchy",
          "created_at",
          "object"
        ]
      },
      "VoucherCreateLoyaltyCardWithSpecificCode": {
        "title": "Create loyalty card with specific code",
        "type": "object",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "example": "WVPblOYX",
                "description": "Code that identifies a voucher. The pattern can use all the letters of the English alphabet, Arabic numerals, and special characters. Pass this attribute in the request body to create a distinct code. Otherwise, either use the `code_config` object to set the rules that the Voucherify API will use to create a random code, or don't pass any code and Voucherify will generate a random code."
              }
            },
            "required": [
              "code"
            ]
          },
          {
            "$ref": "#/components/schemas/VoucherCreateLoyaltyCard"
          }
        ]
      },
      "VoucherCreateLoyaltyCardWithCodeConfig": {
        "title": "Create loyalty card with code config",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherCreateLoyaltyCard"
          },
          {
            "type": "object",
            "properties": {
              "code_config": {
                "$ref": "#/components/schemas/CodeConfig"
              }
            }
          }
        ]
      },
      "VoucherCreateGiftWithSpecificCode": {
        "title": "Create gift card with specific code",
        "type": "object",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "example": "WVPblOYX",
                "description": "Code that identifies a voucher. The pattern can use all the letters of the English alphabet, Arabic numerals, and special characters. Pass this attribute in the request body to create a distinct code. Otherwise, either use the `code_config` object to set the rules that the Voucherify API will use to create a random code, or don't pass any code and Voucherify will generate a random code."
              }
            },
            "required": [
              "code"
            ]
          },
          {
            "$ref": "#/components/schemas/VoucherCreateGift"
          }
        ]
      },
      "VoucherCreateGiftWithCodeConfig": {
        "title": "Create gift card with code config",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherCreateGift"
          },
          {
            "type": "object",
            "properties": {
              "code_config": {
                "$ref": "#/components/schemas/CodeConfig"
              }
            },
            "required": [
              "code_config"
            ]
          }
        ]
      },
      "VoucherCreateDiscountWithSpecificCode": {
        "title": "Create voucher in a discount campaign with specific code",
        "type": "object",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "example": "WVPblOYX",
                "description": "Code that identifies a voucher. The pattern can use all the letters of the English alphabet, Arabic numerals, and special characters. Pass this attribute in the request body to create a distinct code. Otherwise, either use the `code_config` object to set the rules that the Voucherify API will use to create a random code, or don't pass any code and Voucherify will generate a random code."
              }
            },
            "required": [
              "code"
            ]
          },
          {
            "$ref": "#/components/schemas/VoucherCreateDiscount"
          }
        ]
      },
      "VoucherCreateDiscountWithCodeConfig": {
        "title": "Create voucher in a discount campaign with code config",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherCreateDiscount"
          },
          {
            "type": "object",
            "properties": {
              "code_config": {
                "$ref": "#/components/schemas/CodeConfig"
              }
            }
          }
        ]
      },
      "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"
        ]
      },
      "VoucherUpdateBase": {
        "title": "Voucher Update Base",
        "type": "object",
        "properties": {
          "category": {
            "type": "string",
            "description": "The name of the category that this voucher belongs to. Useful when listing vouchers with the [List Vouchers](/api-reference/vouchers/list-vouchers) endpoint."
          },
          "category_id": {
            "type": "string",
            "description": "Unique identifier assigned by Voucherify to the name of the category that this voucher belongs to. Useful when listing vouchers with the [List Vouchers](/api-reference/vouchers/list-vouchers) endpoint.",
            "example": "cat_0bb81a481615a37b5e"
          },
          "start_date": {
            "type": "string",
            "example": "2021-12-01T00:00:00.000Z",
            "format": "date-time",
            "description": "Start date defines when the code starts to be active. Activation timestamp is presented in the 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 date defines when the code expires. Expiration timestamp is presented in the ISO 8601 format.  Voucher is *inactive after* this date."
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "active": {
            "type": "boolean",
            "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."
          }
        }
      },
      "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"
          }
        ]
      },
      "VoucherCreateBase": {
        "title": "Voucher Create Base",
        "type": "object",
        "properties": {
          "campaign": {
            "type": "string",
            "example": "Gift Card Campaign",
            "description": "Identifies the voucher's parent campaign using a unique campaign name."
          },
          "campaign_id": {
            "type": "string",
            "example": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
            "description": "Identifies the voucher's parent campaign using a unique campaign ID assigned by the Voucherify API."
          },
          "category": {
            "type": "string",
            "description": "The name of the category that this voucher belongs to. Useful when listing vouchers with the [List Vouchers](/api-reference/vouchers/list-vouchers) endpoint."
          },
          "category_id": {
            "type": "string",
            "description": "Unique identifier assigned by Voucherify to the name of the category that this voucher belongs to. Useful when listing vouchers with the [List Vouchers](/api-reference/vouchers/list-vouchers) endpoint.",
            "example": "cat_0b6152ce12414820dc"
          },
          "start_date": {
            "type": "string",
            "example": "2021-12-01T00:00:00.000Z",
            "format": "date-time",
            "description": "Start date defines when the code starts to be active. Activation timestamp is presented in the 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 date defines when the code expires. Expiration timestamp is presented in the ISO 8601 format.  Voucher is *inactive after* this date."
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "active": {
            "type": "boolean",
            "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."
          },
          "validation_rules": {
            "type": "array",
            "description": "Array containing the ID of the validation rule associated with the voucher.",
            "items": {
              "type": "string",
              "example": "[val_4j7DCRm2IS59]"
            }
          },
          "redemption": {
            "type": "object",
            "description": "Stores the quantity of redemptions that can be applied to the voucher.",
            "properties": {
              "quantity": {
                "type": "integer",
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              }
            }
          }
        }
      },
      "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."
          }
        }
      },
      "Gift": {
        "title": "Gift",
        "type": "object",
        "description": "Contains current gift card balance information.",
        "properties": {
          "amount": {
            "type": "number",
            "description": "Total gift card income over the lifetime of the card. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "subtracted_amount": {
            "type": "integer",
            "description": "Total amount of subtracted credits over the gift card lifetime."
          },
          "balance": {
            "type": "number",
            "description": "Available funds. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`. `balance` = `amount` - `subtracted_amount` - `redemption.redeemed_amount`."
          },
          "effect": {
            "type": "string",
            "description": "Defines how the credits are applied to the customer's order.",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS"
            ]
          }
        },
        "required": [
          "amount",
          "balance"
        ]
      },
      "VoucherTransactionBase": {
        "title": "Voucher Transaction Base",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique transaction ID."
          },
          "source_id": {
            "type": "string",
            "nullable": true,
            "description": "The merchant's transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service. In case of a redemption, this value is null."
          },
          "voucher_id": {
            "type": "string",
            "description": "Unique voucher ID."
          },
          "campaign_id": {
            "type": "string",
            "description": "Unqiue campaign ID 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 or the Dashboard. In case of a redemption, this value is null."
          },
          "reason": {
            "type": "string",
            "nullable": true,
            "description": "Reason why the transaction occurred. In case of a redemption, this value is null."
          },
          "related_transaction_id": {
            "type": "string",
            "nullable": true,
            "description": "The related transaction ID on the receiving card."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the transaction was created. The value is shown in the ISO 8601 format."
          }
        },
        "required": [
          "id",
          "source_id",
          "voucher_id",
          "campaign_id",
          "source",
          "reason",
          "type",
          "details",
          "related_transaction_id",
          "created_at"
        ]
      },
      "VoucherBalance": {
        "type": "object",
        "title": "Voucher Balance",
        "description": "Contains information on how the balance was affected by the transaction.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of voucher whose balance is being adjusted due to the transaction.",
            "enum": [
              "loyalty_card",
              "gift_voucher"
            ]
          },
          "total": {
            "type": "integer",
            "description": "The number of all points or credits accumulated on the card as affected by add or subtract operations."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON.",
            "enum": [
              "balance"
            ]
          },
          "amount": {
            "type": "integer",
            "description": "Credits added or subtracted on a gift card."
          },
          "points": {
            "type": "integer",
            "description": "Points added or subtracted in the transaction of a loyalty card."
          },
          "balance": {
            "type": "integer",
            "description": "The available points or credits on the card after the transaction as affected by redemption or rollback."
          },
          "operation_type": {
            "type": "string",
            "description": "The type of the operation being performed. The operation type is `AUTOMATIC` if it is an automatic redemption.",
            "enum": [
              "MANUAL",
              "AUTOMATIC"
            ]
          },
          "related_object": {
            "type": "object",
            "required": [
              "id",
              "type"
            ],
            "description": "Defines the resource that is being modified with the values that are returned in the balance object.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Identifies the voucher that is being modified. The ID is assigned by the Voucherify API."
              },
              "type": {
                "type": "string",
                "description": "The object being modified, i.e. voucher.",
                "enum": [
                  "voucher"
                ]
              }
            }
          }
        },
        "required": [
          "total",
          "object",
          "balance",
          "related_object"
        ]
      },
      "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"
        ]
      },
      "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."
              },
              "redeemed_points": {
                "type": "integer",
                "description": "Total loyalty points redeemed."
              }
            },
            "required": [
              "quantity",
              "redeemed_quantity"
            ]
          },
          "start_date": {
            "type": "string",
            "example": "2021-12-01T00:00:00.000Z",
            "format": "date-time",
            "description": "Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date."
          },
          "expiration_date": {
            "type": "string",
            "example": "2021-12-31T00:00:00.000Z",
            "format": "date-time",
            "description": "Expiration timestamp defines when the code expires in ISO 8601 format.  Voucher is *inactive after* this date."
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a voucher. The metadata object stores all custom attributes assigned to the voucher."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "voucher",
            "enum": [
              "voucher"
            ]
          }
        },
        "required": [
          "type",
          "code",
          "created_at",
          "object"
        ]
      },
      "GiftVoucherTransactionsType": {
        "title": "Gift Card Transactions Type",
        "type": "string",
        "description": "Transaction types concerning gift card credits.",
        "enum": [
          "CREDITS_REDEMPTION",
          "CREDITS_REFUND",
          "CREDITS_ADDITION",
          "CREDITS_REMOVAL"
        ]
      },
      "LoyaltyCardTransactionsType": {
        "title": "Loyalty Card Transactions Type",
        "type": "string",
        "description": "Transaction types concerning loyalty points.",
        "enum": [
          "PENDING_POINTS_ACTIVATION",
          "POINTS_ACCRUAL",
          "POINTS_REDEMPTION",
          "POINTS_REFUND",
          "POINTS_ADDITION",
          "POINTS_REMOVAL",
          "POINTS_EXPIRATION",
          "POINTS_TRANSFER_IN",
          "POINTS_TRANSFER_OUT"
        ]
      },
      "VoucherTransactionsFilters": {
        "description": "List of available fields and filters that can be exported with gift card or loyalty card transactions along with the sorting order of the returned data.",
        "title": "Voucher Transactions",
        "type": "object",
        "properties": {
          "order": {
            "type": "string",
            "description": "How the export is filtered, where the dash `-` preceding a sorting option means sorting in a descending order.",
            "enum": [
              "-created_at",
              "created_at"
            ]
          },
          "fields": {
            "type": "array",
            "description": "Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields:\n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| id | Unique transaction ID. | vtx_0cb7811f1c07765800 |\n| type | Transaction type. | - `CREDITS_REMOVAL` <br /> - `CREDITS_ADDITION` <br /> - `CREDITS_REFUND` <br /> - `CREDITS_REDEMPTION` <br /> - `POINTS_ACCRUAL`<br /> - `POINTS_REDEMPTION`<br /> - `POINTS_REFUND`<br /> - `POINTS_ADDITION`<br /> - `POINTS_REMOVAL`<br /> - `POINTS_EXPIRATION`<br /> - `POINTS_TRANSFER_IN`<br /> - `POINTS_TRANSFER_OUT` |\n| source_id | Unique transaction source ID. | 8638 |\n| reason | Contains the reason for the transaction if one was included originally. |  |\n| balance | The gift card or loyalty card balance after the transaction. |  |\n| amount | The amount of gift card or loyalty card credits being allocated during the transaction. This value can either be negative or positive depending on the nature of the transaction. |  |\n| created_at | Timestamp in ISO 8601 format representing the date and time when the transaction was created. | 2022-03-09T09:16:32.521Z  |\n| voucher_id | Unique Voucher ID. | v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp |\n| campaign_id | Parent campaign ID. | camp_FNYR4jhqZBM9xTptxDGgeNBV |\n| source|  Channel through which the transaction was initiated. | API |\n| details | More detailed information stored in the form of a JSON. | Provides more details related to the transaction in the form of an object. |\n| related_transaction_id | Unique transaction ID related to a receiver/donor card in the case of a points transfer from/to another card. | vtx_0c9afe802593b34b80 |",
            "items": {
              "type": "string",
              "enum": [
                "id",
                "type",
                "source_id",
                "reason",
                "balance",
                "amount",
                "created_at",
                "voucher_id",
                "campaign_id",
                "source",
                "details",
                "related_transaction_id"
              ]
            }
          },
          "filters": {
            "$ref": "#/components/schemas/VoucherTransactionsExportFilterConditions"
          }
        },
        "required": [
          "filters"
        ]
      },
      "VoucherImportGift": {
        "title": "Voucher Import Gift",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherImportBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "default": "GIFT_VOUCHER",
                "enum": [
                  "GIFT_VOUCHER"
                ],
                "description": "Defines the type of the voucher. "
              },
              "gift": {
                "$ref": "#/components/schemas/Gift"
              }
            },
            "required": [
              "gift"
            ]
          }
        ]
      },
      "VoucherImportDiscount": {
        "title": "Voucher Import Discount",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherImportBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "default": "DISCOUNT_VOUCHER",
                "enum": [
                  "DISCOUNT_VOUCHER"
                ],
                "description": "Defines the type of the voucher. "
              },
              "discount": {
                "$ref": "#/components/schemas/Discount"
              }
            },
            "required": [
              "discount"
            ]
          }
        ]
      },
      "6_res_applicable_to_object": {
        "title": "Included  Items",
        "type": "object",
        "description": "Contains list of items that qualify in the scope of the discount. These are definitions of included products, SKUs, and product collections. These can be discounted.",
        "properties": {
          "data": {
            "type": "array",
            "description": "Contains array of items to which the discount can apply.",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/6_res_product_collection"
                },
                {
                  "$ref": "#/components/schemas/6_res_product_collection_unit"
                },
                {
                  "$ref": "#/components/schemas/6_res_product_collection_fixed_amount"
                },
                {
                  "$ref": "#/components/schemas/6_res_product"
                },
                {
                  "$ref": "#/components/schemas/6_res_product_unit"
                },
                {
                  "$ref": "#/components/schemas/6_res_product_fixed_amount"
                },
                {
                  "$ref": "#/components/schemas/6_res_sku"
                },
                {
                  "$ref": "#/components/schemas/6_res_sku_unit"
                },
                {
                  "$ref": "#/components/schemas/6_res_sku_unit_fixed_amount"
                }
              ]
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of objects defining included products, SKUs, or product collections."
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of included objects."
          },
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about included products, SKUs, or product collections in a dictionary."
          }
        }
      },
      "6_res_inapplicable_to_object": {
        "title": "Excluded Items",
        "type": "object",
        "description": "Contains list of items that **do not** qualify in the scope of the discount. These are definitions of excluded products, SKUs, and product collections. These **CANNOT** be discounted.",
        "properties": {
          "data": {
            "description": "Contains array of items to which the discount cannot apply.",
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/6_res_product_collection_excluded"
                },
                {
                  "$ref": "#/components/schemas/6_res_product_excluded"
                },
                {
                  "$ref": "#/components/schemas/6_res_sku_excluded"
                }
              ]
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of objects defining excluded products, SKUs, or product collections."
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of excluded objects."
          },
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about excluded products, SKUs, or product collections in a dictionary."
          }
        }
      },
      "ValidityTimeframe": {
        "title": "Validity Timeframe",
        "type": "object",
        "description": "Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.",
        "properties": {
          "duration": {
            "type": "string",
            "description": "Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a `duration` of `PT1H` will be valid for a duration of one hour.",
            "example": "PT1H"
          },
          "interval": {
            "type": "string",
            "description": "Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an `interval` of `P2D` will be valid every other day.",
            "example": "P2D"
          }
        }
      },
      "ValidityDayOfWeek": {
        "title": "Validity Day Of Week",
        "type": "array",
        "description": "Integer array corresponding to the particular days of the week in which the voucher is valid.\n\n- `0` Sunday\n- `1` Monday\n- `2` Tuesday\n- `3` Wednesday\n- `4` Thursday\n- `5` Friday\n- `6` Saturday",
        "items": {
          "type": "integer",
          "enum": [
            0,
            1,
            2,
            3,
            4,
            5,
            6
          ]
        }
      },
      "ValidityHours": {
        "title": "Validity Hours",
        "type": "object",
        "description": "Determines the hours of validity, e.g. to create a happy hours scenario.",
        "properties": {
          "daily": {
            "type": "array",
            "description": "Defines the recurring period(s) when the resource is active. The periods should not overlap.",
            "items": {
              "type": "object",
              "description": "Defines the recurring period(s) when the resource will be active.",
              "properties": {
                "start_time": {
                  "type": "string",
                  "format": "time",
                  "description": "Defines the starting hour of validity in the HH:mm format. The resource is *inactive before* this time.",
                  "example": "12:00"
                },
                "days_of_week": {
                  "type": "array",
                  "description": "Integer array corresponding to the particular days of the week in which the resource is valid.\n\n- `0` Sunday\n- `1` Monday\n- `2` Tuesday\n- `3`  Wednesday\n- `4` Thursday\n- `5` Friday\n- `6` Saturday",
                  "items": {
                    "type": "integer",
                    "enum": [
                      0,
                      1,
                      2,
                      3,
                      4,
                      5,
                      6
                    ]
                  }
                },
                "expiration_time": {
                  "type": "string",
                  "format": "time",
                  "description": "Defines the ending hour of validity in the HH:mm format. The resource is *inactive after* this time.",
                  "example": "14:00"
                }
              }
            }
          }
        }
      },
      "VoucherAssets": {
        "title": "Voucher Assets",
        "type": "object",
        "description": "Stores links to images of QR and barcode that correspond to an encrypted voucher code.",
        "properties": {
          "qr": {
            "type": "object",
            "description": "Stores Quick Response (QR) representation of encrypted code.",
            "properties": {
              "id": {
                "type": "string",
                "example": "U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q==",
                "description": "Encrypted voucher code ID."
              },
              "url": {
                "type": "string",
                "example": "https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D",
                "description": "URL to QR code  \n\n*Optional:* Attach query parameters to base URL to customize the image of the encrypted voucher code.  \n\n- `size`: integer value from `1` to `100`  \n- `format`: string, either `png` (default) or `svg`"
              }
            }
          },
          "barcode": {
            "type": "object",
            "description": "Stores barcode representation of encrypted code.",
            "properties": {
              "id": {
                "type": "string",
                "example": "U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ==",
                "description": "Encrypted voucher code ID."
              },
              "url": {
                "type": "string",
                "example": "https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D",
                "description": "URL to barcode  \n\n*Optional:* Attach query parameters to base URL to customize the image of the encrypted voucher code.  \n\n- `size`: integer value from `1` to `100`  \n- `format`: string, either `png` (default) or `svg`"
              }
            }
          }
        }
      },
      "CodeConfig": {
        "title": "Code Config",
        "type": "object",
        "description": "Contains information about the config used for the voucher code. Defines the code's pattern (prefix, postfix, length, charset, etc).",
        "properties": {
          "length": {
            "type": "number",
            "description": "Number of characters in a generated code (excluding prefix and postfix)."
          },
          "charset": {
            "type": "string",
            "description": "Characters that can appear in the code.  \n\nExamples:\n\n- Alphanumeric: `0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` \n- Alphabetic: `abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` \n- Alphabetic Lowercase: `abcdefghijklmnopqrstuvwxyz` \n- Alphabetic Uppercase: `ABCDEFGHIJKLMNOPQRSTUVWXYZ` \n- Numbers: `0123456789`  \n- Custom: a custom character set"
          },
          "prefix": {
            "type": "string",
            "description": "A text appended before the code."
          },
          "postfix": {
            "type": "string",
            "description": "A text appended after the code."
          },
          "pattern": {
            "type": "string",
            "description": "A pattern for codes where hashes (#) will be replaced with random characters. Overrides `length`."
          },
          "initial_count": {
            "type": "integer",
            "description": "Internal value, does not change anything if provided."
          }
        }
      },
      "BusValRuleAssignment": {
        "title": "Business Validation Rule Assignment",
        "description": "Assignments of business validation rule",
        "example": {
          "id": "asgm_LnY1g7UNFA9KyDrD",
          "rule_id": "val_3gPNA6SnH4ae",
          "related_object_id": "camp_CZOnEGiZfwIKWmSjhIoIT7Ol",
          "related_object_type": "campaign",
          "object": "validation_rules_assignment",
          "validation_status": "PARTIALLY_VALID",
          "validation_omitted_rules": [
            "1"
          ]
        },
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier for a assignment"
          },
          "rule_id": {
            "type": "string",
            "description": "The unique identifier for a rule"
          },
          "related_object_id": {
            "type": "string",
            "description": "The unique identifier for a related object"
          },
          "related_object_type": {
            "type": "string",
            "description": "The type of related object"
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.",
            "example": "2022-03-09T11:19:04.819Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the object was last updated in ISO 8601 format.",
            "example": "2022-03-09T11:19:04.819Z",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "validation_rules_assignment",
            "enum": [
              "validation_rules_assignment"
            ]
          },
          "validation_status": {
            "type": "string",
            "description": "The validation status of the assignment",
            "enum": [
              "VALID",
              "PARTIALLY_VALID",
              "INVALID"
            ]
          },
          "validation_omitted_rules": {
            "type": "array",
            "description": "The list of omitted rules",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "rule_id",
          "related_object_id",
          "related_object_type",
          "object"
        ]
      },
      "DiscountAmount": {
        "type": "object",
        "title": "Amount",
        "properties": {
          "type": {
            "type": "string",
            "default": "AMOUNT",
            "enum": [
              "AMOUNT"
            ],
            "description": "Defines the type of the voucher."
          },
          "amount_off": {
            "type": "number",
            "description": "Amount taken off the subtotal of a price. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000."
          },
          "amount_off_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the discount."
          },
          "aggregated_amount_limit": {
            "type": "integer",
            "description": "Maximum discount amount per order."
          },
          "effect": {
            "description": "Defines how the discount is applied to the customer's order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DiscountAmountVouchersEffectTypes"
              }
            ]
          },
          "is_dynamic": {
            "type": "boolean",
            "description": "Flag indicating whether the discount was calculated using a formula."
          }
        },
        "required": [
          "type",
          "amount_off"
        ]
      },
      "DiscountUnit": {
        "type": "object",
        "title": "Unit",
        "properties": {
          "type": {
            "type": "string",
            "default": "UNIT",
            "enum": [
              "UNIT"
            ],
            "description": "Discount type."
          },
          "unit_off": {
            "type": "integer",
            "description": "Number of units to be granted a full value discount."
          },
          "unit_off_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the number of units."
          },
          "effect": {
            "description": "Defines how the unit is added to the customer's order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DiscountUnitVouchersEffectTypes"
              }
            ]
          },
          "unit_type": {
            "type": "string",
            "description": "The product deemed as free, chosen from product inventory (e.g. time, items)."
          },
          "product": {
            "description": "Contains information about the product.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleProductDiscountUnit"
              }
            ]
          },
          "sku": {
            "$ref": "#/components/schemas/SimpleSkuDiscountUnit"
          },
          "is_dynamic": {
            "type": "boolean",
            "description": "Flag indicating whether the discount was calculated using a formula."
          }
        },
        "required": [
          "type",
          "unit_type"
        ]
      },
      "DiscountUnitMultiple": {
        "type": "object",
        "title": "Unit Multiple",
        "properties": {
          "type": {
            "type": "string",
            "default": "UNIT",
            "enum": [
              "UNIT"
            ],
            "description": "Discount type."
          },
          "effect": {
            "type": "string",
            "default": "ADD_MANY_ITEMS",
            "enum": [
              "ADD_MANY_ITEMS"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          },
          "units": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiscountUnitMultipleOneUnit"
            }
          }
        },
        "required": [
          "type",
          "units"
        ]
      },
      "DiscountPercent": {
        "type": "object",
        "title": "Percent",
        "properties": {
          "type": {
            "type": "string",
            "default": "PERCENT",
            "enum": [
              "PERCENT"
            ],
            "description": "Defines the type of the voucher."
          },
          "percent_off": {
            "type": "number",
            "description": "The percent discount that the customer will receive."
          },
          "percent_off_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the discount."
          },
          "amount_limit": {
            "type": "number",
            "description": "Upper limit allowed to be applied as a discount. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600."
          },
          "aggregated_amount_limit": {
            "type": "integer",
            "description": "Maximum discount amount per order."
          },
          "effect": {
            "description": "Defines how the discount is applied to the customer's order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DiscountPercentVouchersEffectTypes"
              }
            ]
          },
          "is_dynamic": {
            "type": "boolean",
            "description": "Flag indicating whether the discount was calculated using a formula."
          }
        },
        "required": [
          "type",
          "percent_off"
        ]
      },
      "DiscountFixed": {
        "title": "Fixed",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "FIXED",
            "enum": [
              "FIXED"
            ],
            "description": "Defines the type of the voucher."
          },
          "fixed_amount": {
            "type": "number",
            "description": "Sets a fixed value for an order total or the item price. The value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000. If the fixed amount is calculated by the formula, i.e. the `fixed_amount_formula` parameter is present in the fixed amount definition, this value becomes the **fallback value**. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value."
          },
          "fixed_amount_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the discount."
          },
          "effect": {
            "description": "Defines how the discount is applied to the customer's order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DiscountFixedVouchersEffectTypes"
              }
            ]
          },
          "is_dynamic": {
            "type": "boolean",
            "description": "Flag indicating whether the discount was calculated using a formula."
          }
        },
        "required": [
          "type",
          "fixed_amount"
        ]
      },
      "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"
        ]
      },
      "VoucherTransactionsExportFilterConditions": {
        "description": "Filter condition.",
        "title": "Filter by voucher ID",
        "type": "object",
        "required": [
          "voucher_id"
        ],
        "properties": {
          "voucher_id": {
            "type": "object",
            "required": [
              "conditions"
            ],
            "description": "Data filters used to narrow down the data records to be returned in the result.",
            "properties": {
              "conditions": {
                "type": "object",
                "required": [
                  "$in"
                ],
                "description": "Data filters used to narrow down the data records to be returned in the result.",
                "properties": {
                  "$in": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 1,
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1
                    }
                  }
                }
              }
            }
          }
        }
      },
      "VoucherImportBase": {
        "title": "Voucher Import Base",
        "type": "object",
        "description": "Object model for gift card object being imported.",
        "properties": {
          "code": {
            "type": "string",
            "description": "Value representing the imported code."
          },
          "redemption": {
            "type": "object",
            "description": "Stores the quantity of redemptions that can be applied to the voucher.",
            "properties": {
              "quantity": {
                "type": "integer",
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited.",
                "example": 10
              }
            }
          },
          "active": {
            "type": "boolean",
            "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"
          },
          "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."
          },
          "category": {
            "type": "string",
            "description": "Tag defining the category that this voucher belongs to. Useful when listing vouchers using the [List Vouchers](/api-reference/vouchers/list-vouchers) endpoint."
          },
          "start_date": {
            "type": "string",
            "description": "Activation timestamp presented in the ISO 8601 format. Voucher is *inactive before* this date. Start date defines when the code starts to be active.\nAllowed date formats are:\n- YYYY-MM-DD\n- YYYY-MM-DDTHH\n- YYYY-MM-DDTHH:mm\n- YYYY-MM-DDTHH:mm:ss\n- YYYY-MM-DDTHH:mm:ssZ\n- YYYY-MM-DDTHH:mm:ss.SSSZ",
            "format": "date-time",
            "example": "2020-12-28T12:49:16.272Z"
          },
          "expiration_date": {
            "type": "string",
            "description": "Expiration date defines when the code expires. Expiration timestamp is presented in the ISO 8601 format.  Voucher is *inactive after* this date.\nAllowed date formats are:\n- YYYY-MM-DD\n- YYYY-MM-DDTHH\n- YYYY-MM-DDTHH:mm\n- YYYY-MM-DDTHH:mm:ss\n- YYYY-MM-DDTHH:mm:ssZ\n- YYYY-MM-DDTHH:mm:ss.SSSZ",
            "format": "date-time",
            "example": "2053-12-28T12:49:16.272Z"
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "additional_info": {
            "type": "string",
            "description": "An optional field to keep any extra textual information about the code such as a code description and details."
          }
        },
        "required": [
          "code"
        ]
      },
      "6_res_product_collection": {
        "title": "Product Collection",
        "type": "object",
        "description": "Contains definition for a product collection.",
        "properties": {
          "object": {
            "type": "string",
            "default": "products_collection",
            "description": "This object stores information about the product collection."
          },
          "id": {
            "type": "string",
            "example": "pc_4ndRXAsTOzwSdHcQcxf489uU",
            "description": "Unique product collection ID assigned by Voucherify."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_product_collection_unit": {
        "title": "Product Collection for Unit Discount",
        "type": "object",
        "description": "Contains definition for a product collection.",
        "properties": {
          "object": {
            "type": "string",
            "default": "products_collection",
            "description": "This object stores information about the product collection."
          },
          "id": {
            "type": "string",
            "example": "pc_4ndRXAsTOzwSdHcQcxf489uU",
            "description": "Unique product collection ID assigned by Voucherify."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          },
          "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."
          }
        }
      },
      "6_res_product_collection_fixed_amount": {
        "title": "Product Collection for Fixed Amount Discount",
        "type": "object",
        "description": "Contains definition for a product collection.",
        "properties": {
          "object": {
            "type": "string",
            "default": "products_collection",
            "description": "This object stores information about the product collection."
          },
          "id": {
            "type": "string",
            "example": "pc_4ndRXAsTOzwSdHcQcxf489uU",
            "description": "Unique product collection ID assigned by Voucherify."
          },
          "price": {
            "type": "integer",
            "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": "string",
            "description": "Formula used to dynamically calculate the discounted price of an item.",
            "example": "\"IF(ORDER_AMOUNT > 300;ORDER_ITEM_PRICE * 0.8;ORDER_ITEM_PRICE)"
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_product": {
        "title": "Product",
        "type": "object",
        "description": "Contains definition for a product.",
        "properties": {
          "object": {
            "type": "string",
            "default": "product",
            "description": "This object stores information about the product."
          },
          "id": {
            "type": "string",
            "description": "Unique product ID assigned by Voucherify.",
            "example": "prod_0bae2dc5a090fd0184"
          },
          "source_id": {
            "type": "string",
            "description": "The product ID from your inventory system."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_product_unit": {
        "title": "Product for Unit Discount",
        "type": "object",
        "description": "Contains definition for a product.",
        "properties": {
          "object": {
            "type": "string",
            "default": "product",
            "description": "This object stores information about the product."
          },
          "id": {
            "type": "string",
            "description": "Unique product ID assigned by Voucherify.",
            "example": "prod_0bae2dc5a090fd0184"
          },
          "source_id": {
            "type": "string",
            "description": "The product ID from your inventory system."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          },
          "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."
          }
        }
      },
      "6_res_product_fixed_amount": {
        "title": "Product for Fixed Amount Discount",
        "type": "object",
        "description": "Contains definition for a product.",
        "properties": {
          "object": {
            "type": "string",
            "default": "product",
            "description": "This object stores information about the product."
          },
          "id": {
            "type": "string",
            "description": "Unique product ID assigned by Voucherify.",
            "example": "prod_0bae2dc5a090fd0184"
          },
          "source_id": {
            "type": "string",
            "description": "The product ID from your inventory system."
          },
          "price": {
            "type": "integer",
            "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": "string",
            "description": "Formula used to dynamically calculate the discounted price of an item.",
            "example": "IF(ORDER_AMOUNT > 300;ORDER_ITEM_PRICE * 0.8;ORDER_ITEM_PRICE)"
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_sku": {
        "title": "SKU",
        "type": "object",
        "description": "Contains definition for a product variant.",
        "properties": {
          "object": {
            "type": "string",
            "default": "sku",
            "description": "This object stores information about the product variant."
          },
          "id": {
            "type": "string",
            "description": "Unique SKU ID assigned by Voucherify.",
            "example": "sku_0b7d7dfb090be5c619"
          },
          "source_id": {
            "type": "string",
            "description": "The source ID 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."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_sku_unit": {
        "title": "SKU for Unit Discount",
        "type": "object",
        "description": "Contains definition for a product variant.",
        "properties": {
          "object": {
            "type": "string",
            "default": "sku",
            "description": "This object stores information about the product variant."
          },
          "id": {
            "type": "string",
            "description": "Unique SKU ID assigned by Voucherify.",
            "example": "sku_0b7d7dfb090be5c619"
          },
          "source_id": {
            "type": "string",
            "description": "The source ID 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."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          },
          "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."
          }
        }
      },
      "6_res_sku_unit_fixed_amount": {
        "title": "SKU for Amount Discount",
        "type": "object",
        "description": "Contains definition for a product variant.",
        "properties": {
          "object": {
            "type": "string",
            "default": "sku",
            "description": "This object stores information about the product variant."
          },
          "id": {
            "type": "string",
            "description": "Unique SKU ID assigned by Voucherify.",
            "example": "sku_0b7d7dfb090be5c619"
          },
          "source_id": {
            "type": "string",
            "description": "The source ID 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."
          },
          "price": {
            "type": "integer",
            "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": "string",
            "description": "Formula used to dynamically calculate the discounted price of an item.",
            "example": "IF(ORDER_AMOUNT > 200;ORDER_ITEM_PRICE * 0.2;6)"
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_product_collection_excluded": {
        "title": "Product Collection",
        "type": "object",
        "description": "Contains definition for a product collection.",
        "properties": {
          "object": {
            "type": "string",
            "default": "products_collection",
            "description": "This object stores information about the product collection."
          },
          "id": {
            "type": "string",
            "example": "pc_4ndRXAsTOzwSdHcQcxf489uU",
            "description": "Unique product collection ID assigned by Voucherify."
          },
          "effect": {
            "type": "string",
            "default": "APPLY_TO_EVERY",
            "enum": [
              "APPLY_TO_EVERY"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_product_excluded": {
        "title": "Product",
        "type": "object",
        "description": "Contains definition for a product.",
        "properties": {
          "object": {
            "type": "string",
            "default": "product",
            "description": "This product stores information about the product."
          },
          "id": {
            "type": "string",
            "description": "Unique product ID assigned by Voucherify.",
            "example": "prod_0bae2dc5a090fd0184"
          },
          "source_id": {
            "type": "string",
            "description": "The product ID from your inventory system."
          },
          "effect": {
            "type": "string",
            "default": "APPLY_TO_EVERY",
            "enum": [
              "APPLY_TO_EVERY"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_sku_excluded": {
        "title": "SKU",
        "type": "object",
        "description": "Contains definition for a product variant.",
        "properties": {
          "object": {
            "type": "string",
            "default": "sku",
            "description": "This object stores information about the product variant."
          },
          "id": {
            "type": "string",
            "description": "Unique SKU ID assigned by Voucherify.",
            "example": "sku_0b7d7dfb090be5c619"
          },
          "source_id": {
            "type": "string",
            "description": "The source ID from your inventory system."
          },
          "effect": {
            "type": "string",
            "default": "APPLY_TO_EVERY",
            "enum": [
              "APPLY_TO_EVERY"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "DiscountAmountVouchersEffectTypes": {
        "title": "Discount Amount Vouchers Effect Types",
        "enum": [
          "APPLY_TO_ORDER",
          "APPLY_TO_ITEMS",
          "APPLY_TO_ITEMS_PROPORTIONALLY",
          "APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY",
          "APPLY_TO_ITEMS_BY_QUANTITY"
        ],
        "type": "string"
      },
      "DiscountUnitVouchersEffectTypes": {
        "title": "Discount Unit Vouchers Effect Types",
        "enum": [
          "ADD_MISSING_ITEMS",
          "ADD_NEW_ITEMS",
          "ADD_MANY_ITEMS",
          "ADD_SAME_ITEMS"
        ],
        "type": "string"
      },
      "SimpleProductDiscountUnit": {
        "type": "object",
        "title": "Simple Product Discount Unit",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique product ID, assigned by Voucherify."
          },
          "source_id": {
            "type": "string",
            "description": "Product's source ID."
          },
          "name": {
            "type": "string",
            "description": "Product name."
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "SimpleSkuDiscountUnit": {
        "type": "object",
        "title": "Simple Sku Discount Unit",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique SKU ID, assigned by Voucherify."
          },
          "source_id": {
            "type": "string",
            "description": "Product variant's source ID."
          },
          "name": {
            "type": "string",
            "description": "Sku name"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "DiscountUnitMultipleOneUnit": {
        "type": "object",
        "title": "One Unit",
        "properties": {
          "unit_off": {
            "type": "number",
            "description": "Number of units to be granted a full value discount."
          },
          "unit_off_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the number of units."
          },
          "effect": {
            "type": "string",
            "enum": [
              "ADD_NEW_ITEMS",
              "ADD_MISSING_ITEMS"
            ],
            "description": "Defines how the unit is added to the customer's order.\n\n"
          },
          "unit_type": {
            "type": "string",
            "description": "The product deemed as free, chosen from product inventory (e.g. time, items)."
          },
          "product": {
            "description": "Contains information about the product.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleProductDiscountUnit"
              }
            ]
          },
          "sku": {
            "description": "Contains information about the sku.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleSkuDiscountUnit"
              }
            ]
          }
        },
        "required": [
          "effect",
          "unit_type"
        ]
      },
      "DiscountPercentVouchersEffectTypes": {
        "title": "Discount Percent Vouchers Effect Types",
        "enum": [
          "APPLY_TO_ORDER",
          "APPLY_TO_ITEMS"
        ],
        "type": "string"
      },
      "DiscountFixedVouchersEffectTypes": {
        "title": "Discount Fixed Vouchers Effect Types",
        "enum": [
          "APPLY_TO_ORDER",
          "APPLY_TO_ITEMS"
        ],
        "type": "string"
      },
      "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"
              }
            }
          }
        }
      }
    },
    "examples": {
      "res_async_actions": {
        "value": {
          "async_action_id": "aa_0ab2df092385be5ca5"
        }
      },
      "req_vouchers_metadata_1": {
        "value": {
          "codes": [
            "PROMO-CODE810",
            "PROMO-CODE726"
          ],
          "metadata": {
            "lang": "en",
            "authorized_internally": true
          }
        }
      },
      "req_vouchers_metadata_2": {
        "value": {
          "codes": [
            "PROMO-CODE810",
            "PROMO-CODE726",
            "PROMO-CODE888"
          ],
          "metadata": {
            "lang": "en",
            "authorized_internally": true
          }
        }
      }
    },
    "securitySchemes": {
      "X-App-Id": {
        "type": "apiKey",
        "name": "X-App-Id",
        "in": "header"
      },
      "X-App-Token": {
        "type": "apiKey",
        "name": "X-App-Token",
        "in": "header"
      },
      "X-Voucherify-OAuth": {
        "type": "oauth2",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://api.voucherify.io/v1/oauth/token",
            "scopes": {
              "api": "Gives access to whole server-side API.",
              "vouchers": "Gives access to all endpoints and methods starting with `v1/vouchers`.",
              "client_api": "Gives access to whole client-side API.",
              "client_vouchers": "Gives access to all endpoints and methods starting with `/client/v1/vouchers`.",
              "promotions": "Gives access to all endpoints and methods starting with `/v1/promotions`.",
              "client_promotions": "Gives access to all endpoints and methods starting with `/client/v1/promotions`",
              "campaigns": "Gives access to all endpoints and methods starting with `v1/campaigns`.",
              "client_publish": "Gives access to all endpoints and methods starting with `/client/v1/publish`.",
              "exports": "Gives access to all endpoints and methods starting with `/v1/exports`.",
              "publications": "Gives access to all endpoints and methods starting with `/v1/publications`.",
              "client_validate": "Gives access to all endpoints and methods starting with `/client/v1/validate`.",
              "validations": "Gives access to all endpoints and methods starting with `/v1/validations`.",
              "client_validations": "Gives access to all endpoints and methods starting with `/client/v1/validations`.",
              "qualifications": "Gives access to all endpoints and methods starting with `/v1/qualifications`.",
              "client_qualifications": "Gives access to all endpoints and methods starting with `/client/v1/qualifications`.",
              "client_redeem": "Gives access to all endpoints and methods starting with `/client/v1/redeem",
              "redemptions": "Gives access to all endpoints and methods starting with `/v1/redemptions`.",
              "client_redemptions": "Gives access to all endpoints and methods starting with `/client/v1/redemptions`",
              "customers": "Gives access to all endpoints and methods starting with `/v1/customers`.",
              "client_customers": "Gives access to all endpoints and methods starting with `/client/v1/customers`.",
              "orders": "Gives access to all endpoints and methods starting with `/v1/orders`.",
              "products": "Gives access to all endpoints and methods starting with `/v1/products`.",
              "skus": "Gives access to all endpoints and methods starting with `/v1/SKUs`.",
              "validation-rules": "Gives access to all endpoints and methods starting with `/v1/validation-rules`.",
              "validation-rules-assignments": "Gives access to all endpoints and methods starting with `/v1/validation-rules-assignments",
              "segments": "Gives access to all endpoints and methods starting with `/v1/segments`.",
              "events": "Gives access to all endpoints and methods starting with `/v1/events`.",
              "client_events": "Gives access to all endpoints and methods starting with `client/v1/events`.",
              "rewards": "Gives access to all endpoints and methods starting with `/v1/rewards`.",
              "assets": "Gives access to all endpoints and methods starting with `/v1/assets`.",
              "task-results": "Gives access to all endpoints and methods starting with `/v1/task-results`.",
              "loyalties": "Gives access to all endpoints and methods starting with `/v1/loyalties`.",
              "client_consents": "Gives access to all endpoints and methods starting with `client/v1/consents`.",
              "consents": "Gives access to all endpoints and methods starting with `/v1/consents`.",
              "async-actions": "Gives access to all endpoints and methods starting with `/v1/async-actions`.",
              "product-collections": "Gives access to all endpoints and methods starting with `/v1/product-collections`.",
              "categories": "Gives access to all endpoints and methods starting with `/v1/categories`.",
              "metadata-schemas": "Gives access to all endpoints and methods starting with `/v1/metadata-schemas`.",
              "locations": "Gives access to all endpoints and methods starting with `/v1/locations`.",
              "referrals": "Gives access to all endpoints and methods starting with `/v1/referrals`.",
              "trash-bin": "Gives access to all endpoints and methods starting with `/v1/trash-bin`.",
              "templates": "Gives access to all endpoints and methods starting with `/v1/templates`."
            }
          }
        }
      }
    }
  }
}