{
  "openapi": "3.0.1",
  "info": {
    "title": "Voucherify API - Redemptions",
    "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/redemptions": {
      "get": {
        "operationId": "list-redemptions",
        "tags": [
          "Redemptions"
        ],
        "summary": "List Redemptions",
        "description": "Returns a list of redemptions previously created. The redemptions are returned in a sorted order, with the most recent redemptions appearing first. The response returns a list of redemptions of all vouchers. \n\n## Filtering results\nThe result can be narrowed according to specified (or default) filters, for example, you can sort redemptions by date:\n`https://api.voucherify.io/v1/redemptions?limit=3&[created_at][before]=2017-09-08T13:52:18.227Z`.\nA filter based on the object `created_at` field narrows down the results and lists redemptions done before or after a particular date time. You can use the following options: `[created_at][after]`, `[created_at][before]`.\nA 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`.\n\n## Failed Redemptions\n\nA redemption may fail for various reasons. You can figure out an exact reason from the `failure_code`:\n- `resource_not_found` - voucher with given code does not exist\n- `voucher_not_active` - voucher is not active yet (before start date)\n- `voucher_expired` - voucher has already expired (after expiration date)\n- `voucher_disabled` -  voucher has been disabled (`active: false`)\n- `quantity_exceeded` - voucher's redemptions limit has been exceeded\n- `gift_amount_exceeded` - gift amount has been exceeded\n- `customer_rules_violated` - customer did not match the segment\n- `order_rules_violated` - order did not match validation rules\n- `invalid_order` - order was specified incorrectly\n- `invalid_amount` - order amount was specified incorrectly\n- `missing_amount` - order amount was not specified\n- `missing_order_items` - order items were not specified\n- `missing_customer` - customer was not specified",
        "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`."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "result",
            "description": "A filter on the list based on the redemption result. Available options are: `SUCCESS`, `FAILURE`. You can provide multiple values by repeating the param."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "campaign",
            "description": "A filter by the campaign **name** that the redemption resources originate from."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterCustomerId"
            },
            "in": "query",
            "name": "customer",
            "description": "Return redemptions performed by the customer with given `id` or `source_id`."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListRedemptions"
            },
            "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."
          },
          {
            "$ref": "#/components/parameters/created_at"
          },
          {
            "name": "filters",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ParameterFiltersListRedemptions"
            },
            "description": "Filters for listing responses.",
            "style": "deepObject",
            "explode": true
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "redemptions"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a list of redemption objects. Each entry in the array is a separate redemption object. If no more redemptions are available, the resulting array will be empty. If you provide a non-existent customer ID, this call returns an empty object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RedemptionsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "redemptions",
                      "redemptions": [
                        {
                          "id": "r_0c0469eaf705889d99",
                          "object": "redemption",
                          "date": "2022-11-18T12:30:32.622Z",
                          "customer_id": "cust_qBwHpagDOFu71Z3F22UzR80X",
                          "tracking_id": "track_5DQxXbK0C0pvAaHk7mnulhyMBo7VratI",
                          "metadata": {
                            "store_names": "Store 2 - Florida - Miami"
                          },
                          "result": "SUCCESS",
                          "order": {
                            "id": "ord_ndw5rQJt12zvZ4upF72a3ljh",
                            "source_id": null,
                            "created_at": "2022-11-18T12:30:31.338Z",
                            "updated_at": null,
                            "status": "PAID",
                            "amount": 9680000,
                            "items_discount_amount": 9450000,
                            "total_discount_amount": 9450000,
                            "total_amount": 230000,
                            "items_applied_discount_amount": 9450000,
                            "total_applied_discount_amount": 9450000,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0bae45ffc7003ffc52",
                                "quantity": 1,
                                "amount": 230000,
                                "price": 230000,
                                "subtotal_amount": 230000,
                                "product": {
                                  "id": "prod_0bae45ffc7003ffc52",
                                  "source_id": "second_product",
                                  "name": "Samsung Phone 2",
                                  "price": 230000
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0bae2dc5a090fd0184",
                                "sku_id": "sku_0bae3b28f610fd0da1",
                                "quantity": 45,
                                "discount_quantity": 45,
                                "initial_quantity": 0,
                                "amount": 9450000,
                                "discount_amount": 9450000,
                                "initial_amount": 0,
                                "applied_discount_amount": 9450000,
                                "price": 210000,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0bae2dc5a090fd0184",
                                  "source_id": "first_product",
                                  "name": "Samsung Phone 1",
                                  "price": 220000
                                },
                                "sku": {
                                  "id": "sku_0bae3b28f610fd0da1",
                                  "source_id": "first_product_sku_1",
                                  "sku": "Samsung phone 256GB",
                                  "price": 210000
                                }
                              }
                            ],
                            "metadata": {},
                            "customer": {
                              "id": "cust_qBwHpagDOFu71Z3F22UzR80X",
                              "object": "customer"
                            },
                            "customer_id": "cust_qBwHpagDOFu71Z3F22UzR80X",
                            "referrer_id": null,
                            "object": "order",
                            "redemptions": {
                              "r_0c0469eaf705889d99": {
                                "date": "2022-11-18T12:30:31.388Z",
                                "related_object_type": "promotion_tier",
                                "related_object_id": "promo_ZWkx6R0I1Ts3N9HL4kfTdxOm",
                                "related_object_parent_id": "camp_40LC42P5NFbkkD4RWoJ4btks"
                              }
                            }
                          },
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": {
                            "id": "cust_qBwHpagDOFu71Z3F22UzR80X",
                            "name": "Bob Jones",
                            "email": "bob.smith@email.com",
                            "source_id": "pub_source_customer_5_a",
                            "metadata": {
                              "lang": "en",
                              "test": true
                            },
                            "object": "customer"
                          },
                          "related_object_type": "promotion_tier",
                          "related_object_id": "promo_ZWkx6R0I1Ts3N9HL4kfTdxOm",
                          "voucher": null,
                          "promotion_tier": {
                            "id": "promo_ZWkx6R0I1Ts3N9HL4kfTdxOm",
                            "campaign": {
                              "id": "camp_40LC42P5NFbkkD4RWoJ4btks"
                            }
                          }
                        },
                        {
                          "id": "r_0bf9cf0a8b12dc5ba6",
                          "object": "redemption",
                          "date": "2022-11-10T06:49:03.835Z",
                          "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                          "tracking_id": "track_fxEMFisanb4sbl4Z4yCnJyDW013IrRbJmqKByTNHbXE=",
                          "metadata": {},
                          "amount": 200,
                          "result": "SUCCESS",
                          "order": {
                            "id": "ord_jAifScsbOqxgb12hLu7hXrLU",
                            "source_id": null,
                            "created_at": "2022-11-10T06:49:02.703Z",
                            "updated_at": null,
                            "status": "PAID",
                            "amount": 4500,
                            "discount_amount": 4000,
                            "total_discount_amount": 4000,
                            "total_amount": 500,
                            "applied_discount_amount": 4000,
                            "total_applied_discount_amount": 4000,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b0bd64d198e3ae",
                                "quantity": 3,
                                "amount": 4500,
                                "price": 1500,
                                "subtotal_amount": 4500,
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage",
                                  "price": 1500
                                }
                              }
                            ],
                            "metadata": {},
                            "customer": {
                              "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                              "object": "customer"
                            },
                            "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "referrer_id": null,
                            "object": "order",
                            "redemptions": {
                              "r_0bf9cf0a8b12dc5ba6": {
                                "date": "2022-11-10T06:49:02.764Z",
                                "related_object_type": "voucher",
                                "related_object_id": "v_Xak3ViMbxCH8Lb4ZG0lWwC0goMRBXWB4",
                                "related_object_parent_id": "camp_fkZ28pe7DUAEmmabofkxHI8N"
                              }
                            }
                          },
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": {
                            "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "name": "Bobby McDonald",
                            "email": "bobby.mcdonald@email.com",
                            "source_id": "bobby.mcdonald@email.com",
                            "metadata": {
                              "acquisition_channel": "Facebook",
                              "customer_life_time_value": 100
                            },
                            "object": "customer"
                          },
                          "related_object_type": "voucher",
                          "related_object_id": "v_Xak3ViMbxCH8Lb4ZG0lWwC0goMRBXWB4",
                          "voucher": {
                            "id": "v_Xak3ViMbxCH8Lb4ZG0lWwC0goMRBXWB4",
                            "code": "LT1-wMPnRhxb",
                            "campaign": "Loyalty Campaign - Tiers - 1",
                            "campaign_id": "camp_fkZ28pe7DUAEmmabofkxHI8N"
                          },
                          "reward": {
                            "customer": {
                              "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                              "name": "Bobby McDonald",
                              "email": "bobby.mcdonald@email.com",
                              "source_id": "bobby.mcdonald@email.com",
                              "metadata": {
                                "acquisition_channel": "Facebook",
                                "customer_life_time_value": 100
                              },
                              "object": "customer"
                            },
                            "assignment_id": "rewa_nMXB59qGTNYawMT8eP8M4oUp",
                            "id": "rew_MVXA2kV7lZ1zC057WUaTrvNz",
                            "object": "reward",
                            "name": "100 Points = $20",
                            "created_at": "2022-09-09T06:41:54.496Z",
                            "updated_at": null,
                            "parameters": {
                              "coin": {
                                "exchange_ratio": 20,
                                "points_ratio": 100
                              }
                            },
                            "type": "COIN"
                          },
                          "loyalty_card": {
                            "points": 200
                          }
                        },
                        {
                          "id": "rf_0bf9caf744d2dc593a",
                          "object": "redemption",
                          "date": "2022-11-10T06:31:15.477Z",
                          "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                          "tracking_id": "track_fxEMFisanb4sbl4Z4yCnJyDW013IrRbJmqKByTNHbXE=",
                          "metadata": {},
                          "result": "FAILURE",
                          "failure_code": "loyalty_card_points_exceeded",
                          "failure_message": "loyalty card points exceeded",
                          "order": null,
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": {
                            "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "name": "Bobby McDonald",
                            "email": "bobby.mcdonald@email.com",
                            "source_id": "bobby.mcdonald@email.com",
                            "metadata": {
                              "acquisition_channel": "Facebook",
                              "customer_life_time_value": 100
                            },
                            "object": "customer"
                          },
                          "related_object_type": "voucher",
                          "related_object_id": "v_Xak3ViMbxCH8Lb4ZG0lWwC0goMRBXWB4",
                          "voucher": {
                            "id": "v_Xak3ViMbxCH8Lb4ZG0lWwC0goMRBXWB4",
                            "code": "LT1-wMPnRhxb",
                            "campaign": "Loyalty Campaign - Tiers - 1",
                            "campaign_id": "camp_fkZ28pe7DUAEmmabofkxHI8N"
                          }
                        },
                        {
                          "id": "rf_0bf8c023eb4d4aa4ad",
                          "object": "redemption",
                          "date": "2022-11-09T11:05:28.074Z",
                          "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                          "tracking_id": "track_fxEMFisanb4sbl4Z4yCnJyDW013IrRbJmqKByTNHbXE=",
                          "metadata": {},
                          "result": "FAILURE",
                          "failure_code": "customer_rules_violated",
                          "failure_message": "customer does not match validation rules",
                          "order": null,
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": {
                            "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "name": "Bob Smith",
                            "email": "bob.smith@email.com",
                            "source_id": "bob.smith@email.com",
                            "metadata": {
                              "acquisition_channel": "Facebook"
                            },
                            "object": "customer"
                          },
                          "related_object_type": "voucher",
                          "related_object_id": "v_FGQjOjqasEbbdpnySdCpUoalJio3OHWK",
                          "voucher": {
                            "id": "v_FGQjOjqasEbbdpnySdCpUoalJio3OHWK",
                            "code": "3rqWOTAh",
                            "campaign_id": null
                          }
                        },
                        {
                          "id": "r_0ba9fa02fcd28ed8f1",
                          "object": "redemption",
                          "date": "2022-09-09T06:38:20.085Z",
                          "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                          "tracking_id": "track_fxEMFisanb4sbl4Z4yCnJyDW013IrRbJmqKByTNHbXE=",
                          "metadata": {},
                          "amount": 300,
                          "result": "SUCCESS",
                          "order": {
                            "id": "ord_G9LBb5SOPa36pHdwxUvzkw4P",
                            "source_id": null,
                            "created_at": "2022-09-09T06:38:17.984Z",
                            "updated_at": null,
                            "status": "PAID",
                            "amount": 4600,
                            "items_discount_amount": 300,
                            "total_discount_amount": 300,
                            "total_amount": 4300,
                            "items_applied_discount_amount": 300,
                            "total_applied_discount_amount": 300,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619",
                                "quantity": 1,
                                "amount": 1600,
                                "price": 1600,
                                "subtotal_amount": 1600,
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1",
                                  "price": 1600
                                },
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1",
                                  "price": 1600
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a65b3ff8592d7a5b5",
                                "quantity": 1,
                                "amount": 3000,
                                "discount_amount": 300,
                                "applied_discount_amount": 300,
                                "price": 3000,
                                "subtotal_amount": 2700,
                                "product": {
                                  "id": "prod_0a65b3ff8592d7a5b5",
                                  "name": "Koffee Cup",
                                  "price": 3000
                                }
                              }
                            ],
                            "metadata": {},
                            "customer": {
                              "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                              "object": "customer"
                            },
                            "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "referrer_id": null,
                            "object": "order",
                            "redemptions": {
                              "r_0ba9fa02fcd28ed8f1": {
                                "date": "2022-09-09T06:38:18.099Z",
                                "related_object_type": "voucher",
                                "related_object_id": "v_KqP2NOSb4dJb1D6UBhcq7ScPZXun0y40",
                                "related_object_parent_id": "camp_hC2GdqYtOmTT45zfhib62cK1"
                              }
                            }
                          },
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": {
                            "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "name": "Bob Smith",
                            "email": "bob.smith@email.com",
                            "source_id": "bob.smith@email.com",
                            "metadata": {},
                            "object": "customer"
                          },
                          "related_object_type": "voucher",
                          "related_object_id": "v_KqP2NOSb4dJb1D6UBhcq7ScPZXun0y40",
                          "voucher": {
                            "id": "v_KqP2NOSb4dJb1D6UBhcq7ScPZXun0y40",
                            "code": "vTcguVLE",
                            "campaign": "SL-Gift",
                            "campaign_id": "camp_hC2GdqYtOmTT45zfhib62cK1"
                          },
                          "gift": {
                            "amount": 300
                          }
                        },
                        {
                          "id": "rf_0bf8bfe0808d4aa473",
                          "object": "redemption",
                          "date": "2022-11-09T11:04:19.062Z",
                          "customer_id": null,
                          "tracking_id": null,
                          "metadata": {},
                          "result": "FAILURE",
                          "failure_code": "missing_customer",
                          "failure_message": "Missing customer",
                          "order": null,
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": null,
                          "related_object_type": "voucher",
                          "related_object_id": "v_FGQjOjqasEbbdpnySdCpUoalJio3OHWK",
                          "voucher": {
                            "id": "v_FGQjOjqasEbbdpnySdCpUoalJio3OHWK",
                            "code": "3rqWOTAh",
                            "campaign_id": null
                          }
                        }
                      ],
                      "total": 6
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "redeem-stacked-discounts",
        "tags": [
          "Redemptions"
        ],
        "summary": "Redeem Stackable Discounts",
        "description": "In the table below, you can see the logic the API follows to calculate discounts and amounts:\n\n| **Field** | **Calculation** | **Description** |\n|:---|:---|:---|\n| amount | N/A | This field shows the order amount before applying any discount |\n| total_amount | `total_amount` = `amount` - `total_discount_amount` | This field shows the order amount after applying all the discounts |\n| discount_amount | `discount_amount` = `previous_discount_amount` + `applied_discount_amount` | This field sums up all order-level discounts up to and including the specific discount being calculated for the stacked redemption. |\n| items_discount_amount | sum(items, i => i.discount_amount) | This field sums up all product-specific discounts |\n| total_discount_amount | `total_discount_amount` = `discount_amount` + `items_discount_amount` | This field sums up all order-level and all product-specific discounts |\n| applied_discount_amount | N/A | This field shows the order-level discount applied in a particular request |\n| items_applied_discount_amount | sum(items, i => i.applied_discount_amount) | This field sums up all product-specific discounts applied in a particular request |\n| total_applied_discount_amount | `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | This field sums up all order-level and all product-specific discounts applied in a particular request |\n\n\n\nAPI keys with a Merchant role can't use this endpoint.\n\n\n<Note>\n\n<Badge color=\"blue\">Rollbacks</Badge>\n\nYou can't roll back a child redemption. When you call rollback on a stacked redemption, all child redemptions will be rolled back. You need to refer to a parent redemption ID in your [rollback request](/api-reference/redemptions/rollback-stackable-redemptions).\n\n</Note>\n\n\n<Note>\n\n<Badge color=\"blue\">Also available on client-side</Badge>\n\nThis method is also accessible through public keys which you can use in client-side​ apps: mobile and web browser apps. Go to the dedicated [endpoint](/api-reference/client-side/redeem-stackable-discounts-client-side) to learn more.\n\n</Note>",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "redemptions"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RedemptionsRedeemRequestBody"
              },
              "examples": {
                "Sandbox onboarding redemption": {
                  "value": {
                    "redeemables": [
                      {
                        "object": "voucher",
                        "id": "BLCKFRDY"
                      }
                    ],
                    "order": {
                      "amount": 5500
                    }
                  }
                },
                "General example": {
                  "value": {
                    "customer": {
                      "source_id": "sample_customer",
                      "metadata": {
                        "key": "value"
                      }
                    },
                    "options": {
                      "expand": [
                        "order",
                        "redeemable",
                        "category"
                      ]
                    },
                    "redeemables": [
                      {
                        "object": "voucher",
                        "id": "voucher-code"
                      }
                    ],
                    "session": {
                      "type": "LOCK",
                      "key": "session_key"
                    },
                    "order": {
                      "amount": 55000,
                      "status": "PAID",
                      "items": [
                        {
                          "quantity": 2,
                          "price": 20000,
                          "source_id": "sample product1",
                          "related_object": "product",
                          "product": {
                            "metadata": {
                              "key": "value"
                            }
                          }
                        },
                        {
                          "quantity": 1,
                          "price": 15000,
                          "source_id": "sample product2",
                          "related_object": "product",
                          "product": {
                            "metadata": {
                              "key": "value"
                            }
                          }
                        }
                      ],
                      "metadata": {
                        "key": "value"
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Depending on your project settings: all redeemables must be valid or just one must be valid to result as valid redemption. Read more in the [Stacking Rule Documentation](/orchestrate/stacking-rules).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RedemptionsRedeemResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/redemptions/{redemptionId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterString"
          },
          "name": "redemptionId",
          "in": "path",
          "required": true,
          "description": "ID of previously created redemption."
        }
      ],
      "get": {
        "operationId": "get-redemption",
        "tags": [
          "Redemptions"
        ],
        "summary": "Get Redemption",
        "description": "Return a redemption or redemption rollback object. This object can either be a successfull or failed redemption or redemption rollback.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "redemptions"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a redemption object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RedemptionsGetResponseBody"
                },
                "examples": {
                  "Discount Voucher": {
                    "value": {
                      "id": "r_0bade27c428db5873e",
                      "object": "redemption",
                      "date": "2022-09-12T07:29:28.211Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": {},
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_ebmAU9uv3dTE2Khqyh7i5ka7",
                        "source_id": null,
                        "created_at": "2022-09-12T07:29:26.245Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 22500,
                        "discount_amount": 300,
                        "total_discount_amount": 300,
                        "total_amount": 22200,
                        "applied_discount_amount": 300,
                        "total_applied_discount_amount": 300,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0b2c36568000039138",
                            "quantity": 1,
                            "amount": 22500,
                            "price": 22500,
                            "subtotal_amount": 22500,
                            "product": {
                              "id": "prod_0b2c36568000039138",
                              "source_id": "86",
                              "name": "[Sample] Able Brewing System",
                              "price": 22500
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0bade27c428db5873e": {
                            "date": "2022-09-12T07:29:26.282Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_c1yOEjZXOyVIe89VAYiRvL3QimZjXo8h"
                          }
                        }
                      },
                      "channel": {
                        "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                        "channel_type": "USER"
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "accepts_marketing": false
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_c1yOEjZXOyVIe89VAYiRvL3QimZjXo8h",
                      "voucher": {
                        "id": "v_c1yOEjZXOyVIe89VAYiRvL3QimZjXo8h",
                        "code": "FB-metadata-string",
                        "campaign": null,
                        "campaign_id": null,
                        "category": null,
                        "categories": [],
                        "discount": null,
                        "gift": null,
                        "loyalty_card": null,
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "additional_info": null,
                        "assets": {
                          "qr": {},
                          "barcode": {}
                        },
                        "updated_at": null,
                        "object": "voucher"
                      }
                    }
                  },
                  "Loyalty Card - Material Reward Product Type": {
                    "value": {
                      "id": "r_0c5bf0e6d601c7d7de",
                      "object": "redemption",
                      "date": "2023-01-25T12:08:09.503Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": {},
                      "amount": 4,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_dSOsWkNCRT24lHPkMu8o5QbX",
                        "source_id": null,
                        "created_at": "2023-01-25T12:08:07.750Z",
                        "updated_at": null,
                        "status": "PAID",
                        "items": [],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5bf0e6d601c7d7de": {
                            "date": "2023-01-25T12:08:07.768Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                            "related_object_parent_id": "camp_22noMlhTADb7Fq2UL3vWu3d1"
                          }
                        }
                      },
                      "channel": {
                        "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                        "channel_type": "USER"
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "age": 26,
                          "favorite_brands": [
                            "Nike",
                            "Adidas",
                            "Reebok"
                          ],
                          "accepts_marketing": false,
                          "acquisition_channel": "Facebook"
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                      "voucher": {
                        "id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                        "code": "AnsvocvP",
                        "campaign": "Loyalty Campaign - Test Points",
                        "campaign_id": "camp_22noMlhTADb7Fq2UL3vWu3d1",
                        "category": null,
                        "categories": [],
                        "discount": null,
                        "gift": null,
                        "loyalty_card": null,
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "additional_info": null,
                        "assets": {
                          "qr": {},
                          "barcode": {}
                        },
                        "updated_at": null,
                        "object": "voucher"
                      },
                      "reward": {
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "name": "Bob Jones",
                          "email": "bob.jones@email.com",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "assignment_id": "rewa_LRx3Y1iHFWTt217NVrknkpi5",
                        "product": {
                          "id": "prod_0b2c2ddf35150b83bb",
                          "source_id": "97",
                          "name": "[Sample] Tiered Wire Basket",
                          "price": 11995,
                          "attributes": [],
                          "metadata": {
                            "source": "bigcommerce",
                            "bigcommerce_product_categories": [
                              21,
                              23
                            ]
                          },
                          "image_url": null,
                          "created_at": "2022-06-03T13:36:16.084Z",
                          "updated_at": "2022-06-07T09:10:44.644Z",
                          "object": "product"
                        },
                        "id": "rew_EPx1hCTpqzF0HW1z9NKckZH4",
                        "object": "reward",
                        "name": "Present",
                        "created_at": "2022-06-13T06:59:01.694Z",
                        "updated_at": null,
                        "parameters": {
                          "product": {
                            "id": "prod_0b2c2ddf35150b83bb",
                            "sku_id": null
                          }
                        },
                        "type": "MATERIAL"
                      },
                      "loyalty_card": {
                        "points": 4
                      }
                    }
                  },
                  "Loyalty Card - Material Reward SKU Type": {
                    "value": {
                      "id": "r_0c5bf18dad48a34392",
                      "object": "redemption",
                      "date": "2023-01-25T12:11:00.543Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": {},
                      "amount": 6,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_dwb6bpqjIlMuXFS71NuHed9S",
                        "source_id": null,
                        "created_at": "2023-01-25T12:10:58.598Z",
                        "updated_at": null,
                        "status": "PAID",
                        "items": [],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5bf18dad48a34392": {
                            "date": "2023-01-25T12:10:58.613Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                            "related_object_parent_id": "camp_22noMlhTADb7Fq2UL3vWu3d1"
                          }
                        }
                      },
                      "channel": {
                        "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                        "channel_type": "USER"
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "age": 26,
                          "favorite_brands": [
                            "Nike",
                            "Adidas",
                            "Reebok"
                          ],
                          "accepts_marketing": false,
                          "acquisition_channel": "Facebook"
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                      "voucher": {
                        "id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                        "code": "AnsvocvP",
                        "campaign": "Loyalty Campaign - Test Points",
                        "campaign_id": "camp_22noMlhTADb7Fq2UL3vWu3d1",
                        "category": null,
                        "categories": [],
                        "discount": null,
                        "gift": null,
                        "loyalty_card": null,
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "additional_info": null,
                        "assets": {
                          "qr": {},
                          "barcode": {}
                        },
                        "updated_at": null,
                        "object": "voucher"
                      },
                      "reward": {
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "name": "Bob Jones",
                          "email": "bob.jones@email.com",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "assignment_id": "rewa_gfpRNkOT0pwzF7P5tXWXOs4H",
                        "product": {
                          "id": "prod_5h0wc453_2",
                          "source_id": "jonah-nystrom-bourbon",
                          "name": "Johan & Nyström - Bourbon",
                          "price": null,
                          "attributes": [
                            "categories",
                            "description",
                            "weight"
                          ],
                          "metadata": {
                            "company": "Johan & Nyström",
                            "showcase": true
                          },
                          "image_url": null,
                          "created_at": "2021-12-01T08:00:49.418Z",
                          "updated_at": null,
                          "object": "product"
                        },
                        "sku": {
                          "id": "sku_0a3efc9044dd121803",
                          "source_id": "jonah-nystrom-bourbon-250g",
                          "product_id": "prod_5h0wc453_2",
                          "sku": "250g",
                          "price": 1750,
                          "currency": null,
                          "attributes": {
                            "categories": "Coffee, Whole Bean",
                            "description": "Background for this blend comes from the longing for a real dark roasting of high-quality coffee beans. Although the beans are dark roasted, they keep their clear and intense aroma. This coffee has a smoky flavour with a slight hint of sweetness and loads of fruit notes. Thanks to the experience in the dark roasting of coffee, the beans still retain most of their aromas. Its aftertaste is clear and remains for a long time. This coffee is perfect for a Dripper, French Press, Moka coffee maker and the traditional espresso brewing method.",
                            "weight": 250
                          },
                          "image_url": null,
                          "metadata": {},
                          "created_at": "2021-12-01T08:00:49.427Z",
                          "updated_at": null,
                          "object": "sku"
                        },
                        "id": "rew_SfQCsap5R8UBTVbdMTRx10x8",
                        "object": "reward",
                        "name": "Present - SKU",
                        "created_at": "2023-01-25T12:10:16.060Z",
                        "updated_at": null,
                        "parameters": {
                          "product": {
                            "id": "prod_5h0wc453_2",
                            "sku_id": "sku_0a3efc9044dd121803"
                          }
                        },
                        "type": "MATERIAL"
                      },
                      "loyalty_card": {
                        "points": 6
                      }
                    }
                  },
                  "Loyalty Card - Pay with Points": {
                    "value": {
                      "id": "r_0b5e402ad54a3afe9c",
                      "object": "redemption",
                      "date": "2022-07-12T11:00:26.247Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "amount": 5,
                      "redemption": "r_0b5e402ad50a3afe98",
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_9akjPYZNskEhKZ4zCZt6TKwq",
                        "source_id": null,
                        "created_at": "2022-07-12T11:00:26.224Z",
                        "amount": 20000,
                        "discount_amount": 5100,
                        "total_discount_amount": 5100,
                        "total_amount": 14900,
                        "applied_discount_amount": 500,
                        "total_applied_discount_amount": 500,
                        "metadata": {},
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "channel": {
                        "channel_id": "abcdefg-efgj-ijkl-mnop-qrstuvxyz",
                        "channel_type": "API"
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "accepts_marketing": false
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_pQZDYaH8LzoOvgh3234DqZQjGJgbPov6",
                      "voucher": {
                        "id": "v_pQZDYaH8LzoOvgh3234DqZQjGJgbPov6",
                        "code": "LOYALTY-CARD-zOR2sV9Q",
                        "campaign": "Loyalty Program",
                        "campaign_id": "camp_Hpt5hPTA8kSKRWGxBGw8Y0So",
                        "category": null,
                        "categories": [],
                        "discount": null,
                        "gift": null,
                        "loyalty_card": null,
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "additional_info": null,
                        "assets": {
                          "qr": {},
                          "barcode": {}
                        },
                        "updated_at": null,
                        "object": "voucher"
                      },
                      "reward": {
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "name": "Bob Jones",
                          "email": "bob.jones@email.com",
                          "source_id": "36_bob",
                          "metadata": {
                            "accepts_marketing": false
                          },
                          "object": "customer"
                        },
                        "assignment_id": "rewa_X3jnD5XFxP6GXCzPZUNknDck",
                        "id": "rew_6rhNwuuWFQJLvTPO34ilg6jq",
                        "object": "reward",
                        "name": "Pay with Points",
                        "created_at": "2022-07-11T08:18:18.205Z",
                        "updated_at": null,
                        "parameters": {
                          "coin": {
                            "exchange_ratio": 1,
                            "points_ratio": 1
                          }
                        },
                        "type": "COIN"
                      },
                      "loyalty_card": {
                        "points": 5
                      }
                    }
                  },
                  "Loyalty Card - Digital Reward - Discount Voucher": {
                    "value": {
                      "id": "r_0c5bf3323008a35032",
                      "object": "redemption",
                      "date": "2023-01-25T12:18:10.707Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": {
                        "redemption_location": {
                          "city": "Warsaw",
                          "state": "Polyork"
                        }
                      },
                      "amount": 2,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_dqxr4uzaYWkTZnrSEMoQtCF8",
                        "source_id": null,
                        "created_at": "2023-01-25T12:18:09.203Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 2100,
                        "total_amount": 2100,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0bc3bd8a4e072c5275",
                            "quantity": 3,
                            "amount": 2100,
                            "price": 700,
                            "subtotal_amount": 2100,
                            "product": {
                              "id": "prod_0bc3bd8a4e072c5275",
                              "name": "Bouquet - Romantic Roses",
                              "price": 700
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5bf3323008a35032": {
                            "date": "2023-01-25T12:18:09.216Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                            "related_object_parent_id": "camp_22noMlhTADb7Fq2UL3vWu3d1"
                          }
                        }
                      },
                      "channel": {
                        "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                        "channel_type": "USER"
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "age": 26,
                          "favorite_brands": [
                            "Nike",
                            "Adidas",
                            "Reebok"
                          ],
                          "accepts_marketing": false,
                          "acquisition_channel": "Facebook"
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                      "voucher": {
                        "id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                        "code": "AnsvocvP",
                        "campaign": "Loyalty Campaign - Test Points",
                        "campaign_id": "camp_22noMlhTADb7Fq2UL3vWu3d1",
                        "category": null,
                        "categories": [],
                        "discount": null,
                        "gift": null,
                        "loyalty_card": null,
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "additional_info": null,
                        "assets": {
                          "qr": {},
                          "barcode": {}
                        },
                        "updated_at": null,
                        "object": "voucher"
                      },
                      "reward": {
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "name": "Bob Jones",
                          "email": "bob.jones@email.com",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "assignment_id": "rewa_0ZwLAHgeU9IrI2V1ofYRmW7g",
                        "voucher": {
                          "id": "v_4GaEX7clyqMaveT7vHhoyRpsIgxv95Q6",
                          "code": "HAPPY-ORDER5My",
                          "campaign": "$20 off the entire order",
                          "campaign_id": "camp_5h0wc453_4",
                          "category": null,
                          "category_id": "cat_0b688929a2476386a6",
                          "categories": [],
                          "type": "DISCOUNT_VOUCHER",
                          "discount": {
                            "type": "AMOUNT",
                            "amount_off": 2000,
                            "effect": "APPLY_TO_ORDER"
                          },
                          "gift": null,
                          "loyalty_card": null,
                          "start_date": "2022-09-20T00:00:00.000Z",
                          "expiration_date": "2022-09-30T00:00:00.000Z",
                          "validity_timeframe": null,
                          "validity_day_of_week": null,
                          "active": true,
                          "additional_info": null,
                          "metadata": {},
                          "assets": {
                            "qr": {
                              "id": "21ceb848-4869-4dac-ba41-f854bda3a101",
                              "url": "{{internalVoucherifyURL}}"
                            },
                            "barcode": {
                              "id": "1dba9cb2-fb28-4c8d-8548-5edb2eb01f5a",
                              "url": "{{internalVoucherifyURL}}"
                            }
                          },
                          "is_referral_code": false,
                          "created_at": "2023-01-25T12:18:09.256Z",
                          "updated_at": null,
                          "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0,
                            "object": "list",
                            "url": "/v1/vouchers/HAPPY-ORDER5My/redemptions?page=1&limit=10"
                          },
                          "publish": {
                            "object": "list",
                            "count": 1,
                            "url": "/v1/vouchers/HAPPY-ORDER5My/publications?page=1&limit=10"
                          },
                          "object": "voucher"
                        },
                        "id": "rew_MF4hKh1IKYgJkPjbcFbH94Ho",
                        "object": "reward",
                        "name": "Digital Present",
                        "created_at": "2023-01-25T12:16:44.557Z",
                        "updated_at": null,
                        "parameters": {
                          "campaign": {
                            "id": "camp_5h0wc453_4",
                            "type": "DISCOUNT_COUPONS"
                          }
                        },
                        "type": "CAMPAIGN"
                      },
                      "loyalty_card": {
                        "points": 2
                      }
                    }
                  },
                  "Loyalty Card - Digital Reward - Credits on Gift Card": {
                    "value": {
                      "id": "r_0c5c1435d053202118",
                      "object": "redemption",
                      "date": "2023-01-25T14:42:25.206Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": {},
                      "amount": 1,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_v0r7JfUQgWRpw28UJm9Z5AaH",
                        "source_id": null,
                        "created_at": "2023-01-25T14:42:23.637Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 22500,
                        "total_amount": 22500,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0b2c36568000039138",
                            "quantity": 1,
                            "amount": 22500,
                            "price": 22500,
                            "subtotal_amount": 22500,
                            "product": {
                              "id": "prod_0b2c36568000039138",
                              "source_id": "86",
                              "name": "[Sample] Able Brewing System",
                              "price": 22500
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5c1435d053202118": {
                            "date": "2023-01-25T14:42:23.681Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                            "related_object_parent_id": "camp_22noMlhTADb7Fq2UL3vWu3d1"
                          }
                        }
                      },
                      "channel": {
                        "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                        "channel_type": "USER"
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "age": 26,
                          "favorite_brands": [
                            "Nike",
                            "Adidas",
                            "Reebok"
                          ],
                          "accepts_marketing": false,
                          "acquisition_channel": "Facebook"
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                      "voucher": {
                        "id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                        "code": "AnsvocvP",
                        "campaign": "Loyalty Campaign - Test Points",
                        "campaign_id": "camp_22noMlhTADb7Fq2UL3vWu3d1",
                        "category": null,
                        "categories": [],
                        "discount": null,
                        "gift": null,
                        "loyalty_card": null,
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "additional_info": null,
                        "assets": {
                          "qr": {},
                          "barcode": {}
                        },
                        "updated_at": null,
                        "object": "voucher"
                      },
                      "reward": {
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "name": "Bob Jones",
                          "email": "bob.jones@email.com",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "assignment_id": "rewa_U554pL2BhDIDZOvZ8y9YQ9hA",
                        "voucher": {
                          "id": "v_hS8JFl8S6lNcd1L69wLIoXgTio7eWEgk",
                          "code": "GIFT-CARD-xwc6X7Tk",
                          "campaign": "Gift Cards",
                          "campaign_id": "camp_kdxp3vf1clQ9CFs1jpqv3tZe",
                          "category": null,
                          "category_id": "cat_0bb81a481615a37b5e",
                          "categories": [],
                          "type": "GIFT_VOUCHER",
                          "discount": null,
                          "gift": {
                            "amount": 55080,
                            "balance": 44780
                          },
                          "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": "2023-01-11T15:23:02.789Z",
                          "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "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"
                        },
                        "id": "rew_6bvM4vnaVdbPVQxYpuN37rhH",
                        "object": "reward",
                        "name": "Present Credits on Gift Card",
                        "created_at": "2023-01-25T14:41:31.858Z",
                        "updated_at": null,
                        "parameters": {
                          "campaign": {
                            "id": "camp_kdxp3vf1clQ9CFs1jpqv3tZe",
                            "balance": 4000,
                            "type": "GIFT_VOUCHERS"
                          }
                        },
                        "type": "CAMPAIGN"
                      },
                      "loyalty_card": {
                        "points": 1
                      }
                    }
                  },
                  "Loyalty Card - Digital Reward - Points on Loyalty Card": {
                    "value": {
                      "id": "r_0c5c226f498f1a93f0",
                      "object": "redemption",
                      "date": "2023-01-25T15:44:34.317Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": {},
                      "amount": 1,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_1fv4ITwpUQra6iDTHFPVfnRR",
                        "source_id": null,
                        "created_at": "2023-01-25T15:44:32.494Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 700,
                        "total_amount": 700,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0bc3bd8a4e072c5275",
                            "quantity": 1,
                            "amount": 700,
                            "price": 700,
                            "subtotal_amount": 700,
                            "product": {
                              "id": "prod_0bc3bd8a4e072c5275",
                              "name": "Bouquet - Romantic Roses",
                              "price": 700
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5c226f498f1a93f0": {
                            "date": "2023-01-25T15:44:32.550Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                            "related_object_parent_id": "camp_22noMlhTADb7Fq2UL3vWu3d1"
                          }
                        }
                      },
                      "channel": {
                        "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                        "channel_type": "USER"
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "age": 26,
                          "favorite_brands": [
                            "Nike",
                            "Adidas",
                            "Reebok"
                          ],
                          "accepts_marketing": false,
                          "acquisition_channel": "Facebook"
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                      "voucher": {
                        "id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                        "code": "AnsvocvP",
                        "campaign": "Loyalty Campaign - Test Points",
                        "campaign_id": "camp_22noMlhTADb7Fq2UL3vWu3d1",
                        "category": null,
                        "categories": [],
                        "discount": null,
                        "gift": null,
                        "loyalty_card": null,
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "additional_info": null,
                        "assets": {
                          "qr": {},
                          "barcode": {}
                        },
                        "updated_at": null,
                        "object": "voucher"
                      },
                      "reward": {
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "name": "Bob Jones",
                          "email": "bob.jones@email.com",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "assignment_id": "rewa_BpytIepuSekuXXwb9qkLJfCU",
                        "voucher": {
                          "id": "v_pQZDYaH8LzoOvgh3234DqZQjGJgbPov6",
                          "code": "LOYALTY-CARD-zOR2sV9Q",
                          "campaign": "Loyalty Program",
                          "campaign_id": "camp_Hpt5hPTA8kSKRWGxBGw8Y0So",
                          "category": null,
                          "category_id": null,
                          "categories": [],
                          "type": "LOYALTY_CARD",
                          "discount": null,
                          "gift": null,
                          "loyalty_card": {
                            "points": 1000,
                            "balance": 870
                          },
                          "start_date": null,
                          "expiration_date": null,
                          "validity_timeframe": null,
                          "validity_day_of_week": null,
                          "active": true,
                          "additional_info": null,
                          "metadata": {},
                          "assets": {
                            "qr": {
                              "id": "U2FsdGVkX1/THRRj1QegAan0r5U+wRoHuFEA6FR7TrvZm8N+8cK7niF/8uAqFdVYTU1JD0/CdoSXlYqiGgz3PAFOGWFSJt8vkM50fcMtMNLsaudU+YrPDeT2HCB7o0Ts7h1FnbD85+0F7lwrbKmkGW6kub0mjCaRdJYS/axIAq4=",
                              "url": "{{internalVoucherifyURL}}"
                            },
                            "barcode": {
                              "id": "U2FsdGVkX1+yREd0zRAfZY9uwtMZsl4eDd8+LeiKGVI5OzOQRpjhtV91IuEe7/SXEW8m4F2Llg2//yieX2zsP3UtWasWxw8ZkHMRSIdxfxzSdSj8ap0dI5xwKW4OE1Q6Sgsb+kZVfCKUHbwXCcd8y5a6xTpVIg97y74Ng1Vg2PY=",
                              "url": "{{internalVoucherifyURL}}"
                            }
                          },
                          "is_referral_code": false,
                          "created_at": "2022-07-11T08:19:28.780Z",
                          "updated_at": "2022-10-01T00:02:05.604Z",
                          "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 26,
                            "redeemed_points": 130,
                            "object": "list",
                            "url": "/v1/vouchers/LOYALTY-CARD-zOR2sV9Q/redemptions?page=1&limit=10"
                          },
                          "publish": {
                            "object": "list",
                            "count": 1,
                            "url": "/v1/vouchers/LOYALTY-CARD-zOR2sV9Q/publications?page=1&limit=10"
                          },
                          "object": "voucher"
                        },
                        "id": "rew_7ZM476Q77dH5KvHk4KzoRNvF",
                        "object": "reward",
                        "name": "Present on Loyalty Card",
                        "created_at": "2023-01-25T15:43:40.716Z",
                        "updated_at": null,
                        "parameters": {
                          "campaign": {
                            "id": "camp_Hpt5hPTA8kSKRWGxBGw8Y0So",
                            "balance": 20,
                            "type": "LOYALTY_PROGRAM"
                          }
                        },
                        "type": "CAMPAIGN"
                      },
                      "loyalty_card": {
                        "points": 1
                      }
                    }
                  },
                  "Gift Card": {
                    "value": {
                      "id": "r_0b5e7d29ba4fb72ee4",
                      "object": "redemption",
                      "date": "2022-07-12T15:26:52.777Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "amount": 5000,
                      "redemption": "r_0b5e7d29ba0fb72ee2",
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_5iOTjTG4I3Yo2G2bH1qHk66a",
                        "source_id": null,
                        "created_at": "2022-07-12T15:26:52.773Z",
                        "amount": 30200,
                        "discount_amount": 9530,
                        "total_discount_amount": 9530,
                        "total_amount": 20670,
                        "applied_discount_amount": 5000,
                        "total_applied_discount_amount": 5000,
                        "metadata": {},
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "channel": {
                        "channel_id": "abcdefg-efgj-ijkl-mnop-qrstuvxyz",
                        "channel_type": "API"
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "accepts_marketing": false
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_hS8JFl8S6lNcd1L69wLIoXgTio7eWEgk",
                      "voucher": {
                        "id": "v_hS8JFl8S6lNcd1L69wLIoXgTio7eWEgk",
                        "code": "GIFT-CARD-xwc6X7Tk",
                        "campaign": "Gift Cards",
                        "campaign_id": "camp_kdxp3vf1clQ9CFs1jpqv3tZe",
                        "category": null,
                        "categories": [],
                        "discount": null,
                        "gift": null,
                        "loyalty_card": null,
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "additional_info": null,
                        "assets": {
                          "qr": {},
                          "barcode": {}
                        },
                        "updated_at": null,
                        "object": "voucher"
                      },
                      "gift": {
                        "amount": 5000
                      }
                    }
                  },
                  "Promotion Tier": {
                    "value": {
                      "id": "r_0c5d6689b35320059a",
                      "object": "redemption",
                      "date": "2023-01-26T15:20:35.916Z",
                      "customer_id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                      "tracking_id": "track_VAVW6qltuo1/z+G2GI2LPw==",
                      "metadata": null,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_4kVJ1PiXP3TNfik3pM79KZsn",
                        "source_id": null,
                        "created_at": "2023-01-26T15:20:34.216Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 200000,
                        "discount_amount": 80000,
                        "total_discount_amount": 80000,
                        "total_amount": 120000,
                        "applied_discount_amount": 80000,
                        "total_applied_discount_amount": 80000,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "apple534",
                            "related_object": "product",
                            "product_id": "prod_anJ03RZZq74z4v",
                            "quantity": 2,
                            "amount": 100000,
                            "price": 50000,
                            "subtotal_amount": 100000,
                            "product": {
                              "name": "Apple iPhone 8",
                              "metadata": {
                                "shop": "citycenter",
                                "category": "electronics"
                              }
                            },
                            "metadata": {
                              "series": "2022-783CV"
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "apple534-ihd5",
                            "related_object": "sku",
                            "sku_id": "sku_0KtP4rvwEECQ2U",
                            "quantity": 1,
                            "amount": 100000,
                            "price": 100000,
                            "subtotal_amount": 100000,
                            "sku": {
                              "sku": "Apple iPad 10 Silver 64GB",
                              "metadata": {
                                "category": "electronics"
                              }
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                          "object": "customer"
                        },
                        "customer_id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5d6689b35320059a": {
                            "date": "2023-01-26T15:20:34.253Z",
                            "related_object_type": "promotion_tier",
                            "related_object_id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                            "related_object_parent_id": "camp_w7BUstntAm8jbIDjfM49volj"
                          }
                        }
                      },
                      "channel": {
                        "channel_id": "abcdefg-efgj-ijkl-mnop-qrstuvxyz",
                        "channel_type": "API"
                      },
                      "customer": {
                        "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                        "name": "Annie Lemon",
                        "email": "annie@lemon.com",
                        "source_id": "annie@lemon.com",
                        "object": "customer"
                      },
                      "related_object_type": "promotion_tier",
                      "related_object_id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                      "voucher": null,
                      "promotion_tier": {
                        "id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                        "action": null,
                        "campaign": {
                          "id": "camp_w7BUstntAm8jbIDjfM49volj",
                          "start_date": null,
                          "expiration_date": null,
                          "object": "campaign"
                        },
                        "campaign_id": null,
                        "summary": {
                          "redemptions": {
                            "total_redeemed": 0
                          },
                          "orders": {
                            "total_amount": 0,
                            "total_discount_amount": 0
                          }
                        },
                        "object": "promotion_tier",
                        "validation_rule_assignments": null
                      }
                    }
                  },
                  "Stacked Redemption": {
                    "value": {
                      "id": "r_0b5e3e2b7f851d0192",
                      "object": "redemption",
                      "date": "2022-07-12T10:51:33.098Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_qjnno0eUQ1fs0RMjejfbZp7q",
                        "source_id": null,
                        "created_at": "2022-07-12T10:51:31.687Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 20000,
                        "discount_amount": 6100,
                        "total_discount_amount": 6100,
                        "total_amount": 13900,
                        "applied_discount_amount": 6100,
                        "total_applied_discount_amount": 6100,
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0b5e3e2b7f851d0192": {
                            "date": "2022-07-12T10:51:31.711Z",
                            "related_object_type": "redemption",
                            "related_object_id": "r_0b5e3e2b7f851d0192",
                            "stacked": [
                              "r_0b5e3e2b7f851d0193",
                              "r_0b5e3e2b7fc51d0194",
                              "r_0b5e3e2b7fc51d0195",
                              "r_0b5e3e2b7fc51d0196",
                              "r_0b5e3e2b7fc51d0197"
                            ]
                          }
                        }
                      },
                      "channel": {
                        "channel_id": "abcdefg-efgj-ijkl-mnop-qrstuvxyz",
                        "channel_type": "API"
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "accepts_marketing": false
                        },
                        "object": "customer"
                      },
                      "related_object_type": "redemption",
                      "related_object_id": "r_0b5e3e2b7f851d0192",
                      "voucher": null
                    }
                  },
                  "Failed Voucher": {
                    "value": {
                      "id": "rf_0c5bd3c15701c78243",
                      "object": "redemption",
                      "date": "2023-01-25T10:00:47.812Z",
                      "customer_id": "cust_w1aRTTkpzeTGtOauISc8CKUN",
                      "tracking_id": "track_hr0jh/qNQqZWu7gkCEcVwEg27bNVrn2+",
                      "metadata": {
                        "location_id": [],
                        "redemption_location": {
                          "city": "Albany",
                          "state": "New York"
                        }
                      },
                      "result": "FAILURE",
                      "failure_code": "voucher_disabled",
                      "failure_message": "voucher is disabled",
                      "order": null,
                      "channel": {
                        "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                        "channel_type": "USER"
                      },
                      "customer": {
                        "id": "cust_w1aRTTkpzeTGtOauISc8CKUN",
                        "name": "Bobby's Friend",
                        "email": null,
                        "source_id": "create_order_referrer_1",
                        "metadata": {},
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_zr4XJD6b6JtldZq9EorHf4jxRbahjkfi",
                      "voucher": {
                        "id": "v_zr4XJD6b6JtldZq9EorHf4jxRbahjkfi",
                        "code": "PROMO-CODE2",
                        "campaign": null,
                        "campaign_id": null,
                        "category": null,
                        "categories": [],
                        "discount": null,
                        "gift": null,
                        "loyalty_card": null,
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "additional_info": null,
                        "assets": {
                          "qr": {},
                          "barcode": {}
                        },
                        "updated_at": null,
                        "object": "voucher"
                      }
                    }
                  },
                  "Failed Promotion Tier": {
                    "value": {
                      "id": "rf_0c5d6e47050156bfc2",
                      "object": "redemption",
                      "date": "2023-01-26T15:54:23.508Z",
                      "customer_id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                      "tracking_id": "track_VAVW6qltuo1/z+G2GI2LPw==",
                      "metadata": null,
                      "result": "FAILURE",
                      "failure_code": "promotion_inactive",
                      "failure_message": "Inactive Promotion",
                      "order": null,
                      "channel": {
                        "channel_id": "abcdefg-efgj-ijkl-mnop-qrstuvxyz",
                        "channel_type": "API"
                      },
                      "customer": {
                        "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                        "name": "Annie Lemon",
                        "email": "annie@lemon.com",
                        "source_id": "annie@lemon.com",
                        "metadata": {
                          "age": 2
                        },
                        "object": "customer"
                      },
                      "related_object_type": "promotion_tier",
                      "related_object_id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                      "voucher": null,
                      "promotion_tier": {
                        "id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                        "action": null,
                        "campaign": {
                          "id": "camp_w7BUstntAm8jbIDjfM49volj",
                          "start_date": null,
                          "expiration_date": null,
                          "object": "campaign"
                        },
                        "campaign_id": null,
                        "summary": {
                          "redemptions": {
                            "total_redeemed": 0
                          },
                          "orders": {
                            "total_amount": 0,
                            "total_discount_amount": 0
                          }
                        },
                        "object": "promotion_tier",
                        "validation_rule_assignments": null
                      }
                    }
                  },
                  "Failed Redemption": {
                    "value": {
                      "id": "rf_0c5bde8dfc0156f0e3",
                      "object": "redemption",
                      "date": "2023-01-25T10:47:58.578Z",
                      "customer_id": null,
                      "tracking_id": null,
                      "metadata": null,
                      "result": "FAILURE",
                      "failure_code": "not_found",
                      "failure_message": "Resource not found",
                      "order": null,
                      "channel": {
                        "channel_id": "abcdefg-efgj-ijkl-mnop-qrstuvxyz",
                        "channel_type": "API"
                      },
                      "customer": null,
                      "related_object_type": "redemption",
                      "related_object_id": "rf_0c5bde8dfc0156f0e3",
                      "voucher": null
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/{code}/redemption": {
      "parameters": [
        {
          "$ref": "#/components/parameters/code"
        }
      ],
      "get": {
        "operationId": "get-voucher-redemptions",
        "tags": [
          "Redemptions"
        ],
        "summary": "Get Voucher's Redemptions",
        "description": "Retrieve the number of times a voucher was redeemed and each of the redemption details.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "A dictionary with a `redemption_entries` property that contains an array of voucher's redemptions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersRedemptionGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "quantity": null,
                      "redeemed_quantity": 6,
                      "object": "list",
                      "url": "/v1/vouchers/Test - FB - Vouchers - 9/redemptions?page=1&limit=10",
                      "data_ref": "redemption_entries",
                      "total": 6,
                      "redemption_entries": [
                        {
                          "id": "r_0bc92f81a6801f9bca",
                          "object": "redemption",
                          "date": "2022-10-03T12:24:58.008Z",
                          "customer_id": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
                          "tracking_id": "track_fxEMFisanb6bqeHALcTMxy9fmc+1Azdq951CZwGFCweQF8eGLowFHg==",
                          "metadata": {},
                          "result": "SUCCESS",
                          "order": {
                            "id": "ord_bhp1EH2SDz7UwkkurPFPLPhi",
                            "source_id": null,
                            "created_at": "2022-10-03T12:24:56.179Z",
                            "updated_at": null,
                            "status": "PAID",
                            "amount": 230000,
                            "discount_amount": 100,
                            "total_discount_amount": 100,
                            "total_amount": 229900,
                            "applied_discount_amount": 100,
                            "total_applied_discount_amount": 100,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0bae45ffc7003ffc52",
                                "quantity": 1,
                                "amount": 230000,
                                "price": 230000,
                                "subtotal_amount": 230000,
                                "product": {
                                  "id": "prod_0bae45ffc7003ffc52",
                                  "source_id": "second_product",
                                  "name": "Samsung Phone 2",
                                  "price": 230000
                                }
                              }
                            ],
                            "metadata": {},
                            "customer": {
                              "id": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
                              "object": "customer"
                            },
                            "customer_id": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
                            "referrer_id": null,
                            "object": "order",
                            "redemptions": {
                              "r_0bc92f81a6801f9bca": {
                                "date": "2022-10-03T12:24:56.219Z",
                                "related_object_type": "voucher",
                                "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
                              }
                            }
                          },
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": {
                            "id": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
                            "name": null,
                            "email": null,
                            "source_id": "johnnyy@email.com",
                            "metadata": {},
                            "object": "customer"
                          },
                          "related_object_type": "voucher",
                          "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                          "voucher": {
                            "id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                            "code": "Test - FB - Vouchers - 9",
                            "campaign_id": null
                          }
                        },
                        {
                          "id": "r_0bc92e6a68050e118c",
                          "object": "redemption",
                          "date": "2022-10-03T12:20:11.873Z",
                          "customer_id": "cust_TzWOhveicr7BI1Qg4bCFrrQQ",
                          "tracking_id": "track_5DQxXbK0C0pvAaHk7mnulmKhuFqhawWj",
                          "metadata": {},
                          "result": "SUCCESS",
                          "order": {
                            "id": "ord_rBsuJYqf4eFZgqj6IxeJgEcN",
                            "source_id": null,
                            "created_at": "2022-10-03T12:20:10.222Z",
                            "updated_at": null,
                            "status": "PAID",
                            "amount": 230000,
                            "discount_amount": 100,
                            "total_discount_amount": 100,
                            "total_amount": 229900,
                            "applied_discount_amount": 100,
                            "total_applied_discount_amount": 100,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0bae45ffc7003ffc52",
                                "quantity": 1,
                                "amount": 230000,
                                "price": 230000,
                                "subtotal_amount": 230000,
                                "product": {
                                  "id": "prod_0bae45ffc7003ffc52",
                                  "source_id": "second_product",
                                  "name": "Samsung Phone 2",
                                  "price": 230000
                                }
                              }
                            ],
                            "metadata": {},
                            "customer": {
                              "id": "cust_TzWOhveicr7BI1Qg4bCFrrQQ",
                              "object": "customer"
                            },
                            "customer_id": "cust_TzWOhveicr7BI1Qg4bCFrrQQ",
                            "referrer_id": null,
                            "object": "order",
                            "redemptions": {
                              "r_0bc92e6a68050e118c": {
                                "date": "2022-10-03T12:20:10.272Z",
                                "related_object_type": "voucher",
                                "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
                              }
                            }
                          },
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": {
                            "id": "cust_TzWOhveicr7BI1Qg4bCFrrQQ",
                            "name": "Bob Jones",
                            "email": "bob.smith@email.com",
                            "source_id": "pub_source_customer_4",
                            "metadata": {
                              "lang": "en",
                              "test": true
                            },
                            "object": "customer"
                          },
                          "related_object_type": "voucher",
                          "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                          "voucher": {
                            "id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                            "code": "Test - FB - Vouchers - 9",
                            "campaign_id": null
                          }
                        },
                        {
                          "id": "r_0bc92db6e6001f9aa8",
                          "object": "redemption",
                          "date": "2022-10-03T12:17:07.780Z",
                          "customer_id": "cust_BB6F97yf0XqCe7hxVUV7M4sS",
                          "tracking_id": "track_5DQxXbK0C0pvAaHk7mnulmYlx396Pk4X",
                          "metadata": {},
                          "result": "SUCCESS",
                          "order": {
                            "id": "ord_JvZbg1LFcXdQ67no5SENGldH",
                            "source_id": null,
                            "created_at": "2022-10-03T12:17:06.404Z",
                            "updated_at": null,
                            "status": "PAID",
                            "amount": 230000,
                            "discount_amount": 1200,
                            "total_discount_amount": 1200,
                            "total_amount": 228800,
                            "applied_discount_amount": 1200,
                            "total_applied_discount_amount": 1200,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0bae45ffc7003ffc52",
                                "quantity": 1,
                                "amount": 230000,
                                "price": 230000,
                                "subtotal_amount": 230000,
                                "product": {
                                  "id": "prod_0bae45ffc7003ffc52",
                                  "source_id": "second_product",
                                  "name": "Samsung Phone 2",
                                  "price": 230000
                                }
                              }
                            ],
                            "metadata": {},
                            "customer": {
                              "id": "cust_BB6F97yf0XqCe7hxVUV7M4sS",
                              "object": "customer"
                            },
                            "customer_id": "cust_BB6F97yf0XqCe7hxVUV7M4sS",
                            "referrer_id": null,
                            "object": "order",
                            "redemptions": {
                              "r_0bc92db6e6001f9aa8": {
                                "date": "2022-10-03T12:17:06.456Z",
                                "related_object_type": "voucher",
                                "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
                              }
                            }
                          },
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": {
                            "id": "cust_BB6F97yf0XqCe7hxVUV7M4sS",
                            "name": "Bob Jones",
                            "email": "bob.smith@email.com",
                            "source_id": "pub_source_customer_5",
                            "metadata": {
                              "lang": "en",
                              "test": true
                            },
                            "object": "customer"
                          },
                          "related_object_type": "voucher",
                          "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                          "voucher": {
                            "id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                            "code": "Test - FB - Vouchers - 9",
                            "campaign_id": null
                          }
                        },
                        {
                          "id": "r_0bc2dc6404426c0ab3",
                          "object": "redemption",
                          "date": "2022-09-28T14:30:56.199Z",
                          "customer_id": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
                          "tracking_id": "track_fxEMFisanb6bqeHALcTMxy9fmc+1Azdq951CZwGFCweQF8eGLowFHg==",
                          "metadata": {},
                          "result": "SUCCESS",
                          "order": {
                            "id": "ord_6uuhGraDuXMOpVRTJT251kKW",
                            "source_id": null,
                            "created_at": "2022-09-28T14:30:54.681Z",
                            "updated_at": null,
                            "status": "PAID",
                            "amount": 230000,
                            "discount_amount": 800,
                            "total_discount_amount": 800,
                            "total_amount": 229200,
                            "applied_discount_amount": 800,
                            "total_applied_discount_amount": 800,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0bae45ffc7003ffc52",
                                "quantity": 1,
                                "amount": 230000,
                                "price": 230000,
                                "subtotal_amount": 230000,
                                "product": {
                                  "id": "prod_0bae45ffc7003ffc52",
                                  "source_id": "second_product",
                                  "name": "Samsung Phone 2",
                                  "price": 230000
                                }
                              }
                            ],
                            "metadata": {},
                            "customer": {
                              "id": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
                              "object": "customer"
                            },
                            "customer_id": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
                            "referrer_id": null,
                            "object": "order",
                            "redemptions": {
                              "r_0bc2dc6404426c0ab3": {
                                "date": "2022-09-28T14:30:54.737Z",
                                "related_object_type": "voucher",
                                "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
                              }
                            }
                          },
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": {
                            "id": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
                            "name": null,
                            "email": null,
                            "source_id": "jonny@email.com",
                            "metadata": {},
                            "object": "customer"
                          },
                          "related_object_type": "voucher",
                          "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                          "voucher": {
                            "id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                            "code": "Test - FB - Vouchers - 9",
                            "campaign_id": null
                          }
                        },
                        {
                          "id": "r_0bc2d6f0ebc95f1783",
                          "object": "redemption",
                          "date": "2022-09-28T14:07:07.516Z",
                          "customer_id": "cust_H0nXrItO1DNV3UiPIl54HA5o",
                          "tracking_id": "track_ThofCMTQe4EVIo0zvvOlTor1twaQNd7E",
                          "metadata": {},
                          "result": "SUCCESS",
                          "order": {
                            "id": "ord_ZQevc2J2sBegsnp5DwanXHsa",
                            "source_id": null,
                            "created_at": "2022-09-28T14:07:06.073Z",
                            "updated_at": null,
                            "status": "PAID",
                            "amount": 230000,
                            "discount_amount": 0,
                            "total_discount_amount": 0,
                            "total_amount": 230000,
                            "applied_discount_amount": 0,
                            "total_applied_discount_amount": 0,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0bae45ffc7003ffc52",
                                "quantity": 1,
                                "amount": 230000,
                                "price": 230000,
                                "subtotal_amount": 230000,
                                "product": {
                                  "id": "prod_0bae45ffc7003ffc52",
                                  "source_id": "second_product",
                                  "name": "Samsung Phone 2",
                                  "price": 230000
                                }
                              }
                            ],
                            "metadata": {},
                            "customer": {
                              "id": "cust_H0nXrItO1DNV3UiPIl54HA5o",
                              "object": "customer"
                            },
                            "customer_id": "cust_H0nXrItO1DNV3UiPIl54HA5o",
                            "referrer_id": null,
                            "object": "order",
                            "redemptions": {
                              "r_0bc2d6f0ebc95f1783": {
                                "date": "2022-09-28T14:07:06.159Z",
                                "related_object_type": "voucher",
                                "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
                              }
                            }
                          },
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": {
                            "id": "cust_H0nXrItO1DNV3UiPIl54HA5o",
                            "name": "Bob Smith",
                            "email": "bob.smith.1@email.com",
                            "source_id": "bob.smith.1@email.com",
                            "metadata": {
                              "lang": "en",
                              "test": false
                            },
                            "object": "customer"
                          },
                          "related_object_type": "voucher",
                          "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                          "voucher": {
                            "id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                            "code": "Test - FB - Vouchers - 9",
                            "campaign_id": null
                          }
                        },
                        {
                          "id": "r_0bc2d3c4f7495f159a",
                          "object": "redemption",
                          "date": "2022-09-28T13:53:16.057Z",
                          "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                          "tracking_id": "track_fxEMFisanb4sbl4Z4yCnJyDW013IrRbJmqKByTNHbXE=",
                          "metadata": {},
                          "result": "SUCCESS",
                          "order": {
                            "id": "ord_ff6rwr58kmdyuLsi5orplnVW",
                            "source_id": null,
                            "created_at": "2022-09-28T13:53:14.604Z",
                            "updated_at": null,
                            "status": "PAID",
                            "amount": 230000,
                            "discount_amount": 800,
                            "total_discount_amount": 800,
                            "total_amount": 229200,
                            "applied_discount_amount": 800,
                            "total_applied_discount_amount": 800,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0bae45ffc7003ffc52",
                                "quantity": 1,
                                "amount": 230000,
                                "price": 230000,
                                "subtotal_amount": 230000,
                                "product": {
                                  "id": "prod_0bae45ffc7003ffc52",
                                  "source_id": "second_product",
                                  "name": "Samsung Phone 2",
                                  "price": 230000
                                }
                              }
                            ],
                            "metadata": {},
                            "customer": {
                              "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                              "object": "customer"
                            },
                            "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "referrer_id": null,
                            "object": "order",
                            "redemptions": {
                              "r_0bc2d3c4f7495f159a": {
                                "date": "2022-09-28T13:53:14.717Z",
                                "related_object_type": "voucher",
                                "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
                              }
                            }
                          },
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": {
                            "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "name": "John Smith",
                            "email": "john.smith@email.com",
                            "source_id": "john.smith@email.com",
                            "metadata": {
                              "acquisition_channel": "Facebook"
                            },
                            "object": "customer"
                          },
                          "related_object_type": "voucher",
                          "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                          "voucher": {
                            "id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                            "code": "Test - FB - Vouchers - 9",
                            "campaign_id": null
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "redeem-voucher",
        "deprecated": true,
        "tags": [
          "Redemptions"
        ],
        "summary": "Redeem Voucher",
        "description": "\n<Danger>\n\n<Badge color=\"red\">Deprecated</Badge>\n\nThis endpoint represents the deprecated version of the API responsible for voucher redemption, and we do not recommend using it. The new [Stackable Discounts API](/api-reference/redemptions/redeem-stackable-discounts) introduces additional features and improvements while maintaining backward compatibility, including applying a combination of coupon codes and promotion tiers. 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\nTo redeem a voucher, you create a redemption object. It increments the redemption counter and updates the history of the voucher. \n\n## How discounts and order amounts are calculated in the API response?\n\nIn the table below, you can see the logic the API follows to calculate discounts and amounts:\n\n| **Field** | **Calculation** | **Description** |\n|:---|:---|:---|\n| amount | N/A | This field shows the order amount before applying any discount |\n| total_amount | total_amount = amount - total_discount_amount | This field shows the order amount after applying all the discounts |\n| discount_amount | discount_amount = previous_discount_amount + applied_discount_amount | This field sums up all order-level discounts applied to a patricular order |\n| items_discount_amount | sum(items, i => i.discount_amount) | This field sums up all product-specific discounts applied to this order |\n| total_discount_amount | total_discount_amount = discount_amount + items_discount_amount | This field sums up all order-level and all product-specific discounts applied to this order |\n| applied_discount_amount | N/A | This field shows order-level discount applied in a particular request |\n| items_applied_discount_amount | sum(items, i => i.applied_discount_amount) | This field sums up all product-specific discounts applied in a particular request |\n| total_applied_discount_amount | total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount | This field sums up all order-level and all product-specific discounts applied in a particular request |",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "tracking_id",
            "description": "A tracking identifier of a user that redeemed a voucher. Identifier generated during voucher validation based on your internal id (e.g., email, database ID). This is a hashed customer source ID. If you also pass a customer ID, the tracking ID must be the ID of a source of the customer object. Otherwise, if you do not pass a customer ID, the tracking you provide must either be a token, like the ones returned by [voucher validation](/api-reference/validations/validate-voucher), or a string identifying customer, with the options described below. **Although not all information is required, the extra info helps prevent fraud.**"
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "requestBody": {
          "description": "Provide the redemption context in the request body.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/7_req_redeem_voucher"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns a redemption object if the redeem operation succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/7_res_redeem_voucher"
                },
                "examples": {
                  "Gift Voucher": {
                    "value": {
                      "id": "r_0c5e8a38730ccec0d5",
                      "object": "redemption",
                      "date": "2023-01-27T12:34:57.100Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "amount": 2000,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_S4BvUj64TlGqVZDOeud7z3rU",
                        "source_id": null,
                        "created_at": "2023-01-27T12:34:57.086Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 6000,
                        "discount_amount": 2000,
                        "total_discount_amount": 2000,
                        "total_amount": 4000,
                        "applied_discount_amount": 2000,
                        "total_applied_discount_amount": 2000,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9ab4ab019a42d5",
                            "quantity": 1,
                            "amount": 3300,
                            "price": 3000,
                            "subtotal_amount": 3300
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9aeddb019a42db",
                            "quantity": 2,
                            "amount": 3400,
                            "price": 3000,
                            "subtotal_amount": 3400
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5e8a38730ccec0d5": {
                            "date": "2023-01-27T12:34:57.100Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_UFAc7FTVO0HtJV2hWZls4O7eqHMyn62g",
                            "related_object_parent_id": "camp_B2Gx83JsSbmvj05MOwxYbNm6"
                          }
                        }
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "age": 26,
                          "favorite_brands": [
                            "Nike",
                            "Adidas",
                            "Reebok"
                          ],
                          "accepts_marketing": false,
                          "acquisition_channel": "Facebook"
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_UFAc7FTVO0HtJV2hWZls4O7eqHMyn62g",
                      "voucher": {
                        "id": "v_UFAc7FTVO0HtJV2hWZls4O7eqHMyn62g",
                        "code": "CODE14",
                        "campaign": "Gift Card Campaign",
                        "campaign_id": "camp_B2Gx83JsSbmvj05MOwxYbNm6",
                        "category": "Second",
                        "category_id": "cat_0bb343dee3cdb5ec0c",
                        "categories": [],
                        "type": "GIFT_VOUCHER",
                        "discount": null,
                        "gift": {
                          "amount": 2000,
                          "balance": 0,
                          "effect": null
                        },
                        "loyalty_card": null,
                        "start_date": "2020-08-16T00:00:00.000Z",
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "active": true,
                        "additional_info": "secret-code1",
                        "metadata": {
                          "region": "APAC",
                          "season": "Fall"
                        },
                        "assets": {
                          "qr": {
                            "id": "U2FsdGVkX1+VibJ6VGxrSVw5qmdbPMP3aP8HfcngMxtQc9Bm649CK1dK36e8YR820Ct26IkvDemEDzV8ozhB3F2BpazbgvCmhAo2Gvmo2WtwBwPh2ISAPJiXQCHRjwmKiqogjqQaNKWLxwDIBUc2jQ==",
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "barcode": {
                            "id": "U2FsdGVkX1/GVIi0p5fL5hxAY/ZBmuAU7nYYS03umjd30dwI5v5ZbpNc3Q5MiYbMuIOIT0H2fUTTwd//S4R9AB+60T/x4kSKu3lgfa9KgJmbyrzXm7Ggly06/qph4/asJaZVZIXEba4WJCeHqXCEgg==",
                            "url": "{{internalVoucherifyURL}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2022-09-23T11:05:42.164Z",
                        "updated_at": "2023-01-27T12:34:57.102Z",
                        "validation_rules_assignments": {
                          "object": "list",
                          "data_ref": "data",
                          "data": [],
                          "total": 0
                        },
                        "redemption": {
                          "quantity": 18,
                          "redeemed_quantity": 1,
                          "redeemed_amount": 2000,
                          "object": "list",
                          "url": "/v1/vouchers/CODE14/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 0,
                          "url": "/v1/vouchers/CODE14/publications?page=1&limit=10"
                        },
                        "object": "voucher",
                        "applicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        },
                        "inapplicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        }
                      },
                      "gift": {
                        "amount": 2000
                      }
                    }
                  },
                  "Discount Coupon": {
                    "value": {
                      "id": "r_0c5e8ef10842da0aad",
                      "object": "redemption",
                      "date": "2023-01-27T12:55:34.689Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_J5ogV1Gkk2yfxmBEhYIg4O65",
                        "source_id": null,
                        "created_at": "2023-01-27T12:55:34.673Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 6000,
                        "items_discount_amount": 300,
                        "total_discount_amount": 300,
                        "total_amount": 5700,
                        "items_applied_discount_amount": 300,
                        "total_applied_discount_amount": 300,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9ab4ab019a42d5",
                            "quantity": 1,
                            "amount": 3300,
                            "discount_amount": 148,
                            "applied_discount_amount": 148,
                            "price": 3000,
                            "subtotal_amount": 3152
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9aeddb019a42db",
                            "quantity": 2,
                            "amount": 3400,
                            "discount_amount": 152,
                            "applied_discount_amount": 152,
                            "price": 3000,
                            "subtotal_amount": 3248
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5e8ef10842da0aad": {
                            "date": "2023-01-27T12:55:34.689Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u"
                          }
                        }
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "age": 26,
                          "favorite_brands": [
                            "Nike",
                            "Adidas",
                            "Reebok"
                          ],
                          "accepts_marketing": false,
                          "acquisition_channel": "Facebook"
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u",
                      "voucher": {
                        "id": "v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u",
                        "code": "2CpRCE2c",
                        "campaign": null,
                        "campaign_id": null,
                        "category": null,
                        "category_id": null,
                        "categories": [],
                        "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": "2023-01-27T12:55:34.690Z",
                        "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",
                              "object": "validation_rules_assignment"
                            }
                          ],
                          "total": 1
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 2,
                          "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",
                        "applicable_to": {
                          "data": [
                            {
                              "object": "product",
                              "id": "prod_0a9f9ab4ab019a42d5",
                              "source_id": "prod_0a9f9ab4ab019a42d5",
                              "effect": "APPLY_TO_EVERY"
                            },
                            {
                              "object": "product",
                              "id": "prod_0a9f9aeddb019a42db",
                              "source_id": "prod_0a9f9aeddb019a42db",
                              "effect": "APPLY_TO_EVERY"
                            }
                          ],
                          "total": 2,
                          "data_ref": "data",
                          "object": "list"
                        },
                        "inapplicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        }
                      }
                    }
                  },
                  "Loyalty Card": {
                    "value": {
                      "id": "r_0c5e8f2cd78497a372",
                      "object": "redemption",
                      "date": "2023-01-27T12:56:35.934Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "amount": 300,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_MGTimoN4VtSj7iT75bP01FsH",
                        "source_id": null,
                        "created_at": "2023-01-27T12:56:35.923Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 6000,
                        "discount_amount": 6000,
                        "total_discount_amount": 6000,
                        "total_amount": 0,
                        "applied_discount_amount": 6000,
                        "total_applied_discount_amount": 6000,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9ab4ab019a42d5",
                            "quantity": 1,
                            "amount": 3300,
                            "price": 3000,
                            "subtotal_amount": 3300
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9aeddb019a42db",
                            "quantity": 2,
                            "amount": 3400,
                            "price": 3000,
                            "subtotal_amount": 3400
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5e8f2cd78497a372": {
                            "date": "2023-01-27T12:56:35.934Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                            "related_object_parent_id": "camp_22noMlhTADb7Fq2UL3vWu3d1"
                          }
                        }
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "age": 26,
                          "favorite_brands": [
                            "Nike",
                            "Adidas",
                            "Reebok"
                          ],
                          "accepts_marketing": false,
                          "acquisition_channel": "Facebook"
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                      "voucher": {
                        "id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                        "code": "AnsvocvP",
                        "campaign": "Loyalty Campaign - Test Points",
                        "campaign_id": "camp_22noMlhTADb7Fq2UL3vWu3d1",
                        "category": null,
                        "category_id": "cat_0bb81a481615a37b5e",
                        "categories": [],
                        "type": "LOYALTY_CARD",
                        "discount": null,
                        "gift": null,
                        "loyalty_card": {
                          "points": 6500,
                          "balance": 5086
                        },
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "active": true,
                        "additional_info": null,
                        "metadata": {},
                        "assets": {
                          "qr": {
                            "id": "U2FsdGVkX1/Au841M0T7UjYYRxYTzCRbNdZW6jW5YRNcV9PgblvN2MD5hdRuZfBRHEAm+d2pvzc2FOVHFkuh9BQoaIq4KVyvy0FvkWtKkMLe4zO+qL4ocNUIbaRMSLeY6Xiz4hjxKNq918oLyGrp9w==",
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "barcode": {
                            "id": "U2FsdGVkX1+xG42zWo9nivfp6tg5jNuFCYOIFtw7iwas8kcA/8H4gu04dxO/hrbD41gFvxDhCuTSnIKwIPg9dEXzOvh8qy9VWN0UwDc6PL7lfNQuY+8Os7dqVsyNhoRned9pBo1uO6V4pjNu1gRTrw==",
                            "url": "{{internalVoucherifyURL}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2022-11-10T06:28:59.970Z",
                        "updated_at": "2023-01-27T12:56:35.935Z",
                        "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "holder": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "validation_rules_assignments": {
                          "object": "list",
                          "data_ref": "data",
                          "data": [],
                          "total": 0
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 10,
                          "redeemed_points": 1414,
                          "object": "list",
                          "url": "/v1/vouchers/AnsvocvP/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 1,
                          "url": "/v1/vouchers/AnsvocvP/publications?page=1&limit=10"
                        },
                        "object": "voucher",
                        "applicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        },
                        "inapplicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        }
                      },
                      "reward": {
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "name": "Bob Jones",
                          "email": "bob.jones@email.com",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "assignment_id": "rewa_YAIuU7AY6LNJVlUbRxSbNgiD",
                        "id": "rew_INt3fGH3n7xIr3ZQcq4kkUZ1",
                        "object": "reward",
                        "name": "100 = $20",
                        "created_at": "2022-11-10T06:28:39.582Z",
                        "updated_at": null,
                        "parameters": {
                          "coin": {
                            "exchange_ratio": 20,
                            "points_ratio": 100
                          }
                        },
                        "type": "COIN"
                      },
                      "loyalty_card": {
                        "points": 300
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if something goes wrong. A common source of error is an invalid or expired voucher, or a valid gift card with insufficient available balance.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_error_expanded"
                },
                "examples": {
                  "Voucher disabled": {
                    "value": {
                      "code": 400,
                      "key": "voucher_disabled",
                      "message": "voucher is disabled",
                      "details": "AnsvocvP",
                      "request_id": "v-0c5d710a63c4110ae9",
                      "resource_id": "rf_0c5d710a87c8a31f86",
                      "resource_type": "redemption",
                      "error": {
                        "message": "The voucher has been disabled and cannot be used."
                      }
                    }
                  },
                  "Invalid Customer": {
                    "value": {
                      "code": 400,
                      "key": "invalid_customer",
                      "message": "Customer must be a holder of a loyalty card.",
                      "details": "AnsvocvP",
                      "request_id": "v-0c5e628bd14411244b",
                      "resource_id": "rf_0c5e628bf841c7f248",
                      "resource_type": "redemption",
                      "error": {
                        "message": "The customer is invalid."
                      }
                    }
                  },
                  "Voucher Inactive": {
                    "value": {
                      "code": 400,
                      "key": "voucher_not_active_now",
                      "message": "voucher not active now",
                      "details": "CODE14",
                      "request_id": "v-0c5e89b9300d820994",
                      "resource_id": "rf_0c5e89b945d33b9c02",
                      "resource_type": "redemption",
                      "error": {
                        "message": "The voucher is not active in the given timeframe."
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/redemptions/{redemptionId}/rollback": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterRedemptionId"
          },
          "name": "redemptionId",
          "in": "path",
          "required": true,
          "description": "The original redemption ID to be rolled back (undone)."
        }
      ],
      "post": {
        "operationId": "rollback-redemption",
        "tags": [
          "Redemptions"
        ],
        "summary": "Rollback Redemption",
        "description": "Your business logic may include a case when you need to undo a redemption. You can revert a redemption by calling this API endpoint. This endpoint rolls back only single redemptions, meaning those that are not stacked. Stacked redemptions belong to a parent redemption. To roll back a parent redemption, including all of its individual redemptions, use the [POST Rollback Stackable Redemptions](/api-reference/redemptions/rollback-stackable-redemptions) \n<Warning>\n\nYou can roll back a redemption up to 3 months back.\n\n</Warning>\n\n ## Effect \nThe operation \n- creates a rollback entry in voucher's redemption history (`redemption.redemption_entries`) and \n- gives 1 redemption back to the pool (decreases `redeemed_quantity` by 1). \n## Returned funds \nIn case of *gift card vouchers*, this method returns funds back according to the source redemption. In case of *loyalty card vouchers*, this method returns points back according to the source redemption.",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "reason",
            "description": "Reason for the rollback."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "tracking_id",
            "description": "Customer's `source_id`."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "redemptions"
            ]
          }
        ],
        "requestBody": {
          "description": "Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RedemptionsRollbackCreateRequestBody"
              },
              "examples": {
                "Promotion": {
                  "value": {
                    "customer": {
                      "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                      "name": "Annie Lemons",
                      "email": "annie@lemon.com",
                      "phone": "+1 933 222 3334",
                      "birthday": "1900-12-02",
                      "birthdate": "1900-12-01",
                      "address": {
                        "city": "New York",
                        "state": "NY",
                        "line_1": "123 Main St.",
                        "line_2": "APT 3 BLG 5",
                        "country": "United States",
                        "postal_code": "100012"
                      },
                      "metadata": {
                        "age": 23
                      }
                    },
                    "order": {
                      "source_id": "test_rollback_8"
                    },
                    "metadata": {
                      "location_id": [
                        "L2"
                      ]
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns a redemption rollback object indicating the result of the rollback.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RedemptionsRollbackCreateResponseBody"
                },
                "examples": {
                  "Loyalty Card": {
                    "value": {
                      "id": "rr_0c5eba630bc4979e70",
                      "object": "redemption_rollback",
                      "date": "2023-01-27T16:05:23.631Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "amount": -2,
                      "redemption": "r_0c5bf3323008a35032",
                      "reason": "A UI rollback to check for result in API response to listing.",
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_dqxr4uzaYWkTZnrSEMoQtCF8",
                        "source_id": null,
                        "created_at": "2023-01-25T12:18:09.203Z",
                        "updated_at": "2023-01-27T16:05:23.687Z",
                        "status": "CANCELED",
                        "amount": 2100,
                        "total_amount": 2100,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0bc3bd8a4e072c5275",
                            "quantity": 3,
                            "amount": 2100,
                            "price": 700,
                            "subtotal_amount": 2100,
                            "product": {
                              "name": "Bouquet - Romantic Roses",
                              "price": 700
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5bf3323008a35032": {
                            "date": "2023-01-25T12:18:09.216Z",
                            "rollback_id": "rr_0c5eba630bc4979e70",
                            "rollback_date": "2023-01-27T16:05:23.631Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                            "related_object_parent_id": "camp_22noMlhTADb7Fq2UL3vWu3d1"
                          }
                        }
                      },
                      "channel": {
                        "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                        "channel_type": "USER"
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "age": 26,
                          "favorite_brands": [
                            "Nike",
                            "Adidas",
                            "Reebok"
                          ],
                          "accepts_marketing": false,
                          "acquisition_channel": "Facebook"
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                      "voucher": {
                        "id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                        "code": "AnsvocvP",
                        "campaign": "Loyalty Campaign - Test Points",
                        "campaign_id": "camp_22noMlhTADb7Fq2UL3vWu3d1",
                        "category": null,
                        "categories": [],
                        "discount": null,
                        "gift": null,
                        "loyalty_card": null,
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "additional_info": null,
                        "assets": {
                          "qr": {},
                          "barcode": {}
                        },
                        "updated_at": null,
                        "object": "voucher"
                      },
                      "reward": {
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "name": "Bob Jones",
                          "email": "bob.jones@email.com",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "assignment_id": "rewa_0ZwLAHgeU9IrI2V1ofYRmW7g",
                        "voucher": {
                          "id": "v_4GaEX7clyqMaveT7vHhoyRpsIgxv95Q6",
                          "code": "HAPPY-ORDER5My",
                          "campaign": "$20 off the entire order",
                          "campaign_id": "camp_5h0wc453_4",
                          "category": null,
                          "category_id": "cat_0b688929a2476386a6",
                          "categories": [],
                          "type": "DISCOUNT_VOUCHER",
                          "discount": {
                            "type": "AMOUNT",
                            "amount_off": 2000,
                            "effect": "APPLY_TO_ORDER"
                          },
                          "gift": null,
                          "loyalty_card": null,
                          "start_date": "2022-09-20T00:00:00.000Z",
                          "expiration_date": "2022-09-30T00:00:00.000Z",
                          "validity_timeframe": null,
                          "validity_day_of_week": null,
                          "active": true,
                          "additional_info": null,
                          "metadata": {},
                          "assets": {
                            "qr": {
                              "id": "21ceb848-4869-4dac-ba41-f854bda3a101",
                              "url": "{{internalVoucherifyURL}}"
                            },
                            "barcode": {
                              "id": "1dba9cb2-fb28-4c8d-8548-5edb2eb01f5a",
                              "url": "{{internalVoucherifyURL}}"
                            }
                          },
                          "is_referral_code": false,
                          "created_at": "2023-01-25T12:18:09.256Z",
                          "updated_at": null,
                          "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0,
                            "object": "list",
                            "url": "/v1/vouchers/HAPPY-ORDER5My/redemptions?page=1&limit=10"
                          },
                          "publish": {
                            "object": "list",
                            "count": 1,
                            "url": "/v1/vouchers/HAPPY-ORDER5My/publications?page=1&limit=10"
                          },
                          "object": "voucher"
                        },
                        "id": "rew_MF4hKh1IKYgJkPjbcFbH94Ho",
                        "object": "reward",
                        "name": "Digital Present",
                        "created_at": "2023-01-25T12:16:44.557Z",
                        "updated_at": null,
                        "parameters": {
                          "campaign": {
                            "id": "camp_5h0wc453_4",
                            "type": "DISCOUNT_COUPONS"
                          }
                        },
                        "type": "CAMPAIGN"
                      },
                      "loyalty_card": {
                        "points": -2
                      }
                    }
                  },
                  "Discount Coupon": {
                    "value": {
                      "id": "rr_0c5eb002b40cce9d62",
                      "object": "redemption_rollback",
                      "date": "2023-01-27T15:20:03.536Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "redemption": "r_0c5e8ef10842da0aad",
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_J5ogV1Gkk2yfxmBEhYIg4O65",
                        "source_id": null,
                        "created_at": "2023-01-27T12:55:34.673Z",
                        "updated_at": "2023-01-27T15:20:03.743Z",
                        "status": "CANCELED",
                        "amount": 6000,
                        "total_amount": 6000,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9ab4ab019a42d5",
                            "quantity": 1,
                            "amount": 3300,
                            "price": 3000,
                            "subtotal_amount": 3300
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9aeddb019a42db",
                            "quantity": 2,
                            "amount": 3400,
                            "price": 3000,
                            "subtotal_amount": 3400
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5e8ef10842da0aad": {
                            "date": "2023-01-27T12:55:34.689Z",
                            "rollback_id": "rr_0c5eb002b40cce9d62",
                            "rollback_date": "2023-01-27T15:20:03.536Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u"
                          }
                        }
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "source_id": "36_bob",
                        "metadata": {
                          "age": 26,
                          "favorite_brands": [
                            "Nike",
                            "Adidas",
                            "Reebok"
                          ],
                          "accepts_marketing": false,
                          "acquisition_channel": "Facebook"
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u",
                      "voucher": {
                        "id": "v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u",
                        "code": "2CpRCE2c",
                        "campaign": null,
                        "campaign_id": null,
                        "category": null,
                        "category_id": null,
                        "categories": [],
                        "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": "2023-01-27T15:20:03.707Z",
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 1,
                          "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"
                      }
                    }
                  },
                  "Gift Card": {
                    "value": {
                      "id": "rr_0c5eb099214ccea115",
                      "object": "redemption_rollback",
                      "date": "2023-01-27T15:22:37.573Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "amount": -2000,
                      "redemption": "r_0c5e8a38730ccec0d5",
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_S4BvUj64TlGqVZDOeud7z3rU",
                        "source_id": null,
                        "created_at": "2023-01-27T12:34:57.086Z",
                        "updated_at": "2023-01-27T15:22:37.628Z",
                        "status": "CANCELED",
                        "amount": 6000,
                        "total_amount": 6000,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9ab4ab019a42d5",
                            "quantity": 1,
                            "amount": 3300,
                            "price": 3000,
                            "subtotal_amount": 3300
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9aeddb019a42db",
                            "quantity": 2,
                            "amount": 3400,
                            "price": 3000,
                            "subtotal_amount": 3400
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5e8a38730ccec0d5": {
                            "date": "2023-01-27T12:34:57.100Z",
                            "rollback_id": "rr_0c5eb099214ccea115",
                            "rollback_date": "2023-01-27T15:22:37.573Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_UFAc7FTVO0HtJV2hWZls4O7eqHMyn62g",
                            "related_object_parent_id": "camp_B2Gx83JsSbmvj05MOwxYbNm6"
                          }
                        }
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "source_id": "36_bob",
                        "metadata": {
                          "age": 26,
                          "favorite_brands": [
                            "Nike",
                            "Adidas",
                            "Reebok"
                          ],
                          "accepts_marketing": false,
                          "acquisition_channel": "Facebook"
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_UFAc7FTVO0HtJV2hWZls4O7eqHMyn62g",
                      "voucher": {
                        "id": "v_UFAc7FTVO0HtJV2hWZls4O7eqHMyn62g",
                        "code": "CODE14",
                        "campaign": "Gift Card Campaign",
                        "campaign_id": "camp_B2Gx83JsSbmvj05MOwxYbNm6",
                        "category": "Second",
                        "category_id": "cat_0bb343dee3cdb5ec0c",
                        "categories": [],
                        "type": "GIFT_VOUCHER",
                        "discount": null,
                        "gift": {
                          "amount": 2000,
                          "balance": 2000,
                          "effect": null
                        },
                        "loyalty_card": null,
                        "start_date": "2020-08-16T00:00:00.000Z",
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "active": true,
                        "additional_info": "secret-code1",
                        "metadata": {
                          "region": "APAC",
                          "season": "Fall"
                        },
                        "assets": {
                          "qr": {
                            "id": "U2FsdGVkX1+VibJ6VGxrSVw5qmdbPMP3aP8HfcngMxtQc9Bm649CK1dK36e8YR820Ct26IkvDemEDzV8ozhB3F2BpazbgvCmhAo2Gvmo2WtwBwPh2ISAPJiXQCHRjwmKiqogjqQaNKWLxwDIBUc2jQ==",
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "barcode": {
                            "id": "U2FsdGVkX1/GVIi0p5fL5hxAY/ZBmuAU7nYYS03umjd30dwI5v5ZbpNc3Q5MiYbMuIOIT0H2fUTTwd//S4R9AB+60T/x4kSKu3lgfa9KgJmbyrzXm7Ggly06/qph4/asJaZVZIXEba4WJCeHqXCEgg==",
                            "url": "{{internalVoucherifyURL}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2022-09-23T11:05:42.164Z",
                        "updated_at": "2023-01-27T15:22:37.595Z",
                        "redemption": {
                          "quantity": 18,
                          "redeemed_quantity": 0,
                          "redeemed_amount": 0,
                          "object": "list",
                          "url": "/v1/vouchers/CODE14/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 0,
                          "url": "/v1/vouchers/CODE14/publications?page=1&limit=10"
                        },
                        "object": "voucher"
                      },
                      "gift": {
                        "amount": -2000
                      }
                    }
                  },
                  "Promotion Tier": {
                    "value": {
                      "id": "rr_0ca286e96cc03f3e76",
                      "object": "redemption_rollback",
                      "date": "2023-03-21T07:57:12.526Z",
                      "customer_id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                      "tracking_id": "track_VAVW6qltuo1/z+G2GI2LPw==",
                      "metadata": {
                        "location_id": [
                          "L2"
                        ]
                      },
                      "redemption": "r_0ca286d222d2f7dc1f",
                      "reason": "To undo a redemption.",
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_0FR01SqYIxV4ITzgs1yZjkK6",
                        "source_id": "test_rollback_8",
                        "created_at": "2023-03-21T07:56:48.634Z",
                        "updated_at": "2023-03-21T07:57:12.546Z",
                        "status": "CANCELED",
                        "amount": 200000,
                        "total_amount": 200000,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "apple534",
                            "related_object": "product",
                            "product_id": "prod_anJ03RZZq74z4v",
                            "quantity": 2,
                            "amount": 100000,
                            "price": 50000,
                            "subtotal_amount": 100000,
                            "product": {
                              "id": "prod_0c5d6689b39320059b",
                              "source_id": "prod_anJ03RZZq74z4v",
                              "name": "Apple iPhone 8",
                              "metadata": {
                                "shop": "citycenter",
                                "category": "electronics"
                              }
                            },
                            "metadata": {
                              "series": "2022-783CV"
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "apple534-ihd5",
                            "related_object": "sku",
                            "sku_id": "sku_0KtP4rvwEECQ2U",
                            "quantity": 1,
                            "amount": 100000,
                            "price": 100000,
                            "subtotal_amount": 100000,
                            "sku": {
                              "sku": "Apple iPad 10 Silver 64GB",
                              "metadata": {
                                "category": "electronics"
                              }
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                          "object": "customer"
                        },
                        "customer_id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0ca286d222d2f7dc1f": {
                            "date": "2023-03-21T07:56:48.651Z",
                            "rollback_id": "rr_0ca286e96cc03f3e76",
                            "rollback_date": "2023-03-21T07:57:12.526Z",
                            "related_object_type": "promotion_tier",
                            "related_object_id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                            "related_object_parent_id": "camp_w7BUstntAm8jbIDjfM49volj"
                          }
                        }
                      },
                      "channel": {
                        "channel_id": "e55f3aaa-b303-421a-b562-ca8529ed341d",
                        "channel_type": "API"
                      },
                      "customer": {
                        "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                        "name": "Annie Lemons",
                        "email": "annie@lemon.com",
                        "source_id": "annie@lemon.com",
                        "metadata": {
                          "age": 23
                        },
                        "object": "customer"
                      },
                      "related_object_type": "promotion_tier",
                      "related_object_id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                      "voucher": null,
                      "promotion_tier": {
                        "id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                        "created_at": "2022-09-23T08:31:23.022Z",
                        "updated_at": "2023-02-01T07:47:57.324Z",
                        "name": "Percent Discount",
                        "banner": "Get 40% off",
                        "action": {
                          "discount": {
                            "type": "PERCENT",
                            "percent_off": 40,
                            "effect": "APPLY_TO_ORDER"
                          }
                        },
                        "metadata": {},
                        "hierarchy": 2,
                        "campaign": {
                          "id": "camp_w7BUstntAm8jbIDjfM49volj",
                          "start_date": "2019-08-16T00:00:00.000Z",
                          "expiration_date": null,
                          "active": true,
                          "object": "campaign"
                        },
                        "campaign_id": "camp_w7BUstntAm8jbIDjfM49volj",
                        "active": true,
                        "start_date": "2022-09-21T00:00:00.000Z",
                        "validity_day_of_week": [
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "summary": {
                          "redemptions": {
                            "total_redeemed": 5
                          },
                          "orders": {
                            "total_amount": 616000,
                            "total_discount_amount": 246400
                          }
                        },
                        "object": "promotion_tier",
                        "validation_rule_assignments": null,
                        "category_id": null,
                        "categories": []
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the rollback redemption process failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Already rolledback": {
                    "value": {
                      "code": 400,
                      "key": "already_rolled_back",
                      "message": "Already rolled back",
                      "details": "Redemption has been already rolled back.",
                      "request_id": "v-0c5eb3bd81cd7e3a39",
                      "resource_id": "rrf_0c5eb3bd884497ed05",
                      "resource_type": "redemption_rollback"
                    }
                  },
                  "Invalid Redemption Parent": {
                    "value": {
                      "code": 400,
                      "key": "invalid_redemption_parent",
                      "message": "Invalid redemption parent",
                      "details": "You can rollback only a redemption that does not have parent redemption.",
                      "request_id": "v-0c6382005e03b3bd2f"
                    }
                  },
                  "Invalid Redemption": {
                    "value": {
                      "code": 400,
                      "key": "invalid_redemption",
                      "message": "Invalid redemption",
                      "details": "You can rollback only a single redemption. Use different endpoint for stacked redemption.",
                      "request_id": "v-0c675e5e2e04e31bb3"
                    }
                  },
                  "Invalid Order": {
                    "value": {
                      "code": 400,
                      "key": "invalid_order",
                      "message": "Invalid order",
                      "details": "Order is not related with redemption.",
                      "request_id": "v-0ca2770e3fc4047e25"
                    }
                  },
                  "Invalidate Customer": {
                    "value": {
                      "code": 400,
                      "key": "invalid_customer",
                      "message": "Invalid customer",
                      "details": "Customer is not related with redemption.",
                      "request_id": "v-0ca284851b0404513f"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the rollback redemption process failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Cannot find customer": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find customer with id cust_eWgXlBBiY6THFRJwX45Iakv4s",
                      "request_id": "v-0c5ebc5de80a2cf1a5",
                      "resource_id": "cust_eWgXlBBiY6THFRJwX45Iakv4s",
                      "resource_type": "customer"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/promotions/tiers/{promotionTierId}/redemption": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterPromotionTierId"
          },
          "name": "promotionTierId",
          "in": "path",
          "required": true,
          "description": "ID of the promotion tier to be redeemed."
        }
      ],
      "post": {
        "operationId": "redeem-promotion",
        "deprecated": true,
        "tags": [
          "Redemptions"
        ],
        "summary": "Redeem Promotion",
        "description": "\n<Danger>\n\n<Badge color=\"red\">Deprecated</Badge>\n\nThis endpoint represents the deprecated version of the API responsible for promotion tier redemption, and we do not recommend using it. The new [Stackable Discounts API](/api-reference/redemptions/redeem-stackable-discounts) introduces additional features and improvements while maintaining backward compatibility, including applying a combination of coupon codes and promotion tiers. 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\nTo redeem a promotion, you create a redemption object passing a context.\n\nYou can retrieve a list of active promotions through the [Validate Promotions](/api-reference/validations/validate-promotion-tier) endpoint. That validation method will return a list of active​ promotion tiers identified by thier IDs. \n\n<Note>\n\n<Badge color=\"blue\">Redemption rollback</Badge>\n\nDo you need to undo a redemption? You can do it with [redemption rollback](/api-reference/redemptions/rollback-redemption).\n\n</Note>",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "promotions"
            ]
          }
        ],
        "requestBody": {
          "description": "Provide the redemption context in the request body.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/7_req_redeem_promotion_tier"
              },
              "examples": {
                "One product one sku": {
                  "value": {
                    "customer": {
                      "source_id": "annie@lemon.com",
                      "name": "Annie Lemon",
                      "email": "annie@lemon.com"
                    },
                    "order": {
                      "amount": 200000,
                      "items": [
                        {
                          "source_id": "apple534",
                          "product_id": "prod_anJ03RZZq74z4v",
                          "related_object": "product",
                          "quantity": 2,
                          "price": 50000,
                          "product": {
                            "override": true,
                            "name": "Apple iPhone 8",
                            "metadata": {
                              "shop": "citycenter",
                              "category": "electronics"
                            }
                          },
                          "metadata": {
                            "series": "2022-783CV"
                          }
                        },
                        {
                          "sku_id": "sku_0KtP4rvwEECQ2U",
                          "source_id": "apple534-ihd5",
                          "related_object": "sku",
                          "quantity": 1,
                          "price": 100000,
                          "sku": {
                            "override": true,
                            "sku": "Apple iPad 10 Silver 64GB",
                            "metadata": {
                              "category": "electronics"
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns a redemption object if the redeem operation succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/7_obj_redemption_object_promotion_tier_extended"
                },
                "examples": {
                  "One product one sku": {
                    "value": {
                      "id": "r_0ca2699201c03f121b",
                      "object": "redemption",
                      "date": "2023-03-21T05:49:00.807Z",
                      "customer_id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                      "tracking_id": "track_VAVW6qltuo1/z+G2GI2LPw==",
                      "metadata": null,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_IVEF85NZCXmP4S1fGmImSTwH",
                        "source_id": null,
                        "created_at": "2023-03-21T05:49:00.772Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 200000,
                        "discount_amount": 80000,
                        "total_discount_amount": 80000,
                        "total_amount": 120000,
                        "applied_discount_amount": 80000,
                        "total_applied_discount_amount": 80000,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "apple534",
                            "related_object": "product",
                            "product_id": "prod_anJ03RZZq74z4v",
                            "quantity": 2,
                            "amount": 100000,
                            "price": 50000,
                            "subtotal_amount": 100000,
                            "product": {
                              "id": "prod_0c5d6689b39320059b",
                              "source_id": "prod_anJ03RZZq74z4v",
                              "name": "Apple iPhone 8",
                              "metadata": {
                                "shop": "citycenter",
                                "category": "electronics"
                              }
                            },
                            "metadata": {
                              "series": "2022-783CV"
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "apple534-ihd5",
                            "related_object": "sku",
                            "sku_id": "sku_0KtP4rvwEECQ2U",
                            "quantity": 1,
                            "amount": 100000,
                            "price": 100000,
                            "subtotal_amount": 100000,
                            "sku": {
                              "sku": "Apple iPad 10 Silver 64GB",
                              "metadata": {
                                "category": "electronics"
                              }
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                          "object": "customer"
                        },
                        "customer_id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0ca2699201c03f121b": {
                            "date": "2023-03-21T05:49:00.807Z",
                            "related_object_type": "promotion_tier",
                            "related_object_id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                            "related_object_parent_id": "camp_w7BUstntAm8jbIDjfM49volj"
                          }
                        }
                      },
                      "channel": {
                        "channel_id": "e55f3aaa-b303-421a-b562-ca8529ed341d",
                        "channel_type": "API"
                      },
                      "customer": {
                        "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                        "name": "Annie Lemon",
                        "email": "annie@lemon.com",
                        "source_id": "annie@lemon.com",
                        "metadata": {
                          "age": 2
                        },
                        "object": "customer"
                      },
                      "related_object_type": "promotion_tier",
                      "related_object_id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                      "voucher": null,
                      "promotion_tier": {
                        "id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                        "created_at": "2022-09-23T08:31:23.022Z",
                        "updated_at": "2023-02-01T07:47:57.324Z",
                        "name": "Percent Discount",
                        "banner": "Get 40% off",
                        "action": {
                          "discount": {
                            "type": "PERCENT",
                            "percent_off": 40,
                            "effect": "APPLY_TO_ORDER"
                          }
                        },
                        "metadata": {},
                        "hierarchy": 2,
                        "campaign": {
                          "id": "camp_w7BUstntAm8jbIDjfM49volj",
                          "start_date": "2019-08-16T00:00:00.000Z",
                          "expiration_date": null,
                          "active": true,
                          "object": "campaign"
                        },
                        "campaign_id": "camp_w7BUstntAm8jbIDjfM49volj",
                        "active": true,
                        "start_date": "2022-09-21T00:00:00.000Z",
                        "validity_day_of_week": [
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "summary": {
                          "redemptions": {
                            "total_redeemed": 5
                          },
                          "orders": {
                            "total_amount": 616000,
                            "total_discount_amount": 246400
                          }
                        },
                        "object": "promotion_tier",
                        "validation_rule_assignments": {
                          "object": "list",
                          "data_ref": "data",
                          "data": [
                            {
                              "id": "asgm_z6MvMg2Zf2UABNWN",
                              "rule_id": "val_q8qUBMOh5qIQ",
                              "related_object_id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                              "related_object_type": "promotion_tier",
                              "object": "validation_rules_assignment"
                            }
                          ],
                          "total": 1
                        },
                        "category_id": null,
                        "categories": []
                      }
                    }
                  },
                  "Example": {
                    "value": {
                      "id": "r_0c64c10b8ece60bd91",
                      "object": "redemption",
                      "date": "2023-02-01T08:25:22.235Z",
                      "customer_id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                      "tracking_id": "track_VAVW6qltuo1/z+G2GI2LPw==",
                      "metadata": null,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_7n58dbLV2jMG4C14XjEYEbjh",
                        "source_id": null,
                        "created_at": "2023-02-01T08:25:22.192Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 200000,
                        "discount_amount": 80000,
                        "total_discount_amount": 80000,
                        "total_amount": 120000,
                        "applied_discount_amount": 80000,
                        "total_applied_discount_amount": 80000,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "apple534",
                            "related_object": "product",
                            "product_id": "prod_anJ03RZZq74z4v",
                            "quantity": 2,
                            "amount": 100000,
                            "price": 50000,
                            "subtotal_amount": 100000,
                            "product": {
                              "id": "prod_0c5d6689b39320059b",
                              "source_id": "prod_anJ03RZZq74z4v",
                              "name": "Apple iPhone 8",
                              "metadata": {
                                "shop": "citycenter",
                                "category": "electronics"
                              }
                            },
                            "metadata": {
                              "series": "2022-783CV"
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "apple534-ihd5",
                            "related_object": "sku",
                            "sku_id": "sku_0KtP4rvwEECQ2U",
                            "quantity": 1,
                            "amount": 100000,
                            "price": 100000,
                            "subtotal_amount": 100000,
                            "sku": {
                              "sku": "Apple iPad 10 Silver 64GB",
                              "metadata": {
                                "category": "electronics"
                              }
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                          "object": "customer"
                        },
                        "customer_id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c64c10b8ece60bd91": {
                            "date": "2023-02-01T08:25:22.235Z",
                            "related_object_type": "promotion_tier",
                            "related_object_id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                            "related_object_parent_id": "camp_w7BUstntAm8jbIDjfM49volj"
                          }
                        }
                      },
                      "customer": {
                        "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                        "name": "Annie Lemon",
                        "email": "annie@lemon.com",
                        "source_id": "annie@lemon.com",
                        "metadata": {
                          "age": 2
                        },
                        "object": "customer"
                      },
                      "related_object_type": "promotion_tier",
                      "related_object_id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                      "voucher": null,
                      "promotion_tier": {
                        "id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                        "created_at": "2022-09-23T08:31:23.022Z",
                        "updated_at": "2023-02-01T07:47:57.324Z",
                        "name": "Percent Discount",
                        "banner": "Get 40% off",
                        "action": {
                          "discount": {
                            "type": "PERCENT",
                            "percent_off": 40,
                            "effect": "APPLY_TO_ORDER"
                          }
                        },
                        "metadata": {},
                        "hierarchy": 2,
                        "campaign": {
                          "id": "camp_w7BUstntAm8jbIDjfM49volj",
                          "start_date": "2019-08-16T00:00:00.000Z",
                          "expiration_date": null,
                          "active": true,
                          "object": "campaign"
                        },
                        "campaign_id": null,
                        "active": true,
                        "start_date": "2022-09-21T00:00:00.000Z",
                        "validity_day_of_week": [
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "summary": {
                          "redemptions": {
                            "total_redeemed": 3
                          },
                          "orders": {
                            "total_amount": 408000,
                            "total_discount_amount": 163200
                          }
                        },
                        "object": "promotion_tier",
                        "validation_rule_assignments": {
                          "object": "list",
                          "data_ref": "data",
                          "data": [
                            {
                              "id": "asgm_z6MvMg2Zf2UABNWN",
                              "rule_id": "val_q8qUBMOh5qIQ",
                              "related_object_id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                              "related_object_type": "promotion_tier",
                              "object": "validation_rules_assignment"
                            }
                          ],
                          "total": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the promotion tier is inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_error_expanded"
                },
                "examples": {
                  "Inactive Promotion": {
                    "value": {
                      "code": 400,
                      "key": "promotion_inactive",
                      "message": "Inactive Promotion",
                      "details": "Promotion Tier with id: promo_DE1N30D731Tg2F6NoMwNas2W is disabled.",
                      "request_id": "v-0c64b722160294496b",
                      "resource_id": "rf_0c64b7223cce60eec6",
                      "resource_type": "redemption",
                      "error": {
                        "message": "The promotion is inactive."
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/redemptions/{parentRedemptionId}/rollbacks": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterRedemptionId"
          },
          "name": "parentRedemptionId",
          "in": "path",
          "required": true,
          "description": "Unique identifier of a parent redemption, e.g. `r_JQfm73zWSJFQxs3bGxweYjgm`."
        }
      ],
      "post": {
        "operationId": "rollback-stacked-redemptions",
        "tags": [
          "Redemptions"
        ],
        "summary": "Rollback Stackable Redemptions",
        "description": "Rollback a stackable redemption. When you roll back a stacked redemption, all child redemptions will be rolled back. Provide the parent redemption ID as the path parameter. However, you can use this endpoint to roll back a single redemption that does not have a parent, similarly to [POST Rollback redemption](/api-reference/redemptions/rollback-redemption).\n<Warning>\n\nYou can roll back a redemption up to 3 months back.\n\n</Warning>",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "reason",
            "description": "Reason for the rollback."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "tracking_id",
            "description": "Customer's `source_id`."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "redemptions"
            ]
          }
        ],
        "requestBody": {
          "description": "Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RedemptionsRollbacksCreateRequestBody"
              },
              "examples": {
                "Promotion": {
                  "value": {
                    "customer": {
                      "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                      "name": "Annie Lemons",
                      "email": "annie@lemon.com",
                      "phone": "+1 933 222 3334",
                      "birthday": "1900-12-02",
                      "birthdate": "1900-12-01",
                      "address": {
                        "city": "New York",
                        "state": "NY",
                        "line_1": "123 Main St.",
                        "line_2": "APT 3 BLG 5",
                        "country": "United States",
                        "postal_code": "100012"
                      },
                      "metadata": {
                        "age": 23
                      }
                    },
                    "order": {
                      "source_id": "test_rollback_8"
                    },
                    "metadata": {
                      "location_id": [
                        "L2"
                      ]
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns an array with the individual redemption rollback results along with the parent rollback result and related order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RedemptionsRollbacksCreateResponseBody"
                }
              }
            }
          },
          "400": {
            "description": "Returns an error indicating that the parent redemption ID is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Invalid Redemption Parent": {
                    "value": {
                      "code": 400,
                      "key": "invalid_redemption_parent",
                      "message": "Invalid redemption parent",
                      "details": "You can rollback only a redemption that does not have parent redemption.",
                      "request_id": "v-0b56a1cf1e4d69b375"
                    }
                  },
                  "Already rolled back": {
                    "value": {
                      "code": 400,
                      "key": "already_rolled_back",
                      "message": "Already rolled back",
                      "details": "Redemption has been already rolled back.",
                      "request_id": "v-0c67af9544c4e3388f",
                      "resource_id": "rrf_0c67af954e039be56b",
                      "resource_type": "redemption_rollback"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "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."
      },
      "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
      },
      "code": {
        "name": "code",
        "in": "path",
        "schema": {
          "$ref": "#/components/schemas/ParameterCode"
        },
        "description": "A **code** that identifies the voucher.",
        "required": true
      }
    },
    "schemas": {
      "ParameterPage99": {
        "type": "integer",
        "minimum": 1,
        "maximum": 99
      },
      "ParameterString": {
        "type": "string"
      },
      "ParameterCustomerId": {
        "type": "string",
        "example": "cust_nk0N1uNQ1YnupAoJGOgvsODC"
      },
      "ParameterOrderListRedemptions": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "id",
          "-id",
          "voucher_code",
          "-voucher_code",
          "tracking_id",
          "-tracking_id",
          "customer_id",
          "-customer_id"
        ]
      },
      "ParameterFiltersListRedemptions": {
        "type": "object",
        "properties": {
          "voucher_code": {
            "type": "object",
            "description": "Unique voucher code.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "related_object_id": {
            "type": "object",
            "description": "Unique related object ID, i.e. v_hS8JFl8S6lNcd1L69wLIoXgTio7eWEgk.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "related_object_parent_id": {
            "type": "object",
            "description": "Unique related object parent ID, i.e. camp_22noMlhTADb7Fq2UL3vWu3d1.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "parent_redemption_id": {
            "type": "object",
            "description": "Unique parent redemption ID, i.e. r_0c5952900bcbfd54b6.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "failure_code": {
            "type": "object",
            "description": "Failure code, i.e. quantity_exceeded.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "result": {
            "type": "object",
            "description": "Result, i.e. `SUCCESS` or `FAILURE`.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "object": {
            "type": "object",
            "description": "Specify which type of object to return, i.e. `redemption` or `redemption_rollback`.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "customer_id": {
            "type": "object",
            "description": "Unique customer ID, i.e. cust_sehkNIi8Uq2qQuRqSr7xn4Zi.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "campaign_name": {
            "type": "object",
            "description": "Campaign name.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "user_login": {
            "type": "object",
            "description": "User login used to login to Voucherify, i.e. name.lastname@email.com",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "RedemptionsListResponseBody": {
        "title": "Redemptions List Response Body",
        "type": "object",
        "description": "Response body schema for **GET** `v1/redemptions`.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about redemptions in a dictionary."
          },
          "data_ref": {
            "type": "string",
            "default": "redemptions",
            "description": "Identifies the name of the attribute that contains the array of redemption objects."
          },
          "redemptions": {
            "type": "array",
            "items": {
              "title": "Redemptions List Response Body Redemptions Item",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/RedemptionWithVoucherWithoutStackingRulesTypeCategories"
                },
                {
                  "$ref": "#/components/schemas/RedemptionRollback"
                }
              ]
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of redemptions."
          }
        },
        "required": [
          "object",
          "data_ref",
          "redemptions",
          "total"
        ]
      },
      "RedemptionsRedeemRequestBody": {
        "type": "object",
        "title": "Redemptions Redeem Request Body",
        "description": "Response body schema for **POST** `v1/redemptions`.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "options": {
                "type": "object",
                "description": "Configure parameters returned in the response.",
                "properties": {
                  "expand": {
                    "type": "array",
                    "description": "Expand array lets you configure params included in the response. Depending on the strings included in the array, the response will contain different details. \n\n| **Expand Option** | **Response Body** |\n|:---|:---|\n| [\"order\"] | - Same response as fallback response (without an options object).<br />- Order data with calculated discounts are listed in each child redeemable object.<br />- Metadata not included for each discount type. |\n| [\"redeemable\"] | Expands redeemable objects by including `metadata` for each discount type. |\n| [\"order\", \"redeemable\"] | - Order data with calculated discounts are listed in each child redeemable object.<br />- Includes `metadata` for each discount type. |\n| [\"redeemable\", \"redemption\", \"category\"] | - Returns each discount type's `metadata` in each child redemption object.<br />- Returns redemption object `metadata`.<br />- Returns an expanded `categories` object, showing details about the category. |",
                    "items": {
                      "type": "string",
                      "enum": [
                        "order",
                        "redemption",
                        "redeemable",
                        "category"
                      ]
                    }
                  }
                }
              }
            }
          },
          {
            "$ref": "#/components/schemas/StackableValidateRedeemBase"
          }
        ]
      },
      "RedemptionsRedeemResponseBody": {
        "type": "object",
        "title": "Redemptions Redeem Response Body",
        "description": "Response body schema for **POST** `v1/redemptions`.",
        "properties": {
          "redemptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Redemption"
            }
          },
          "parent_redemption": {
            "$ref": "#/components/schemas/Redemption"
          },
          "order": {
            "description": "Contains the order details associated with the redemption.",
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderCalculated"
              },
              {
                "type": "object",
                "properties": {
                  "items": {
                    "type": "array",
                    "description": "Array of items applied to the order. It can include up to 500 items.",
                    "items": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/OrderCalculatedItem"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "application_details": {
                              "$ref": "#/components/schemas/ApplicationDetails"
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            ]
          },
          "inapplicable_redeemables": {
            "type": "array",
            "description": "Lists validation results of each inapplicable redeemable.",
            "items": {
              "$ref": "#/components/schemas/ValidationsRedeemableInapplicable"
            }
          },
          "skipped_redeemables": {
            "type": "array",
            "description": "Lists validation results of each redeemable. If a redeemable can be applied, the API returns `\"status\": \"APPLICABLE\"`.",
            "items": {
              "$ref": "#/components/schemas/ValidationsRedeemableSkipped"
            }
          }
        }
      },
      "RedemptionsGetResponseBody": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/RedemptionWithVoucherWithoutStackingRulesTypeCategories"
          },
          {
            "$ref": "#/components/schemas/RedemptionRollback"
          }
        ],
        "title": "Get Redemption Response Body",
        "description": "Response body schema for **GET** `v1/redemptions/{redemptionId}"
      },
      "VouchersRedemptionGetResponseBody": {
        "type": "object",
        "title": "Vouchers Redemption Get Response Body",
        "description": "Response body schema for **GET** `v1/vouchers/{code}/redemption`.",
        "properties": {
          "quantity": {
            "type": "integer",
            "nullable": true,
            "description": "The maximum number of times a voucher can be redeemed."
          },
          "redeemed_quantity": {
            "type": "integer",
            "description": "The number of times the voucher was redeemed successfully."
          },
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about redemptions in a dictionary."
          },
          "url": {
            "type": "string",
            "example": "/v1/vouchers/PROMO-CODE2/redemptions?page=1&limit=10",
            "description": "URL"
          },
          "data_ref": {
            "type": "string",
            "default": "redemption_entries",
            "description": "Identifies the name of the attribute that contains the array of `redemption_entries`."
          },
          "total": {
            "type": "integer",
            "description": "Total number of redemption objects."
          },
          "redemption_entries": {
            "description": "Contains the array of successful and failed redemption objects.",
            "items": {
              "title": "Vouchers Redemption Get Response Body Redemption Entries Item",
              "allOf": [
                {
                  "$ref": "#/components/schemas/RedemptionEntry"
                }
              ]
            }
          }
        },
        "required": [
          "quantity",
          "redeemed_quantity",
          "object",
          "url",
          "data_ref",
          "total",
          "redemption_entries"
        ]
      },
      "7_req_redeem_voucher": {
        "title": "Redeem Voucher Request Body",
        "description": "Request body schema for redeeming a voucher using **POST** `v1/vouchers/{code}/redemption`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/7_req_redeem_voucher_discount_code"
          },
          {
            "$ref": "#/components/schemas/7_req_redeem_voucher_gift_card"
          },
          {
            "$ref": "#/components/schemas/7_req_redeem_voucher_loyalty_card"
          }
        ]
      },
      "7_res_redeem_voucher": {
        "title": "Redeem Voucher Response Body",
        "description": "Response body schema for **POST** `v1/vouchers/{code}/redemption`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/7_obj_redemption_object_voucher_extended"
          }
        ]
      },
      "e_error_expanded": {
        "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": "redemption"
          },
          "error": {
            "type": "object",
            "description": "Contains custom user-defined error message translation.",
            "properties": {
              "message": {
                "type": "string",
                "description": "Error message translation defined in Dashboard &rarr; Project Settings &rarr; Error Messages"
              }
            }
          }
        }
      },
      "RedemptionsRollbackCreateRequestBody": {
        "title": "Redemptions Rollback Create Request Body",
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "description": "Reason for the rollback."
          },
          "tracking_id": {
            "type": "string",
            "description": "Customer's `source_id`."
          },
          "customer": {
            "$ref": "#/components/schemas/Customer"
          },
          "order": {
            "$ref": "#/components/schemas/Order"
          },
          "metadata": {
            "type": "object",
            "description": "A set of key/value pairs that you can send in the request body to update **redemption** metadata."
          }
        },
        "description": "Request body schema for **POST** `v1/redemptions/{redemptionId}/rollback`."
      },
      "RedemptionsRollbackCreateResponseBody": {
        "title": "Redemptions Rollback Create Response Body",
        "description": "Response body schema for **POST** `v1/redemptions/{redemptionId}/rollback`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/RedemptionRollback"
          }
        ]
      },
      "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"
        ]
      },
      "ParameterRedemptionId": {
        "type": "string",
        "example": "r_0ba186c4824e4881e1"
      },
      "7_req_redeem_promotion_tier": {
        "title": "Redeem Promotion Tier",
        "type": "object",
        "description": "Redeem a promotion tier.",
        "properties": {
          "customer": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_customer_id"
              },
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_customer_source_id"
              },
              {
                "$ref": "#/components/schemas/9_req_create_customer"
              }
            ],
            "description": "Customer's information."
          },
          "order": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_order_id"
              },
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_order_source_id"
              },
              {
                "$ref": "#/components/schemas/OrdersCreateRequestBody"
              }
            ],
            "description": "Order information."
          },
          "metadata": {
            "type": "object",
            "description": "A set of key/value pairs that you can send in the request body to check against promotion tiers requiring **redemption** metadata validation rules to be satisfied. The validation 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)."
          }
        }
      },
      "7_obj_redemption_object_promotion_tier_extended": {
        "type": "object",
        "title": "Promotion Tier",
        "description": "This is an object representing a promotion tier redemption.",
        "properties": {
          "id": {
            "type": "string",
            "example": "r_0bc92f81a6801f9bca",
            "description": "Unique redemption ID."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON. This object stores information about the `redemption`.",
            "default": "redemption"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption occured."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "order": {
            "description": "Defines the details of the order that is related to the redemption.",
            "allOf": [
              {
                "$ref": "#/components/schemas/7_obj_order_object"
              }
            ]
          },
          "channel": {
            "type": "object",
            "description": "Defines the details of the channel through which the redemption was issued.",
            "properties": {
              "channel_id": {
                "type": "string",
                "example": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                "description": "Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API."
              },
              "channel_type": {
                "type": "string",
                "description": "The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.",
                "enum": [
                  "USER",
                  "API"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer that is related to the redemption.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "source_id": {
                "type": "string",
                "description": "The merchant's customer ID if it is different from the Voucherify customer ID. It is really useful in case of an integration between multiple systems. It can be a customer ID from a CRM system, database or 3rd-party service."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.",
            "default": "promotion_tier",
            "enum": [
              "promotion_tier"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, i.e. promo_NzjTc3ZXTe7md5SziK3uYtei for a promotion tier."
          },
          "voucher": {
            "type": "object",
            "nullable": true
          },
          "promotion_tier": {
            "description": "Contains details of the promotion tier and the parent campaign.",
            "allOf": [
              {
                "$ref": "#/components/schemas/PromotionTier"
              }
            ]
          }
        }
      },
      "ParameterPromotionTierId": {
        "type": "string",
        "example": "promo_2EnAik6Jt7dKTOMkRTIgEjZH"
      },
      "RedemptionsRollbacksCreateRequestBody": {
        "title": "Redemptions Rollbacks Create Request Body",
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "description": "Reason for the rollback."
          },
          "tracking_id": {
            "type": "string",
            "description": "Customer's `source_id`."
          },
          "customer": {
            "$ref": "#/components/schemas/Customer"
          },
          "order": {
            "$ref": "#/components/schemas/Order"
          },
          "metadata": {
            "type": "object",
            "description": "A set of key/value pairs that you can send in the request body to update **redemption** metadata."
          }
        },
        "description": "Request body schema for **POST** `v1/redemptions/{parentRedemptionId}/rollbacks`."
      },
      "RedemptionsRollbacksCreateResponseBody": {
        "title": "Redemptions Rollbacks Create Response Body",
        "description": "Response body schema for **POST** `/redemptions/{parentRedemptionID}/rollbacks`.",
        "type": "object",
        "properties": {
          "rollbacks": {
            "type": "array",
            "description": "Contains the rollback redemption objects of the particular incentives.",
            "items": {
              "$ref": "#/components/schemas/RedemptionRollback"
            }
          },
          "parent_rollback": {
            "$ref": "#/components/schemas/RedemptionRollback"
          },
          "order": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderCalculated"
              },
              {
                "type": "object",
                "properties": {
                  "items": {
                    "type": "array",
                    "description": "Array of items applied to the order. It can include up to 500 items.",
                    "items": {
                      "$ref": "#/components/schemas/OrderCalculatedItem"
                    }
                  }
                }
              }
            ]
          }
        }
      },
      "ParameterLimit": {
        "type": "integer",
        "maximum": 100,
        "minimum": 1
      },
      "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"
          }
        }
      },
      "FilterConditionsString": {
        "title": "Filter by conditions",
        "type": "object",
        "description": "Data filters used to narrow down the data records to be returned in the result.",
        "properties": {
          "$in": {
            "type": "array",
            "description": "Array of resource values that should be included in the results (multiple values).",
            "items": {
              "type": "string"
            }
          },
          "$not_in": {
            "type": "array",
            "description": "Array of resource values that should be included in the results (multiple values).",
            "items": {
              "type": "string"
            }
          },
          "$is": {
            "type": "string",
            "description": "Value is exactly this value (single value)."
          },
          "$is_not": {
            "type": "string",
            "description": "Results omit this value (single value)."
          },
          "$has_value": {
            "type": "string",
            "description": "Value is NOT null. The value for this parameter is an empty string."
          },
          "$is_unknown": {
            "type": "string",
            "description": "Value is null. The value for this parameter is an empty string."
          },
          "$starts_with": {
            "type": "string",
            "description": "Value starts with the specified string."
          },
          "$ends_with": {
            "type": "string",
            "description": "Value ends with the specified string."
          },
          "$contains": {
            "type": "string",
            "description": "Value includes the specified string."
          },
          "$not_contain": {
            "type": "string",
            "description": "Value does NOT include the specified string."
          }
        }
      },
      "Junction": {
        "title": "Junction",
        "description": "Logical Operator Between Filters. Filter by conditions set on the `junction` parameter indicating how the `conditions` should be accounted for in the query. An `AND` is an all-inclusive logical operator, meaning the `AND` operator displays a record if **ALL** the conditions separated by AND are TRUE, while  an `OR` operator displays a record if **ANY** of the conditions separated by OR is TRUE.",
        "enum": [
          "and",
          "or"
        ],
        "type": "string"
      },
      "RedemptionWithVoucherWithoutStackingRulesTypeCategories": {
        "title": "Redemption",
        "type": "object",
        "description": "This is an object representing a redemption.",
        "allOf": [
          {
            "$ref": "#/components/schemas/RedemptionBase"
          },
          {
            "type": "object",
            "properties": {
              "voucher": {
                "description": "Defines the details of the voucher being redeemed.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Voucher"
                  },
                  {
                    "$ref": "#/components/schemas/VoucherHolder"
                  }
                ]
              }
            }
          }
        ]
      },
      "RedemptionRollback": {
        "title": "Redemption Rollback",
        "type": "object",
        "description": "This is an object representing a redemption rollback.",
        "properties": {
          "id": {
            "type": "string",
            "example": "rr_0efeb3dab05e62e599",
            "description": "Unique identifier of the redemption rollback."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON",
            "default": "redemption_rollback",
            "enum": [
              "redemption_rollback"
            ]
          },
          "date": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "customer_id": {
            "type": "string",
            "nullable": true,
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "nullable": true,
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "description": "The metadata object stores all custom attributes assigned to the redemption."
          },
          "amount": {
            "type": "integer",
            "description": "For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card.\nFor loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer.",
            "example": -10000
          },
          "redemption": {
            "nullable": true,
            "type": "string",
            "description": "Unique redemption ID of the parent redemption.",
            "example": "r_0c656311b5878a2031"
          },
          "reason": {
            "type": "string",
            "description": "System generated cause for the redemption being invalid in the context of the provided parameters."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "status": {
            "type": "string",
            "enum": [
              "SUCCEEDED",
              "FAILED"
            ],
            "description": "Redemption status."
          },
          "failure_code": {
            "type": "string",
            "example": "customer_rules_violated",
            "description": "If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed."
          },
          "failure_message": {
            "type": "string",
            "description": "If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed."
          },
          "order": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderCalculated"
              },
              {
                "type": "object",
                "properties": {
                  "items": {
                    "type": "array",
                    "description": "Array of items applied to the order. It can include up to 500 items.",
                    "items": {
                      "$ref": "#/components/schemas/OrderCalculatedItem"
                    }
                  }
                }
              }
            ]
          },
          "channel": {
            "type": "object",
            "description": "Defines the details of the channel through which the redemption was issued.",
            "properties": {
              "channel_id": {
                "type": "string",
                "example": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                "description": "Unique identifier of the channel which was used by the user performing the redemption rollback. This is either a user ID from the user using the Voucherify Dashboard or an X-APP-Id of a user using the API."
              },
              "channel_type": {
                "type": "string",
                "description": "The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.",
                "enum": [
                  "USER",
                  "API"
                ]
              }
            }
          },
          "customer": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleCustomer"
              }
            ]
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.",
            "enum": [
              "voucher",
              "promotion_tier",
              "redemption"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique identifier of the related object. It is assigned by Voucherify, i.e. `v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno` for a voucher."
          },
          "voucher": {
            "description": "Defines the details of the voucher being originally redeemed.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Voucher"
              }
            ]
          },
          "promotion_tier": {
            "description": "Contains details of the promotion tier and the parent campaign.",
            "allOf": [
              {
                "$ref": "#/components/schemas/PromotionTier"
              }
            ]
          },
          "reward": {
            "$ref": "#/components/schemas/RedemptionRewardResult"
          },
          "gift": {
            "type": "object",
            "description": "Contains the amount returned to the gift card in the redemption rollback. It is expressed as a negative integer.",
            "properties": {
              "amount": {
                "type": "integer",
                "description": "Amount returned to the gift card as a result of the redemption rollback and expressed as a negative integer. The amount is expressed as the smallest currency unit (e.g. -100 cents for $1.00 returned)."
              }
            }
          },
          "loyalty_card": {
            "type": "object",
            "description": "Contains the number of points returned to the loyalty card in the reward redemption rollback. It is expressed as a negative integer.",
            "properties": {
              "points": {
                "type": "integer",
                "description": "Number of points being returned to the loyalty card for the reward redemption rollback. It is expressed as a negative integer."
              }
            }
          }
        },
        "required": [
          "id",
          "object",
          "date",
          "customer_id",
          "tracking_id",
          "metadata",
          "redemption",
          "result",
          "status",
          "order",
          "channel",
          "customer",
          "related_object_type",
          "related_object_id"
        ]
      },
      "StackableValidateRedeemBase": {
        "title": "Stackable Validate Redeem Base",
        "type": "object",
        "properties": {
          "redeemables": {
            "type": "array",
            "minItems": 1,
            "maxItems": 30,
            "description": "An array of redeemables. You can combine `voucher`(s) and `promotion_tier`(s). Alternatively, send one unique`promotion_stack` in the array. Each unique redeemable can be sent in one request only once.",
            "items": {
              "title": "Stackable Validate Redeem Base Redeemables Item",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/RedeemVoucher"
                },
                {
                  "$ref": "#/components/schemas/RedeemPromotionTier"
                },
                {
                  "$ref": "#/components/schemas/RedeemPromotionStack"
                },
                {
                  "$ref": "#/components/schemas/RedeemGiftCard"
                },
                {
                  "$ref": "#/components/schemas/RedeemLoyaltyCard"
                }
              ]
            }
          },
          "order": {
            "description": "Order information.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Order"
              }
            ]
          },
          "customer": {
            "description": "Customer's information.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Customer"
              }
            ]
          },
          "session": {
            "description": "Schema model for session lock object. The session object is required to establish a session between multiple parallel validation and redemption requests. If you only send the type parameter in the request, then by default the session lock will be established for 7 days. Read more on establishing a validation session.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Session"
              }
            ]
          },
          "tracking_id": {
            "description": "Is correspondent to Customer's source_id",
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "description": "A set of key/value pairs that you can attach to a redemption object. It can be useful for storing additional information about the redemption in a structured format."
          }
        },
        "required": [
          "redeemables"
        ]
      },
      "Redemption": {
        "title": "Redemption",
        "type": "object",
        "description": "This is an object representing a redemption for **POST** `v1/redemptions` and **POST** `/client/v1/redemptions`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/RedemptionBase"
          },
          {
            "type": "object",
            "properties": {
              "voucher": {
                "description": "Defines the details of the voucher being redeemed.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/VoucherWithStackingRulesTypeCategories"
                  },
                  {
                    "$ref": "#/components/schemas/VoucherHolder"
                  }
                ]
              }
            }
          }
        ]
      },
      "OrderCalculated": {
        "title": "Order Calculated No Customer Data",
        "type": "object",
        "description": "Order information.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request."
          },
          "source_id": {
            "type": "string",
            "nullable": true,
            "description": "Unique source ID of an existing order that will be linked to the redemption of this request."
          },
          "status": {
            "type": "string",
            "description": "The order status.",
            "enum": [
              "CREATED",
              "PAID",
              "CANCELED",
              "FULFILLED"
            ]
          },
          "amount": {
            "type": "integer",
            "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "initial_amount": {
            "type": "integer",
            "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "items_discount_amount": {
            "type": "integer",
            "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "total_discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "total_amount": {
            "type": "integer",
            "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "applied_discount_amount": {
            "type": "integer",
            "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "items_applied_discount_amount": {
            "type": "integer",
            "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).  \n`sum(items, i => i.applied_discount_amount)`"
          },
          "total_applied_discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).  \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`"
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "order",
            "enum": [
              "order"
            ]
          },
          "created_at": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "example": "2021-12-22T10:14:45.316Z",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format."
          },
          "customer_id": {
            "type": "string",
            "nullable": true,
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.",
            "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
          },
          "referrer_id": {
            "type": "string",
            "nullable": true,
            "description": "Unique referrer ID.",
            "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
          },
          "customer": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomerId"
              }
            ]
          },
          "referrer": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ReferrerId"
              }
            ]
          },
          "redemptions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/OrderRedemptionsEntry"
            }
          }
        }
      },
      "OrderCalculatedItem": {
        "type": "object",
        "title": "Order Item Calculated",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the order line item."
          },
          "sku_id": {
            "type": "string",
            "description": "Unique identifier of the SKU. It is assigned by Voucherify."
          },
          "product_id": {
            "type": "string",
            "description": "Unique identifier of the product. It is assigned by Voucherify."
          },
          "related_object": {
            "type": "string",
            "enum": [
              "product",
              "sku"
            ],
            "description": "Used along with the source_id property, can be set to either sku or product."
          },
          "source_id": {
            "type": "string",
            "description": "The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service."
          },
          "quantity": {
            "type": "integer",
            "description": "The quantity of the particular item in the cart."
          },
          "discount_quantity": {
            "type": "integer",
            "description": "Number of dicounted items."
          },
          "initial_quantity": {
            "type": "integer",
            "description": "A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity."
          },
          "amount": {
            "type": "integer",
            "description": "The total amount of the order item (price * quantity)."
          },
          "discount_amount": {
            "type": "integer",
            "description": "Sum of all order-item-level discounts applied to the order."
          },
          "applied_discount_amount": {
            "type": "integer",
            "description": "This field shows the order-level discount applied."
          },
          "applied_discount_quantity": {
            "type": "integer",
            "description": "Number of the discounted items applied in the transaction."
          },
          "applied_quantity": {
            "type": "integer",
            "description": "Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced."
          },
          "applied_quantity_amount": {
            "type": "integer",
            "description": "Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced."
          },
          "initial_amount": {
            "type": "integer",
            "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts."
          },
          "price": {
            "type": "integer",
            "description": "Unit price of an item. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "subtotal_amount": {
            "type": "integer",
            "description": "Final order item amount after the applied item-level discount.  If there are no item-level discounts applied, this item is equal to the `amount`.   \n`subtotal_amount`=`amount`-`applied_discount_amount`"
          },
          "product": {
            "type": "object",
            "description": "An object containing details of the related product.",
            "properties": {
              "id": {
                "type": "string",
                "description": "A unique identifier that represents the product and is assigned by Voucherify."
              },
              "source_id": {
                "type": "string",
                "description": "The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service."
              },
              "override": {
                "type": "boolean",
                "description": "The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system."
              },
              "name": {
                "type": "string",
                "description": "Product name."
              },
              "metadata": {
                "type": "object",
                "description": "A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections."
              },
              "price": {
                "type": "number",
                "description": "Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00)."
              }
            }
          },
          "sku": {
            "type": "object",
            "description": "An object containing details of the related SKU.",
            "properties": {
              "id": {
                "type": "string",
                "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
              },
              "source_id": {
                "type": "string",
                "description": "The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service."
              },
              "override": {
                "type": "boolean",
                "description": "The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system."
              },
              "sku": {
                "type": "string",
                "description": "The SKU name."
              },
              "price": {
                "type": "number",
                "description": "SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00)."
              },
              "metadata": {
                "type": "object",
                "description": "A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections."
              }
            }
          },
          "object": {
            "type": "string",
            "default": "order_item",
            "enum": [
              "order_item"
            ],
            "description": "The type of the object represented by JSON."
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas."
          }
        },
        "required": [
          "object"
        ]
      },
      "ApplicationDetails": {
        "type": "array",
        "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.",
        "items": {
          "type": "object",
          "description": "Object representing item replacement.",
          "properties": {
            "source_index": {
              "type": "integer",
              "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.",
              "minimum": 0
            },
            "source_applied_quantity": {
              "type": "integer",
              "description": "Number of source units that are replaced.",
              "maximum": -1
            },
            "source_applied_quantity_amount": {
              "type": "integer",
              "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.",
              "maximum": 0
            },
            "target_index": {
              "type": "integer",
              "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`."
            },
            "target_applied_quantity": {
              "type": "integer",
              "description": "Number of added target units that are replacements."
            },
            "target_applied_quantity_amount": {
              "type": "integer",
              "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity."
            },
            "target_applied_discount_amount": {
              "type": "integer",
              "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`."
            }
          }
        }
      },
      "ValidationsRedeemableInapplicable": {
        "type": "object",
        "title": "Inapplicable Redeemable",
        "properties": {
          "status": {
            "type": "string",
            "default": "INAPPLICABLE",
            "enum": [
              "INAPPLICABLE"
            ],
            "description": "Indicates whether the redeemable can be applied or not applied based on the validation rules."
          },
          "id": {
            "type": "string",
            "description": "Redeemable ID, i.e. the voucher code."
          },
          "object": {
            "type": "string",
            "description": "Redeemable's object type.",
            "enum": [
              "voucher",
              "promotion_tier"
            ]
          },
          "result": {
            "type": "object",
            "description": "Includes the error object with details about the reason why the redeemable is inapplicable",
            "properties": {
              "error": {
                "$ref": "#/components/schemas/Error"
              },
              "details": {
                "type": "object",
                "description": "Provides details about the reason why the redeemable is inapplicable.",
                "properties": {
                  "message": {
                    "type": "string",
                    "description": "Generic message from the `message` string shown in the `error` object or the message configured in a validation rule."
                  },
                  "key": {
                    "type": "string",
                    "description": "Generic message from the `key` string shown in the `error` object."
                  }
                }
              },
              "bundle": {
                "$ref": "#/components/schemas/Bundle"
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable."
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CategoryWithStackingRulesType"
            }
          },
          "campaign_name": {
            "type": "string",
            "description": "Campaign name. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body."
          },
          "campaign_id": {
            "type": "string",
            "description": "Unique campaign ID assigned by Voucherify. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.",
            "example": "camp_pqZjuhG6Mgtp4GD0zD7b8hA3"
          },
          "name": {
            "type": "string",
            "description": "Name of the promotion tier. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body."
          }
        },
        "required": [
          "status",
          "id",
          "object",
          "result"
        ]
      },
      "ValidationsRedeemableSkipped": {
        "type": "object",
        "title": "Skipped Redeemable",
        "properties": {
          "status": {
            "type": "string",
            "default": "SKIPPED",
            "enum": [
              "SKIPPED"
            ],
            "description": "Indicates whether the redeemable can be applied or not applied based on the validation rules."
          },
          "id": {
            "type": "string",
            "description": "Redeemable ID, i.e. the voucher code."
          },
          "object": {
            "type": "string",
            "description": "Redeemable's object type.",
            "enum": [
              "voucher",
              "promotion_tier"
            ]
          },
          "result": {
            "type": "object",
            "description": "Provides details about the reason why the redeemable is skipped.",
            "properties": {
              "details": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ValidationsRedeemableSkippedResultLimitExceeded"
                  },
                  {
                    "$ref": "#/components/schemas/ValidationsRedeemableSkippedResultCategoryLimitExceeded"
                  },
                  {
                    "$ref": "#/components/schemas/ValidationsRedeemableSkippedResultRedeemablesLimitExceeded"
                  },
                  {
                    "$ref": "#/components/schemas/ValidationsRedeemableSkippedResultRedeemablesCategoryLimitExceeded"
                  },
                  {
                    "$ref": "#/components/schemas/ValidationsRedeemableSkippedResultExclusionRulesNotMet"
                  },
                  {
                    "$ref": "#/components/schemas/ValidationsRedeemableSkippedResultPrecedingValidationFailed"
                  },
                  {
                    "$ref": "#/components/schemas/ValidationsRedeemableSkippedResultNoEffect"
                  }
                ]
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable."
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CategoryWithStackingRulesType"
            }
          },
          "campaign_name": {
            "type": "string",
            "description": "Campaign name. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body."
          },
          "campaign_id": {
            "type": "string",
            "description": "Unique campaign ID assigned by Voucherify. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.",
            "example": "camp_pqZjuhG6Mgtp4GD0zD7b8hA3"
          },
          "name": {
            "type": "string",
            "description": "Name of the promotion tier. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body."
          }
        },
        "required": [
          "status",
          "id",
          "object",
          "result"
        ]
      },
      "RedemptionEntry": {
        "title": "Redemption Entry",
        "oneOf": [
          {
            "$ref": "#/components/schemas/RedemptionWithVoucherWithoutStackingRulesTypeCategories"
          },
          {
            "$ref": "#/components/schemas/RedemptionRollback"
          }
        ]
      },
      "ParameterCode": {
        "type": "string",
        "example": "2CpRCE2c"
      },
      "7_req_redeem_voucher_discount_code": {
        "title": "Discount Code",
        "type": "object",
        "description": "Redeem a discount code.",
        "properties": {
          "session": {
            "$ref": "#/components/schemas/6_req_session_lock_discount_code"
          },
          "customer": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_customer_id"
              },
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_customer_source_id"
              },
              {
                "$ref": "#/components/schemas/9_req_create_customer"
              }
            ],
            "description": "Customer's information."
          },
          "order": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_order_id"
              },
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_order_source_id"
              },
              {
                "$ref": "#/components/schemas/OrdersCreateRequestBody"
              }
            ],
            "description": "Order information."
          },
          "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 validation 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)."
          },
          "options": {
            "type": "object",
            "description": "Configure parameters returned in the response.",
            "properties": {
              "expand": {
                "type": "array",
                "description": "The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. Add `category` as a string in the array to include a `categories` object in the response.",
                "items": {
                  "type": "string",
                  "default": "category",
                  "enum": [
                    "category"
                  ],
                  "example": "category"
                }
              }
            }
          }
        }
      },
      "7_req_redeem_voucher_gift_card": {
        "title": "Gift Card",
        "type": "object",
        "description": "Redeem a gift card.",
        "properties": {
          "session": {
            "$ref": "#/components/schemas/6_req_session_lock_gift_card"
          },
          "gift": {
            "type": "object",
            "description": "Contains information on the number of gift card credits that the customer wants to apply to the order.",
            "properties": {
              "credits": {
                "type": "integer",
                "description": "The number of credits that the user wants to use from the gift card to fulfil the order. The value of credits cannot be higher than the current balance on the gift card. If the user gives more points than he has on the gift card, the application will return an error code in response. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
              }
            }
          },
          "customer": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_customer_id"
              },
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_customer_source_id"
              },
              {
                "$ref": "#/components/schemas/9_req_create_customer"
              }
            ],
            "description": "Customer's information."
          },
          "order": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_order_id"
              },
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_order_source_id"
              },
              {
                "$ref": "#/components/schemas/OrdersCreateRequestBody"
              }
            ],
            "description": "Order information."
          },
          "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 validation 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)."
          },
          "options": {
            "type": "object",
            "description": "Configure parameters returned in the response.",
            "properties": {
              "expand": {
                "type": "array",
                "description": "The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. Add `category` as a string in the array to include a `categories` object in the response.",
                "items": {
                  "type": "string",
                  "default": "category",
                  "enum": [
                    "category"
                  ],
                  "example": "category"
                }
              }
            }
          }
        }
      },
      "7_req_redeem_voucher_loyalty_card": {
        "title": "Loyalty Card",
        "type": "object",
        "description": "Redeem a loyalty card.",
        "properties": {
          "session": {
            "$ref": "#/components/schemas/6_req_session_lock_loyalty_card"
          },
          "reward": {
            "type": "object",
            "description": "Contains information about the reward that the customer wants to redeem and the number of points the customer is choosing to use for the reward.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique reward ID assigned by Voucherify. The reward must be assigned to the campaign in order for the user to be able to use the reward."
              },
              "points": {
                "type": "integer",
                "description": "The number of loyalty points that the user wants to spend in order to fulfill the order. The number of points cannot be higher than the current balance on the loyalty card. If the user gives more points than he/she has on the loyalty card, the application will return an error code in response."
              }
            }
          },
          "customer": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_customer_id"
              },
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_customer_source_id"
              },
              {
                "$ref": "#/components/schemas/9_req_create_customer"
              }
            ],
            "description": "Customer's information."
          },
          "order": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_order_id"
              },
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_order_source_id"
              },
              {
                "$ref": "#/components/schemas/OrdersCreateRequestBody"
              }
            ],
            "description": "Order information."
          },
          "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 validation 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)."
          },
          "options": {
            "type": "object",
            "description": "Configure parameters returned in the response.",
            "properties": {
              "expand": {
                "type": "array",
                "description": "The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. Add `category` as a string in the array to include a `categories` object in the response.",
                "items": {
                  "type": "string",
                  "default": "category",
                  "enum": [
                    "category"
                  ],
                  "example": "category"
                }
              }
            }
          }
        }
      },
      "7_obj_redemption_object_voucher_extended": {
        "title": "Redemption Object",
        "description": "This is an object representing an attempted or successful voucher redemption.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/7_obj_redemption_object_discount_voucher_extended"
          },
          {
            "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_extended"
          },
          {
            "$ref": "#/components/schemas/7_obj_redemption_object_gift_card_extended"
          }
        ]
      },
      "Customer": {
        "title": "Customer",
        "allOf": [
          {
            "type": "object",
            "title": "Customer Id And Source Id",
            "properties": {
              "id": {
                "type": "string",
                "description": "The ID of an existing customer."
              },
              "source_id": {
                "type": "string",
                "description": "A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored."
              }
            }
          },
          {
            "$ref": "#/components/schemas/CustomerBase"
          }
        ]
      },
      "Order": {
        "title": "Order",
        "type": "object",
        "description": "Order information.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request."
              }
            }
          },
          {
            "$ref": "#/components/schemas/OrderBase"
          }
        ]
      },
      "6_req_validate_voucher_customer_id": {
        "title": "Customer ID",
        "description": "You can pass the unique customer ID that was assigned by Voucherify.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of an existing customer that will be linked to redemption in this request.",
            "example": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv"
          }
        }
      },
      "6_req_validate_voucher_customer_source_id": {
        "title": "Customer Source ID",
        "description": "You can send the source ID that you used to create the customer in Voucherify.",
        "type": "object",
        "properties": {
          "source_id": {
            "type": "string",
            "description": "A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored."
          }
        }
      },
      "9_req_create_customer": {
        "type": "object",
        "title": "Customer",
        "description": "This is an object containing information about the customer.",
        "properties": {
          "source_id": {
            "type": "string",
            "description": "The merchant's customer ID if it is different from the Voucherify customer ID. It is really useful in case of an integration between multiple systems. It can be a customer ID from a CRM system, database or 3rd-party service. \n\nPlease note that if you would like your data to sync based on the `source_id` of the customer, you need to define the `source_id` upfront. You will not be able to change or update the `source_id` later on."
          },
          "name": {
            "type": "string",
            "description": "Customer's first and last name."
          },
          "description": {
            "type": "string",
            "description": "An arbitrary string that you can attach to a customer object."
          },
          "email": {
            "type": "string",
            "description": "Customer's email address."
          },
          "phone": {
            "type": "string",
            "description": "Customer's phone number.  This parameter is mandatory when you try to send out codes to customers via an SMS channel."
          },
          "address": {
            "type": "object",
            "description": "Customer's address.",
            "properties": {
              "city": {
                "type": "string",
                "description": "City"
              },
              "state": {
                "type": "string",
                "description": "State"
              },
              "line_1": {
                "type": "string",
                "description": "First line of address."
              },
              "line_2": {
                "type": "string",
                "description": "Second line of address."
              },
              "country": {
                "type": "string",
                "description": "Country."
              },
              "postal_code": {
                "type": "string",
                "description": "Postal code."
              }
            }
          },
          "birthdate": {
            "type": "string",
            "description": "Customer's birthdate; format `YYYY-MM-DD`.",
            "format": "date"
          },
          "birthday": {
            "type": "string",
            "description": "`Deprecated`. ~~Customer's birthdate; format `YYYY-MM-DD`~~.",
            "format": "date"
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. "
          }
        }
      },
      "6_req_validate_voucher_order_id": {
        "title": "Order ID",
        "description": "You can pass the unique order ID that was assigned by Voucherify.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request."
          }
        }
      },
      "6_req_validate_voucher_order_source_id": {
        "title": "Order Source ID",
        "description": "You can send the source ID that you used to create the order in Voucherify.",
        "type": "object",
        "properties": {
          "source_id": {
            "type": "string",
            "description": "Unique source ID of an existing order that will be linked to the redemption of this request."
          }
        }
      },
      "OrdersCreateRequestBody": {
        "title": "Orders Create Request Body",
        "type": "object",
        "description": "Request body schema for **POST** `v1/orders`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Order"
          },
          {
            "title": "Order Customer And Referrer Ids Objects",
            "type": "object",
            "description": "Order information.",
            "properties": {
              "created_at": {
                "type": "string",
                "example": "2021-12-22T10:13:06.487Z",
                "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.",
                "format": "date-time"
              },
              "referrer_id": {
                "type": "string",
                "nullable": true,
                "description": "Unique referrer ID.",
                "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
              },
              "customer": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Customer"
                  }
                ]
              },
              "referrer": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Referrer"
                  }
                ]
              }
            }
          }
        ]
      },
      "7_obj_order_object": {
        "title": "Order object",
        "description": "This is an object representing an order with calculated discounts applied using the voucher code.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/7_obj_order_object_apply_to_order"
          },
          {
            "$ref": "#/components/schemas/7_obj_order_object_apply_to_items"
          }
        ]
      },
      "PromotionTier": {
        "type": "object",
        "description": "This is an object representing a promotion tier. Promotion tiers are always assigned to a campaign and cannot be used standalone.",
        "title": "Promotion Tier",
        "properties": {
          "id": {
            "type": "string",
            "example": "promo_63fYCt81Aw0h7lzyRkrGZh9p",
            "description": "Unique promotion tier ID."
          },
          "created_at": {
            "type": "string",
            "example": "2021-12-15T11:34:01.333Z",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format."
          },
          "updated_at": {
            "type": "string",
            "example": "2022-02-09T09:20:05.603Z",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format."
          },
          "name": {
            "type": "string",
            "description": "Name of the promotion tier."
          },
          "banner": {
            "type": "string",
            "description": "Text to be displayed to your customers on your website."
          },
          "action": {
            "type": "object",
            "description": "Contains details about the discount applied by the promotion tier.",
            "properties": {
              "discount": {
                "$ref": "#/components/schemas/Discount"
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format."
          },
          "hierarchy": {
            "type": "integer",
            "description": "The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy."
          },
          "promotion_id": {
            "type": "string",
            "description": "Promotion unique ID."
          },
          "campaign": {
            "type": "object",
            "description": "Contains details about promotion tier's parent campaign.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique campaign ID."
              },
              "start_date": {
                "type": "string",
                "description": "Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. ",
                "format": "date-time",
                "example": "2022-09-22T00:00:00.000Z"
              },
              "expiration_date": {
                "type": "string",
                "format": "date-time",
                "description": "Expiration timestamp defines when the campaign expires in ISO 8601 format.  Campaign is *inactive after* this date.",
                "example": "2022-09-30T00:00:00.000Z"
              },
              "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 indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the `start_date` and `expiration_date` using the [Disable Campaign](/api-reference/disable-campaign) endpoint.  \n\n- `true` indicates an *active* campaign\n- `false` indicates an *inactive* campaign"
              },
              "category_id": {
                "type": "string",
                "example": "cat_0b688929a2476386a6",
                "description": "Unique category ID that this campaign belongs to."
              },
              "object": {
                "type": "string",
                "description": "The type of the object represented by the campaign object. This object stores information about the campaign.",
                "default": "campaign"
              }
            }
          },
          "campaign_id": {
            "type": "string",
            "description": "Promotion tier's parent campaign's unique ID."
          },
          "active": {
            "type": "boolean",
            "description": "A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`.  \n\n- `true` indicates an *active* promotion tier\n- `false` indicates an *inactive* promotion tier"
          },
          "start_date": {
            "type": "string",
            "description": "Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. ",
            "format": "date-time",
            "example": "2022-09-23T00:00:00.000Z"
          },
          "expiration_date": {
            "type": "string",
            "description": "Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. ",
            "format": "date-time",
            "example": "2022-09-26T00:00:00.000Z"
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "summary": {
            "type": "object",
            "description": "Contains statistics about promotion tier redemptions and orders.",
            "properties": {
              "redemptions": {
                "type": "object",
                "description": "Contains statistics about promotion tier redemptions.",
                "properties": {
                  "total_redeemed": {
                    "type": "integer",
                    "description": "Number of times the promotion tier was redeemed."
                  }
                }
              },
              "orders": {
                "type": "object",
                "description": "Contains statistics about orders related to the promotion tier.",
                "properties": {
                  "total_amount": {
                    "type": "integer",
                    "description": "Sum of order totals."
                  },
                  "total_discount_amount": {
                    "type": "integer",
                    "description": "Sum of total discount applied using the promotion tier."
                  }
                }
              }
            }
          },
          "object": {
            "type": "string",
            "default": "promotion_tier",
            "description": "The type of the object represented by JSON. This object stores information about the promotion tier."
          },
          "validation_rule_assignments": {
            "$ref": "#/components/schemas/ValidationRuleAssignmentsList"
          },
          "category_id": {
            "type": "string",
            "description": "Promotion tier category ID.",
            "example": "cat_0c9da30e7116ba6bba"
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          }
        }
      },
      "RedemptionBase": {
        "title": "Redemption Base",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "r_0bc92f81a6801f9bca",
            "description": "Unique redemption ID."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON",
            "default": "redemption",
            "enum": [
              "redemption"
            ]
          },
          "date": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "customer_id": {
            "type": "string",
            "nullable": true,
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "nullable": true,
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "description": "The metadata object stores all custom attributes assigned to the redemption."
          },
          "amount": {
            "type": "integer",
            "description": "For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits.\nFor loyalty cards, this is the number of loyalty points used in the transaction.",
            "example": 10000
          },
          "redemption": {
            "nullable": true,
            "type": "string",
            "description": "Unique redemption ID of the parent redemption.",
            "example": "r_0c656311b5878a2031"
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "status": {
            "type": "string",
            "enum": [
              "SUCCEEDED",
              "FAILED",
              "ROLLED_BACK"
            ],
            "description": "Redemption status."
          },
          "session": {
            "type": "object",
            "description": "Contains details about the redemption session lock. Sessions can be established only for discount vouchers, promotions, and gift cards.",
            "properties": {
              "key": {
                "type": "string",
                "description": "The session unique ID assigned by Voucherify or your own unique session ID sent in the request."
              }
            }
          },
          "related_redemptions": {
            "type": "object",
            "properties": {
              "rollbacks": {
                "type": "array",
                "items": {
                  "title": "Redemption Related Redemptions Rollbacks Item",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "rr_0bc92f81a6801f9bca",
                      "description": "Unique rollback redemption ID."
                    },
                    "date": {
                      "type": "string",
                      "example": "2021-12-22T10:13:06.487Z",
                      "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.",
                      "format": "date-time"
                    },
                    "rollback_order_mode": {
                      "type": "string",
                      "description": "Defines the rollback mode for the order. `WITH_ORDER` is a default setting. The redemption is rolled back together with the data about the order, including related discount values. `WITHOUT_ORDER` allows rolling the redemption back without affecting order data, including the applied discount values. This is returned only in GET `v1/redemptions/` and GET `v1/redemptions/{redemptionId}` endpoints.",
                      "enum": [
                        "WITH_ORDER",
                        "WITHOUT_ORDER"
                      ]
                    }
                  }
                }
              },
              "redemptions": {
                "type": "array",
                "items": {
                  "title": "Redemption Related Redemptions Item",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "r_0bc92f81a6801f9bca",
                      "description": "Unique redemption ID."
                    },
                    "date": {
                      "type": "string",
                      "example": "2021-12-22T10:13:06.487Z",
                      "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "failure_code": {
            "type": "string",
            "example": "customer_rules_violated",
            "description": "If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed."
          },
          "failure_message": {
            "type": "string",
            "description": "If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed."
          },
          "order": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderCalculated"
              },
              {
                "type": "object",
                "properties": {
                  "items": {
                    "type": "array",
                    "description": "Array of items applied to the order. It can include up to 500 items.",
                    "items": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/OrderCalculatedItem"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "application_details": {
                              "$ref": "#/components/schemas/ApplicationDetails"
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            ]
          },
          "channel": {
            "type": "object",
            "description": "Defines the details of the channel through which the redemption was issued.",
            "properties": {
              "channel_id": {
                "type": "string",
                "example": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                "description": "Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API. For `AUTO_REDEEM`, it is the reward assignment ID."
              },
              "channel_type": {
                "type": "string",
                "description": "The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard, `API` corresponds to the API, and `AUTO_REDEEM` corresponds to a loyalty campaign reward that has been redeemed automatically.",
                "enum": [
                  "USER",
                  "API",
                  "AUTO_REDEEM"
                ]
              }
            }
          },
          "customer": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleCustomer"
              }
            ]
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.",
            "enum": [
              "voucher",
              "promotion_tier",
              "redemption"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher."
          },
          "promotion_tier": {
            "description": "Contains details of the promotion tier and the parent campaign.",
            "allOf": [
              {
                "$ref": "#/components/schemas/PromotionTier"
              }
            ]
          },
          "reward": {
            "$ref": "#/components/schemas/RedemptionRewardResult"
          },
          "gift": {
            "type": "object",
            "description": "Contains the amount subtracted from the gift card for the redemption.",
            "properties": {
              "amount": {
                "type": "integer",
                "description": "Amount subtracted from the gift card as a result of the redemption. The amount is expressed as the smallest currency unit (e.g. 100 cents for $1.00)."
              }
            }
          },
          "loyalty_card": {
            "type": "object",
            "description": "Contains the number of points subtracted from the loyalty card for the redemption.",
            "properties": {
              "points": {
                "type": "integer",
                "description": "Number of points subtracted from the loyalty card as a result of the redemption."
              }
            }
          }
        },
        "required": [
          "id",
          "object",
          "date",
          "customer_id",
          "tracking_id",
          "metadata",
          "redemption",
          "result",
          "status",
          "order",
          "channel",
          "customer",
          "related_object_type",
          "related_object_id"
        ]
      },
      "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"
              }
            }
          }
        ]
      },
      "VoucherHolder": {
        "title": "Voucher Holder",
        "type": "object",
        "description": "This is an object representing a voucher holder.",
        "properties": {
          "holder": {
            "$ref": "#/components/schemas/SimpleCustomer"
          }
        }
      },
      "SimpleCustomer": {
        "title": "Simple Customer",
        "type": "object",
        "description": "Simplified customer data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of an existing customer. It is assigned by Voucherify."
          },
          "name": {
            "type": "string",
            "description": "Customer's first and last name."
          },
          "email": {
            "type": "string",
            "description": "Customer's email address."
          },
          "source_id": {
            "type": "string",
            "description": "A unique identifier of the customer. It can be a customer ID or email from a CRM system, database, or a third-party service."
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that are attached to the customer. It stores all custom attributes assigned to the customer."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "enum": [
              "customer"
            ]
          }
        }
      },
      "RedemptionRewardResult": {
        "title": "Redemption Reward Result",
        "type": "object",
        "properties": {
          "customer": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleCustomer"
              }
            ]
          },
          "assignment_id": {
            "type": "string",
            "nullable": true,
            "description": "Unique reward assignment ID assigned by Voucherify."
          },
          "voucher": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Voucher"
              }
            ]
          },
          "product": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Product"
              }
            ]
          },
          "sku": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Sku"
              }
            ]
          },
          "loyalty_tier_id": {
            "type": "string",
            "nullable": true,
            "description": "Unique loyalty tier ID assigned by Voucherify."
          },
          "id": {
            "type": "string",
            "example": "rew_0bc92f81a6801f9bca",
            "description": "Unique reward ID."
          },
          "name": {
            "type": "string",
            "example": "Reward Name",
            "description": "Name of the reward."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON",
            "default": "reward",
            "enum": [
              "reward"
            ]
          },
          "created_at": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the reward was updated."
          },
          "parameters": {
            "type": "object",
            "description": "These are parameters representing a material reward.",
            "properties": {
              "campaign": {
                "type": "object",
                "description": "Defines the product redeemed as a reward.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Campaign unique ID.",
                    "example": "camp_13BbZ0kQsNinhqsX3wUts2UP"
                  },
                  "balance": {
                    "type": "integer",
                    "description": "Points available for reward redemption. This is calculated as follows: `balance` = `points` - `expired_points` - `subtracted_points` - `redemption.redeemed_points`."
                  },
                  "type": {
                    "type": "string",
                    "description": "Defines the type of the campaign."
                  }
                }
              },
              "product": {
                "type": "object",
                "description": "Defines the product redeemed as a reward.",
                "properties": {
                  "id": {
                    "type": "string",
                    "example": "prod_0b7d7dfb05cbe5c616",
                    "description": "Unique product ID, assigned by Voucherify. "
                  },
                  "sku_id": {
                    "type": "string",
                    "description": "Unique identifier of the SKU. It is assigned by Voucherify.",
                    "example": "sku_0a41e31c7b41c28358"
                  }
                }
              },
              "coin": {
                "type": "object",
                "description": "Defines the ratio by mapping the number of loyalty points in `points_ratio` to a predefined cash amount in `exchange_ratio`.",
                "properties": {
                  "exchange_ratio": {
                    "type": "number",
                    "description": "The cash equivalent of the points defined in the `points_ratio` property."
                  },
                  "points_ratio": {
                    "type": "integer",
                    "description": "The number of loyalty points that will map to the predefined cash amount defined by the `exchange_ratio` property."
                  }
                }
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a reward. The metadata object stores all custom attributes assigned to the reward."
          },
          "type": {
            "type": "string",
            "enum": [
              "CAMPAIGN",
              "COIN",
              "MATERIAL"
            ],
            "description": "Reward type."
          }
        },
        "required": [
          "reward",
          "customer",
          "assignment_id",
          "voucher",
          "product",
          "sku",
          "loyalty_tier_id"
        ]
      },
      "RedeemVoucher": {
        "title": "Voucher Redeemable",
        "type": "object",
        "description": "Validate or redeem a discount code.",
        "properties": {
          "object": {
            "type": "string",
            "description": "Redeemable object type.",
            "default": "voucher",
            "enum": [
              "voucher"
            ]
          },
          "id": {
            "type": "string",
            "description": "Redeemable code."
          }
        },
        "required": [
          "object",
          "id"
        ]
      },
      "RedeemPromotionTier": {
        "title": "Promotion Tier Redeemable",
        "type": "object",
        "description": "Validate or redeem a promotion tier.",
        "properties": {
          "object": {
            "type": "string",
            "description": "Redeemable object type.",
            "default": "promotion_tier",
            "enum": [
              "promotion_tier"
            ]
          },
          "id": {
            "type": "string",
            "description": "Promotion tier unique id, such as: promo_Mwy9XpA0TLctSGriM5kum0qp"
          }
        },
        "required": [
          "object",
          "id"
        ]
      },
      "RedeemPromotionStack": {
        "title": "Promotion Stack Redeemable",
        "type": "object",
        "description": "Validate or redeem a promotion stack.",
        "properties": {
          "object": {
            "type": "string",
            "description": "Redeemable object type.",
            "default": "promotion_stack",
            "enum": [
              "promotion_stack"
            ]
          },
          "id": {
            "type": "string",
            "description": "Promotion stack unique id, such as: stack_KxSD0GahLUg9ULB6TseGfUHJ"
          }
        },
        "required": [
          "object",
          "id"
        ]
      },
      "RedeemGiftCard": {
        "title": "Gift Card Redeemable",
        "description": "Validate or redeem a gift card",
        "allOf": [
          {
            "$ref": "#/components/schemas/RedeemVoucher"
          },
          {
            "type": "object",
            "properties": {
              "gift": {
                "type": "object",
                "description": "Contains information on the number of gift card credits that the customer wants to apply to the order.",
                "properties": {
                  "credits": {
                    "type": "integer",
                    "description": "The number of credits that the user wants to use from the gift card to fulfill the order. The value of credits cannot be higher than the current balance on the gift card. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
                  }
                }
              }
            }
          }
        ]
      },
      "RedeemLoyaltyCard": {
        "title": "Loyalty Card Redeemable",
        "description": "Validate or redeem a loyalty card",
        "allOf": [
          {
            "$ref": "#/components/schemas/RedeemVoucher"
          },
          {
            "type": "object",
            "properties": {
              "reward": {
                "type": "object",
                "description": "Contains information about the reward that the customer wants to redeem and the number of points the customer is choosing to use for the reward.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique reward ID assigned by Voucherify. The reward must be assigned to the campaign in order for the user to be able to use the reward.",
                    "example": "rew_EPx1hCTpqzF0HW1z9NKckZH4"
                  },
                  "points": {
                    "type": "integer",
                    "description": "The number of loyalty points that the user wants to spend in order to fulfill the order using a **pay with points** reward. The number of points cannot be higher than the current balance on the loyalty card."
                  }
                }
              }
            }
          }
        ]
      },
      "Session": {
        "type": "object",
        "title": "Session",
        "properties": {
          "key": {
            "type": "string",
            "description": "The session unique ID assigned by Voucherify or your own unique session ID. Sending an existing ID will result in overwriting an existing session. If no session key is provided, then a new ID will be generated."
          },
          "type": {
            "type": "string",
            "default": "LOCK",
            "enum": [
              "LOCK"
            ],
            "description": "This parameter is required to establish a new session."
          },
          "ttl": {
            "type": "number",
            "description": "Value for the period of time that the session is active. Units for this parameter are defined by the session.ttl_unit parameter."
          },
          "ttl_unit": {
            "type": "string",
            "enum": [
              "DAYS",
              "HOURS",
              "MICROSECONDS",
              "MILLISECONDS",
              "MINUTES",
              "NANOSECONDS",
              "SECONDS"
            ],
            "description": "Defines the type of unit in which the session time is counted."
          }
        }
      },
      "VoucherWithStackingRulesTypeCategories": {
        "title": "Voucher with categories and validation rules assignments",
        "description": "This is an object representing a voucher with categories and validation rules assignments for **POST** `v1/qualifications`, **POST** `v1/redemptions`, and **POST** `v1/validations`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherBase"
          },
          {
            "type": "object",
            "properties": {
              "categories": {
                "type": "array",
                "description": "Contains details about the category.",
                "items": {
                  "$ref": "#/components/schemas/CategoryWithStackingRulesType"
                }
              },
              "validation_rules_assignments": {
                "$ref": "#/components/schemas/ValidationRulesAssignmentsList"
              }
            }
          }
        ]
      },
      "CustomerId": {
        "title": "Customer Id",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "A unique identifier of an existing customer."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "customer",
            "enum": [
              "customer"
            ]
          }
        },
        "required": [
          "id",
          "object"
        ]
      },
      "ReferrerId": {
        "title": "Referrer Id",
        "allOf": [
          {
            "$ref": "#/components/schemas/CustomerId"
          }
        ]
      },
      "OrderRedemptionsEntry": {
        "title": "Order Redemptions",
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.",
            "example": "2022-09-02T17:06:56.649Z",
            "format": "date-time"
          },
          "rollback_id": {
            "type": "string",
            "description": "Unique ID of the redemption rollback.",
            "example": "rr_0c63c84eb78ee0a6c0"
          },
          "rollback_date": {
            "type": "string",
            "description": "Timestamp representing the date and time when the redemption rollback was created. The value is shown in the ISO 8601 format.",
            "example": "2023-01-31T14:18:37.150Z",
            "format": "date-time"
          },
          "related_object_type": {
            "type": "string",
            "description": "The source of the incentive.",
            "default": "redemption"
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique ID of the parent redemption.",
            "example": "r_0ba186c4824e4881e1"
          },
          "related_object_parent_id": {
            "type": "string",
            "description": "Represent's the campaign ID of the voucher if the redemption was based on a voucher that was part of bulk codes generated within a campaign. In case of a promotion tier, this represents the campaign ID of the promotion tier's parent campaign."
          },
          "stacked": {
            "type": "array",
            "description": "Contains a list of unique IDs of child redemptions, which belong to the stacked incentives.",
            "items": {
              "type": "string"
            }
          },
          "rollback_stacked": {
            "type": "array",
            "description": "Lists the rollback redemption IDs of the particular child redemptions.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Bundle": {
        "title": "Bundle Details",
        "type": "object",
        "description": "Determines how the bundle conditions are met by the customer's order items. The items in the order meet the bundle condition in the following way: SKU, then product, then collection.",
        "properties": {
          "quantity": {
            "type": "integer",
            "description": "Determines how many bundles are qualified. If there are missing bundle products, the value is `0`. If the bundle is qualified, the value is `1`. The maximum number of identified bundles can equal the number set in `limit`. Also defines the multiplier of the discount for `AMOUNT`, `PERCENT`, and `UNIT` discount types. To inform end-customers that more products can be added to meet additional bundles, compare this parameter with `limit`.",
            "minimum": 0,
            "maximum": 100
          },
          "limit": {
            "type": "integer",
            "description": "Determines the maximum number of identified bundles. This also defines the maximum multiplier of the bundle discount.",
            "minimum": 1,
            "maximum": 100
          },
          "identified": {
            "type": "array",
            "description": "Determines products from the customer's order items that meet bundle conditions. SKUs meet the conditions for their product that is used in the bundle. Returns only the products and their quantity that meet the bundle.",
            "items": {
              "type": "object",
              "description": "Determines a product from the customer's order items that meets bundle conditions.",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique identifier of the product or SKU that meets the bundle condition. This is an ID assigned by Voucherify."
                },
                "object": {
                  "type": "string",
                  "description": "Determines the type of the object that meets the bundle condition.",
                  "enum": [
                    "product",
                    "sku"
                  ]
                },
                "item_index": {
                  "type": "integer",
                  "description": "Number assigned to the order line item in accordance with the order sent in the request. It starts with `0` for the first order line item in the request.",
                  "minimum": 0
                },
                "item_quantity": {
                  "type": "integer",
                  "description": "Quantity of items that meet the bundle conditions. If the quantity in the order is higher than the quantity required by the bundle, this returns only the number that meets the bundle. For example, if the bundle requires `5` coffees, but the order includes `10` coffees, `item_quantity` returns `5`."
                }
              },
              "required": [
                "id",
                "object",
                "item_index",
                "item_quantity"
              ]
            }
          },
          "missing": {
            "type": "array",
            "description": "Determines products, SKUs, or collections from the bundle that are missing in the customer's order items. Determines also the missing quantity. For collections, this means that order items do not include a sufficient number of items that belong to the collection. Not returned when all required bundle items are in the order.",
            "items": {
              "type": "object",
              "description": "Determines a product, SKU, or collection that is in bundle conditions, but is missing in the customer's order items. Determines also the missing quantity.",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique identifier of the collection, product, or SKU that is missing in the customer's order items. This is an ID assigned by Voucherify."
                },
                "object": {
                  "type": "string",
                  "description": "Determines the type of the object that is missing in the customer's order items.",
                  "enum": [
                    "product",
                    "products_collection",
                    "sku"
                  ]
                },
                "item_quantity": {
                  "type": "integer",
                  "description": "Quantity of items that are missing in the order items to meet the bundle conditions."
                }
              },
              "required": [
                "id",
                "object",
                "item_quantity"
              ]
            }
          }
        },
        "required": [
          "quantity",
          "limit"
        ]
      },
      "CategoryWithStackingRulesType": {
        "type": "object",
        "title": "Category with Stacking Rules Type",
        "description": "Category object with `stacking_rules_type`",
        "allOf": [
          {
            "$ref": "#/components/schemas/Category"
          },
          {
            "type": "object",
            "properties": {
              "stacking_rules_type": {
                "type": "string",
                "description": "The type of the stacking rule eligibility.",
                "enum": [
                  "JOINT",
                  "EXCLUSIVE"
                ]
              }
            }
          }
        ]
      },
      "ValidationsRedeemableSkippedResultLimitExceeded": {
        "title": "Validations Redeemable Skipped Result Limit Exceeded",
        "type": "object",
        "description": "Displayed when the `applicable_redeemables_limit` defined in the stacking rules is exceeded.",
        "properties": {
          "key": {
            "type": "string",
            "default": "applicable_redeemables_limit_exceeded",
            "enum": [
              "applicable_redeemables_limit_exceeded"
            ]
          },
          "message": {
            "type": "string",
            "example": "Applicable redeemables limit exceeded"
          }
        }
      },
      "ValidationsRedeemableSkippedResultCategoryLimitExceeded": {
        "title": "Validations Redeemable Skipped Result Category Limit Exceeded",
        "type": "object",
        "description": "Displayed when `applicable_redeemables_per_category_limit` defined in the stacking rules is exceeded",
        "properties": {
          "key": {
            "type": "string",
            "default": "applicable_redeemables_per_category_limit_exceeded",
            "enum": [
              "applicable_redeemables_per_category_limit_exceeded"
            ]
          },
          "message": {
            "type": "string",
            "example": "Applicable redeemables limit per category exceeded"
          }
        }
      },
      "ValidationsRedeemableSkippedResultRedeemablesLimitExceeded": {
        "title": "Validations Redeemable Skipped Result Redeemables Limit Exceeded",
        "type": "object",
        "description": "Displayed when `applicable_exclusive_redeemables_limit` defined in the  stacking rules is exceeded.",
        "properties": {
          "key": {
            "type": "string",
            "default": "applicable_exclusive_redeemables_limit_exceeded",
            "enum": [
              "applicable_exclusive_redeemables_limit_exceeded"
            ]
          },
          "message": {
            "type": "string",
            "example": "Applicable exclusive redeemables limit exceeded"
          }
        }
      },
      "ValidationsRedeemableSkippedResultRedeemablesCategoryLimitExceeded": {
        "title": "Validations Redeemable Skipped Result Redeemables Category Limit Exceeded",
        "type": "object",
        "description": "Displayed when `applicable_exclusive_redeemables_per_category_limit` defined in the stacking rules is exceeded.",
        "properties": {
          "key": {
            "type": "string",
            "default": "applicable_exclusive_redeemables_per_category_limit_exceeded",
            "enum": [
              "applicable_exclusive_redeemables_per_category_limit_exceeded"
            ]
          },
          "message": {
            "type": "string",
            "example": "Applicable exclusive redeemables limit per category exceeded"
          }
        }
      },
      "ValidationsRedeemableSkippedResultExclusionRulesNotMet": {
        "title": "Validations Redeemable Skipped Result Exclusion Rules Not Met",
        "type": "object",
        "description": "Displayed when the redeemable cannot be applied because the exclusion rules are not fulfilled.",
        "properties": {
          "key": {
            "type": "string",
            "default": "exclusion_rules_not_met",
            "enum": [
              "exclusion_rules_not_met"
            ]
          },
          "message": {
            "type": "string",
            "example": "Redeemable cannot be applied due to exclusion rules"
          }
        }
      },
      "ValidationsRedeemableSkippedResultPrecedingValidationFailed": {
        "title": "Validations Redeemable Skipped Result Preceding Validation Failed",
        "type": "object",
        "description": "Displayed in the ALL application rule when one of the preceding redeeambles is `INAPPLICABLE`, so the rest becomes `SKIPPED`",
        "properties": {
          "key": {
            "type": "string",
            "default": "preceding_validation_failed",
            "enum": [
              "preceding_validation_failed"
            ]
          },
          "message": {
            "type": "string",
            "example": "Redeemable cannot be applied due to preceding validation failure"
          }
        }
      },
      "ValidationsRedeemableSkippedResultNoEffect": {
        "title": "Validations Redeemable Skipped Result No Effect",
        "type": "object",
        "description": "Displayed when the redeemable does not calculate any discount effect and the `redeemables_no_effect_rule` defined in the stacking rules is set to `SKIP` for the redeemable, either globally or through `no_effect_skip_categories`.",
        "properties": {
          "key": {
            "type": "string",
            "default": "no_effect",
            "enum": [
              "no_effect"
            ]
          },
          "message": {
            "type": "string",
            "example": "Redeemable cannot be applied due to no effect"
          }
        }
      },
      "6_req_session_lock_discount_code": {
        "title": "Discount Code Session Lock",
        "type": "object",
        "description": "Schema model for `session` lock object. The session object is **required** to establish a session between multiple parallel validation and redemption requests. If you only send the `type` parameter in the request, then by default the session lock will be established for 7 days. Read more on establishing a [validation session](/guides/locking-validation-session).",
        "properties": {
          "type": {
            "type": "string",
            "description": "This parameter is **required** to establish a new session. The session locks the redemption **quantity** by 1.",
            "default": "LOCK",
            "enum": [
              "LOCK"
            ]
          },
          "key": {
            "type": "string",
            "description": "The session unique ID assigned by Voucherify or your own unique session ID. Sending an existing ID will result in overwriting an existing session. If no session key is provided, then a new ID will be generated.",
            "example": "ssn_yQGMTeKBSw8OOuFPwlBEjzGy8d8VA9Ts"
          },
          "ttl_unit": {
            "type": "string",
            "description": "Defines the type of unit in which the session time is counted.",
            "enum": [
              "HOURS",
              "DAYS",
              "MINUTES",
              "SECONDS",
              "MILLISECONDS",
              "MICROSECONDS",
              "NANOSECONDS"
            ]
          },
          "ttl": {
            "type": "integer",
            "description": "Value for the period of time that the session is active. Units for this parameter are defined by the `session.ttl_unit` parameter."
          }
        }
      },
      "6_req_session_lock_gift_card": {
        "title": "Gift Card Session Lock",
        "type": "object",
        "description": "Schema model for `session` lock object. The session object is **required** to establish a session between multiple parallel validation and redemption requests. If you only send the `type` parameter in the request, then by default the session lock will be established for 7 days. Read more on establishing a [validation session](/guides/locking-validation-session).",
        "properties": {
          "type": {
            "type": "string",
            "description": "This parameter is **required** to establish a new session. The session locks the redemption **quantity** by 1 and the redemption **gift credits** specified within the request.",
            "default": "LOCK",
            "enum": [
              "LOCK"
            ]
          },
          "key": {
            "type": "string",
            "description": "The session unique ID assigned by Voucherify or your own unique session ID. Sending an existing ID will result in overwriting an existing session. If no session key is provided, then a new ID will be generated.",
            "example": "ssn_yQGMTeKBSw8OOuFPwlBEjzGy8d8VA9Ts"
          },
          "ttl_unit": {
            "type": "string",
            "description": "Defines the type of unit in which the session time is counted.",
            "enum": [
              "HOURS",
              "DAYS",
              "MINUTES",
              "SECONDS",
              "MILLISECONDS",
              "MICROSECONDS",
              "NANOSECONDS"
            ]
          },
          "ttl": {
            "type": "integer",
            "description": "Value for the period of time that the session is active. Units for this parameter are defined by the `session.ttl_unit` parameter."
          }
        }
      },
      "6_req_session_lock_loyalty_card": {
        "title": "Loyalty Card Session Lock",
        "type": "object",
        "description": "Schema model for `session` lock object. The session object is **required** to establish a session between multiple parallel validation and redemption requests. If you only send the `type` parameter in the request, then by default the session lock will be established for 7 days. Read more on establishing a [validation session](/guides/locking-validation-session).",
        "properties": {
          "type": {
            "type": "string",
            "description": "This parameter is **required** to establish a new session. The session locks the redemption **quantity** by 1 and the redemption **loyalty points** specified within the request.",
            "default": "LOCK",
            "enum": [
              "LOCK"
            ]
          },
          "key": {
            "type": "string",
            "description": "The session unique ID assigned by Voucherify or your own unique session ID. Sending an existing ID will result in overwriting an existing session. If no session key is provided, then a new ID will be generated.",
            "example": "ssn_yQGMTeKBSw8OOuFPwlBEjzGy8d8VA9Ts"
          },
          "ttl_unit": {
            "type": "string",
            "description": "Defines the type of unit in which the session time is counted.",
            "enum": [
              "HOURS",
              "DAYS",
              "MINUTES",
              "SECONDS",
              "MILLISECONDS",
              "MICROSECONDS",
              "NANOSECONDS"
            ]
          },
          "ttl": {
            "type": "integer",
            "description": "Value for the period of time that the session is active. Units for this parameter are defined by the `session.ttl_unit` parameter."
          }
        }
      },
      "7_obj_redemption_object_discount_voucher_extended": {
        "type": "object",
        "title": "Discount Voucher",
        "description": "This is an object representing a redemption.  \n\nRedemption is the key operation in the voucher and promotion tier lifecycle. A customer can redeem a voucher or promotion tier once or multiple times depending on selected limit (`quantity`). Each redemption is recorded in voucher/promotion's history (`redemption_entries`). There is also an option to cancel a redemption. We call such operation a [redemption rollback](rollback-redemption).",
        "properties": {
          "id": {
            "type": "string",
            "example": "r_0bc92f81a6801f9bca",
            "description": "Unique redemption ID."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON. This object stores information about the `redemption`.",
            "default": "redemption"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption occured."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "order": {
            "description": "Defines the details of the order that is related to the redemption.",
            "allOf": [
              {
                "$ref": "#/components/schemas/7_obj_order_object"
              }
            ]
          },
          "channel": {
            "type": "object",
            "description": "Defines the details of the channel through which the redemption was issued.",
            "properties": {
              "channel_id": {
                "type": "string",
                "example": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                "description": "Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API."
              },
              "channel_type": {
                "type": "string",
                "description": "The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.",
                "enum": [
                  "USER",
                  "API"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer that is related to the redemption.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "source_id": {
                "type": "string",
                "description": "The merchant's customer ID if it is different from the Voucherify customer ID. It is really useful in case of an integration between multiple systems. It can be a customer ID from a CRM system, database or 3rd-party service."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.\n\n| **Related Object** | **Definition** |\n| :--- | :--- |\n| voucher | Either a discount voucher, gift card, or loyalty card. |",
            "default": "voucher",
            "enum": [
              "voucher"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher."
          },
          "voucher": {
            "description": "Defines the details of the voucher being redeemed.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Voucher"
              },
              {
                "$ref": "#/components/schemas/VoucherHolder"
              }
            ]
          }
        }
      },
      "7_obj_redemption_object_loyalty_card_extended": {
        "type": "object",
        "title": "Loyalty Card Voucher",
        "description": "This is an object representing a redemption.  \n\nRedemption is the key operation in the voucher and promotion tier lifecycle. A customer can redeem a voucher or promotion tier once or multiple times depending on selected limit (`quantity`). Each redemption is recorded in voucher/promotion's history (`redemption_entries`). There is also an option to cancel a redemption. We call such operation a [redemption rollback](rollback-redemption).",
        "properties": {
          "id": {
            "type": "string",
            "example": "r_0bc92f81a6801f9bca",
            "description": "Unique redemption ID."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON. This object stores information about the redemption.",
            "default": "redemption"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption occured."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "amount": {
            "type": "integer",
            "description": "Number of points being redeemed for a reward."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "order": {
            "description": "Defines the details of the order that is related to the redemption.",
            "allOf": [
              {
                "$ref": "#/components/schemas/7_obj_order_object"
              }
            ]
          },
          "channel": {
            "type": "object",
            "description": "Defines the details of the channel through which the redemption was issued.",
            "properties": {
              "channel_id": {
                "type": "string",
                "example": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                "description": "Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API."
              },
              "channel_type": {
                "type": "string",
                "description": "The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.",
                "enum": [
                  "USER",
                  "API"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer redeeming the reward.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "source_id": {
                "type": "string",
                "description": "The merchant's customer ID if it is different from the Voucherify customer ID. It is really useful in case of an integration between multiple systems. It can be a customer ID from a CRM system, database or 3rd-party service."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object, i.e. `voucher`.",
            "default": "voucher",
            "enum": [
              "voucher"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, i.e. `v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno` for a voucher."
          },
          "voucher": {
            "description": "Defines the details of the voucher being redeemed.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Voucher"
              }
            ]
          },
          "reward": {
            "description": "Defines the reward being redeemed.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_pay_with_points"
              },
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_material_product"
              },
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_material_sku"
              },
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_digital"
              }
            ]
          },
          "loyalty_card": {
            "type": "object",
            "description": "Stores the number of points being subtracted from the loyalty card for the reward redemption.",
            "properties": {
              "points": {
                "type": "integer",
                "description": "Number of points being subtracted from the loyalty card for the reward redemption."
              }
            }
          }
        }
      },
      "7_obj_redemption_object_gift_card_extended": {
        "type": "object",
        "title": "Gift Card",
        "description": "This is an object representing a gift card redemption.",
        "properties": {
          "id": {
            "type": "string",
            "example": "r_0bc92f81a6801f9bca",
            "description": "Unique redemption ID."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON. This object stores information about the `redemption`.",
            "default": "redemption"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption occured."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "amount": {
            "type": "integer",
            "description": "The amount subtracted from the gift card expressed as the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "order": {
            "description": "Defines the details of the order that is related to the redemption.",
            "allOf": [
              {
                "$ref": "#/components/schemas/7_obj_order_object"
              }
            ]
          },
          "channel": {
            "type": "object",
            "description": "Defines the details of the channel through which the redemption was issued.",
            "properties": {
              "channel_id": {
                "type": "string",
                "example": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                "description": "Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API."
              },
              "channel_type": {
                "type": "string",
                "description": "The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.",
                "enum": [
                  "USER",
                  "API"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer redeeming the gift card.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "source_id": {
                "type": "string",
                "description": "The merchant's customer ID if it is different from the Voucherify customer ID. It is really useful in case of an integration between multiple systems. It can be a customer ID from a CRM system, database or 3rd-party service."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.\n\n| **Related Object** | **Definition** |\n| :--- | :--- |\n| voucher | Either a discount voucher, gift card, or loyalty card. |",
            "default": "voucher",
            "enum": [
              "voucher"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher."
          },
          "voucher": {
            "description": "Defines the details of the voucher being redeemed.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Voucher"
              }
            ]
          },
          "gift": {
            "type": "object",
            "description": "Contains the amount being subtracted from the gift card for the redemption.",
            "properties": {
              "amount": {
                "type": "integer",
                "description": "The amount subtracted from the gift card expressed as the smallest currency unit (e.g. 100 cents for $1.00)."
              }
            }
          }
        }
      },
      "CustomerBase": {
        "title": "Customer Base",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Customer's first and last name."
          },
          "description": {
            "type": "string",
            "description": "An arbitrary string that you can attach to a customer object."
          },
          "email": {
            "type": "string",
            "description": "Customer's email address."
          },
          "phone": {
            "type": "string",
            "description": "Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel."
          },
          "birthday": {
            "type": "string",
            "description": "`Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~.",
            "format": "date"
          },
          "birthdate": {
            "type": "string",
            "description": "Customer's birthdate; format YYYY-MM-DD.",
            "format": "date"
          },
          "address": {
            "type": "object",
            "nullable": true,
            "description": "Customer's address.",
            "properties": {
              "city": {
                "type": "string",
                "description": "City"
              },
              "state": {
                "type": "string",
                "description": "State"
              },
              "line_1": {
                "type": "string",
                "description": "First line of address."
              },
              "line_2": {
                "type": "string",
                "description": "Second line of address."
              },
              "country": {
                "type": "string",
                "description": "Country."
              },
              "postal_code": {
                "type": "string",
                "description": "Postal code."
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments."
          }
        }
      },
      "OrderBase": {
        "title": "Order Base",
        "type": "object",
        "description": "Order information.",
        "properties": {
          "source_id": {
            "type": "string",
            "nullable": true,
            "description": "Unique source ID of an existing order that will be linked to the redemption of this request.\n\nFor validation and redemption, if `source_id` is used with an existing order, the original order data will be used, like `items`, `amount`, and so on, not the one sent in the new request."
          },
          "status": {
            "type": "string",
            "description": "The order status.",
            "enum": [
              "CREATED",
              "PAID",
              "CANCELED",
              "FULFILLED"
            ]
          },
          "amount": {
            "type": "integer",
            "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts."
          },
          "initial_amount": {
            "type": "integer",
            "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts."
          },
          "discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "items": {
            "type": "array",
            "description": "Array of items applied to the order. It can include up to 500 items.",
            "items": {
              "$ref": "#/components/schemas/OrderItem"
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas."
          }
        }
      },
      "Referrer": {
        "title": "Referrer",
        "allOf": [
          {
            "$ref": "#/components/schemas/Customer"
          }
        ]
      },
      "7_obj_order_object_apply_to_order": {
        "type": "object",
        "title": "Order object - Effect: Apply to order",
        "description": "This is an object representing an order with calculated discounts applied using the voucher code.",
        "properties": {
          "id": {
            "type": "string",
            "example": "ord_OLWs41pBk7VFn6ZTyX9U6keh",
            "description": "Unique order ID, assigned by Voucherify."
          },
          "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."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-06T11:40:48.705Z",
            "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-06T11:47:20.760Z",
            "description": "Timestamp representing the date and time when the order was updated. The value is shown in the ISO 8601 format."
          },
          "status": {
            "type": "string",
            "description": "Order status.",
            "enum": [
              "CREATED",
              "PAID",
              "CANCELED",
              "FULFILLED"
            ]
          },
          "amount": {
            "type": "integer",
            "description": "Order amount before applying any discount."
          },
          "discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level discounts applied to the order."
          },
          "total_discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level AND all product-specific discounts applied to the order.  \n`total_discount_amount` = `discount_amount` + `items_discount_amount`"
          },
          "total_amount": {
            "type": "integer",
            "description": "Order amount after applying all the discounts.  \n`total_amount` = `amount` - `total_discount_amount`"
          },
          "applied_discount_amount": {
            "type": "integer",
            "description": "This field shows the order-level discount applied."
          },
          "total_applied_discount_amount": {
            "type": "integer",
            "description": "This field sums up all order-level and all product-specific discounts applied in a particular request."
          },
          "items": {
            "type": "array",
            "description": "Array of order items that have been applied to the order. Each order item can show the effects of particular discounts on the item-level.",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "default": "order_item",
                  "description": "The type of the object represented by JSON. This object stores information about the `order_item`."
                },
                "product_id": {
                  "type": "string",
                  "example": "prod_5h0wc453_1",
                  "description": "A unique identifier that represents the product and is assigned by Voucherify."
                },
                "sku_id": {
                  "type": "string",
                  "example": "sku_prod_5h0wc453_1_1",
                  "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
                },
                "quantity": {
                  "type": "integer",
                  "description": "Quantity of the item in the cart."
                },
                "amount": {
                  "type": "integer",
                  "description": "Represents a total pre-discount amount of order item (`price` * `quantity`)."
                },
                "price": {
                  "type": "integer",
                  "description": "Unit price of an item. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
                },
                "subtotal_amount": {
                  "type": "integer",
                  "description": "Final order item amount after the applied item-level discount.  If there are no item-level discounts applied, this item is equal to the `amount`.   \n`subtotal_amount`=`amount`-`discount_amount`"
                },
                "product": {
                  "type": "object",
                  "description": "This object stores more information about the related product.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "prod_5h0wc453_1",
                      "description": "A unique identifier that represents the product and is assigned by Voucherify."
                    },
                    "source_id": {
                      "type": "string",
                      "description": "A unique product identifier from your inventory system.",
                      "example": "illy-arabica"
                    },
                    "name": {
                      "type": "string",
                      "example": "Brewing System",
                      "description": "Product name."
                    },
                    "price": {
                      "type": "integer",
                      "description": "Unit price of a product. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
                    }
                  }
                },
                "sku": {
                  "type": "object",
                  "description": "This object stores more information about the related SKU.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "sku_prod_5h0wc453_1_1",
                      "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
                    },
                    "source_id": {
                      "type": "string",
                      "example": "illy-arabica-250g",
                      "description": "A unique SKU identifier from your inventory system."
                    },
                    "sku": {
                      "type": "string",
                      "description": "SKU name."
                    },
                    "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`."
                    }
                  }
                }
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the order. A set of key/value pairs that are att to an order object. Stores additional information about the order in a structured format."
          },
          "customer": {
            "type": "object",
            "description": "Object containing information about the customer that is making the purchase.",
            "properties": {
              "id": {
                "type": "string",
                "example": "cust_7iUa6ICKyU6gH40dBU25kQU1",
                "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify."
              },
              "object": {
                "type": "string",
                "default": "customer",
                "description": "Type of object represented by the `customer` object."
              }
            }
          },
          "referrer": {
            "type": "object",
            "description": "Object containing information about the referrer.",
            "properties": {
              "id": {
                "type": "string",
                "example": "cust_7iUa6ICKyU6gH40dBU25kQU1",
                "description": "Unique referrer ID, who referred the customer making the purchase."
              },
              "object": {
                "type": "string",
                "default": "customer",
                "description": "Type of object represented by the `referrer` object."
              }
            }
          },
          "customer_id": {
            "type": "string",
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.",
            "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
          },
          "referrer_id": {
            "type": "string",
            "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
            "description": "Unique referrer ID."
          },
          "object": {
            "type": "string",
            "default": "order",
            "description": "The type of the object represented by JSON. This object stores information about the `order`."
          },
          "redemptions": {
            "description": "Lists details related to the redemption.",
            "allOf": [
              {
                "$ref": "#/components/schemas/10_obj_order_object_unstacked_redemptions"
              }
            ]
          }
        }
      },
      "7_obj_order_object_apply_to_items": {
        "type": "object",
        "title": "Order object - Effect: Apply to items",
        "description": "This is an object representing an order with calculated discounts applied using the voucher code.",
        "properties": {
          "id": {
            "type": "string",
            "example": "ord_OLWs41pBk7VFn6ZTyX9U6keh",
            "description": "Unique order ID, assigned by Voucherify. "
          },
          "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."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-06T11:40:48.705Z",
            "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-06T11:47:20.760Z",
            "description": "Timestamp representing the date and time when the order was updated. The value is shown in the ISO 8601 format."
          },
          "status": {
            "type": "string",
            "description": "Order status.",
            "enum": [
              "CREATED",
              "PAID",
              "CANCELED",
              "FULFILLED"
            ]
          },
          "amount": {
            "type": "integer",
            "description": "Order amount before applying any discount."
          },
          "items_discount_amount": {
            "type": "integer",
            "description": "Sum of all product-specific discounts applied to the order.  \n`sum(items, i => i.discount_amount)`"
          },
          "total_discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level AND all product-specific discounts applied to the order."
          },
          "total_amount": {
            "type": "integer",
            "description": "Order amount after applying all the discounts.  \n`total_amount` = `amount` - `total_discount_amount`"
          },
          "items_applied_discount_amount": {
            "type": "integer",
            "description": "Sum of all product-specific discounts applied."
          },
          "total_applied_discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level AND all product-specific discounts applied to the order."
          },
          "items": {
            "type": "array",
            "description": "Array of order items that have been applied to the order. Each order item can show the effects of particular discounts on the item-level.",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "default": "order_item",
                  "description": "The type of the object represented by JSON. This object stores information about the `order_item`."
                },
                "product_id": {
                  "type": "string",
                  "example": "prod_5h0wc453_1",
                  "description": "A unique identifier that represents the product and is assigned by Voucherify."
                },
                "sku_id": {
                  "type": "string",
                  "example": "sku_prod_5h0wc453_1_1",
                  "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
                },
                "quantity": {
                  "type": "integer",
                  "description": "Quantity of the item in the cart."
                },
                "amount": {
                  "type": "integer",
                  "description": "Represents a total pre-discount amount of order item (`price` * `quantity`)."
                },
                "discount_amount": {
                  "type": "integer",
                  "description": "The item-level discount applied to the item."
                },
                "applied_discount_amount": {
                  "type": "integer",
                  "description": "The item-level discount applied to the item."
                },
                "price": {
                  "type": "integer",
                  "description": "Unit price of an item. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
                },
                "subtotal_amount": {
                  "type": "integer",
                  "description": "Final order item amount after the applied item-level discount.  If there are no item-level discounts applied, this item is equal to the `amount`.   \n`subtotal_amount`=`amount`-`discount_amount`"
                },
                "product": {
                  "type": "object",
                  "description": "This object stores more information about the related product.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "prod_5h0wc453_1",
                      "description": "A unique identifier that represents the product and is assigned by Voucherify."
                    },
                    "source_id": {
                      "type": "string",
                      "description": "A unique product identifier from your inventory system.",
                      "example": "illy-arabica"
                    },
                    "name": {
                      "type": "string",
                      "example": "Brewing System",
                      "description": "Product name."
                    },
                    "price": {
                      "type": "integer",
                      "description": "Unit price of a product. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
                    }
                  }
                },
                "sku": {
                  "type": "object",
                  "description": "This object stores more information about the related SKU.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "sku_prod_5h0wc453_1_1",
                      "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
                    },
                    "source_id": {
                      "type": "string",
                      "example": "illy-arabica-250g",
                      "description": "A unique SKU identifier from your inventory system."
                    },
                    "sku": {
                      "type": "string",
                      "description": "SKU name."
                    },
                    "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`."
                    }
                  }
                }
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the order. A set of key/value pairs that are att to an order object. Stores additional information about the order in a structured format."
          },
          "customer": {
            "type": "object",
            "description": "Object containing information about the customer that is making the purchase.",
            "properties": {
              "id": {
                "type": "string",
                "example": "cust_7iUa6ICKyU6gH40dBU25kQU1",
                "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify."
              },
              "object": {
                "type": "string",
                "default": "customer",
                "description": "Type of object represented by the `customer` object."
              }
            }
          },
          "referrer": {
            "type": "object",
            "description": "Object containing information about the referrer.",
            "properties": {
              "id": {
                "type": "string",
                "example": "cust_7iUa6ICKyU6gH40dBU25kQU1",
                "description": "Unique referrer ID, who referred the customer making the purchase."
              },
              "object": {
                "type": "string",
                "default": "customer",
                "description": "Type of object represented by the `referrer` object."
              }
            }
          },
          "customer_id": {
            "type": "string",
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.",
            "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
          },
          "referrer_id": {
            "type": "string",
            "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
            "description": "Unique referrer ID."
          },
          "object": {
            "type": "string",
            "default": "order",
            "description": "The type of the object represented by JSON. This object stores information about the `order`."
          },
          "redemptions": {
            "description": "Lists details related to the redemption.",
            "allOf": [
              {
                "$ref": "#/components/schemas/10_obj_order_object_unstacked_redemptions"
              }
            ]
          }
        }
      },
      "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"
          }
        ]
      },
      "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"
                }
              }
            }
          }
        }
      },
      "ValidationRuleAssignmentsList": {
        "type": "object",
        "description": "Validation Rule Assignments List",
        "title": "Validation Rule Assignments List",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about validation rule assignments.",
            "default": "list"
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the JSON property that contains the array of validation rule assignments.",
            "default": "data"
          },
          "data": {
            "type": "array",
            "description": "A dictionary that contains an array of validation rule assignments.",
            "items": {
              "$ref": "#/components/schemas/ValidationRuleAssignment"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of validation rule assignments."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "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"
        ]
      },
      "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`"
              }
            }
          }
        }
      },
      "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"
        ]
      },
      "Product": {
        "type": "object",
        "description": "This is an object representing a product.  \n\nThis entity should be used to map product items from your inventory management system. The aim of products is to build which reflect product-specific campaigns.",
        "title": "Product",
        "allOf": [
          {
            "$ref": "#/components/schemas/ProductWithoutSkus"
          },
          {
            "type": "object",
            "properties": {
              "skus": {
                "$ref": "#/components/schemas/SkusListForProduct"
              }
            }
          }
        ]
      },
      "Sku": {
        "title": "SKU Object",
        "type": "object",
        "description": "This is an object representing a product SKU.",
        "properties": {
          "id": {
            "type": "string",
            "example": "sku_0b1621b319d248b79f",
            "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
          },
          "source_id": {
            "type": "string",
            "nullable": true,
            "example": "sku_source_id_4",
            "description": "A unique SKU identifier from your inventory system."
          },
          "product_id": {
            "type": "string",
            "example": "prod_0b15f6b9f650c16990",
            "description": "The parent product's unique ID."
          },
          "sku": {
            "type": "string",
            "nullable": true,
            "example": "Large Pink Shirt",
            "description": "Unique user-defined SKU name."
          },
          "price": {
            "type": "integer",
            "nullable": true,
            "description": "Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`."
          },
          "currency": {
            "type": "string",
            "nullable": true,
            "description": "SKU price currency.",
            "example": "USD"
          },
          "attributes": {
            "type": "object",
            "description": "The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family."
          },
          "image_url": {
            "type": "string",
            "nullable": true,
            "description": "The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections."
          },
          "created_at": {
            "type": "string",
            "example": "2022-05-17T10:36:30.187Z",
            "description": "Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "example": "2022-05-17T10:55:09.137Z",
            "description": "Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "default": "sku",
            "description": "The type of the object represented by JSON. This object stores information about the `SKU`.",
            "enum": [
              "sku"
            ]
          }
        },
        "required": [
          "id",
          "source_id",
          "product_id",
          "sku",
          "price",
          "attributes",
          "metadata",
          "image_url",
          "created_at",
          "updated_at",
          "object"
        ]
      },
      "7_obj_redemption_object_loyalty_card_pay_with_points": {
        "type": "object",
        "description": "Defines the pay with points reward redeemed for the particular loyalty card.",
        "properties": {
          "customer": {
            "type": "object",
            "description": "Defines the customer redeeming the reward.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "source_id": {
                "type": "string",
                "description": "The merchant's customer ID if it is different from the Voucherify customer ID. It is really useful in case of an integration between multiple systems. It can be a customer ID from a CRM system, database or 3rd-party service."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "assignment_id": {
            "type": "string",
            "example": "rewa_YAIuU7AY6LNJVlUbRxSbNgiD",
            "description": "Unique reward assginment ID assigned by Voucherify."
          },
          "id": {
            "type": "string",
            "example": "rew_INt3fGH3n7xIr3ZQcq4kkUZ1",
            "description": "Unique reward ID assigned by Voucherify."
          },
          "object": {
            "type": "string",
            "default": "reward",
            "description": "Type of object represented is `reward`."
          },
          "name": {
            "type": "string",
            "description": "Reward name."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the reward was created."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the reward was updated."
          },
          "parameters": {
            "type": "object",
            "description": "These are parameters representing a Pay with Points (COIN) reward.",
            "properties": {
              "coin": {
                "type": "object",
                "description": "Defines the ratio by mapping the number of loyalty points in `points_ratio` to a predefined cash amount in `exchange_ratio`.",
                "properties": {
                  "exchange_ratio": {
                    "type": "integer",
                    "description": "The cash equivalent of the points defined in the `points_ratio` property."
                  },
                  "points_ratio": {
                    "type": "integer",
                    "description": "The number of loyalty points that will map to the predefined cash amount defined by the `exchange_ratio` property."
                  }
                }
              }
            }
          },
          "type": {
            "type": "string",
            "description": "Reward type",
            "default": "COIN",
            "enum": [
              "COIN"
            ]
          }
        },
        "title": "Pay with Points Reward"
      },
      "7_obj_redemption_object_loyalty_card_material_product": {
        "type": "object",
        "description": "Defines the product material reward redeemed for the particular loyalty card.",
        "properties": {
          "customer": {
            "type": "object",
            "description": "Defines the customer redeeming the reward.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "source_id": {
                "type": "string",
                "description": "The merchant's customer ID if it is different from the Voucherify customer ID. It is really useful in case of an integration between multiple systems. It can be a customer ID from a CRM system, database or 3rd-party service."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "assignment_id": {
            "type": "string",
            "example": "rewa_YAIuU7AY6LNJVlUbRxSbNgiD",
            "description": "Unique reward assginment ID assigned by Voucherify."
          },
          "product": {
            "description": "Details of the product redeemed as a reward.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Product"
              }
            ]
          },
          "id": {
            "type": "string",
            "example": "rew_INt3fGH3n7xIr3ZQcq4kkUZ1",
            "description": "Unique reward ID assigned by Voucherify."
          },
          "object": {
            "type": "string",
            "default": "reward",
            "description": "Type of object represented is `reward`."
          },
          "name": {
            "type": "string",
            "description": "Reward name."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the reward was created."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the reward was updated."
          },
          "parameters": {
            "type": "object",
            "description": "These are parameters representing a material reward.",
            "properties": {
              "product": {
                "type": "object",
                "description": "Defines the product redeemed as a reward.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique product ID assignedy by Voucherify of the product.",
                    "example": "prod_0b2c2ddf35150b83bb"
                  },
                  "sku_id": {
                    "type": "string",
                    "nullable": true
                  }
                }
              }
            }
          },
          "type": {
            "type": "string",
            "description": "Reward type",
            "default": "MATERIAL",
            "enum": [
              "MATERIAL"
            ]
          }
        },
        "title": "Product Material Reward"
      },
      "7_obj_redemption_object_loyalty_card_material_sku": {
        "type": "object",
        "description": "Defines the SKU material reward redeemed for the particular loyalty card.",
        "properties": {
          "customer": {
            "type": "object",
            "description": "Defines the customer redeeming the reward.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "source_id": {
                "type": "string",
                "description": "The merchant's customer ID if it is different from the Voucherify customer ID. It is really useful in case of an integration between multiple systems. It can be a customer ID from a CRM system, database or 3rd-party service."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "assignment_id": {
            "type": "string",
            "example": "rewa_YAIuU7AY6LNJVlUbRxSbNgiD",
            "description": "Unique reward assginment ID assigned by Voucherify."
          },
          "product": {
            "description": "Details of the SKU's parent product redeemed as a reward.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Product"
              }
            ]
          },
          "sku": {
            "description": "Details of the SKU redeemed as a reward.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Sku"
              }
            ]
          },
          "id": {
            "type": "string",
            "example": "rew_INt3fGH3n7xIr3ZQcq4kkUZ1",
            "description": "Unique reward ID assigned by Voucherify."
          },
          "object": {
            "type": "string",
            "default": "reward",
            "description": "Type of object represented is `reward`."
          },
          "name": {
            "type": "string",
            "description": "Reward name."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the reward was created."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the reward was updated."
          },
          "parameters": {
            "type": "object",
            "description": "These are parameters representing a material reward.",
            "properties": {
              "product": {
                "type": "object",
                "description": "Defines the SKU redeemed as a reward.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique product ID assignedy by Voucherify of the SKU's parent."
                  },
                  "sku_id": {
                    "type": "string",
                    "description": "Unique SKU ID assigned by Voucherify of the SKU redeemed as a reward."
                  }
                }
              }
            }
          },
          "type": {
            "type": "string",
            "description": "Reward type",
            "default": "MATERIAL",
            "enum": [
              "MATERIAL"
            ]
          }
        },
        "title": "SKU Material Reward"
      },
      "7_obj_redemption_object_loyalty_card_digital": {
        "type": "object",
        "description": "Defines the digital reward redeemed for the particular loyalty card.",
        "properties": {
          "customer": {
            "type": "object",
            "description": "Defines the customer redeeming the reward.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "source_id": {
                "type": "string",
                "description": "The merchant's customer ID if it is different from the Voucherify customer ID. It is really useful in case of an integration between multiple systems. It can be a customer ID from a CRM system, database or 3rd-party service."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "assignment_id": {
            "type": "string",
            "example": "rewa_YAIuU7AY6LNJVlUbRxSbNgiD",
            "description": "Unique reward assginment ID assigned by Voucherify."
          },
          "voucher": {
            "description": "Voucher object.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Voucher"
              }
            ]
          },
          "id": {
            "type": "string",
            "example": "rew_INt3fGH3n7xIr3ZQcq4kkUZ1",
            "description": "Unique reward ID assigned by Voucherify."
          },
          "object": {
            "type": "string",
            "default": "reward",
            "description": "Type of object represented is `reward`."
          },
          "name": {
            "type": "string",
            "description": "Reward name."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the reward was created."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the reward was updated."
          },
          "parameters": {
            "type": "object",
            "description": "These are parameters representing a digital reward. These can be in the form of discount coupons, gift card credits, or loyalty point credits.",
            "properties": {
              "campaign": {
                "description": "Defines the source of the digital reward.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_digital_discount_voucher"
                  },
                  {
                    "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_digital_gift_card_credits"
                  },
                  {
                    "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_digital_loyalty_card_points"
                  }
                ]
              }
            }
          },
          "type": {
            "type": "string",
            "description": "Reward type",
            "default": "CAMPAIGN",
            "enum": [
              "CAMPAIGN"
            ]
          }
        },
        "title": "Digital Reward"
      },
      "OrderItem": {
        "type": "object",
        "title": "Order Item",
        "properties": {
          "sku_id": {
            "type": "string",
            "description": "Unique identifier of the SKU. It is assigned by Voucherify."
          },
          "product_id": {
            "type": "string",
            "description": "Unique identifier of the product. It is assigned by Voucherify."
          },
          "related_object": {
            "type": "string",
            "enum": [
              "product",
              "sku"
            ],
            "description": "Used along with the source_id property, can be set to either sku or product."
          },
          "source_id": {
            "type": "string",
            "description": "The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service."
          },
          "quantity": {
            "type": "integer",
            "description": "The quantity of the particular item in the cart."
          },
          "discount_quantity": {
            "type": "integer",
            "description": "Number of dicounted items."
          },
          "initial_quantity": {
            "type": "integer",
            "description": "A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity."
          },
          "amount": {
            "type": "integer",
            "description": "The total amount of the order item (price * quantity)."
          },
          "discount_amount": {
            "type": "integer",
            "description": "Sum of all order-item-level discounts applied to the order."
          },
          "initial_amount": {
            "type": "integer",
            "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts."
          },
          "price": {
            "type": "integer",
            "description": "Unit price of an item. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "product": {
            "type": "object",
            "description": "An object containing details of the related product.",
            "properties": {
              "id": {
                "type": "string",
                "description": "A unique identifier that represents the product and is assigned by Voucherify."
              },
              "source_id": {
                "type": "string",
                "description": "The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service."
              },
              "override": {
                "type": "boolean",
                "description": "The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. Override works only for endpoints that create an order in the database."
              },
              "name": {
                "type": "string",
                "description": "Product name."
              },
              "metadata": {
                "type": "object",
                "description": "A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections."
              },
              "price": {
                "type": "number",
                "description": "Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00)."
              }
            }
          },
          "sku": {
            "type": "object",
            "description": "An object containing details of the related SKU.",
            "properties": {
              "id": {
                "type": "string",
                "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
              },
              "source_id": {
                "type": "string",
                "description": "The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service."
              },
              "override": {
                "type": "boolean",
                "description": "The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system."
              },
              "sku": {
                "type": "string",
                "description": "The SKU name."
              },
              "price": {
                "type": "number",
                "description": "SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00)."
              },
              "metadata": {
                "type": "object",
                "description": "A set of custom key/value pairs that you can attach to an order item. It can be useful for storing additional information about the order item in a structured format. It can be used to create product collections."
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to an order item. It can be useful for storing additional information about the order item in a structured format. It can be used to define business validation rules."
          }
        },
        "required": [
          "object"
        ]
      },
      "10_obj_order_object_unstacked_redemptions": {
        "type": "object",
        "title": "Unstacked Redemption",
        "description": "Redemption object representing a single redemption.",
        "properties": {
          "redemption_ID": {
            "type": "object",
            "description": "The property name is the unique redemption ID; i.e. `r_0ba186c4824e4881e1`. This object contains information about the redemption of an incentive.",
            "properties": {
              "date": {
                "type": "string",
                "description": "Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.",
                "example": "2022-09-02T17:06:56.649Z",
                "format": "date-time"
              },
              "related_object_type": {
                "type": "string",
                "description": "The source of the incentive.",
                "enum": [
                  "voucher",
                  "promotion_tier"
                ]
              },
              "related_object_id": {
                "type": "string",
                "description": "Unique ID of the related object that defines the incentive."
              },
              "related_object_parent_id": {
                "type": "string",
                "description": "Represent's the campaign ID of the voucher if the redemption was based on a voucher that was part of bulk codes generated within a campaign. In case of a promotion tier, this represents the campaign ID of the promotion tier's parent campaign."
              }
            }
          }
        }
      },
      "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"
        ]
      },
      "ValidationRuleAssignment": {
        "title": "Validation Rule Assignment",
        "type": "object",
        "description": "This is an object representing a validation rule assignment.",
        "properties": {
          "id": {
            "type": "string",
            "example": "asgm_74F7QZoYbUoljwQO",
            "description": "Validation rule assignment ID."
          },
          "rule_id": {
            "type": "string",
            "example": "val_4j7DCRm2IS59",
            "description": "Validation rule ID."
          },
          "related_object_id": {
            "type": "string",
            "example": "v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT",
            "description": "The resource ID to which the validation rule was assigned."
          },
          "related_object_type": {
            "type": "string",
            "description": "The type of resource to which the validation rule was assigned.",
            "enum": [
              "voucher",
              "campaign",
              "earning_rule",
              "reward_assignment",
              "promotion_tier",
              "distribution"
            ]
          },
          "created_at": {
            "type": "string",
            "example": "2022-02-17T08:18:15.085Z",
            "description": "Timestamp representing the date and time when the validation rule assignment was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "default": "validation_rules_assignment",
            "description": "The type of the object represented by the ID.",
            "enum": [
              "validation_rules_assignment"
            ]
          }
        },
        "required": [
          "id",
          "rule_id",
          "related_object_id",
          "related_object_type",
          "created_at",
          "object"
        ]
      },
      "VoucherAssets": {
        "title": "Voucher Assets",
        "type": "object",
        "description": "Stores links to images of QR and barcode that correspond to an encrypted voucher code.",
        "properties": {
          "qr": {
            "type": "object",
            "description": "Stores Quick Response (QR) representation of encrypted code.",
            "properties": {
              "id": {
                "type": "string",
                "example": "U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q==",
                "description": "Encrypted voucher code ID."
              },
              "url": {
                "type": "string",
                "example": "https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D",
                "description": "URL to QR code  \n\n*Optional:* Attach query parameters to base URL to customize the image of the encrypted voucher code.  \n\n- `size`: integer value from `1` to `100`  \n- `format`: string, either `png` (default) or `svg`"
              }
            }
          },
          "barcode": {
            "type": "object",
            "description": "Stores barcode representation of encrypted code.",
            "properties": {
              "id": {
                "type": "string",
                "example": "U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ==",
                "description": "Encrypted voucher code ID."
              },
              "url": {
                "type": "string",
                "example": "https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D",
                "description": "URL to barcode  \n\n*Optional:* Attach query parameters to base URL to customize the image of the encrypted voucher code.  \n\n- `size`: integer value from `1` to `100`  \n- `format`: string, either `png` (default) or `svg`"
              }
            }
          }
        }
      },
      "BusValRuleAssignment": {
        "title": "Business Validation Rule Assignment",
        "description": "Assignments of business validation rule",
        "example": {
          "id": "asgm_LnY1g7UNFA9KyDrD",
          "rule_id": "val_3gPNA6SnH4ae",
          "related_object_id": "camp_CZOnEGiZfwIKWmSjhIoIT7Ol",
          "related_object_type": "campaign",
          "object": "validation_rules_assignment",
          "validation_status": "PARTIALLY_VALID",
          "validation_omitted_rules": [
            "1"
          ]
        },
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier for a assignment"
          },
          "rule_id": {
            "type": "string",
            "description": "The unique identifier for a rule"
          },
          "related_object_id": {
            "type": "string",
            "description": "The unique identifier for a related object"
          },
          "related_object_type": {
            "type": "string",
            "description": "The type of related object"
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.",
            "example": "2022-03-09T11:19:04.819Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the object was last updated in ISO 8601 format.",
            "example": "2022-03-09T11:19:04.819Z",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "validation_rules_assignment",
            "enum": [
              "validation_rules_assignment"
            ]
          },
          "validation_status": {
            "type": "string",
            "description": "The validation status of the assignment",
            "enum": [
              "VALID",
              "PARTIALLY_VALID",
              "INVALID"
            ]
          },
          "validation_omitted_rules": {
            "type": "array",
            "description": "The list of omitted rules",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "rule_id",
          "related_object_id",
          "related_object_type",
          "object"
        ]
      },
      "ProductWithoutSkus": {
        "title": "Product without Skus Object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique product ID assigned by Voucherify.",
            "example": "prod_0b1da8105693710357"
          },
          "source_id": {
            "type": "string",
            "nullable": true,
            "example": "productSourceID16",
            "description": "Unique product source ID."
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Unique user-defined product name.",
            "example": "T-shirt"
          },
          "price": {
            "type": "integer",
            "nullable": true,
            "description": "Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`."
          },
          "attributes": {
            "type": "array",
            "description": "A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute.",
            "items": {
              "type": "string"
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections."
          },
          "image_url": {
            "type": "string",
            "nullable": true,
            "description": "The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image.",
            "example": "https://images.com/original.jpg"
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format.",
            "example": "2022-05-23T06:52:55.008Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format.",
            "example": "2022-05-23T09:24:07.405Z",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about the product.",
            "default": "product",
            "enum": [
              "product"
            ]
          }
        },
        "required": [
          "id",
          "source_id",
          "name",
          "attributes",
          "metadata",
          "object",
          "price"
        ]
      },
      "SkusListForProduct": {
        "type": "object",
        "description": "Contains information about child SKUs.",
        "title": "Skus List For Product",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about SKUs.",
            "default": "list"
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the JSON property that contains the array of SKUs.",
            "default": "data"
          },
          "data": {
            "type": "array",
            "description": "A dictionary that contains an array of SKUs.",
            "items": {
              "$ref": "#/components/schemas/Sku"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of SKUs in the product."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "7_obj_redemption_object_loyalty_card_digital_discount_voucher": {
        "type": "object",
        "title": "Discount Voucher",
        "description": "Contains information about the source of the digital reward.",
        "properties": {
          "id": {
            "type": "string",
            "example": "camp_0dJG7cCAjquzcxWmZ634bA0C",
            "description": "Unique parent campaign ID of reward."
          },
          "type": {
            "type": "string",
            "description": "Campaign type.",
            "default": "DISCOUNT_COUPONS",
            "enum": [
              "DISCOUNT_COUPONS"
            ]
          }
        }
      },
      "7_obj_redemption_object_loyalty_card_digital_gift_card_credits": {
        "type": "object",
        "title": "Gift Card",
        "description": "Contains information about the source of the digital reward.",
        "properties": {
          "id": {
            "type": "string",
            "example": "camp_0dJG7cCAjquzcxWmZ634bA0C",
            "description": "Unique parent campaign ID of reward."
          },
          "balance": {
            "type": "integer",
            "description": "The amount credited to the gift card as a reward expressed as the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "type": {
            "type": "string",
            "description": "Campaign type.",
            "default": "GIFT_VOUCHERS",
            "enum": [
              "GIFT_VOUCHERS"
            ]
          }
        }
      },
      "7_obj_redemption_object_loyalty_card_digital_loyalty_card_points": {
        "type": "object",
        "title": "Loyalty Card",
        "description": "Contains information about the source of the digital reward.",
        "properties": {
          "id": {
            "type": "string",
            "example": "camp_0dJG7cCAjquzcxWmZ634bA0C",
            "description": "Unique parent campaign ID of reward."
          },
          "balance": {
            "type": "integer",
            "description": "The number of loyalty points that is added to the loyalty card as a reward."
          },
          "type": {
            "type": "string",
            "description": "Campaign type.",
            "default": "LOYALTY_PROGRAM",
            "enum": [
              "LOYALTY_PROGRAM"
            ]
          }
        }
      },
      "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"
      }
    },
    "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`."
            }
          }
        }
      }
    }
  }
}