{
  "openapi": "3.0.1",
  "info": {
    "title": "Voucherify API - Validations",
    "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/validations": {
      "post": {
        "operationId": "validate-stacked-discounts",
        "tags": [
          "Validations"
        ],
        "summary": "Validate Stackable Discounts",
        "description": "Verify redeemables provided in the request. This method is designed for server side integration which means that it is accessible only through private keys.\n\nAPI keys with a Merchant role can't use this endpoint.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "validations"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidationsValidateRequestBody"
              },
              "examples": {
                "Sandbox onboarding validation": {
                  "value": {
                    "redeemables": [
                      {
                        "object": "voucher",
                        "id": "BLCKFRDY"
                      }
                    ],
                    "order": {
                      "amount": 5500
                    }
                  }
                },
                "1 Redeemable": {
                  "value": {
                    "customer": {
                      "source_id": "sample_customer",
                      "metadata": {
                        "key": "value"
                      }
                    },
                    "options": {
                      "expand": [
                        "order",
                        "redeemable",
                        "category"
                      ]
                    },
                    "redeemables": [
                      {
                        "object": "voucher",
                        "id": "voucher-code"
                      }
                    ],
                    "session": {
                      "type": "LOCK"
                    },
                    "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"
                      }
                    }
                  }
                },
                "5 Redeemables": {
                  "value": {
                    "customer": {
                      "source_id": "36_bob"
                    },
                    "options": {
                      "expand": [
                        "order",
                        "redeemable",
                        "category"
                      ]
                    },
                    "redeemables": [
                      {
                        "object": "voucher",
                        "id": "GNcuPKGe"
                      },
                      {
                        "object": "voucher",
                        "id": "AnsvocvP",
                        "reward": {
                          "id": "rew_EPx1hCTpqzF0HW1z9NKckZH4"
                        }
                      },
                      {
                        "object": "voucher",
                        "id": "M3X8IwW8",
                        "gift": {
                          "credits": 100
                        }
                      },
                      {
                        "object": "promotion_tier",
                        "id": "promo_DE1N30D731Tg2F6NoMwNas2W"
                      },
                      {
                        "object": "promotion_tier",
                        "id": "promo_NDHgTg4VnOLYNjk9r7WOmQxf"
                      }
                    ],
                    "session": {
                      "type": "LOCK"
                    },
                    "order": {
                      "items": [
                        {
                          "sku_id": "sku_0a3efc90375d1217e2",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0bc3bd8a4e072c5275",
                          "quantity": 1
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "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 validation. Read more in the [Stacking Rule Documentation](/orchestrate/stacking-rules).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationsValidateResponseBody"
                },
                "examples": {
                  "False": {
                    "value": {
                      "id": "valid_101740aa2869354c6d",
                      "valid": false,
                      "redeemables": [
                        {
                          "status": "INAPPLICABLE",
                          "id": "eee33463",
                          "object": "voucher",
                          "result": {
                            "error": {
                              "code": 404,
                              "key": "not_found",
                              "message": "Resource not found",
                              "details": "Cannot find voucher with id eee33463",
                              "request_id": "v-0c6c6e20dc42940f0b",
                              "resource_id": "eee33463",
                              "resource_type": "voucher"
                            }
                          }
                        },
                        {
                          "status": "SKIPPED",
                          "id": "promo_Mwy9XpA0TLctSGriM5kum0qp",
                          "object": "promotion_tier",
                          "result": {}
                        }
                      ],
                      "tracking_id": "track_VAVW6qltuo1/z+G2GI2LPw==",
                      "stacking_rules": {
                        "redeemables_limit": 30,
                        "applicable_redeemables_limit": 30,
                        "applicable_exclusive_redeemables_limit": 5,
                        "applicable_redeemables_per_category_limit": 30,
                        "applicable_redeemables_category_limits": {},
                        "exclusive_categories": [
                          "cat_0e1d0ba106c17fa350"
                        ],
                        "joint_categories": [
                          "cat_0e1d0ba99c2fff2b51"
                        ],
                        "redeemables_application_mode": "PARTIAL",
                        "redeemables_sorting_rule": "REQUESTED_ORDER",
                        "redeemables_no_effect_rule": "REDEEM_ANYWAY",
                        "no_effect_skip_categories": [
                          "cat_0e156dab8f2e43873a"
                        ],
                        "no_effect_redeem_anyway_categories": [
                          "cat_0e1d0ba106c17fa350"
                        ],
                        "redeemables_products_application_mode": "STACK",
                        "redeemables_rollback_order_mode": "WITHOUT_ORDER",
                        "grouped_redeemables_sorting_rule": "JOINT_ALWAYS_LAST"
                      }
                    }
                  },
                  "True - 5 Redeemables": {
                    "value": {
                      "valid": true,
                      "redeemables": [
                        {
                          "status": "APPLICABLE",
                          "id": "GNcuPKGe",
                          "object": "voucher",
                          "order": {
                            "amount": 2700,
                            "items_discount_amount": 1700,
                            "total_discount_amount": 1700,
                            "total_amount": 1000,
                            "items_applied_discount_amount": 1700,
                            "total_applied_discount_amount": 1700,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_s3C0nDpr0DuC7",
                                "sku_id": "sku_0a3efc90375d1217e2",
                                "quantity": 1,
                                "amount": 2000,
                                "discount_amount": 1000,
                                "applied_discount_amount": 1000,
                                "price": 2000,
                                "subtotal_amount": 1000,
                                "product": {
                                  "id": "prod_s3C0nDpr0DuC7",
                                  "source_id": "test_prod_id_2",
                                  "name": "Watchflix"
                                },
                                "sku": {
                                  "id": "sku_0a3efc90375d1217e2",
                                  "source_id": "test_standard_ultra_hd",
                                  "sku": "Premium",
                                  "price": 2000
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0bc3bd8a4e072c5275",
                                "quantity": 1,
                                "amount": 700,
                                "discount_amount": 700,
                                "applied_discount_amount": 700,
                                "price": 700,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0bc3bd8a4e072c5275",
                                  "name": "Bouquet - Romantic Roses",
                                  "price": 700
                                }
                              }
                            ],
                            "metadata": {},
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "applicable_to": {
                            "data": [
                              {
                                "object": "products_collection",
                                "id": "pc_a11pr0dUc75",
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "sku",
                                "id": "sku_0a3efc90375d1217e2",
                                "source_id": "test_standard_ultra_hd",
                                "product_id": "prod_s3C0nDpr0DuC7",
                                "product_source_id": "test_prod_id_2",
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "product",
                                "id": "prod_0bc3bd8a4e072c5275",
                                "source_id": "prod_0bc3bd8a4e072c5275",
                                "effect": "APPLY_TO_EVERY"
                              }
                            ],
                            "total": 3,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "result": {
                            "discount": {
                              "type": "AMOUNT",
                              "effect": "APPLY_TO_ITEMS",
                              "amount_off": 1000,
                              "is_dynamic": false
                            }
                          },
                          "metadata": {},
                          "categories": []
                        },
                        {
                          "status": "APPLICABLE",
                          "id": "AnsvocvP",
                          "object": "voucher",
                          "order": {
                            "amount": 2700,
                            "items_discount_amount": 1700,
                            "total_discount_amount": 1700,
                            "total_amount": 1000,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_s3C0nDpr0DuC7",
                                "sku_id": "sku_0a3efc90375d1217e2",
                                "quantity": 1,
                                "amount": 2000,
                                "discount_amount": 1000,
                                "price": 2000,
                                "subtotal_amount": 1000,
                                "product": {
                                  "id": "prod_s3C0nDpr0DuC7",
                                  "source_id": "test_prod_id_2",
                                  "name": "Watchflix"
                                },
                                "sku": {
                                  "id": "sku_0a3efc90375d1217e2",
                                  "source_id": "test_standard_ultra_hd",
                                  "sku": "Premium",
                                  "price": 2000
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0bc3bd8a4e072c5275",
                                "quantity": 1,
                                "amount": 700,
                                "discount_amount": 700,
                                "price": 700,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0bc3bd8a4e072c5275",
                                  "name": "Bouquet - Romantic Roses",
                                  "price": 700
                                }
                              }
                            ],
                            "metadata": {},
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "applicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "result": {
                            "loyalty_card": {
                              "points": 4
                            }
                          },
                          "metadata": {},
                          "categories": [
                            {
                              "id": "cat_0bb81a481615a37b5e",
                              "name": "Second",
                              "hierarchy": 2,
                              "created_at": "2022-09-20T05:58:01.561Z",
                              "object": "category"
                            }
                          ]
                        },
                        {
                          "status": "APPLICABLE",
                          "id": "M3X8IwW8",
                          "object": "voucher",
                          "order": {
                            "amount": 2700,
                            "discount_amount": 100,
                            "items_discount_amount": 1700,
                            "total_discount_amount": 1800,
                            "total_amount": 900,
                            "applied_discount_amount": 100,
                            "total_applied_discount_amount": 100,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_s3C0nDpr0DuC7",
                                "sku_id": "sku_0a3efc90375d1217e2",
                                "quantity": 1,
                                "amount": 2000,
                                "discount_amount": 1000,
                                "price": 2000,
                                "subtotal_amount": 1000,
                                "product": {
                                  "id": "prod_s3C0nDpr0DuC7",
                                  "source_id": "test_prod_id_2",
                                  "name": "Watchflix"
                                },
                                "sku": {
                                  "id": "sku_0a3efc90375d1217e2",
                                  "source_id": "test_standard_ultra_hd",
                                  "sku": "Premium",
                                  "price": 2000
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0bc3bd8a4e072c5275",
                                "quantity": 1,
                                "amount": 700,
                                "discount_amount": 700,
                                "price": 700,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0bc3bd8a4e072c5275",
                                  "name": "Bouquet - Romantic Roses",
                                  "price": 700
                                }
                              }
                            ],
                            "metadata": {},
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "applicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "result": {
                            "gift": {
                              "credits": 100
                            }
                          },
                          "metadata": {},
                          "categories": []
                        },
                        {
                          "status": "APPLICABLE",
                          "id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                          "object": "promotion_tier",
                          "order": {
                            "amount": 2700,
                            "discount_amount": 460,
                            "items_discount_amount": 1700,
                            "total_discount_amount": 2160,
                            "total_amount": 540,
                            "applied_discount_amount": 360,
                            "total_applied_discount_amount": 360,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_s3C0nDpr0DuC7",
                                "sku_id": "sku_0a3efc90375d1217e2",
                                "quantity": 1,
                                "amount": 2000,
                                "discount_amount": 1000,
                                "price": 2000,
                                "subtotal_amount": 1000,
                                "product": {
                                  "id": "prod_s3C0nDpr0DuC7",
                                  "source_id": "test_prod_id_2",
                                  "name": "Watchflix"
                                },
                                "sku": {
                                  "id": "sku_0a3efc90375d1217e2",
                                  "source_id": "test_standard_ultra_hd",
                                  "sku": "Premium",
                                  "price": 2000
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0bc3bd8a4e072c5275",
                                "quantity": 1,
                                "amount": 700,
                                "discount_amount": 700,
                                "price": 700,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0bc3bd8a4e072c5275",
                                  "name": "Bouquet - Romantic Roses",
                                  "price": 700
                                }
                              }
                            ],
                            "metadata": {},
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "applicable_to": {
                            "data": [
                              {
                                "object": "sku",
                                "id": "sku_0a3efc90375d1217e2",
                                "source_id": "test_standard_ultra_hd",
                                "product_id": "prod_s3C0nDpr0DuC7",
                                "product_source_id": "test_prod_id_2",
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "product",
                                "id": "prod_0bc3bd8a4e072c5275",
                                "source_id": "prod_0bc3bd8a4e072c5275",
                                "effect": "APPLY_TO_EVERY"
                              }
                            ],
                            "total": 2,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [
                              {
                                "object": "product",
                                "id": "prod_0b2c2ddf35150b83bb",
                                "source_id": "97",
                                "effect": "APPLY_TO_EVERY"
                              }
                            ],
                            "total": 1,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "result": {
                            "discount": {
                              "type": "PERCENT",
                              "effect": "APPLY_TO_ORDER",
                              "percent_off": 40,
                              "is_dynamic": false
                            }
                          },
                          "metadata": {}
                        },
                        {
                          "status": "APPLICABLE",
                          "id": "promo_NDHgTg4VnOLYNjk9r7WOmQxf",
                          "object": "promotion_tier",
                          "order": {
                            "amount": 2700,
                            "discount_amount": 490,
                            "items_discount_amount": 1700,
                            "total_discount_amount": 2190,
                            "total_amount": 510,
                            "applied_discount_amount": 30,
                            "total_applied_discount_amount": 30,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_s3C0nDpr0DuC7",
                                "sku_id": "sku_0a3efc90375d1217e2",
                                "quantity": 1,
                                "amount": 2000,
                                "discount_amount": 1000,
                                "price": 2000,
                                "subtotal_amount": 1000,
                                "product": {
                                  "id": "prod_s3C0nDpr0DuC7",
                                  "source_id": "test_prod_id_2",
                                  "name": "Watchflix"
                                },
                                "sku": {
                                  "id": "sku_0a3efc90375d1217e2",
                                  "source_id": "test_standard_ultra_hd",
                                  "sku": "Premium",
                                  "price": 2000
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0bc3bd8a4e072c5275",
                                "quantity": 1,
                                "amount": 700,
                                "discount_amount": 700,
                                "price": 700,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0bc3bd8a4e072c5275",
                                  "name": "Bouquet - Romantic Roses",
                                  "price": 700
                                }
                              }
                            ],
                            "metadata": {},
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "applicable_to": {
                            "data": [
                              {
                                "object": "sku",
                                "id": "sku_0a3efc90375d1217e2",
                                "source_id": "test_standard_ultra_hd",
                                "product_id": "prod_s3C0nDpr0DuC7",
                                "product_source_id": "test_prod_id_2",
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "product",
                                "id": "prod_0bc3bd8a4e072c5275",
                                "source_id": "prod_0bc3bd8a4e072c5275",
                                "effect": "APPLY_TO_EVERY"
                              }
                            ],
                            "total": 2,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [
                              {
                                "object": "product",
                                "id": "prod_0b2c2ddf35150b83bb",
                                "source_id": "97",
                                "effect": "APPLY_TO_EVERY"
                              }
                            ],
                            "total": 1,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "result": {
                            "discount": {
                              "type": "AMOUNT",
                              "effect": "APPLY_TO_ORDER",
                              "amount_off": 30,
                              "is_dynamic": false
                            }
                          },
                          "metadata": {}
                        }
                      ],
                      "order": {
                        "amount": 2700,
                        "discount_amount": 490,
                        "items_discount_amount": 1700,
                        "total_discount_amount": 2190,
                        "total_amount": 510,
                        "applied_discount_amount": 490,
                        "items_applied_discount_amount": 1700,
                        "total_applied_discount_amount": 2190,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_s3C0nDpr0DuC7",
                            "sku_id": "sku_0a3efc90375d1217e2",
                            "quantity": 1,
                            "amount": 2000,
                            "discount_amount": 1000,
                            "applied_discount_amount": 1000,
                            "price": 2000,
                            "subtotal_amount": 1000,
                            "product": {
                              "id": "prod_s3C0nDpr0DuC7",
                              "source_id": "test_prod_id_2",
                              "name": "Watchflix"
                            },
                            "sku": {
                              "id": "sku_0a3efc90375d1217e2",
                              "source_id": "test_standard_ultra_hd",
                              "sku": "Premium",
                              "price": 2000
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0bc3bd8a4e072c5275",
                            "quantity": 1,
                            "amount": 700,
                            "discount_amount": 700,
                            "applied_discount_amount": 700,
                            "price": 700,
                            "subtotal_amount": 0,
                            "product": {
                              "id": "prod_0bc3bd8a4e072c5275",
                              "name": "Bouquet - Romantic Roses",
                              "price": 700
                            }
                          }
                        ],
                        "metadata": {},
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "session": {
                        "key": "ssn_pkJfPcWAgp9WyHpA62Eky8X8SzxpKub2",
                        "type": "LOCK",
                        "ttl": 7,
                        "ttl_unit": "DAYS"
                      },
                      "stacking_rules": {
                        "redeemables_limit": 30,
                        "applicable_redeemables_limit": 30,
                        "applicable_exclusive_redeemables_limit": 5,
                        "applicable_redeemables_per_category_limit": 30,
                        "applicable_redeemables_category_limits": {},
                        "exclusive_categories": [
                          "cat_0e1d0ba106c17fa350"
                        ],
                        "joint_categories": [
                          "cat_0e1d0ba99c2fff2b51"
                        ],
                        "redeemables_application_mode": "PARTIAL",
                        "redeemables_sorting_rule": "REQUESTED_ORDER",
                        "redeemables_no_effect_rule": "REDEEM_ANYWAY",
                        "no_effect_skip_categories": [
                          "cat_0e156dab8f2e43873a"
                        ],
                        "no_effect_redeem_anyway_categories": [
                          "cat_0e1d0ba106c17fa350"
                        ],
                        "redeemables_products_application_mode": "STACK",
                        "redeemables_rollback_order_mode": "WITHOUT_ORDER",
                        "grouped_redeemables_sorting_rule": "JOINT_ALWAYS_LAST"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload is missing an `\"object\"` or `\"id\"` property in the redeemables array, if you add more than one promotion stack or attempt to join stacks with vouchers/promotion tiers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .redeemables[1] should have required property 'id'",
                      "request_id": "v-0b4ff38ab8c8164573"
                    }
                  },
                  "Duplicated Redeemables": {
                    "value": {
                      "code": 400,
                      "key": "duplicated_redeemables",
                      "message": "Duplicated redeemables detected",
                      "details": "Duplicated redeemables detected in one redemption",
                      "request_id": "v-0b4ffecfb408165300"
                    }
                  },
                  "Invalid Redeemables": {
                    "value": {
                      "code": 400,
                      "key": "invalid_redeemables",
                      "message": "Invalid redeemables",
                      "details": "Promotion Stack cannot be use with other redeemables",
                      "request_id": "v-0b5007812f48165d6b"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/{code}/validate": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCode"
          },
          "name": "code",
          "in": "path",
          "required": true,
          "description": "A code that identifies the voucher."
        }
      ],
      "post": {
        "operationId": "validate-voucher",
        "deprecated": true,
        "tags": [
          "Validations"
        ],
        "summary": "Validate Voucher",
        "description": "\n<Danger>\n\n<Badge color=\"red\">Deprecated</Badge>\n\nThis endpoint represents the deprecated version of the API responsible for voucher validation, and we do not recommend using it. The new [Stackable Discounts API](/api-reference/validations/validate-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 verify a voucher code given by a customer, you can use this method. It is designed for a server side integration, which means that is accessible only through private keys.  \n\n\n<Danger>\n\n<Badge color=\"red\">Important</Badge>\n\nThis endpoint supports the validation of a single promo code. If you need to validate more than one incentive, you can use the [Stackable discounts API](/api-reference/validations/validate-stackable-discounts). The stacking discounts API lets you validate up to 30 incentives per call. Before integrating Voucherify, choose which validation endpoint you prefer to use.\n\n</Danger>\n\n#### Gift Vouchers - validate Gift Card and control amount to redeem\nVoucherify also gives the possibility to create a gift card, which allows using credits to fulfill the order. A user can specify how many credits he wants to use from the gift card. The available balance of credits is counted based on policy rules attached to the Gift Voucher definition.  \n\nThis operation returns information about the validity of the code. Moreover, it returns a hashed source identifier which can be used as a tracking ID in future calls.\n\nIf a validation session is established, then the session details will be returned as well. Read more about sessions [here](/guides/locking-validation-session).\n\nVoucher validation might fail because of one of these reasons:\n* `voucher not found` - voucher doesn't exist or was [deleted](/api-reference/vouchers/delete-voucher)\n* `voucher expired` - voucher is out of start date - expiration date time frame\n* `voucher is disabled` - learn more about a [disabled voucher](/api-reference/vouchers/disable-voucher)\n* `customer does not match segment rules` - learn more [customer tracking](/api-reference/customers/customer-object) \n* `order does not match validation rules` - learn more about [validation rules](/api-reference/validation-rules/validation-rule-object)",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the voucher validation context using the request body parameters.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VouchersValidateRequestBody"
              },
              "examples": {
                "Free Shipping": {
                  "value": {
                    "customer": {
                      "id": "cust_4vMj8Twr5nBzvTrNCgipMb6M"
                    },
                    "order": {
                      "items": [
                        {
                          "product_id": "prod_0ba621bae5d39762ce",
                          "quantity": "1"
                        },
                        {
                          "product_id": "prod_0b661d404787ec6d3b",
                          "quantity": "1",
                          "price": 3100
                        }
                      ]
                    }
                  }
                },
                "Multiple Product Variants": {
                  "value": {
                    "customer": {
                      "source_id": "08dd9b5a-26de-44aa-a1d4-d9adfa9e8ec2"
                    },
                    "order": {
                      "id": "ord_FDdsDI3FppuiqHa4s7drZEMP"
                    }
                  }
                },
                "Unit - Add order items": {
                  "value": {
                    "customer": {
                      "source_id": "08dd9b5a-26de-44aa-a1d4-d9adfa9e8ec2"
                    },
                    "order": {
                      "source_id": "47f491d1-a697-4f92-95ca-2ba1f463efa8"
                    },
                    "session": {
                      "type": "LOCK",
                      "ttl_unit": "NANOSECONDS",
                      "ttl": 1
                    }
                  }
                },
                "Fixed": {
                  "value": {
                    "customer": {
                      "source_id": "08dd9b5a-26de-44aa-a1d4-d9adfa9e8ec2"
                    },
                    "order": {
                      "items": [
                        {
                          "source_id": "webinar_BF_sweater_pink_sweater",
                          "quantity": "1",
                          "price": 6500,
                          "related_object": "product"
                        },
                        {
                          "source_id": "webinar_BF_pants_navy_sweat_pants",
                          "quantity": "1",
                          "price": 6000,
                          "related_object": "product"
                        },
                        {
                          "source_id": "5h1pp1ng",
                          "quantity": "1",
                          "price": 2000,
                          "related_object": "product"
                        },
                        {
                          "source_id": "webinar_BF_pants_gray_sweat_pants",
                          "quantity": "2",
                          "price": 5000,
                          "related_object": "product"
                        },
                        {
                          "source_id": "webinar_BF_sweater_pearl",
                          "quantity": "2",
                          "price": 11000,
                          "related_object": "product"
                        }
                      ]
                    },
                    "session": {
                      "type": "LOCK"
                    }
                  }
                },
                "Percentage": {
                  "value": {
                    "customer": {
                      "source_id": "your_customer_source_ID",
                      "name": "Bob Smith",
                      "description": "A frequent customer",
                      "email": "bob.smith@email.com",
                      "phone": "+1 933 222 3333",
                      "address": {
                        "city": "New York",
                        "country": "United States",
                        "line_1": "123 Main St.",
                        "line_2": "APT 3 BLG 5",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {
                        "lang": "en",
                        "test": true
                      },
                      "birthday": "1960-12-01"
                    },
                    "order": {
                      "items": [
                        {
                          "source_id": "webinar_BF_sweater_pink_sweater",
                          "quantity": "1",
                          "price": 6500,
                          "related_object": "product"
                        },
                        {
                          "source_id": "webinar_BF_pants_navy_sweat_pants",
                          "quantity": "1",
                          "price": 6000,
                          "related_object": "product"
                        },
                        {
                          "source_id": "5h1pp1ng",
                          "quantity": "1",
                          "price": 2000,
                          "related_object": "product"
                        },
                        {
                          "source_id": "webinar_BF_pants_gray_sweat_pants",
                          "quantity": "2",
                          "price": 5000,
                          "related_object": "product"
                        },
                        {
                          "source_id": "webinar_BF_sweater_pearl",
                          "quantity": "2",
                          "price": 11000,
                          "related_object": "product"
                        }
                      ]
                    },
                    "session": {
                      "type": "LOCK",
                      "key": "your_custom_key",
                      "ttl_unit": "NANOSECONDS",
                      "ttl": 1
                    }
                  }
                },
                "Amount": {
                  "value": {
                    "customer": {
                      "source_id": "your_customer_source_ID",
                      "name": "Bob Smith",
                      "description": "A frequent customer",
                      "email": "bob.smith@email.com",
                      "phone": "+1 933 222 3333",
                      "address": {
                        "city": "New York",
                        "country": "United States",
                        "line_1": "123 Main St.",
                        "line_2": "APT 3 BLG 5",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {
                        "lang": "en",
                        "test": true
                      },
                      "birthday": "1960-12-01"
                    },
                    "order": {
                      "items": [
                        {
                          "source_id": "webinar_BF_sweater_pink_sweater",
                          "quantity": "1",
                          "price": 6500,
                          "related_object": "product"
                        },
                        {
                          "source_id": "webinar_BF_pants_navy_sweat_pants",
                          "quantity": "1",
                          "price": 6000,
                          "related_object": "product"
                        },
                        {
                          "source_id": "5h1pp1ng",
                          "quantity": "1",
                          "price": 2000,
                          "related_object": "product"
                        },
                        {
                          "source_id": "webinar_BF_pants_gray_sweat_pants",
                          "quantity": "2",
                          "price": 5000,
                          "related_object": "product"
                        },
                        {
                          "source_id": "webinar_BF_sweater_pearl",
                          "quantity": "2",
                          "price": 11000,
                          "related_object": "product"
                        }
                      ],
                      "metadata": {
                        "currency": "EUR"
                      }
                    },
                    "session": {
                      "type": "LOCK",
                      "key": "your_custom_key",
                      "ttl_unit": "NANOSECONDS",
                      "ttl": 1
                    }
                  }
                },
                "Loyalty Card": {
                  "value": {
                    "order": {
                      "items": [
                        {
                          "product_id": "prod_0bd76fc58f8038b043",
                          "quantity": "1"
                        },
                        {
                          "product_id": "prod_0bd76bd0e204542738",
                          "quantity": "1"
                        }
                      ]
                    },
                    "reward": {
                      "id": "rew_4ZF6Y69U2PXE3GLIZxfozgg1",
                      "points": 10
                    }
                  }
                },
                "Gift Card": {
                  "value": {
                    "customer": {
                      "source_id": "286401dc-6f4c-4ebb-8ca2-9f78b3e84c7d"
                    },
                    "order": {
                      "amount": 1000,
                      "metadata": {
                        "currency": "USD"
                      }
                    },
                    "gift": {
                      "credits": 2
                    },
                    "metadata": {
                      "location_id": [
                        "L1"
                      ]
                    }
                  }
                },
                "Referral Code": {
                  "value": {
                    "customer": {
                      "source_id": "earlybirdcust"
                    },
                    "order": {
                      "amount": 20000,
                      "metadata": {
                        "currency": "USD"
                      }
                    },
                    "metadata": {
                      "location_id": [
                        "L1"
                      ]
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns information whether the voucher is valid in the context of the parameter values provided in the request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersValidateResponseBody"
                },
                "examples": {
                  "False": {
                    "value": {
                      "valid": false,
                      "reason": "redemption does not match validation rules",
                      "error": {
                        "code": 400,
                        "key": "redemption_rules_violated",
                        "message": "redemption does not match validation rules",
                        "details": "Gift Card cannot be redeemed because of violated validation rules: val_wvipKm99CJuL",
                        "request_id": "v-0bccef7a9585cf63b6"
                      },
                      "tracking_id": "track_ZGPtmYcM+Mw=",
                      "code": "vBQvYFEM",
                      "metadata": {}
                    }
                  },
                  "Free Shipping": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_rynPcKGW2z7+kd2Vry4p12+Rx2NtyXZyiApdGWEXPrdX+44Fg6LRBQ==",
                      "order": {
                        "amount": 4300,
                        "total_amount": 4300,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0ba621bae5d39762ce",
                            "quantity": 1,
                            "amount": 1200,
                            "price": 1200,
                            "subtotal_amount": 1200,
                            "product": {
                              "id": "prod_0ba621bae5d39762ce",
                              "source_id": "arabica_plus",
                              "name": "Arabica Coffee 250g",
                              "price": 1200
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0b661d404787ec6d3b",
                            "quantity": 1,
                            "amount": 3100,
                            "price": 3100,
                            "subtotal_amount": 3100,
                            "product": {
                              "id": "prod_0b661d404787ec6d3b",
                              "source_id": "7717f389-4621-4c7a-a6db-d4acfe051a97",
                              "name": "Kate Moss by Mario Testino"
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_5h1pp1ng",
                            "quantity": 1,
                            "discount_quantity": 1,
                            "initial_quantity": 0,
                            "product": {
                              "id": "prod_5h1pp1ng",
                              "source_id": "5h1pp1ng",
                              "name": "Shipping"
                            }
                          }
                        ],
                        "metadata": {},
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "code": "Test - Discount - Free Shipping",
                      "discount": {
                        "type": "UNIT",
                        "effect": "ADD_MISSING_ITEMS",
                        "unit_off": 1,
                        "unit_type": "prod_5h1pp1ng",
                        "product": {
                          "id": "prod_5h1pp1ng",
                          "source_id": "5h1pp1ng",
                          "name": "Shipping"
                        }
                      },
                      "metadata": {}
                    }
                  },
                  "Multiple Product Varients": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_rynPcKGW2z7+kd2Vry4p12+Rx2NtyXZyiApdGWEXPrdX+44Fg6LRBQ==",
                      "order": {
                        "id": "ord_FDdsDI3FppuiqHa4s7drZEMP",
                        "source_id": "47f491d1-a697-4f92-95ca-2ba1f463efa8",
                        "created_at": "2022-09-21T13:09:25.773Z",
                        "updated_at": "2022-09-21T13:09:27.139Z",
                        "status": "PAID",
                        "amount": 237300,
                        "initial_amount": 28000,
                        "discount_amount": 8400,
                        "items_discount_amount": 209300,
                        "total_discount_amount": 217700,
                        "total_amount": 19600,
                        "items_applied_discount_amount": 209300,
                        "total_applied_discount_amount": 209300,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "A0E20000000295J",
                            "related_object": "sku",
                            "product_id": "prod_0b661d31134b299cc2",
                            "quantity": 1,
                            "amount": 9500,
                            "price": 9500,
                            "subtotal_amount": 9500,
                            "product": {
                              "id": "prod_0b661d31134b299cc2",
                              "source_id": "2c446063-d582-4d7e-9651-23971b3e56f7",
                              "name": "Keychain D‘Amico"
                            },
                            "sku": {
                              "id": "sku_0b661d6265cb29ae52",
                              "source_id": "A0E20000000295J",
                              "sku": "Keychain D‘Amico",
                              "metadata": {},
                              "price": 9500
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "M0E20000000EAT6",
                            "related_object": "sku",
                            "quantity": 1,
                            "amount": 18500,
                            "price": 18500,
                            "subtotal_amount": 18500,
                            "product": {
                              "name": "Jogging pants Paolo Pecora light grey"
                            },
                            "sku": {
                              "sku": "Jogging pants Paolo Pecora light grey",
                              "metadata": {}
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_5h1pp1ng",
                            "quantity": 1,
                            "discount_quantity": 1,
                            "initial_quantity": 0,
                            "product": {
                              "id": "prod_5h1pp1ng",
                              "source_id": "5h1pp1ng",
                              "name": "Shipping"
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0b661d4bd2c7ec7d1f",
                            "sku_id": "sku_0b661e41fc8d35a8f7",
                            "quantity": 3,
                            "discount_quantity": 3,
                            "initial_quantity": 0,
                            "amount": 89700,
                            "discount_amount": 89700,
                            "initial_amount": 0,
                            "applied_discount_amount": 89700,
                            "price": 29900,
                            "subtotal_amount": 0,
                            "product": {
                              "id": "prod_0b661d4bd2c7ec7d1f",
                              "source_id": "facdc58f-ff7c-40c4-a22f-ab0a084a9107",
                              "name": "Casual jacket Michael Kors beige"
                            },
                            "sku": {
                              "id": "sku_0b661e41fc8d35a8f7",
                              "source_id": "M0E20000000ELDG",
                              "sku": "Casual jacket Michael Kors beige",
                              "price": 29900
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0b661d4bd2c7ec7d1f",
                            "sku_id": "sku_0b661e41fc8d35a8f6",
                            "quantity": 4,
                            "discount_quantity": 4,
                            "initial_quantity": 0,
                            "amount": 119600,
                            "discount_amount": 119600,
                            "initial_amount": 0,
                            "applied_discount_amount": 119600,
                            "price": 29900,
                            "subtotal_amount": 0,
                            "product": {
                              "id": "prod_0b661d4bd2c7ec7d1f",
                              "source_id": "facdc58f-ff7c-40c4-a22f-ab0a084a9107",
                              "name": "Casual jacket Michael Kors beige"
                            },
                            "sku": {
                              "id": "sku_0b661e41fc8d35a8f6",
                              "source_id": "M0E20000000ELDF",
                              "sku": "Casual jacket Michael Kors beige",
                              "price": 29900
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
                          "object": "customer"
                        },
                        "customer_id": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0bb9c69ca9d5a364b2": {
                            "date": "2022-09-21T13:09:25.799Z",
                            "related_object_type": "redemption",
                            "related_object_id": "r_0bb9c69ca9d5a364b2",
                            "stacked": [
                              "r_0bb9c69ca9d5a364b3",
                              "r_0bb9c69ca9d5a364b4"
                            ]
                          }
                        }
                      },
                      "code": "Test - Discount - Unit - Multiple - Product Variants",
                      "discount": {
                        "type": "UNIT",
                        "effect": "ADD_MANY_ITEMS",
                        "units": [
                          {
                            "effect": "ADD_MISSING_ITEMS",
                            "unit_off": 3,
                            "unit_type": "sku_0b661e41fc8d35a8f7",
                            "sku": {
                              "id": "sku_0b661e41fc8d35a8f7",
                              "source_id": "M0E20000000ELDG",
                              "sku": "Casual jacket Michael Kors beige"
                            },
                            "product": {
                              "id": "prod_0b661d4bd2c7ec7d1f",
                              "source_id": "facdc58f-ff7c-40c4-a22f-ab0a084a9107",
                              "name": "Casual jacket Michael Kors beige"
                            }
                          },
                          {
                            "effect": "ADD_NEW_ITEMS",
                            "unit_off": 4,
                            "unit_type": "sku_0b661e41fc8d35a8f6",
                            "sku": {
                              "id": "sku_0b661e41fc8d35a8f6",
                              "source_id": "M0E20000000ELDF",
                              "sku": "Casual jacket Michael Kors beige"
                            },
                            "product": {
                              "id": "prod_0b661d4bd2c7ec7d1f",
                              "source_id": "facdc58f-ff7c-40c4-a22f-ab0a084a9107",
                              "name": "Casual jacket Michael Kors beige"
                            }
                          }
                        ]
                      },
                      "metadata": {}
                    }
                  },
                  "Unit - Add order items": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_rynPcKGW2z7+kd2Vry4p12+Rx2NtyXZyiApdGWEXPrdX+44Fg6LRBQ==",
                      "session": {
                        "key": "ssn_K7DV3RbAGNCRVrPNZxJfld3FdwAQwOGl",
                        "type": "LOCK",
                        "ttl": 1,
                        "ttl_unit": "NANOSECONDS"
                      },
                      "order": {
                        "id": "ord_FDdsDI3FppuiqHa4s7drZEMP",
                        "source_id": "47f491d1-a697-4f92-95ca-2ba1f463efa8",
                        "created_at": "2022-09-21T13:09:25.773Z",
                        "updated_at": "2022-09-21T13:09:27.139Z",
                        "status": "PAID",
                        "amount": 117700,
                        "initial_amount": 28000,
                        "discount_amount": 8400,
                        "items_discount_amount": 89700,
                        "total_discount_amount": 98100,
                        "total_amount": 19600,
                        "items_applied_discount_amount": 89700,
                        "total_applied_discount_amount": 89700,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "A0E20000000295J",
                            "related_object": "sku",
                            "product_id": "prod_0b661d31134b299cc2",
                            "quantity": 1,
                            "amount": 9500,
                            "price": 9500,
                            "subtotal_amount": 9500,
                            "product": {
                              "id": "prod_0b661d31134b299cc2",
                              "source_id": "2c446063-d582-4d7e-9651-23971b3e56f7",
                              "name": "Keychain D‘Amico"
                            },
                            "sku": {
                              "id": "sku_0b661d6265cb29ae52",
                              "source_id": "A0E20000000295J",
                              "sku": "Keychain D‘Amico",
                              "metadata": {},
                              "price": 9500
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "M0E20000000EAT6",
                            "related_object": "sku",
                            "quantity": 1,
                            "amount": 18500,
                            "price": 18500,
                            "subtotal_amount": 18500,
                            "product": {
                              "name": "Jogging pants Paolo Pecora light grey"
                            },
                            "sku": {
                              "sku": "Jogging pants Paolo Pecora light grey",
                              "metadata": {}
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_5h1pp1ng",
                            "quantity": 1,
                            "discount_quantity": 1,
                            "initial_quantity": 0,
                            "product": {
                              "id": "prod_5h1pp1ng",
                              "source_id": "5h1pp1ng",
                              "name": "Shipping"
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0b661d4bd2c7ec7d1f",
                            "sku_id": "sku_0b661e41fc8d35a8f8",
                            "quantity": 3,
                            "discount_quantity": 3,
                            "initial_quantity": 0,
                            "amount": 89700,
                            "discount_amount": 89700,
                            "initial_amount": 0,
                            "applied_discount_amount": 89700,
                            "price": 29900,
                            "subtotal_amount": 0,
                            "product": {
                              "id": "prod_0b661d4bd2c7ec7d1f",
                              "source_id": "facdc58f-ff7c-40c4-a22f-ab0a084a9107",
                              "name": "Casual jacket Michael Kors beige"
                            },
                            "sku": {
                              "id": "sku_0b661e41fc8d35a8f8",
                              "source_id": "M0E20000000ELDH",
                              "sku": "Casual jacket Michael Kors beige",
                              "price": 29900
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
                          "object": "customer"
                        },
                        "customer_id": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0bb9c69ca9d5a364b2": {
                            "date": "2022-09-21T13:09:25.799Z",
                            "related_object_type": "redemption",
                            "related_object_id": "r_0bb9c69ca9d5a364b2",
                            "stacked": [
                              "r_0bb9c69ca9d5a364b3",
                              "r_0bb9c69ca9d5a364b4"
                            ]
                          }
                        }
                      },
                      "code": "Test - Discount - Unit - Add new order items",
                      "discount": {
                        "type": "UNIT",
                        "effect": "ADD_NEW_ITEMS",
                        "unit_off": 3,
                        "unit_type": "sku_0b661e41fc8d35a8f8",
                        "sku": {
                          "id": "sku_0b661e41fc8d35a8f8",
                          "source_id": "M0E20000000ELDH",
                          "sku": "Casual jacket Michael Kors beige"
                        },
                        "product": {
                          "id": "prod_0b661d4bd2c7ec7d1f",
                          "source_id": "facdc58f-ff7c-40c4-a22f-ab0a084a9107",
                          "name": "Casual jacket Michael Kors beige"
                        }
                      },
                      "metadata": {}
                    }
                  },
                  "Fixed": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [
                          {
                            "object": "product",
                            "id": "prod_5h1pp1ng",
                            "source_id": "5h1pp1ng",
                            "price": 2000,
                            "price_formula": "IF(ORDER_AMOUNT > 400;0;20)",
                            "effect": "APPLY_TO_EVERY"
                          },
                          {
                            "object": "products_collection",
                            "id": "pc_2KWKXn09Dk8neCfymqd4xOq8",
                            "price": 99900,
                            "price_formula": "IF(ORDER_AMOUNT > 300;ORDER_ITEM_PRICE * 0.8;ORDER_ITEM_PRICE)",
                            "effect": "APPLY_TO_EVERY"
                          },
                          {
                            "object": "products_collection",
                            "id": "pc_x7HELQo52g2uI6nDuuOTRjAW",
                            "price": 99900,
                            "price_formula": "IF(ORDER_AMOUNT > 200;ORDER_ITEM_PRICE * 0.9;ORDER_ITEM_PRICE)",
                            "effect": "APPLY_TO_EVERY"
                          },
                          {
                            "object": "product",
                            "id": "prod_0bd76ca337954ca116",
                            "source_id": "webinar_BF_sweater_pink_sweater",
                            "price": 99900,
                            "price_formula": "IF(ORDER_AMOUNT > 300;ORDER_ITEM_PRICE * 0.8;ORDER_ITEM_PRICE)",
                            "effect": "APPLY_TO_EVERY"
                          },
                          {
                            "object": "product",
                            "id": "prod_0bd76bd0e204542738",
                            "source_id": "webinar_BF_pants_navy_sweat_pants",
                            "price": 99900,
                            "price_formula": "IF(ORDER_AMOUNT > 200;ORDER_ITEM_PRICE * 0.9;ORDER_ITEM_PRICE)",
                            "effect": "APPLY_TO_EVERY"
                          },
                          {
                            "object": "product",
                            "id": "prod_0bd76b8656956a183f",
                            "source_id": "webinar_BF_pants_gray_sweat_pants",
                            "price": 99900,
                            "price_formula": "IF(ORDER_AMOUNT > 200;ORDER_ITEM_PRICE * 0.9;ORDER_ITEM_PRICE)",
                            "effect": "APPLY_TO_EVERY"
                          },
                          {
                            "object": "product",
                            "id": "prod_0bd76f59f98617518e",
                            "source_id": "webinar_BF_sweater_pearl",
                            "price": 99900,
                            "price_formula": "IF(ORDER_AMOUNT > 300;ORDER_ITEM_PRICE * 0.8;ORDER_ITEM_PRICE)",
                            "effect": "APPLY_TO_EVERY"
                          }
                        ],
                        "total": 7,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_rynPcKGW2z7+kd2Vry4p12+Rx2NtyXZyiApdGWEXPrdX+44Fg6LRBQ==",
                      "session": {
                        "key": "ssn_u8rvi3Ac70S5ZRELWrxYsR2bnolpVWNg",
                        "type": "LOCK",
                        "ttl": 7,
                        "ttl_unit": "DAYS"
                      },
                      "order": {
                        "amount": 46500,
                        "items_discount_amount": 9300,
                        "total_discount_amount": 9300,
                        "total_amount": 37200,
                        "items_applied_discount_amount": 9300,
                        "total_applied_discount_amount": 9300,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_sweater_pink_sweater",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 6500,
                            "discount_amount": 1300,
                            "applied_discount_amount": 1300,
                            "price": 6500,
                            "subtotal_amount": 5200,
                            "product": {
                              "id": "prod_0bd76ca337954ca116",
                              "source_id": "webinar_BF_sweater_pink_sweater",
                              "name": "Pink Sweater",
                              "price": 6500
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_pants_navy_sweat_pants",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 6000,
                            "discount_amount": 600,
                            "applied_discount_amount": 600,
                            "price": 6000,
                            "subtotal_amount": 5400,
                            "product": {
                              "id": "prod_0bd76bd0e204542738",
                              "source_id": "webinar_BF_pants_navy_sweat_pants",
                              "name": "Navy Sweat Pants",
                              "price": 6000
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "5h1pp1ng",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 2000,
                            "discount_amount": 2000,
                            "applied_discount_amount": 2000,
                            "price": 2000,
                            "subtotal_amount": 0,
                            "product": {
                              "id": "prod_5h1pp1ng",
                              "source_id": "5h1pp1ng",
                              "name": "Shipping",
                              "price": 0
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_pants_gray_sweat_pants",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 10000,
                            "discount_amount": 1000,
                            "applied_discount_amount": 1000,
                            "price": 5000,
                            "subtotal_amount": 9000,
                            "product": {
                              "id": "prod_0bd76b8656956a183f",
                              "source_id": "webinar_BF_pants_gray_sweat_pants",
                              "name": "Gray Sweat Pants",
                              "price": 5000
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_sweater_pearl",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 22000,
                            "discount_amount": 4400,
                            "applied_discount_amount": 4400,
                            "price": 11000,
                            "subtotal_amount": 17600,
                            "product": {
                              "id": "prod_0bd76f59f98617518e",
                              "source_id": "webinar_BF_sweater_pearl",
                              "name": "Pearl Sweater",
                              "price": 11000
                            }
                          }
                        ],
                        "metadata": {},
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "code": "SPENDMOREGETMORE-DaIXFJvn",
                      "discount": {
                        "type": "FIXED",
                        "effect": "APPLY_TO_ITEMS"
                      },
                      "metadata": {
                        "shoutout": "Order more than 200€ to get 10% off pants, more than 300€ to get 20% off sweaters, and more than 400€ to get free shipping."
                      },
                      "campaign": "SPENDMOREGETMORE",
                      "campaign_id": "camp_Nwb2mppeDTtk23s1FVo6riwp"
                    }
                  },
                  "Voucher expired": {
                    "value": {
                      "valid": false,
                      "reason": "voucher expired",
                      "error": {
                        "code": 400,
                        "key": "voucher_expired",
                        "message": "voucher expired",
                        "details": "EarlyBird-tB6zCApA",
                        "request_id": "v-0be43067028abb6ca8"
                      },
                      "tracking_id": "track_4Wb/eeza4PDXKElxYR/QtlDQOVFpY9mP",
                      "code": "EarlyBird-tB6zCApA",
                      "metadata": {
                        "shoutout": "Get an early bird special. The earlier you order, the better discount you will get."
                      }
                    }
                  },
                  "Percentage": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_4Wb/eeza4PDXKElxYR/QtlDQOVFpY9mP",
                      "session": {
                        "key": "your_custom_key",
                        "type": "LOCK",
                        "ttl": 1,
                        "ttl_unit": "NANOSECONDS"
                      },
                      "order": {
                        "amount": 46500,
                        "discount_amount": 4650,
                        "total_discount_amount": 4650,
                        "total_amount": 41850,
                        "applied_discount_amount": 4650,
                        "total_applied_discount_amount": 4650,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_sweater_pink_sweater",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 6500,
                            "price": 6500,
                            "subtotal_amount": 6500,
                            "product": {
                              "id": "prod_0bd76ca337954ca116",
                              "source_id": "webinar_BF_sweater_pink_sweater",
                              "name": "Pink Sweater",
                              "price": 6500
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_pants_navy_sweat_pants",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 6000,
                            "price": 6000,
                            "subtotal_amount": 6000,
                            "product": {
                              "id": "prod_0bd76bd0e204542738",
                              "source_id": "webinar_BF_pants_navy_sweat_pants",
                              "name": "Navy Sweat Pants",
                              "price": 6000
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "5h1pp1ng",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 2000,
                            "price": 2000,
                            "subtotal_amount": 2000,
                            "product": {
                              "id": "prod_5h1pp1ng",
                              "source_id": "5h1pp1ng",
                              "name": "Shipping",
                              "price": 0
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_pants_gray_sweat_pants",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 10000,
                            "price": 5000,
                            "subtotal_amount": 10000,
                            "product": {
                              "id": "prod_0bd76b8656956a183f",
                              "source_id": "webinar_BF_pants_gray_sweat_pants",
                              "name": "Gray Sweat Pants",
                              "price": 5000
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_sweater_pearl",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 22000,
                            "price": 11000,
                            "subtotal_amount": 22000,
                            "product": {
                              "id": "prod_0bd76f59f98617518e",
                              "source_id": "webinar_BF_sweater_pearl",
                              "name": "Pearl Sweater",
                              "price": 11000
                            }
                          }
                        ],
                        "metadata": {},
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "code": "EarlyBird-tB6zCApA",
                      "discount": {
                        "type": "PERCENT",
                        "effect": "APPLY_TO_ORDER",
                        "percent_off": 10
                      },
                      "expiration_date": "2022-10-29T00:00:00.000Z",
                      "metadata": {
                        "shoutout": "Get an early bird special. The earlier you order, the better discount you will get."
                      },
                      "campaign": "Webinar - Early Bird Scenario",
                      "campaign_id": "camp_z1g3iFqQe5qiZ9TTYFVpMwC0"
                    }
                  },
                  "Amount": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_4Wb/eeza4PDXKElxYR/QtlDQOVFpY9mP",
                      "session": {
                        "key": "your_custom_key",
                        "type": "LOCK",
                        "ttl": 1,
                        "ttl_unit": "NANOSECONDS"
                      },
                      "order": {
                        "amount": 46500,
                        "discount_amount": 1000,
                        "total_discount_amount": 1000,
                        "total_amount": 45500,
                        "applied_discount_amount": 1000,
                        "total_applied_discount_amount": 1000,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_sweater_pink_sweater",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 6500,
                            "price": 6500,
                            "subtotal_amount": 6500,
                            "product": {
                              "id": "prod_0bd76ca337954ca116",
                              "source_id": "webinar_BF_sweater_pink_sweater",
                              "name": "Pink Sweater",
                              "price": 6500
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_pants_navy_sweat_pants",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 6000,
                            "price": 6000,
                            "subtotal_amount": 6000,
                            "product": {
                              "id": "prod_0bd76bd0e204542738",
                              "source_id": "webinar_BF_pants_navy_sweat_pants",
                              "name": "Navy Sweat Pants",
                              "price": 6000
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "5h1pp1ng",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 2000,
                            "price": 2000,
                            "subtotal_amount": 2000,
                            "product": {
                              "id": "prod_5h1pp1ng",
                              "source_id": "5h1pp1ng",
                              "name": "Shipping",
                              "price": 0
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_pants_gray_sweat_pants",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 10000,
                            "price": 5000,
                            "subtotal_amount": 10000,
                            "product": {
                              "id": "prod_0bd76b8656956a183f",
                              "source_id": "webinar_BF_pants_gray_sweat_pants",
                              "name": "Gray Sweat Pants",
                              "price": 5000
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_sweater_pearl",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 22000,
                            "price": 11000,
                            "subtotal_amount": 22000,
                            "product": {
                              "id": "prod_0bd76f59f98617518e",
                              "source_id": "webinar_BF_sweater_pearl",
                              "name": "Pearl Sweater",
                              "price": 11000
                            }
                          }
                        ],
                        "metadata": {
                          "currency": "EUR"
                        },
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "code": "PAYINEUROS",
                      "discount": {
                        "type": "AMOUNT",
                        "effect": "APPLY_TO_ORDER",
                        "amount_off": 1000
                      },
                      "metadata": {
                        "shoutout": "Pay in euros to get 10 Euros off, any other currency to get 5 off in that currency."
                      }
                    }
                  },
                  "Loyalty points exceeded": {
                    "value": {
                      "valid": false,
                      "reason": "loyalty card points exceeded",
                      "error": {
                        "code": 400,
                        "key": "loyalty_card_points_exceeded",
                        "message": "loyalty card points exceeded",
                        "details": "LOYALTY-CARD-ng3Kb9tM",
                        "request_id": "v-0be434ae35cabb018a"
                      },
                      "tracking_id": "track_Mcg5qK0jIStHAopLoM+nM6ua9crMFQrLt+qSe2YCbmTrTT8932kSlg==",
                      "code": "LOYALTY-CARD-ng3Kb9tM",
                      "metadata": {}
                    }
                  },
                  "Loyalty Card": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_Mcg5qK0jIStHAopLoM+nM6ua9crMFQrLt+qSe2YCbmTrTT8932kSlg==",
                      "order": {
                        "amount": 14500,
                        "discount_amount": 50,
                        "total_discount_amount": 50,
                        "total_amount": 14450,
                        "applied_discount_amount": 50,
                        "total_applied_discount_amount": 50,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0bd76fc58f8038b043",
                            "quantity": 1,
                            "amount": 8500,
                            "price": 8500,
                            "subtotal_amount": 8500,
                            "product": {
                              "id": "prod_0bd76fc58f8038b043",
                              "source_id": "webinar_BF_sweater_yellow",
                              "name": "Yellow Sweater",
                              "price": 8500
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0bd76bd0e204542738",
                            "quantity": 1,
                            "amount": 6000,
                            "price": 6000,
                            "subtotal_amount": 6000,
                            "product": {
                              "id": "prod_0bd76bd0e204542738",
                              "source_id": "webinar_BF_pants_navy_sweat_pants",
                              "name": "Navy Sweat Pants",
                              "price": 6000
                            }
                          }
                        ],
                        "metadata": {},
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "code": "LOYALTY-CARD-ng3Kb9tM",
                      "loyalty": {
                        "points_cost": 10
                      },
                      "reward": {
                        "id": "rew_4ZF6Y69U2PXE3GLIZxfozgg1",
                        "assignment_id": "rewa_WkeBlLhj0sRae70J5AAvLbmy",
                        "points": 10
                      },
                      "metadata": {},
                      "campaign": "Loyalty Campaign",
                      "campaign_id": "camp_ZNb23Xtw1WuGCm7gdax84PUi"
                    }
                  },
                  "Voucher disabled": {
                    "value": {
                      "valid": false,
                      "reason": "voucher is disabled",
                      "error": {
                        "code": 400,
                        "key": "voucher_disabled",
                        "message": "voucher is disabled",
                        "details": "GIFT-CARD-kW4aEsfB",
                        "request_id": "v-0be43817d7121a437d"
                      },
                      "tracking_id": "track_Mcg5qK0jIStHAopLoM+nM6ua9crMFQrLt+qSe2YCbmTrTT8932kSlg==",
                      "code": "GIFT-CARD-kW4aEsfB",
                      "metadata": {}
                    }
                  },
                  "Gift Card": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_Mcg5qK0jIStHAopLoM+nM6ua9crMFQrLt+qSe2YCbmTrTT8932kSlg==",
                      "order": {
                        "amount": 1000,
                        "discount_amount": 2,
                        "total_discount_amount": 2,
                        "total_amount": 998,
                        "applied_discount_amount": 2,
                        "total_applied_discount_amount": 2,
                        "metadata": {
                          "currency": "USD"
                        },
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "code": "GIFT-CARD-kW4aEsfB",
                      "gift": {
                        "amount": 32000,
                        "balance": 21500,
                        "effect": "APPLY_TO_ORDER"
                      },
                      "metadata": {},
                      "campaign": "Gift Card Campaign",
                      "campaign_id": "camp_ZjoZEdmnyUCPYwMPN0IVbvDK"
                    }
                  },
                  "Cannot be redeemed by referrer": {
                    "value": {
                      "valid": false,
                      "reason": "voucher cannot be redeemed by referrer",
                      "error": {
                        "code": 400,
                        "key": "referrer_not_permitted_to_redeem",
                        "message": "voucher cannot be redeemed by referrer",
                        "details": "REFERRAL-CODE-OxBakPYf",
                        "request_id": "v-0be43a8a110abb1bd3"
                      },
                      "tracking_id": "track_Mcg5qK0jIStHAopLoM+nM6ua9crMFQrLt+qSe2YCbmTrTT8932kSlg==",
                      "code": "REFERRAL-CODE-OxBakPYf",
                      "metadata": {}
                    }
                  },
                  "Referral Code": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_p6hPsnZj2VSvyXDjH9o6aQ==",
                      "order": {
                        "amount": 20000,
                        "discount_amount": 6000,
                        "total_discount_amount": 6000,
                        "total_amount": 14000,
                        "applied_discount_amount": 6000,
                        "total_applied_discount_amount": 6000,
                        "metadata": {
                          "currency": "USD"
                        },
                        "referrer": {
                          "id": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
                          "object": "customer"
                        },
                        "customer_id": null,
                        "referrer_id": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
                        "object": "order"
                      },
                      "code": "REFERRAL-CODE-OxBakPYf",
                      "discount": {
                        "type": "PERCENT",
                        "effect": "APPLY_TO_ORDER",
                        "percent_off": 30
                      },
                      "metadata": {},
                      "campaign": "Referral Campaign",
                      "campaign_id": "camp_TnOf5NB4Jtjxwoq38WckMJfy"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if request body is missing parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_error"
                },
                "examples": {
                  "Missing reward": {
                    "value": {
                      "code": 400,
                      "key": "missing_reward",
                      "message": "Missing reward",
                      "details": "A reward is required when redeeming a LOYALTY_CARD",
                      "request_id": "v-0bcb925c6d90f7f8fc",
                      "error": {
                        "message": "Missing reward = please add one."
                      }
                    }
                  },
                  "Missing Parameter": {
                    "value": {
                      "code": 400,
                      "key": "missing_order_items_amount",
                      "message": "Missing applicable order items",
                      "details": "At least one applicable order item with amount is required to redeem this GIFT_VOUCHER",
                      "request_id": "v-0bcccfd04085cf2540",
                      "error": {
                        "message": "Request should contain an amount for the item."
                      }
                    }
                  },
                  "Metadata Validation Failed": {
                    "value": {
                      "code": 400,
                      "key": "metadata_validation_failed",
                      "message": "Metadata validation failed",
                      "details": "location_id: must be an array, and every element: must be a string, must be equal to one of L1,L2,L3 (actual value is 'L1')",
                      "request_id": "v-0bcced27715305d3fa"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/promotions/validation": {
      "post": {
        "operationId": "validate-promotions",
        "deprecated": true,
        "tags": [
          "Validations"
        ],
        "summary": "Validate Promotions",
        "description": "\n<Danger>\n\n<Badge color=\"red\">Deprecated</Badge>\n\nThis endpoint represents the deprecated version of the API responsible for qualification, and we do not recommend using it. The new [Qualifications API](/api-reference/qualifications/check-eligibility) introduces additional features and improvements while maintaining backward compatibility. Developers are encouraged to migrate to the latest version to take advantage of the latest enhancements and bug fixes. No updates will be provided to the deprecated endpoint.\n\n</Danger>\n\n \n<Danger>\n\n<Badge color=\"red\">Limitation</Badge>\n\nOnly the first 150 most recent promotion tiers are checked for eligibility. Older promotion tiers are ignored and not returned.\n\n</Danger>\n\n Use this method to get valid promotions for a given customer and order.\n\n### Advanced validation filters\n\nYou can narrow down a validation to a specific promotion ID or tier metadata.",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "audienceRulesOnly",
            "description": "If you add a query param AudienceRulesOnly=true, the request will be validated against customer-related rules only, the rest of attached limits and rules will be ignored."
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ParameterFiltersValidatePromotions"
            },
            "style": "deepObject",
            "explode": true,
            "description": "Filter conditions."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "promotions"
            ]
          }
        ],
        "requestBody": {
          "description": "Provide the customer and order context.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/6_req_validate_promotion"
              },
              "examples": {
                "Example": {
                  "value": {
                    "customer": {
                      "source_id": "source-id",
                      "metadata": {
                        "key": "value"
                      }
                    },
                    "options": {
                      "expand": [
                        "category"
                      ]
                    },
                    "order": {
                      "amount": 10000,
                      "items": [
                        {
                          "product_id": "product-id",
                          "quantity": "1",
                          "price": 10000,
                          "related_object": "product",
                          "product": {
                            "metadata": {
                              "key": "value"
                            }
                          }
                        }
                      ]
                    },
                    "metadata": {
                      "key": "value"
                    }
                  }
                },
                "Customer Rules Only": {
                  "value": {
                    "customer": {
                      "id": "cust_gN9KgORZECfdhG9qT6n82Zr7"
                    },
                    "order": {
                      "items": [
                        {
                          "product_id": "prod_0a9f9ab4ab019a42d5",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0a9f9aeddb019a42db",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0a9f9ab4ab019a42d5",
                          "quantity": "1"
                        },
                        {
                          "sku_id": "sku_0b7d7dfb090be5c619",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0b72b0bd64d198e3ae",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0b7d7c4e814be5c502",
                          "quantity": 1
                        }
                      ],
                      "metadata": {
                        "payment_mean": [
                          "credit-card"
                        ]
                      }
                    },
                    "options": {
                      "expand": [
                        "category"
                      ]
                    }
                  }
                },
                "Campaign Specific": {
                  "value": {
                    "customer": {
                      "source_id": "test-user@email.com"
                    },
                    "order": {
                      "items": [
                        {
                          "product_id": "prod_0a9f9ab4ab019a42d5",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0a9f9aeddb019a42db",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0a9f9ab4ab019a42d5",
                          "quantity": "1"
                        },
                        {
                          "sku_id": "sku_0b7d7dfb090be5c619",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0b72b0bd64d198e3ae",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0b7d7c4e814be5c502",
                          "quantity": 1
                        }
                      ],
                      "metadata": {
                        "payment_mean": [
                          "credit-card"
                        ]
                      }
                    },
                    "options": {
                      "expand": [
                        "category"
                      ]
                    },
                    "metadata": {
                      "store_names": "Store 1 - New York - Broadway"
                    }
                  }
                },
                "Promotion Tier Metadata": {
                  "value": {
                    "customer": {
                      "name": "Joe McDonald",
                      "email": "joey@email.com",
                      "source_id": "123_source_id"
                    },
                    "order": {
                      "items": [
                        {
                          "product_id": "prod_0a9f9ab4ab019a42d5",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0a9f9aeddb019a42db",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0a9f9ab4ab019a42d5",
                          "quantity": "1"
                        },
                        {
                          "sku_id": "sku_0b7d7dfb090be5c619",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0b72b0bd64d198e3ae",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0b7d7c4e814be5c502",
                          "quantity": 1
                        }
                      ],
                      "metadata": {
                        "payment_mean": [
                          "credit-card"
                        ]
                      }
                    },
                    "options": {
                      "expand": [
                        "category"
                      ]
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns a list of valid promotions for a given context (customer and order). You can then choose which promotion to apply, i.e. the highest discount amount.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/6_res_validate_promotion"
                },
                "examples": {
                  "Customer Rules Only": {
                    "value": {
                      "valid": true,
                      "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                      "promotions": [
                        {
                          "valid": true,
                          "applicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                          "order": {
                            "amount": 9351000,
                            "initial_amount": 72100,
                            "items_discount_amount": 9340400,
                            "total_discount_amount": 9340400,
                            "total_amount": 10600,
                            "items_applied_discount_amount": 9340400,
                            "total_applied_discount_amount": 9340400,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9aeddb019a42db",
                                "quantity": 1,
                                "amount": 3100,
                                "price": 3100,
                                "subtotal_amount": 3100,
                                "product": {
                                  "id": "prod_0a9f9aeddb019a42db",
                                  "name": "Blue T-Shirt",
                                  "price": 3100
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619",
                                "quantity": 23,
                                "discount_quantity": 22,
                                "initial_quantity": 1,
                                "amount": 39100,
                                "discount_amount": 37400,
                                "initial_amount": 1700,
                                "applied_discount_amount": 37400,
                                "price": 1700,
                                "subtotal_amount": 1700,
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1",
                                  "price": 2100
                                },
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1",
                                  "price": 1700
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b0bd64d198e3ae",
                                "quantity": 222,
                                "discount_quantity": 222,
                                "initial_quantity": 1,
                                "amount": 333000,
                                "discount_amount": 333000,
                                "initial_amount": 1500,
                                "applied_discount_amount": 333000,
                                "price": 1500,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage",
                                  "price": 1500
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7c4e814be5c502",
                                "quantity": 111,
                                "discount_quantity": 111,
                                "initial_quantity": 1,
                                "amount": 6660000,
                                "discount_amount": 6660000,
                                "initial_amount": 60000,
                                "applied_discount_amount": 6660000,
                                "price": 60000,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0b7d7c4e814be5c502",
                                  "source_id": "prod_1",
                                  "name": "Apple iPhone 12",
                                  "price": 60000
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0bae2dc5a090fd0184",
                                "sku_id": "sku_0bae3b28f610fd0da1",
                                "quantity": 11,
                                "discount_quantity": 11,
                                "initial_quantity": 0,
                                "amount": 2310000,
                                "discount_amount": 2310000,
                                "initial_amount": 0,
                                "applied_discount_amount": 2310000,
                                "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": {
                              "payment_mean": [
                                "credit-card"
                              ]
                            },
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "id": "promo_ByIIAHC1Mz9ouJsitzAWsush",
                          "name": "Multiple",
                          "discount": {
                            "type": "UNIT",
                            "effect": "ADD_MANY_ITEMS",
                            "units": [
                              {
                                "effect": "ADD_MISSING_ITEMS",
                                "unit_off": 11,
                                "unit_type": "sku_0bae3b28f610fd0da1",
                                "sku": {
                                  "id": "sku_0bae3b28f610fd0da1",
                                  "source_id": "first_product_sku_1",
                                  "sku": "Samsung phone 256GB"
                                },
                                "product": {
                                  "id": "prod_0bae2dc5a090fd0184",
                                  "source_id": "first_product",
                                  "name": "Samsung Phone 1"
                                }
                              },
                              {
                                "effect": "ADD_NEW_ITEMS",
                                "unit_off": 22,
                                "unit_type": "sku_0b7d7dfb090be5c619",
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1"
                                },
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1"
                                }
                              },
                              {
                                "effect": "ADD_MISSING_ITEMS",
                                "unit_off": 111,
                                "unit_type": "prod_0b7d7c4e814be5c502",
                                "product": {
                                  "id": "prod_0b7d7c4e814be5c502",
                                  "source_id": "prod_1",
                                  "name": "Apple iPhone 12"
                                }
                              },
                              {
                                "effect": "ADD_MISSING_ITEMS",
                                "unit_off": 222,
                                "unit_type": "prod_0b72b0bd64d198e3ae",
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage"
                                }
                              }
                            ]
                          },
                          "campaign": {
                            "id": "camp_JtoaZ8Qgpf6FkMAy2wWiOJWH",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "object": "campaign"
                          },
                          "hierarchy": 1,
                          "discount_amount": 9340400,
                          "applied_discount_amount": 9340400,
                          "metadata": {},
                          "object": "promotion_tier"
                        },
                        {
                          "valid": true,
                          "applicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                          "order": {
                            "amount": 9522100,
                            "initial_amount": 72100,
                            "items_discount_amount": 9450000,
                            "total_discount_amount": 9450000,
                            "total_amount": 72100,
                            "items_applied_discount_amount": 9450000,
                            "total_applied_discount_amount": 9450000,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9aeddb019a42db",
                                "quantity": 1,
                                "amount": 3100,
                                "price": 3100,
                                "subtotal_amount": 3100,
                                "product": {
                                  "id": "prod_0a9f9aeddb019a42db",
                                  "name": "Blue T-Shirt",
                                  "price": 3100
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619",
                                "quantity": 1,
                                "amount": 1700,
                                "price": 1700,
                                "subtotal_amount": 1700,
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1",
                                  "price": 2100
                                },
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1",
                                  "price": 1700
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b0bd64d198e3ae",
                                "quantity": 1,
                                "amount": 1500,
                                "price": 1500,
                                "subtotal_amount": 1500,
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage",
                                  "price": 1500
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7c4e814be5c502",
                                "quantity": 1,
                                "amount": 60000,
                                "price": 60000,
                                "subtotal_amount": 60000,
                                "product": {
                                  "id": "prod_0b7d7c4e814be5c502",
                                  "source_id": "prod_1",
                                  "name": "Apple iPhone 12",
                                  "price": 60000
                                }
                              },
                              {
                                "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": {
                              "payment_mean": [
                                "credit-card"
                              ]
                            },
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "id": "promo_ZWkx6R0I1Ts3N9HL4kfTdxOm",
                          "name": "Add new SKU",
                          "discount": {
                            "type": "UNIT",
                            "effect": "ADD_NEW_ITEMS",
                            "unit_off": 45,
                            "unit_type": "sku_0bae3b28f610fd0da1",
                            "sku": {
                              "id": "sku_0bae3b28f610fd0da1",
                              "source_id": "first_product_sku_1",
                              "sku": "Samsung phone 256GB"
                            },
                            "product": {
                              "id": "prod_0bae2dc5a090fd0184",
                              "source_id": "first_product",
                              "name": "Samsung Phone 1"
                            }
                          },
                          "campaign": {
                            "id": "camp_40LC42P5NFbkkD4RWoJ4btks",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "object": "campaign"
                          },
                          "hierarchy": 4,
                          "discount_amount": 9450000,
                          "applied_discount_amount": 9450000,
                          "metadata": {},
                          "object": "promotion_tier"
                        },
                        {
                          "valid": true,
                          "applicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                          "order": {
                            "amount": 109500,
                            "initial_amount": 72100,
                            "items_discount_amount": 39100,
                            "total_discount_amount": 39100,
                            "total_amount": 70400,
                            "items_applied_discount_amount": 39100,
                            "total_applied_discount_amount": 39100,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9aeddb019a42db",
                                "quantity": 1,
                                "amount": 3100,
                                "price": 3100,
                                "subtotal_amount": 3100,
                                "product": {
                                  "id": "prod_0a9f9aeddb019a42db",
                                  "name": "Blue T-Shirt",
                                  "price": 3100
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619",
                                "quantity": 23,
                                "discount_quantity": 23,
                                "initial_quantity": 1,
                                "amount": 39100,
                                "discount_amount": 39100,
                                "initial_amount": 1700,
                                "applied_discount_amount": 39100,
                                "price": 1700,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1",
                                  "price": 2100
                                },
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1",
                                  "price": 1700
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b0bd64d198e3ae",
                                "quantity": 1,
                                "amount": 1500,
                                "price": 1500,
                                "subtotal_amount": 1500,
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage",
                                  "price": 1500
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7c4e814be5c502",
                                "quantity": 1,
                                "amount": 60000,
                                "price": 60000,
                                "subtotal_amount": 60000,
                                "product": {
                                  "id": "prod_0b7d7c4e814be5c502",
                                  "source_id": "prod_1",
                                  "name": "Apple iPhone 12",
                                  "price": 60000
                                }
                              }
                            ],
                            "metadata": {
                              "payment_mean": [
                                "credit-card"
                              ]
                            },
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "id": "promo_NcdD0zLo6FUhKWpNrNuP3Pte",
                          "name": "Add missing SKU",
                          "discount": {
                            "type": "UNIT",
                            "effect": "ADD_MISSING_ITEMS",
                            "unit_off": 23,
                            "unit_type": "sku_0b7d7dfb090be5c619",
                            "sku": {
                              "id": "sku_0b7d7dfb090be5c619",
                              "source_id": "ComicBook_1",
                              "sku": "Comics1"
                            },
                            "product": {
                              "id": "prod_0b7d7dfb05cbe5c616",
                              "source_id": "Books",
                              "name": "Comic Books1"
                            }
                          },
                          "campaign": {
                            "id": "camp_40LC42P5NFbkkD4RWoJ4btks",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "object": "campaign"
                          },
                          "hierarchy": 3,
                          "discount_amount": 39100,
                          "applied_discount_amount": 39100,
                          "metadata": {},
                          "object": "promotion_tier"
                        },
                        {
                          "valid": true,
                          "applicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                          "order": {
                            "amount": 76100,
                            "initial_amount": 72100,
                            "items_discount_amount": 4000,
                            "total_discount_amount": 4000,
                            "total_amount": 72100,
                            "items_applied_discount_amount": 4000,
                            "total_applied_discount_amount": 4000,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9aeddb019a42db",
                                "quantity": 1,
                                "amount": 3100,
                                "price": 3100,
                                "subtotal_amount": 3100,
                                "product": {
                                  "id": "prod_0a9f9aeddb019a42db",
                                  "name": "Blue T-Shirt",
                                  "price": 3100
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619",
                                "quantity": 1,
                                "amount": 1700,
                                "price": 1700,
                                "subtotal_amount": 1700,
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1",
                                  "price": 2100
                                },
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1",
                                  "price": 1700
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b0bd64d198e3ae",
                                "quantity": 1,
                                "amount": 1500,
                                "price": 1500,
                                "subtotal_amount": 1500,
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage",
                                  "price": 1500
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7c4e814be5c502",
                                "quantity": 1,
                                "amount": 60000,
                                "price": 60000,
                                "subtotal_amount": 60000,
                                "product": {
                                  "id": "prod_0b7d7c4e814be5c502",
                                  "source_id": "prod_1",
                                  "name": "Apple iPhone 12",
                                  "price": 60000
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b00ffed198e344",
                                "quantity": 8,
                                "discount_quantity": 8,
                                "initial_quantity": 0,
                                "amount": 4000,
                                "discount_amount": 4000,
                                "initial_amount": 0,
                                "applied_discount_amount": 4000,
                                "price": 500,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0b72b00ffed198e344",
                                  "source_id": "roses_1",
                                  "name": "Bouquet - Romantic Roses",
                                  "price": 500
                                }
                              }
                            ],
                            "metadata": {
                              "payment_mean": [
                                "credit-card"
                              ]
                            },
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "id": "promo_nGr1SWuy9vduABkbbJkl8cHb",
                          "name": "Add new order items",
                          "banner": "Add Romantic Roses",
                          "discount": {
                            "type": "UNIT",
                            "effect": "ADD_NEW_ITEMS",
                            "unit_off": 8,
                            "unit_type": "prod_0b72b00ffed198e344",
                            "product": {
                              "id": "prod_0b72b00ffed198e344",
                              "source_id": "roses_1",
                              "name": "Bouquet - Romantic Roses"
                            }
                          },
                          "campaign": {
                            "id": "camp_40LC42P5NFbkkD4RWoJ4btks",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "object": "campaign"
                          },
                          "hierarchy": 2,
                          "discount_amount": 4000,
                          "applied_discount_amount": 4000,
                          "metadata": {},
                          "object": "promotion_tier"
                        },
                        {
                          "valid": true,
                          "applicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                          "order": {
                            "amount": 78100,
                            "initial_amount": 72100,
                            "items_discount_amount": 7500,
                            "total_discount_amount": 7500,
                            "total_amount": 70600,
                            "items_applied_discount_amount": 7500,
                            "total_applied_discount_amount": 7500,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9aeddb019a42db",
                                "quantity": 1,
                                "amount": 3100,
                                "price": 3100,
                                "subtotal_amount": 3100,
                                "product": {
                                  "id": "prod_0a9f9aeddb019a42db",
                                  "name": "Blue T-Shirt",
                                  "price": 3100
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619",
                                "quantity": 1,
                                "amount": 1700,
                                "price": 1700,
                                "subtotal_amount": 1700,
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1",
                                  "price": 2100
                                },
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1",
                                  "price": 1700
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b0bd64d198e3ae",
                                "quantity": 5,
                                "discount_quantity": 5,
                                "initial_quantity": 1,
                                "amount": 7500,
                                "discount_amount": 7500,
                                "initial_amount": 1500,
                                "applied_discount_amount": 7500,
                                "price": 1500,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage",
                                  "price": 1500
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7c4e814be5c502",
                                "quantity": 1,
                                "amount": 60000,
                                "price": 60000,
                                "subtotal_amount": 60000,
                                "product": {
                                  "id": "prod_0b7d7c4e814be5c502",
                                  "source_id": "prod_1",
                                  "name": "Apple iPhone 12",
                                  "price": 60000
                                }
                              }
                            ],
                            "metadata": {
                              "payment_mean": [
                                "credit-card"
                              ]
                            },
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "id": "promo_R50x0A66V6jmPhM7YYOcFZfL",
                          "name": "Add missing order items",
                          "banner": "Add Boho Vintage",
                          "discount": {
                            "type": "UNIT",
                            "effect": "ADD_MISSING_ITEMS",
                            "unit_off": 5,
                            "unit_type": "prod_0b72b0bd64d198e3ae",
                            "product": {
                              "id": "prod_0b72b0bd64d198e3ae",
                              "source_id": "vase_1",
                              "name": "Vase - Boho Vintage"
                            }
                          },
                          "campaign": {
                            "id": "camp_40LC42P5NFbkkD4RWoJ4btks",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "object": "campaign"
                          },
                          "hierarchy": 1,
                          "discount_amount": 7500,
                          "applied_discount_amount": 7500,
                          "metadata": {},
                          "object": "promotion_tier"
                        },
                        {
                          "valid": true,
                          "applicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                          "order": {
                            "amount": 72100,
                            "total_amount": 72100,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9aeddb019a42db",
                                "quantity": 1,
                                "amount": 3100,
                                "price": 3100,
                                "subtotal_amount": 3100,
                                "product": {
                                  "id": "prod_0a9f9aeddb019a42db",
                                  "name": "Blue T-Shirt",
                                  "price": 3100
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619",
                                "quantity": 1,
                                "amount": 1700,
                                "price": 1700,
                                "subtotal_amount": 1700,
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1",
                                  "price": 2100
                                },
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1",
                                  "price": 1700
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b0bd64d198e3ae",
                                "quantity": 1,
                                "amount": 1500,
                                "price": 1500,
                                "subtotal_amount": 1500,
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage",
                                  "price": 1500
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7c4e814be5c502",
                                "quantity": 1,
                                "amount": 60000,
                                "price": 60000,
                                "subtotal_amount": 60000,
                                "product": {
                                  "id": "prod_0b7d7c4e814be5c502",
                                  "source_id": "prod_1",
                                  "name": "Apple iPhone 12",
                                  "price": 60000
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_5h1pp1ng",
                                "quantity": 1,
                                "discount_quantity": 1,
                                "initial_quantity": 0,
                                "product": {
                                  "id": "prod_5h1pp1ng",
                                  "source_id": "5h1pp1ng",
                                  "name": "Shipping"
                                }
                              }
                            ],
                            "metadata": {
                              "payment_mean": [
                                "credit-card"
                              ]
                            },
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "id": "promo_jp2l6wRcTL4cARG5E8XRo42A",
                          "name": "Get",
                          "banner": "Free shipping",
                          "discount": {
                            "type": "UNIT",
                            "effect": "ADD_MISSING_ITEMS",
                            "unit_off": 1,
                            "unit_type": "prod_5h1pp1ng",
                            "product": {
                              "id": "prod_5h1pp1ng",
                              "source_id": "5h1pp1ng",
                              "name": "Shipping"
                            }
                          },
                          "campaign": {
                            "id": "camp_wCEdu2igBcyv7CNna9ughGKc",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "object": "campaign"
                          },
                          "hierarchy": 1,
                          "metadata": {
                            "has_budget": true,
                            "audience_restricted": false
                          },
                          "object": "promotion_tier"
                        },
                        {
                          "valid": true,
                          "applicable_to": {
                            "data": [
                              {
                                "object": "products_collection",
                                "id": "pc_a11pr0dUc75",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "product",
                                "id": "prod_0a9f9ab4ab019a42d5",
                                "source_id": "prod_0a9f9ab4ab019a42d5",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "product",
                                "id": "prod_0a9f9aeddb019a42db",
                                "source_id": "prod_0a9f9aeddb019a42db",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "sku",
                                "id": "sku_0b7d7dfb090be5c619",
                                "source_id": "ComicBook_1",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "product_source_id": "Books",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "product",
                                "id": "prod_0b72b0bd64d198e3ae",
                                "source_id": "vase_1",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "product",
                                "id": "prod_0b7d7c4e814be5c502",
                                "source_id": "prod_1",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              }
                            ],
                            "total": 6,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                          "order": {
                            "amount": 72100,
                            "items_discount_amount": 67300,
                            "total_discount_amount": 67300,
                            "total_amount": 4800,
                            "items_applied_discount_amount": 67300,
                            "total_applied_discount_amount": 67300,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "discount_amount": 2100,
                                "applied_discount_amount": 2100,
                                "price": 2900,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9aeddb019a42db",
                                "quantity": 1,
                                "amount": 3100,
                                "discount_amount": 2300,
                                "applied_discount_amount": 2300,
                                "price": 3100,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0a9f9aeddb019a42db",
                                  "name": "Blue T-Shirt",
                                  "price": 3100
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "discount_amount": 2100,
                                "applied_discount_amount": 2100,
                                "price": 2900,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619",
                                "quantity": 1,
                                "amount": 1700,
                                "discount_amount": 900,
                                "applied_discount_amount": 900,
                                "price": 1700,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1",
                                  "price": 2100
                                },
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1",
                                  "price": 1700
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b0bd64d198e3ae",
                                "quantity": 1,
                                "amount": 1500,
                                "discount_amount": 700,
                                "applied_discount_amount": 700,
                                "price": 1500,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage",
                                  "price": 1500
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7c4e814be5c502",
                                "quantity": 1,
                                "amount": 60000,
                                "discount_amount": 59200,
                                "applied_discount_amount": 59200,
                                "price": 60000,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0b7d7c4e814be5c502",
                                  "source_id": "prod_1",
                                  "name": "Apple iPhone 12",
                                  "price": 60000
                                }
                              }
                            ],
                            "metadata": {
                              "payment_mean": [
                                "credit-card"
                              ]
                            },
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "id": "promo_WEloFBBJ8JJDCxrtR1FPy6t1",
                          "name": "Get Amount Off",
                          "banner": "Every product is worth 8",
                          "discount": {
                            "type": "FIXED",
                            "effect": "APPLY_TO_ITEMS"
                          },
                          "campaign": {
                            "id": "camp_Ds2u0MSFGuKhDuR3jEa5dHBx",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "object": "campaign"
                          },
                          "hierarchy": 2,
                          "discount_amount": 67300,
                          "applied_discount_amount": 67300,
                          "metadata": {
                            "has_budget": true,
                            "audience_restricted": false
                          },
                          "object": "promotion_tier"
                        }
                      ]
                    }
                  },
                  "Campaign specific": {
                    "value": {
                      "valid": true,
                      "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                      "promotions": [
                        {
                          "valid": true,
                          "applicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                          "order": {
                            "amount": 72100,
                            "discount_amount": 100,
                            "total_discount_amount": 100,
                            "total_amount": 72000,
                            "applied_discount_amount": 100,
                            "total_applied_discount_amount": 100,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9aeddb019a42db",
                                "quantity": 1,
                                "amount": 3100,
                                "price": 3100,
                                "subtotal_amount": 3100,
                                "product": {
                                  "id": "prod_0a9f9aeddb019a42db",
                                  "name": "Blue T-Shirt",
                                  "price": 3100
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619",
                                "quantity": 1,
                                "amount": 1700,
                                "price": 1700,
                                "subtotal_amount": 1700,
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1",
                                  "price": 2100
                                },
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1",
                                  "price": 1700
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b0bd64d198e3ae",
                                "quantity": 1,
                                "amount": 1500,
                                "price": 1500,
                                "subtotal_amount": 1500,
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage",
                                  "price": 1500
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7c4e814be5c502",
                                "quantity": 1,
                                "amount": 60000,
                                "price": 60000,
                                "subtotal_amount": 60000,
                                "product": {
                                  "id": "prod_0b7d7c4e814be5c502",
                                  "source_id": "prod_1",
                                  "name": "Apple iPhone 12",
                                  "price": 60000
                                }
                              }
                            ],
                            "metadata": {
                              "payment_mean": [
                                "credit-card"
                              ]
                            },
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "id": "promo_g83qUzYZpfX0OMAFOVoQuOYG",
                          "name": "1",
                          "discount": {
                            "type": "AMOUNT",
                            "effect": "APPLY_TO_ORDER",
                            "amount_off": 100
                          },
                          "campaign": {
                            "id": "camp_nYcAyjFXmEaBU0nB7EQ4hVTr",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "categories": [
                              {
                                "id": "cat_0b5f66bc97ce5be3c6",
                                "name": "Sixth",
                                "hierarchy": 6,
                                "created_at": "2022-07-13T08:27:14.926Z",
                                "object": "category"
                              }
                            ],
                            "object": "campaign"
                          },
                          "hierarchy": 1,
                          "discount_amount": 100,
                          "applied_discount_amount": 100,
                          "metadata": {},
                          "object": "promotion_tier"
                        }
                      ]
                    }
                  },
                  "Promotion Tier Metadata": {
                    "value": {
                      "valid": true,
                      "tracking_id": "track_oNgl7cQ8tVTg/fIVul/GKA==",
                      "promotions": [
                        {
                          "valid": true,
                          "applicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "tracking_id": "track_oNgl7cQ8tVTg/fIVul/GKA==",
                          "order": {
                            "amount": 72100,
                            "total_amount": 72100,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9aeddb019a42db",
                                "quantity": 1,
                                "amount": 3100,
                                "price": 3100,
                                "subtotal_amount": 3100,
                                "product": {
                                  "id": "prod_0a9f9aeddb019a42db",
                                  "name": "Blue T-Shirt",
                                  "price": 3100
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619",
                                "quantity": 1,
                                "amount": 1700,
                                "price": 1700,
                                "subtotal_amount": 1700,
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1",
                                  "price": 2100
                                },
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1",
                                  "price": 1700
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b0bd64d198e3ae",
                                "quantity": 1,
                                "amount": 1500,
                                "price": 1500,
                                "subtotal_amount": 1500,
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage",
                                  "price": 1500
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7c4e814be5c502",
                                "quantity": 1,
                                "amount": 60000,
                                "price": 60000,
                                "subtotal_amount": 60000,
                                "product": {
                                  "id": "prod_0b7d7c4e814be5c502",
                                  "source_id": "prod_1",
                                  "name": "Apple iPhone 12",
                                  "price": 60000
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_5h1pp1ng",
                                "quantity": 1,
                                "discount_quantity": 1,
                                "initial_quantity": 0,
                                "product": {
                                  "id": "prod_5h1pp1ng",
                                  "source_id": "5h1pp1ng",
                                  "name": "Shipping"
                                }
                              }
                            ],
                            "metadata": {
                              "payment_mean": [
                                "credit-card"
                              ]
                            },
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "id": "promo_jp2l6wRcTL4cARG5E8XRo42A",
                          "name": "Get",
                          "banner": "Free shipping",
                          "discount": {
                            "type": "UNIT",
                            "effect": "ADD_MISSING_ITEMS",
                            "unit_off": 1,
                            "unit_type": "prod_5h1pp1ng",
                            "product": {
                              "id": "prod_5h1pp1ng",
                              "source_id": "5h1pp1ng",
                              "name": "Shipping"
                            }
                          },
                          "campaign": {
                            "id": "camp_wCEdu2igBcyv7CNna9ughGKc",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "object": "campaign"
                          },
                          "hierarchy": 1,
                          "metadata": {
                            "has_budget": true,
                            "audience_restricted": false
                          },
                          "object": "promotion_tier"
                        },
                        {
                          "valid": true,
                          "applicable_to": {
                            "data": [
                              {
                                "object": "products_collection",
                                "id": "pc_a11pr0dUc75",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "product",
                                "id": "prod_0a9f9ab4ab019a42d5",
                                "source_id": "prod_0a9f9ab4ab019a42d5",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "product",
                                "id": "prod_0a9f9aeddb019a42db",
                                "source_id": "prod_0a9f9aeddb019a42db",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "sku",
                                "id": "sku_0b7d7dfb090be5c619",
                                "source_id": "ComicBook_1",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "product_source_id": "Books",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "product",
                                "id": "prod_0b72b0bd64d198e3ae",
                                "source_id": "vase_1",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "product",
                                "id": "prod_0b7d7c4e814be5c502",
                                "source_id": "prod_1",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              }
                            ],
                            "total": 6,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "tracking_id": "track_oNgl7cQ8tVTg/fIVul/GKA==",
                          "order": {
                            "amount": 72100,
                            "items_discount_amount": 67300,
                            "total_discount_amount": 67300,
                            "total_amount": 4800,
                            "items_applied_discount_amount": 67300,
                            "total_applied_discount_amount": 67300,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "discount_amount": 2100,
                                "applied_discount_amount": 2100,
                                "price": 2900,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9aeddb019a42db",
                                "quantity": 1,
                                "amount": 3100,
                                "discount_amount": 2300,
                                "applied_discount_amount": 2300,
                                "price": 3100,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0a9f9aeddb019a42db",
                                  "name": "Blue T-Shirt",
                                  "price": 3100
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "discount_amount": 2100,
                                "applied_discount_amount": 2100,
                                "price": 2900,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619",
                                "quantity": 1,
                                "amount": 1700,
                                "discount_amount": 900,
                                "applied_discount_amount": 900,
                                "price": 1700,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1",
                                  "price": 2100
                                },
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1",
                                  "price": 1700
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b0bd64d198e3ae",
                                "quantity": 1,
                                "amount": 1500,
                                "discount_amount": 700,
                                "applied_discount_amount": 700,
                                "price": 1500,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage",
                                  "price": 1500
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7c4e814be5c502",
                                "quantity": 1,
                                "amount": 60000,
                                "discount_amount": 59200,
                                "applied_discount_amount": 59200,
                                "price": 60000,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0b7d7c4e814be5c502",
                                  "source_id": "prod_1",
                                  "name": "Apple iPhone 12",
                                  "price": 60000
                                }
                              }
                            ],
                            "metadata": {
                              "payment_mean": [
                                "credit-card"
                              ]
                            },
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "id": "promo_WEloFBBJ8JJDCxrtR1FPy6t1",
                          "name": "Get Amount Off",
                          "banner": "Every product is worth 8",
                          "discount": {
                            "type": "FIXED",
                            "effect": "APPLY_TO_ITEMS"
                          },
                          "campaign": {
                            "id": "camp_Ds2u0MSFGuKhDuR3jEa5dHBx",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "object": "campaign"
                          },
                          "hierarchy": 2,
                          "discount_amount": 67300,
                          "applied_discount_amount": 67300,
                          "metadata": {
                            "has_budget": true,
                            "audience_restricted": false
                          },
                          "object": "promotion_tier"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/promotions/tiers/{tierId}/validation": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterString"
          },
          "name": "tierId",
          "in": "path",
          "required": true,
          "description": "Unique promotion tier ID."
        }
      ],
      "post": {
        "operationId": "validate-promotion-tier",
        "deprecated": true,
        "tags": [
          "Validations"
        ],
        "summary": "Validate Promotion Tier",
        "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/validations/validate-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 verify whether the promotion tier discount can be applied to an order. This method is designed for server side integration which means that it is accessible only through private keys.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "promotions"
            ]
          }
        ],
        "requestBody": {
          "description": "Provide the customer and order context.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/6_req_validate_promotion_tier"
              },
              "examples": {
                "Using IDs": {
                  "value": {
                    "customer": {
                      "source_id": "test-user@email.io"
                    },
                    "order": {
                      "id": "ord_71uW6qnB5CFZlLHCeCNC4qtS"
                    }
                  }
                },
                "Using Redemption Metadata": {
                  "value": {
                    "customer": {
                      "source_id": "test-user@email.com"
                    },
                    "order": {
                      "amount": 200000,
                      "items": [
                        {
                          "product_id": "prod_anJ03RZZq74z4v",
                          "quantity": 2
                        },
                        {
                          "sku_id": "sku_0KtP4rvwEECQ2U",
                          "related_object": "sku",
                          "quantity": 1
                        }
                      ]
                    },
                    "metadata": {
                      "store_names": "Store 1 - New York - Broadway"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns validation result in `valid` key of the promotion tier object. Returns `true` if the promotion tier rules and validation rules are satisfied given the request body parameters. Returns `false` if the data provided in the payload does not meet validation rules or promotion tier requirements.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/6_res_validate_promotion_tier"
                },
                "examples": {
                  "Promotion Valid": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_OWyBVb1mg1qnieLLNygh19A0Ia7FsJck",
                      "order": {
                        "id": "ord_71uW6qnB5CFZlLHCeCNC4qtS",
                        "source_id": null,
                        "created_at": "2022-11-17T12:17:55.096Z",
                        "updated_at": null,
                        "status": "CREATED",
                        "amount": 9918200,
                        "initial_amount": 468200,
                        "items_discount_amount": 9450000,
                        "total_discount_amount": 9450000,
                        "total_amount": 468200,
                        "items_applied_discount_amount": 9450000,
                        "total_applied_discount_amount": 9450000,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_sweater_pink_sweater",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 6500,
                            "price": 6500,
                            "subtotal_amount": 6500
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_pants_navy_sweat_pants",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 6000,
                            "price": 6000,
                            "subtotal_amount": 6000
                          },
                          {
                            "object": "order_item",
                            "source_id": "5h1pp1ng",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 2000,
                            "price": 2000,
                            "subtotal_amount": 2000,
                            "product": {
                              "id": "prod_5h1pp1ng",
                              "source_id": "5h1pp1ng",
                              "name": "Shipping"
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_pants_gray_sweat_pants",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 10000,
                            "price": 5000,
                            "subtotal_amount": 10000
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_sweater_pearl",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 22000,
                            "price": 11000,
                            "subtotal_amount": 22000
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0b7d7dfb05cbe5c616",
                            "sku_id": "sku_0b7d7dfb090be5c619",
                            "quantity": 1,
                            "amount": 1700,
                            "price": 1700,
                            "subtotal_amount": 1700,
                            "product": {
                              "id": "prod_0b7d7dfb05cbe5c616",
                              "source_id": "Books",
                              "name": "Comic Books1",
                              "price": 2100
                            },
                            "sku": {
                              "id": "sku_0b7d7dfb090be5c619",
                              "source_id": "ComicBook_1",
                              "sku": "Comics1",
                              "price": 1700
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0bae32322150fd0546",
                            "quantity": 2,
                            "amount": 420000,
                            "price": 210000,
                            "subtotal_amount": 420000,
                            "product": {
                              "id": "prod_0bae32322150fd0546",
                              "name": "Samsung Phone",
                              "price": 210000
                            }
                          },
                          {
                            "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": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "id": "promo_ZWkx6R0I1Ts3N9HL4kfTdxOm",
                      "name": "Add new SKU",
                      "discount": {
                        "type": "UNIT",
                        "effect": "ADD_NEW_ITEMS",
                        "unit_off": 45,
                        "unit_type": "sku_0bae3b28f610fd0da1",
                        "sku": {
                          "id": "sku_0bae3b28f610fd0da1",
                          "source_id": "first_product_sku_1",
                          "sku": "Samsung phone 256GB"
                        },
                        "product": {
                          "id": "prod_0bae2dc5a090fd0184",
                          "source_id": "first_product",
                          "name": "Samsung Phone 1"
                        }
                      },
                      "campaign": {
                        "id": "camp_40LC42P5NFbkkD4RWoJ4btks",
                        "start_date": null,
                        "expiration_date": null,
                        "active": true,
                        "object": "campaign"
                      },
                      "hierarchy": 4,
                      "discount_amount": 9450000,
                      "applied_discount_amount": 9450000,
                      "metadata": {},
                      "object": "promotion_tier"
                    }
                  },
                  "Promotion Invalid with Error Message": {
                    "value": {
                      "valid": false,
                      "reason": "redemption does not match validation rules",
                      "error": {
                        "code": 400,
                        "key": "redemption_rules_violated",
                        "message": "redemption does not match validation rules",
                        "details": "Promotion Tier cannot be redeemed because of violated validation rules: val_eqSA1dXOv491",
                        "request_id": "v-0c034585fd16cf6958"
                      },
                      "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                      "id": "promo_R50x0A66V6jmPhM7YYOcFZfL",
                      "name": "Add missing order items",
                      "banner": "Add Boho Vintage",
                      "discount": {
                        "type": "UNIT",
                        "effect": "ADD_MISSING_ITEMS",
                        "unit_off": 5,
                        "unit_type": "prod_0b72b0bd64d198e3ae"
                      },
                      "campaign": {
                        "id": "camp_40LC42P5NFbkkD4RWoJ4btks",
                        "start_date": null,
                        "expiration_date": null,
                        "active": true,
                        "object": "campaign"
                      },
                      "hierarchy": 1,
                      "metadata": {
                        "has_budget": true
                      },
                      "object": "promotion_tier"
                    }
                  },
                  "Promotion Invalid with Custom Message": {
                    "value": {
                      "valid": false,
                      "reason": "Inactive Promotion",
                      "error": {
                        "message": "Promotion is inactive this weekend."
                      },
                      "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                      "id": "promo_R50x0A66V6jmPhM7YYOcFZfL",
                      "name": "Add missing order items",
                      "banner": "Add Boho Vintage",
                      "discount": {
                        "type": "UNIT",
                        "effect": "ADD_MISSING_ITEMS",
                        "unit_off": 5,
                        "unit_type": "prod_0b72b0bd64d198e3ae"
                      },
                      "campaign": {
                        "id": "camp_40LC42P5NFbkkD4RWoJ4btks",
                        "start_date": null,
                        "expiration_date": null,
                        "active": true,
                        "object": "campaign"
                      },
                      "hierarchy": 1,
                      "metadata": {
                        "has_budget": true
                      },
                      "object": "promotion_tier"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ValidationsValidateRequestBody": {
        "title": "Validations Validate Request Body",
        "description": "Request body schema for **POST** `v1/validations`.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "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. \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| [\"category\"] | - Returns an expanded `categories` object, showing details about the category. |",
                    "items": {
                      "type": "string",
                      "enum": [
                        "order",
                        "redemption",
                        "redeemable",
                        "category"
                      ]
                    }
                  }
                }
              }
            }
          },
          {
            "$ref": "#/components/schemas/StackableValidateRedeemBase"
          }
        ]
      },
      "ValidationsValidateResponseBody": {
        "title": "Validations Validate Response Body",
        "description": "Response body schema for **POST** `v1/validations`.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the validation, assigned by Voucherify.",
            "example": "valid_101740aa2869354c6d"
          },
          "valid": {
            "type": "boolean",
            "description": "The result of the validation. It takes all of the redeemables into account and returns a `false` if at least one redeemable is inapplicable. Returns `true` if all redeemables are applicable."
          },
          "redeemables": {
            "type": "array",
            "description": "Lists validation results of each redeemable. If  `redeemables_application_mode` is `PARTIAL` in the `stacking_rules` object, all redeemables here will be `APPLICABLE`. Read more in [the Stacking rules article](/orchestrate/stacking-rules).",
            "items": {
              "title": "Validations Validate All Response Body Redeemables Item",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ValidationsRedeemableApplicable"
                },
                {
                  "$ref": "#/components/schemas/ValidationsRedeemableInapplicable"
                },
                {
                  "$ref": "#/components/schemas/ValidationsRedeemableSkipped"
                }
              ]
            }
          },
          "skipped_redeemables": {
            "type": "array",
            "description": "Lists validation results of each skipped redeemable.",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ValidationsRedeemableSkipped"
                }
              ]
            }
          },
          "inapplicable_redeemables": {
            "type": "array",
            "description": "Lists validation results of each inapplicable redeemable.",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ValidationsRedeemableInapplicable"
                }
              ]
            }
          },
          "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": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/OrderCalculatedItem"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "application_details": {
                              "$ref": "#/components/schemas/ApplicationDetails"
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            ]
          },
          "tracking_id": {
            "type": "string",
            "example": "track_VAVo1/z+G2GI2LPw==",
            "description": "Hashed customer source ID."
          },
          "session": {
            "$ref": "#/components/schemas/Session"
          },
          "stacking_rules": {
            "description": "Defines stacking rules for redeemables. Read more in the [Stacking Rule Documentation](/orchestrate/stacking-rules).",
            "allOf": [
              {
                "$ref": "#/components/schemas/StackingRules"
              }
            ]
          }
        },
        "required": [
          "valid",
          "redeemables",
          "stacking_rules"
        ]
      },
      "e_400_invalid_payload": {
        "title": "Invalid Payload",
        "type": "object",
        "description": "Error: Bad Request &rarr; Invalid Payload",
        "properties": {
          "code": {
            "type": "integer",
            "default": 400,
            "description": "Error's HTTP status code."
          },
          "key": {
            "type": "string",
            "default": "invalid_payload",
            "description": "Short string describing the kind of error which occurred."
          },
          "message": {
            "type": "string",
            "default": "Invalid payload",
            "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-0a884c6be8c3756f42",
            "description": "This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team."
          }
        }
      },
      "VouchersValidateRequestBody": {
        "title": "Validate Voucher Request Body",
        "description": "Request schema model for validating a voucher using **POST** `v1/vouchers/{code}/validate`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/VouchersValidateDiscountRequestBody"
          },
          {
            "$ref": "#/components/schemas/VouchersValidateGiftRequestBody"
          },
          {
            "$ref": "#/components/schemas/VouchersValidateLoyaltyRequestBody"
          }
        ]
      },
      "VouchersValidateResponseBody": {
        "title": "Vouchers Validate Response Body",
        "description": "Response body schema for **POST** `v1/vouchers/{code}/validate`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/VouchersValidateValidResponseBody"
          },
          {
            "$ref": "#/components/schemas/VouchersValidateInvalidResponseBody"
          }
        ]
      },
      "e_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."
          },
          "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"
              }
            }
          }
        }
      },
      "ParameterCode": {
        "type": "string",
        "example": "2CpRCE2c"
      },
      "ParameterString": {
        "type": "string"
      },
      "ParameterFiltersValidatePromotions": {
        "type": "object",
        "title": "Promotion filters",
        "description": "Promotion filter conditions.",
        "properties": {
          "metadata": {
            "type": "object",
            "description": "Allows you to create a filter based on the conditions set for promotion metadata values. The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that are attached to a promotion tier object. Stores additional information about the promotion tier in a structured format."
          },
          "promotion_id": {
            "type": "object",
            "description": "Allows you to create a filter based on the unique promotion ID."
          }
        }
      },
      "6_req_validate_promotion": {
        "title": "Validate Promotion Request Body",
        "type": "object",
        "description": "Request schema model for validating a promotion using **POST** `v1/promotions/validation`.",
        "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 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"
                }
              }
            }
          }
        }
      },
      "6_res_validate_promotion": {
        "title": "Validate Promotion Response Body",
        "type": "object",
        "description": "Response schema model for validating a promotion using **POST** `v1/promotions/validation`.",
        "properties": {
          "valid": {
            "type": "boolean",
            "description": "Indicates whether the promotion is valid within the context of the parameters provided in the request body and filters in the query parameters."
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed customer source ID."
          },
          "promotions": {
            "type": "array",
            "description": "Contains an array of promotion tier objects.",
            "items": {
              "$ref": "#/components/schemas/6_res_validate_promotion_object"
            }
          }
        }
      },
      "6_req_validate_promotion_tier": {
        "title": "Validate Promotion Tier Request Body",
        "type": "object",
        "description": "Request schema model for validating a promotion using **POST** `v1/promotions/tiers/{tierId}/validation`.",
        "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 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)."
          }
        }
      },
      "6_res_validate_promotion_tier": {
        "title": "Validate Promotion Tier Response Body",
        "description": "Response schema model for validating a promotion using **POST** `v1/promotions/tiers/{tierId}/validation`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/6_res_validate_promotion_tier_true"
          },
          {
            "$ref": "#/components/schemas/6_res_validate_promotion_tier_false"
          }
        ]
      },
      "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"
        ]
      },
      "ValidationsRedeemableApplicable": {
        "type": "object",
        "title": "Applicable Redeemable",
        "properties": {
          "status": {
            "type": "string",
            "default": "APPLICABLE",
            "enum": [
              "APPLICABLE"
            ],
            "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"
            ]
          },
          "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"
                    }
                  }
                }
              }
            ]
          },
          "applicable_to": {
            "$ref": "#/components/schemas/ApplicableToResultList"
          },
          "inapplicable_to": {
            "$ref": "#/components/schemas/InapplicableToResultList"
          },
          "result": {
            "description": "Specifies the redeemable's end effect on the order. This object is unique to each type of redeemable.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/RedeemableResultVoucherCode"
              },
              {
                "$ref": "#/components/schemas/RedeemableResultGiftCard"
              },
              {
                "$ref": "#/components/schemas/RedeemableResultLoyaltyCard"
              },
              {
                "$ref": "#/components/schemas/RedeemableResultPromotionTier"
              },
              {
                "$ref": "#/components/schemas/RedeemableResultPromotionStack"
              }
            ]
          },
          "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"
        ]
      },
      "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"
        ]
      },
      "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`."
            }
          }
        }
      },
      "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."
          }
        }
      },
      "StackingRules": {
        "type": "object",
        "title": "Stacking Rules",
        "description": "Defines stacking rules for redeemables. Read more in the [Stacking Rule Documentation](/orchestrate/stacking-rules).",
        "properties": {
          "redeemables_limit": {
            "type": "integer",
            "description": "Defines how many redeemables can be sent in one request. Note: more redeemables means more processing time.",
            "default": 30,
            "maximum": 30,
            "minimum": 1
          },
          "applicable_redeemables_limit": {
            "type": "integer",
            "description": "Defines how many redeemables can be applied in one request. The number must be less than or equal to `redeemables_limit`. For example, a user can select 30 discounts but only 5 will be applied to the order and the remaining will be `SKIPPED` according to the `redeemables_sorting_rule`.",
            "default": 5,
            "maximum": 30,
            "minimum": 1
          },
          "applicable_redeemables_per_category_limit": {
            "type": "integer",
            "description": "Defines how many redeemables with the same category can be applied in one request. The number must be less than or equal to `applicable_redeemables_limit`. The ones above the limit will be `SKIPPED` according to the `redeemables_sorting_rule`.",
            "default": 1,
            "maximum": 30,
            "minimum": 1
          },
          "applicable_redeemables_category_limits": {
            "type": "object",
            "description": "Lists categories by category IDs (keys) and defines their limits (values) of applicable redeemables that belong to campaigns with that category.",
            "additionalProperties": {
              "type": "integer",
              "description": "Limit of applicable redeemables per category.",
              "minimum": 1,
              "maximum": 10
            }
          },
          "applicable_exclusive_redeemables_limit": {
            "type": "integer",
            "description": "Defines how many redeemables with an assigned exclusive category can be applied in one request. The ones above the limit will be `SKIPPED` according to the `redeemables_sorting_rule`.",
            "default": 1,
            "maximum": 5,
            "minimum": 1
          },
          "applicable_exclusive_redeemables_per_category_limit": {
            "type": "integer",
            "description": "Defines how many redeemables with an exclusive category per category in stacking rules can be applied in one request. The ones above the limit will be `SKIPPED` according to the `redeemables_sorting_rule`.",
            "default": 1,
            "maximum": 5,
            "minimum": 1
          },
          "exclusive_categories": {
            "type": "array",
            "description": "Lists the IDs of exclusive categories. A redeemable from a campaign with an exclusive category is the only redeemable to be redeemed when applied with redeemables from other campaigns unless these campaigns are exclusive or joint.",
            "items": {
              "type": "string"
            }
          },
          "joint_categories": {
            "type": "array",
            "description": "Lists the IDs of the joint categories. A campaign with a joint category is always applied regardless of the exclusivity of other campaigns.",
            "items": {
              "type": "string"
            }
          },
          "redeemables_application_mode": {
            "type": "string",
            "description": "Defines the application mode for redeemables.\n`\"ALL\"` means that all redeemables must be validated for the redemption to be successful.\n`\"PARTIAL\"` means that only those redeemables that can be validated will be redeemed. The redeemables that fail validaton will be skipped.",
            "enum": [
              "ALL",
              "PARTIAL"
            ]
          },
          "redeemables_sorting_rule": {
            "type": "string",
            "description": "Defines redeemables sorting rule. `CATEGORY_HIERARCHY` means that redeemables are applied oaccording to the category priority. `REQUESTED_ORDER` means that redeemables are applied in the sequence provided in the request.",
            "enum": [
              "CATEGORY_HIERARCHY",
              "REQUESTED_ORDER"
            ],
            "default": "REQUESTED_ORDER"
          },
          "redeemables_products_application_mode": {
            "type": "string",
            "description": "Defines redeemables products application mode. `STACK` means that multiple discounts can be applied to a product. `ONCE` means that only one discount can be applied to the same product.",
            "enum": [
              "STACK",
              "ONCE"
            ]
          },
          "redeemables_no_effect_rule": {
            "type": "string",
            "description": "Defines redeemables no effect rule. `REDEEM_ANYWAY` means that the redeemable will be redeemed regardless of any restrictions or conditions in place. `SKIP` means that the redeemable will be processed only when an applicable effect is calculated.",
            "enum": [
              "REDEEM_ANYWAY",
              "SKIP"
            ]
          },
          "no_effect_skip_categories": {
            "type": "array",
            "description": "Lists category IDs. Redeemables with a given category are skipped even if the `redeemables_no_effect_rule` is set to `REDEEM_ANYWAY`. Category IDs can't overlap with the IDs in `no_effect_redeem_anyway_categories`.",
            "items": {
              "type": "string"
            }
          },
          "no_effect_redeem_anyway_categories": {
            "type": "array",
            "description": "Lists category IDs. Redeemables with a given category are redeemed anyway even if the `redeemables_no_effect_rule` is set to `SKIP`. Category IDs can't overlap with the IDs in `no_effect_skip_categories`.",
            "items": {
              "type": "string"
            }
          },
          "redeemables_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.",
            "enum": [
              "WITH_ORDER",
              "WITHOUT_ORDER"
            ]
          }
        },
        "required": [
          "redeemables_limit",
          "applicable_redeemables_limit",
          "applicable_exclusive_redeemables_limit",
          "applicable_redeemables_per_category_limit",
          "applicable_redeemables_category_limits",
          "exclusive_categories",
          "joint_categories",
          "redeemables_application_mode",
          "redeemables_sorting_rule",
          "redeemables_no_effect_rule",
          "no_effect_skip_categories",
          "no_effect_redeem_anyway_categories",
          "redeemables_products_application_mode",
          "redeemables_rollback_order_mode"
        ]
      },
      "VouchersValidateDiscountRequestBody": {
        "type": "object",
        "title": "Vouchers Validate Discount Request Body",
        "description": "Request schema model for validating a voucher using **POST** `v1/vouchers/{code}/validate`.",
        "properties": {
          "customer": {
            "description": "Customer's information.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Customer"
              }
            ]
          },
          "order": {
            "description": "Order information.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Order"
              }
            ]
          },
          "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": {
            "type": "string"
          },
          "metadata": {
            "type": "object"
          },
          "options": {
            "type": "object",
            "properties": {
              "expand": {
                "type": "array",
                "items": {
                  "type": "string",
                  "default": "category",
                  "enum": [
                    "category"
                  ]
                }
              }
            }
          }
        }
      },
      "VouchersValidateGiftRequestBody": {
        "type": "object",
        "title": "Vouchers Validate Gift Request Body",
        "description": "Request schema model for **POST** `v1/vouchers/{code}/validate`.",
        "properties": {
          "customer": {
            "description": "Customer's information.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Customer"
              }
            ]
          },
          "order": {
            "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.\n\n"
              },
              "source_id": {
                "type": "string",
                "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": "string",
                "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."
              },
              "items": {
                "type": "array",
                "description": "Array of items applied to the order.",
                "items": {
                  "$ref": "#/components/schemas/OrderItem"
                }
              },
              "customer": {
                "description": "This is an object containing information about the customer.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Customer"
                  }
                ]
              },
              "customer_id": {
                "type": "string"
              },
              "referrer": {
                "description": "This is an ojbect containing information about the referrer.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Referrer"
                  }
                ]
              },
              "referrer_id": {
                "type": "string"
              },
              "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."
              }
            }
          },
          "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": "number",
                "minimum": 0,
                "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`."
              }
            },
            "required": [
              "credits"
            ]
          },
          "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": {
            "type": "string"
          },
          "metadata": {
            "type": "object"
          },
          "options": {
            "type": "object",
            "properties": {
              "expand": {
                "type": "array",
                "items": {
                  "type": "string",
                  "default": "category",
                  "enum": [
                    "category"
                  ]
                }
              }
            }
          }
        },
        "required": [
          "gift"
        ]
      },
      "VouchersValidateLoyaltyRequestBody": {
        "type": "object",
        "title": "Vouchers Validate Loyalty Request Body",
        "description": "Request schema model for **POST** `v1/vouchers/{code}/validate`.",
        "properties": {
          "customer": {
            "description": "Customer's information.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Customer"
              }
            ]
          },
          "order": {
            "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.\n\n"
              },
              "source_id": {
                "type": "string",
                "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": "string",
                "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.\n\n"
              },
              "items": {
                "type": "array",
                "description": "Array of items applied to the order.",
                "items": {
                  "$ref": "#/components/schemas/OrderItem"
                }
              },
              "customer": {
                "description": "This is an object containing information about the customer.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Customer"
                  }
                ]
              },
              "customer_id": {
                "type": "string"
              },
              "referrer": {
                "description": "This is an ojbect containing information about the referrer.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Referrer"
                  }
                ]
              },
              "referrer_id": {
                "type": "string"
              },
              "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."
              }
            }
          },
          "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."
              },
              "assignment_id": {
                "type": "string"
              },
              "points": {
                "type": "number",
                "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."
              }
            },
            "required": [
              "id"
            ]
          },
          "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": {
            "type": "string"
          },
          "metadata": {
            "type": "object"
          },
          "options": {
            "type": "object",
            "properties": {
              "expand": {
                "type": "array",
                "items": {
                  "type": "string",
                  "default": "category",
                  "enum": [
                    "category"
                  ]
                }
              }
            }
          }
        },
        "required": [
          "reward"
        ]
      },
      "VouchersValidateValidResponseBody": {
        "type": "object",
        "description": "Response body schema for **POST** `v1/vouchers/{code}/validate`.",
        "title": "Vouchers Validate Valid Response Body",
        "properties": {
          "valid": {
            "type": "boolean",
            "default": true,
            "description": "Indicates whether the voucher is valid within the context of the parameters provided in the request body."
          },
          "code": {
            "type": "string",
            "description": "Voucher code."
          },
          "applicable_to": {
            "description": "Contains list of items that qualify in the scope of the discount. These are definitions of included products, SKUs, and product collections. These can be discounted.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ApplicableToResultList"
              }
            ]
          },
          "inapplicable_to": {
            "description": "Contains list of items that do not qualify in the scope of the discount. These are definitions of excluded products, SKUs, and product collections. These CANNOT be discounted.",
            "allOf": [
              {
                "$ref": "#/components/schemas/InapplicableToResultList"
              }
            ]
          },
          "campaign": {
            "type": "string",
            "description": "Voucher's parent campaign name."
          },
          "campaign_id": {
            "type": "string",
            "description": "Voucher's parent campaign's unique ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format."
          },
          "discount": {
            "$ref": "#/components/schemas/Discount"
          },
          "gift": {
            "description": "Gift object response",
            "allOf": [
              {
                "$ref": "#/components/schemas/Gift"
              }
            ]
          },
          "loyalty": {
            "type": "object",
            "description": "Contains the cost of reward in points.",
            "properties": {
              "points_cost": {
                "type": "number",
                "description": "Number of points that wlil be deducted from loyaty card for the associated reward."
              }
            },
            "required": [
              "points_cost"
            ]
          },
          "reward": {
            "type": "object",
            "description": "Contains information about the reward that is being validated.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique reward ID assigned by Voucherify."
              },
              "assignment_id": {
                "type": "string",
                "description": "Unique reward assignment ID assigned by Voucherify."
              },
              "points": {
                "type": "number",
                "description": "Number of points applied to the reward."
              }
            },
            "required": [
              "id",
              "assignment_id",
              "points"
            ]
          },
          "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"
                    }
                  }
                }
              }
            ]
          },
          "session": {
            "description": "Schema model for session lock object. The session object contains information about the session key that was used to establish a session between multiple parallel validation and redemption requests.\n\n\n",
            "allOf": [
              {
                "$ref": "#/components/schemas/Session"
              }
            ]
          },
          "start_date": {
            "type": "string",
            "description": "Activation timestamp defines when the voucher starts to be active in ISO 8601 format. Voucher is inactive before this date."
          },
          "expiration_date": {
            "type": "string",
            "description": "Expiration timestamp defines when the voucher expires in ISO 8601 format. Voucher is inactive after this date."
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed order source ID."
          }
        },
        "required": [
          "valid",
          "code",
          "applicable_to",
          "inapplicable_to",
          "metadata",
          "tracking_id"
        ]
      },
      "VouchersValidateInvalidResponseBody": {
        "type": "object",
        "title": "Vouchers Validate Invalid Response Body",
        "description": "Response body schema for **POST** `v1/vouchers/{code}/validate`.",
        "properties": {
          "valid": {
            "type": "boolean",
            "default": false,
            "description": "Indicates whether the voucher is valid within the context of the parameters provided in the request body."
          },
          "code": {
            "type": "string",
            "description": "Voucher code."
          },
          "error": {
            "type": "object",
            "description": "Detailed failure cause for the invalid voucher if the reason has a translation defined in the Dashboard → Project Settings → Error Messages.",
            "properties": {
              "code": {
                "type": "number",
                "description": "Voucher code."
              },
              "key": {
                "type": "string"
              },
              "message": {
                "type": "string",
                "description": "Customized error message."
              },
              "details": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "resource_id": {
                "type": "string"
              },
              "resource_type": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "key",
              "message",
              "details"
            ]
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed customer source ID."
          },
          "customer_id": {
            "type": "string",
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify."
          },
          "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."
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "valid",
          "code"
        ]
      },
      "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"
                  }
                ]
              }
            }
          }
        ]
      },
      "6_res_validate_promotion_object": {
        "title": "Validate Promotion",
        "type": "object",
        "description": "Validate Promotion",
        "properties": {
          "valid": {
            "type": "string",
            "description": "Indicates whether the promotion is valid within the context of the parameters provided in the request body and filters in the query parameters."
          },
          "applicable_to": {
            "$ref": "#/components/schemas/6_res_applicable_to_object"
          },
          "inapplicable_to": {
            "$ref": "#/components/schemas/6_res_inapplicable_to_object"
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed customer source ID."
          },
          "order": {
            "$ref": "#/components/schemas/6_obj_order_object"
          },
          "id": {
            "type": "string",
            "example": "promo_4TqHr24boFISDrcOHSlfAxwm",
            "description": "Unique promotion tier ID."
          },
          "name": {
            "type": "string",
            "description": "Custom promotion tier name."
          },
          "banner": {
            "type": "string",
            "description": "Text to be displayed to your customers on your website.",
            "example": "Get 45% off items"
          },
          "discount": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_amount"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_percent"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_fixed"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_unit"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_unit_multiple"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_shipping"
              }
            ],
            "description": "Contains information about the discount to be applied to the order."
          },
          "start_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-11-02T00:00:00.000Z",
            "description": "Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Campaign is *inactive* before this date."
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-11-04T00:00:00.000Z",
            "description": "Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive* after this date."
          },
          "campaign": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "example": "camp_h8RyP6FV94F3Ev2odP24j5p1",
                "description": "Unique promotion tier 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.",
                "example": "2022-11-01T00:00:00.000Z",
                "format": "date-time"
              },
              "expiration_date": {
                "type": "string",
                "description": "Activation timestamp defines when the campaign expires in ISO 8601 format. Promotion tier is *inactive* after this date.",
                "example": "2022-11-30T00:00:00.000Z",
                "format": "date-time"
              },
              "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`.  \n\n- `true` indicates an *active* campaign\n- `false` indicates an *inactive* campaign"
              },
              "categories": {
                "$ref": "#/components/schemas/Category"
              },
              "object": {
                "type": "string",
                "default": "campaign",
                "description": "The type of the object represented by the campaign object. This object stores information about the campaign."
              }
            }
          },
          "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."
          },
          "discount_amount": {
            "type": "integer",
            "description": "The calculated discount amount based on the discount type and effect."
          },
          "applied_discount_amount": {
            "type": "integer",
            "description": "The effective discount amount that would be applied to the order."
          },
          "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."
          },
          "object": {
            "type": "string",
            "default": "promotion_tier",
            "description": "The type of the object represented by JSON. This object stores information about the promotion tier."
          },
          "category_id": {
            "type": "string",
            "description": "Promotion tier category ID.",
            "example": "cat_0c9da30e7116ba6bba"
          },
          "categories": {
            "description": "Details about the category assigned to the promotion tier.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Category"
              }
            ]
          }
        }
      },
      "6_res_validate_promotion_tier_true": {
        "title": "Promotion Tier Valid",
        "type": "object",
        "description": "Response schema model for valid promotion tier when validating a promotion using **POST** `v1/promotions/tiers/{tierId}/validation`.",
        "properties": {
          "valid": {
            "type": "string",
            "description": "Indicates whether the promotion is valid within the context of the parameters provided in the request body and filters in the query parameters."
          },
          "applicable_to": {
            "$ref": "#/components/schemas/6_res_applicable_to_object"
          },
          "inapplicable_to": {
            "$ref": "#/components/schemas/6_res_inapplicable_to_object"
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed customer source ID."
          },
          "order": {
            "$ref": "#/components/schemas/6_obj_order_object"
          },
          "id": {
            "type": "string",
            "example": "promo_4TqHr24boFISDrcOHSlfAxwm",
            "description": "Unique promotion tier ID."
          },
          "name": {
            "type": "string",
            "description": "Custom promotion tier name."
          },
          "banner": {
            "type": "string",
            "description": "Text to be displayed to your customers on your website.",
            "example": "Get 45% off items"
          },
          "discount": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_amount"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_percent"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_fixed"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_unit"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_unit_multiple"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_shipping"
              }
            ],
            "description": "Contains information about the discount to be applied to the order."
          },
          "start_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-11-02T00:00:00.000Z",
            "description": "Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Campaign is *inactive* before this date."
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-11-04T00:00:00.000Z",
            "description": "Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive* after this date."
          },
          "campaign": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "example": "camp_h8RyP6FV94F3Ev2odP24j5p1",
                "description": "Unique promotion tier 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.",
                "example": "2022-11-01T00:00:00.000Z",
                "format": "date-time"
              },
              "expiration_date": {
                "type": "string",
                "description": "Activation timestamp defines when the campaign expires in ISO 8601 format. Promotion tier is *inactive* after this date.",
                "example": "2022-11-30T00:00:00.000Z",
                "format": "date-time"
              },
              "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`.  \n\n- `true` indicates an *active* campaign\n- `false` indicates an *inactive* campaign"
              },
              "categories": {
                "$ref": "#/components/schemas/Category"
              },
              "object": {
                "type": "string",
                "default": "campaign",
                "description": "The type of the object represented by the campaign object. This object stores information about the campaign."
              }
            }
          },
          "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."
          },
          "discount_amount": {
            "type": "integer",
            "description": "The calculated discount amount based on the discount type and effect."
          },
          "applied_discount_amount": {
            "type": "integer",
            "description": "The effective discount amount that would be applied to the order."
          },
          "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."
          },
          "object": {
            "type": "string",
            "default": "promotion_tier",
            "description": "The type of the object represented by JSON. This object stores information about the promotion tier."
          }
        }
      },
      "6_res_validate_promotion_tier_false": {
        "type": "object",
        "description": "Response schema model for a non-valid promotion tier when validating a promotion using **POST** `v1/promotions/tiers/{tierId}/validation`.",
        "title": "Promotion Tier Not Valid",
        "properties": {
          "valid": {
            "type": "boolean",
            "description": "Response schema for a voucher that is not valid."
          },
          "reason": {
            "type": "string",
            "description": "System generated cause for the voucher being invalid in the context of the provided parameters."
          },
          "error": {
            "description": "Detailed failure cause for the invalid voucher if the reason has a translation defined in the Dashboard &rarr; Project Settings &rarr; Error Messages.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_res_validate_promotion_tier_false_custom_message"
              },
              {
                "$ref": "#/components/schemas/Error"
              }
            ]
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed customer source ID."
          },
          "id": {
            "type": "string",
            "example": "promo_ByIIAHC1Mz9ouJsitzAWsush",
            "description": "Promotion tier ID."
          },
          "name": {
            "type": "string",
            "description": "Custom promotion tier name."
          },
          "banner": {
            "type": "string",
            "description": "Text to be displayed to your customers on your website.",
            "example": "Get 25% off"
          },
          "discount": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_amount"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_percent"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_fixed"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_unit"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_unit_multiple"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_shipping"
              }
            ],
            "description": "Contains information about the discount to be applied to the order."
          },
          "start_date": {
            "type": "string",
            "description": "Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Campaign is *inactive* before this date.",
            "format": "date-time",
            "example": "2022-11-02T00: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-11-04T00:00:00.000Z"
          },
          "campaign": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique promotion tier 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-11-01T00:00:00.000Z"
              },
              "expiration_date": {
                "type": "string",
                "format": "date-time",
                "description": "Activation timestamp defines when the campaign expires in ISO 8601 format. Promotion tier is *inactive* after this date.",
                "example": "2022-11-30T00:00:00.000Z"
              },
              "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`.  \n\n- `true` indicates an *active* campaign\n- `false` indicates an *inactive* campaign"
              },
              "object": {
                "type": "string",
                "description": "The type of the object represented by the campaign object. This object stores information about the campaign.",
                "default": "campaign"
              }
            }
          },
          "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."
          },
          "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."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about the promotion tier.",
            "default": "promotion_tier"
          }
        }
      },
      "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."
                  }
                }
              }
            }
          }
        ]
      },
      "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"
          }
        ]
      },
      "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"
          }
        ]
      },
      "ApplicableToResultList": {
        "title": "Applicable To Result List",
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "description": "Contains array of items to which the discount can apply.",
            "items": {
              "$ref": "#/components/schemas/ApplicableTo"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "description": "Total number of objects defining included products, SKUs, or product collections."
          },
          "object": {
            "type": "string",
            "default": "list",
            "enum": [
              "list"
            ],
            "description": "The type of the object represented by JSON."
          },
          "data_ref": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "data",
            "enum": [
              "data"
            ]
          }
        },
        "required": [
          "data",
          "total",
          "object",
          "data_ref"
        ]
      },
      "InapplicableToResultList": {
        "title": "Inapplicable To Result List",
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "description": "Contains array of items to which the discount cannot apply.",
            "items": {
              "$ref": "#/components/schemas/InapplicableTo"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "description": "Total number of objects defining included products, SKUs, or product collections."
          },
          "object": {
            "type": "string",
            "default": "list",
            "enum": [
              "list"
            ],
            "description": "The type of the object represented by JSON."
          },
          "data_ref": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "data",
            "enum": [
              "data"
            ]
          }
        },
        "required": [
          "data",
          "total",
          "object",
          "data_ref"
        ]
      },
      "RedeemableResultVoucherCode": {
        "type": "object",
        "title": "Coupon Code",
        "description": "This is a `result` object representing the results for a coupon code.",
        "properties": {
          "discount": {
            "description": "Discount details about the type of discount to be applied for the redeemable.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DiscountAmount"
              },
              {
                "$ref": "#/components/schemas/DiscountUnit"
              },
              {
                "$ref": "#/components/schemas/DiscountUnitMultiple"
              },
              {
                "$ref": "#/components/schemas/DiscountPercent"
              },
              {
                "$ref": "#/components/schemas/DiscountFixed"
              }
            ]
          },
          "bundle": {
            "$ref": "#/components/schemas/Bundle"
          }
        }
      },
      "RedeemableResultGiftCard": {
        "type": "object",
        "title": "Gift Card",
        "description": "This is a `result` object representing the results for a gift card.",
        "properties": {
          "gift": {
            "description": "Stores the amount of gift card credits to be applied.",
            "type": "object",
            "properties": {
              "balance": {
                "type": "integer",
                "description": "Available funds at the moment of validation. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
              },
              "credits": {
                "type": "integer",
                "description": "Total number of gift card credits to be applied. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
              }
            }
          }
        }
      },
      "RedeemableResultLoyaltyCard": {
        "type": "object",
        "title": "Loyalty Card",
        "description": "This is a `result` object representing the results for a loyalty card.",
        "properties": {
          "loyalty_card": {
            "description": "Stores the amount of loyalty card points to be applied in the redemption.",
            "type": "object",
            "properties": {
              "points": {
                "type": "integer",
                "description": "Total number of loyalty points to be applied in the redemption."
              }
            }
          }
        }
      },
      "RedeemableResultPromotionTier": {
        "type": "object",
        "title": "Promotion Tier",
        "description": "This is a `result` object representing the results for a promotion tier.",
        "properties": {
          "discount": {
            "description": "Discount details about the type of discount to be applied for the redeemable.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DiscountAmount"
              },
              {
                "$ref": "#/components/schemas/DiscountUnit"
              },
              {
                "$ref": "#/components/schemas/DiscountUnitMultiple"
              },
              {
                "$ref": "#/components/schemas/DiscountPercent"
              },
              {
                "$ref": "#/components/schemas/DiscountFixed"
              }
            ]
          },
          "bundle": {
            "$ref": "#/components/schemas/Bundle"
          }
        }
      },
      "RedeemableResultPromotionStack": {
        "type": "object",
        "title": "Promotion Stack",
        "description": "This is a `result` object representing the results for a promotion stack.",
        "properties": {
          "discount": {
            "description": "Discount details about the type of discount to be applied for the redeemable.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DiscountAmount"
              },
              {
                "$ref": "#/components/schemas/DiscountUnit"
              },
              {
                "$ref": "#/components/schemas/DiscountUnitMultiple"
              },
              {
                "$ref": "#/components/schemas/DiscountPercent"
              },
              {
                "$ref": "#/components/schemas/DiscountFixed"
              }
            ]
          },
          "bundle": {
            "$ref": "#/components/schemas/Bundle"
          }
        }
      },
      "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"
                ]
              }
            }
          }
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
          }
        }
      },
      "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"
            }
          }
        }
      },
      "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"
        ]
      },
      "Referrer": {
        "title": "Referrer",
        "allOf": [
          {
            "$ref": "#/components/schemas/Customer"
          }
        ]
      },
      "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"
          }
        ]
      },
      "Gift": {
        "title": "Gift",
        "type": "object",
        "description": "Contains current gift card balance information.",
        "properties": {
          "amount": {
            "type": "number",
            "description": "Total gift card income over the lifetime of the card. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "subtracted_amount": {
            "type": "integer",
            "description": "Total amount of subtracted credits over the gift card lifetime."
          },
          "balance": {
            "type": "number",
            "description": "Available funds. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`. `balance` = `amount` - `subtracted_amount` - `redemption.redeemed_amount`."
          },
          "effect": {
            "type": "string",
            "description": "Defines how the credits are applied to the customer's order.",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS"
            ]
          }
        },
        "required": [
          "amount",
          "balance"
        ]
      },
      "6_res_applicable_to_object": {
        "title": "Included  Items",
        "type": "object",
        "description": "Contains list of items that qualify in the scope of the discount. These are definitions of included products, SKUs, and product collections. These can be discounted.",
        "properties": {
          "data": {
            "type": "array",
            "description": "Contains array of items to which the discount can apply.",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/6_res_product_collection"
                },
                {
                  "$ref": "#/components/schemas/6_res_product_collection_unit"
                },
                {
                  "$ref": "#/components/schemas/6_res_product_collection_fixed_amount"
                },
                {
                  "$ref": "#/components/schemas/6_res_product"
                },
                {
                  "$ref": "#/components/schemas/6_res_product_unit"
                },
                {
                  "$ref": "#/components/schemas/6_res_product_fixed_amount"
                },
                {
                  "$ref": "#/components/schemas/6_res_sku"
                },
                {
                  "$ref": "#/components/schemas/6_res_sku_unit"
                },
                {
                  "$ref": "#/components/schemas/6_res_sku_unit_fixed_amount"
                }
              ]
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of objects defining included products, SKUs, or product collections."
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of included objects."
          },
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about included products, SKUs, or product collections in a dictionary."
          }
        }
      },
      "6_res_inapplicable_to_object": {
        "title": "Excluded Items",
        "type": "object",
        "description": "Contains list of items that **do not** qualify in the scope of the discount. These are definitions of excluded products, SKUs, and product collections. These **CANNOT** be discounted.",
        "properties": {
          "data": {
            "description": "Contains array of items to which the discount cannot apply.",
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/6_res_product_collection_excluded"
                },
                {
                  "$ref": "#/components/schemas/6_res_product_excluded"
                },
                {
                  "$ref": "#/components/schemas/6_res_sku_excluded"
                }
              ]
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of objects defining excluded products, SKUs, or product collections."
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of excluded objects."
          },
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about excluded products, SKUs, or product collections in a dictionary."
          }
        }
      },
      "6_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/6_obj_order_object_apply_to_order"
          },
          {
            "$ref": "#/components/schemas/6_obj_order_object_apply_to_items"
          }
        ]
      },
      "6_res_validate_voucher_discount_amount": {
        "title": "Amount Discount",
        "type": "object",
        "description": "This is an object representing the discount that the customer would receive in the context of the provided request body parameters. If the discount is calculated based on a formula, this object will return either the discount calculated based on the formula or the fallback value.",
        "properties": {
          "type": {
            "type": "string",
            "default": "AMOUNT",
            "description": "Defines the type of the voucher."
          },
          "effect": {
            "type": "string",
            "description": "Defines how the discount is applied to the customer's order.",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS",
              "APPLY_TO_ITEMS_PROPORTIONALLY",
              "APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY",
              "APPLY_TO_ITEMS_BY_QUANTITY"
            ]
          },
          "amount_off": {
            "type": "integer",
            "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. "
          }
        }
      },
      "6_res_validate_voucher_discount_percent": {
        "title": "Percent Discount",
        "type": "object",
        "description": "This is an object representing the discount that the customer would receive in the context of the provided request body parameters. If the discount is calculated based on a formula, this object will return either the discount calculated based on the formula or the fallback value.",
        "properties": {
          "type": {
            "type": "string",
            "default": "PERCENT",
            "description": "Defines the type of the voucher."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          },
          "percent_off": {
            "type": "integer",
            "description": "The percent discount that the customer will receive."
          },
          "amount_limit": {
            "type": "integer",
            "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."
          },
          "is_dynamic": {
            "type": "boolean",
            "description": "Flag indicating whether the discount was calculated using a formula."
          }
        }
      },
      "6_res_validate_voucher_discount_fixed": {
        "title": "Fixed Discount",
        "type": "object",
        "description": "This is an object representing the discount that the customer would receive in the context of the provided request body parameters. If the discount is calculated based on a formula, this object will return either the discount calculated based on the formula or the fallback value. A fixed discounts sets a fixed total on cart or item(s) and then calculates the discount to apply.",
        "properties": {
          "type": {
            "type": "string",
            "default": "FIXED",
            "description": "Type of discount."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS"
            ],
            "description": "Defines how the discount is applied to the customer's order.    \n    \n| **Effect** | **Definition** |\n|---|---|\n| **APPLY_TO_ORDER** | Sets the order total amount to the value of the fixed amount. The discount value is calculated during the redemption as it's a difference between the total amount of the customer's order and the fixed amount. |\n| **APPLY_TO_ITEMS** | Sets a new price on items. The total discount amount is calculated during the redemption and it's a difference between the initial item price and the fixed amount. |"
          },
          "fixed_amount": {
            "type": "integer",
            "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."
          }
        }
      },
      "6_res_validate_voucher_discount_unit": {
        "title": "Unit Discount, single item",
        "description": "This is an object representing the discount that the customer would receive in the context of the provided request body parameters. If the discount is calculated based on a formula, this object will return either the discount calculated based on the formula or the fallback value.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/6_res_validate_voucher_discount_unit_product"
          },
          {
            "$ref": "#/components/schemas/6_res_validate_voucher_discount_unit_sku"
          }
        ]
      },
      "6_res_validate_voucher_discount_unit_multiple": {
        "title": "Unit Discount, multiple items",
        "type": "object",
        "description": "This is an object representing the discount that the customer would receive in the context of the provided request body parameters. If the discount is calculated based on a formula, this object will return either the discount calculated based on the formula or the fallback value.",
        "properties": {
          "type": {
            "type": "string",
            "default": "UNIT",
            "description": "Discount type."
          },
          "effect": {
            "type": "string",
            "default": "ADD_MANY_ITEMS",
            "description": "Defines how the discount is applied to the customer's order."
          },
          "units": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_unit_product_multiple"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_unit_sku_multiple"
              }
            ]
          }
        }
      },
      "6_res_validate_voucher_discount_shipping": {
        "title": "Shipping Discount",
        "type": "object",
        "description": "This is an object representing the discount that the customer would receive in the context of the provided request body parameters. If the discount is calculated based on a formula, this object will return either the discount calculated based on the formula or the fallback value.",
        "properties": {
          "type": {
            "type": "string",
            "default": "UNIT",
            "description": "Discount type."
          },
          "effect": {
            "type": "string",
            "description": "Defines how the unit is added to the customer's order.",
            "default": "ADD_MISSING_ITEMS"
          },
          "unit_off": {
            "type": "integer",
            "description": "Number of units to be granted a full value discount.",
            "default": 1
          },
          "unit_type": {
            "type": "string",
            "description": "The shipping \"product\" deemed as free.",
            "default": "prod_5h1pp1ng"
          },
          "product": {
            "type": "object",
            "description": "Contains information about the shipping \"product\".",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique shipping \"product\" ID, assigned by Voucherify.",
                "default": "prod_5h1pp1ng"
              },
              "source_id": {
                "type": "string",
                "description": "\"Product's\" source ID.",
                "default": "5h1pp1ng"
              },
              "name": {
                "type": "string",
                "description": "\"Product\" name.",
                "default": "Shipping"
              }
            }
          }
        }
      },
      "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"
        ]
      },
      "6_res_validate_promotion_tier_false_custom_message": {
        "type": "object",
        "description": "Custom Error Message",
        "title": "Custom Message",
        "properties": {
          "message": {
            "type": "string",
            "description": "Customized error message."
          }
        }
      },
      "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."
          }
        }
      },
      "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."
          }
        }
      },
      "ApplicableTo": {
        "title": "Applicable To",
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "product",
              "sku",
              "products_collection"
            ],
            "description": "This object stores information about the resource to which the discount is applicable."
          },
          "id": {
            "type": "string",
            "description": "Unique product collection, product, or SKU identifier assigned by Voucherify."
          },
          "source_id": {
            "type": "string",
            "description": "The source identifier from your inventory system."
          },
          "product_id": {
            "type": "string",
            "description": "Parent product's unique ID assigned by Voucherify."
          },
          "product_source_id": {
            "type": "string",
            "description": "Parent product's source ID from your inventory system."
          },
          "price": {
            "type": "number",
            "description": "New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the price_formula parameter is present in the fixed price definition, this value becomes the fallback value. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price."
          },
          "price_formula": {
            "type": "number",
            "description": "Formula used to dynamically calculate the discounted price of an item."
          },
          "effect": {
            "description": "Defines how the discount is applied to the customer's order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ApplicableToEffect"
              }
            ]
          },
          "quantity_limit": {
            "type": "integer",
            "description": "The maximum number of units allowed to be discounted per order line item."
          },
          "aggregated_quantity_limit": {
            "type": "integer",
            "description": "The maximum number of units allowed to be discounted combined across all matched order line items."
          },
          "amount_limit": {
            "type": "integer",
            "description": "Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600."
          },
          "aggregated_amount_limit": {
            "type": "integer",
            "description": "Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects:\n- `APPLY_TO_ITEMS` (each item subtotal is discounted equally)\n- `APPLY_TO_ITEMS_BY_QUANTITY` (each unit of matched products has the same discount value)"
          },
          "product_campaign_quantity_limit": {
            "type": "integer",
            "description": "Limits the number of discounted item units (product, SKU, collection) that all customers can receive in a given campaign. If a product is selected, the limit covers all discounts across all SKUs belonging to that product. If a product collection is selected, the limit covers all products/SKUs within the collection.\n\nThis limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more."
          },
          "product_campaign_quantity_limit_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the maximum units per campaign.\n\nThis limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more."
          },
          "product_customer_campaign_quantity_limit": {
            "type": "integer",
            "description": "Limits the number of discounted item units (product, SKU, collection) that one customer can receive in a given campaign.\n\nThis limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more."
          },
          "product_customer_campaign_quantity_limit_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the maximum units per customer in a campaign.\n\nThis limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more."
          },
          "product_in_collection_campaign_quantity_limit": {
            "type": "integer",
            "description": "Limits the number of discounted item units of a given product in a collection that all customers can receive in a given campaign.\n\nThis limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more."
          },
          "product_in_collection_campaign_quantity_limit_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the maximum units per campaign for a product in a collection.\n\nThis limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more."
          },
          "product_in_collection_customer_campaign_quantity_limit": {
            "type": "integer",
            "description": "Limits the number of discounted item units of a given product in a collection that one customer can receive in a campaign.\n\nThis limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more."
          },
          "product_in_collection_customer_campaign_quantity_limit_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the maximum units per customer for a product in a collection.\n\nThis limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more."
          },
          "product_promotion_tier_quantity_limit": {
            "type": "integer",
            "description": "Limits the number of discounted item units that all customers can receive in a promotion tier.\n\nThis limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more."
          },
          "product_promotion_tier_quantity_limit_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the maximum units per promotion tier.\n\nThis limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more."
          },
          "product_customer_promotion_tier_quantity_limit": {
            "type": "integer",
            "description": "Limits the number of discounted item units that one customer can receive in a given promotion tier.\n\nThis limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more."
          },
          "product_customer_promotion_tier_quantity_limit_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the maximum units per customer in a promotion tier.\n\nThis limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more."
          },
          "product_in_collection_promotion_tier_quantity_limit": {
            "type": "integer",
            "description": "Limits the number of discounted item units of a given product in a collection that all customers can receive in a given promotion tier.\n\nThis limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more."
          },
          "product_in_collection_promotion_tier_quantity_limit_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the maximum units per promotion tier for a product in a collection.\n\nThis limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more."
          },
          "product_in_collection_customer_promotion_tier_quantity_limit": {
            "type": "integer",
            "description": "Limits the number of discounted item units of a given product in a collection that one customer can receive in a promotion tier.\n\nThis limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more."
          },
          "product_in_collection_customer_promotion_tier_quantity_limit_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the maximum units per customer in a promotion tier for a product in a collection.\n\nThis limit is available on demand as part of campaign budget limits. Contact [Voucherify support](https://www.voucherify.io/contact-support) or your account manager to learn more."
          },
          "order_item_indices": {
            "type": "array",
            "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.",
            "items": {
              "type": "integer"
            }
          },
          "order_item_units": {
            "type": "array",
            "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer",
                  "description": "Number assigned to the order line item in accordance with the order sent in the request.",
                  "minimum": 0
                },
                "units": {
                  "type": "array",
                  "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`. The maximum quantity of all handled units is 1000. If the quantity of all order items exceeds 1000, this array is not returned, but `units_limit_exceeded: true`. However, the discount is calculated properly for all relevant units.",
                  "items": {
                    "type": "integer"
                  }
                },
                "units_limit_exceeded": {
                  "type": "boolean",
                  "description": "Returned as `true` only when the sum total of `quantity` of all order items exceeds 1000."
                }
              }
            }
          },
          "repeat": {
            "type": "integer",
            "description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item."
          },
          "skip_initially": {
            "type": "integer",
            "description": "Determines how many items are skipped before the discount is applied."
          },
          "target": {
            "type": "string",
            "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.",
            "enum": [
              "ITEM",
              "UNIT"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "effect"
        ]
      },
      "InapplicableTo": {
        "title": "Inapplicable To",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ApplicableTo"
          }
        ]
      },
      "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"
        ]
      },
      "6_res_product_collection": {
        "title": "Product Collection",
        "type": "object",
        "description": "Contains definition for a product collection.",
        "properties": {
          "object": {
            "type": "string",
            "default": "products_collection",
            "description": "This object stores information about the product collection."
          },
          "id": {
            "type": "string",
            "example": "pc_4ndRXAsTOzwSdHcQcxf489uU",
            "description": "Unique product collection ID assigned by Voucherify."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_product_collection_unit": {
        "title": "Product Collection for Unit Discount",
        "type": "object",
        "description": "Contains definition for a product collection.",
        "properties": {
          "object": {
            "type": "string",
            "default": "products_collection",
            "description": "This object stores information about the product collection."
          },
          "id": {
            "type": "string",
            "example": "pc_4ndRXAsTOzwSdHcQcxf489uU",
            "description": "Unique product collection ID assigned by Voucherify."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          },
          "quantity_limit": {
            "type": "integer",
            "description": "The maximum number of units allowed to be discounted per order line item."
          },
          "aggregated_quantity_limit": {
            "type": "integer",
            "description": "The maximum number of units allowed to be discounted combined across all matched order line items."
          }
        }
      },
      "6_res_product_collection_fixed_amount": {
        "title": "Product Collection for Fixed Amount Discount",
        "type": "object",
        "description": "Contains definition for a product collection.",
        "properties": {
          "object": {
            "type": "string",
            "default": "products_collection",
            "description": "This object stores information about the product collection."
          },
          "id": {
            "type": "string",
            "example": "pc_4ndRXAsTOzwSdHcQcxf489uU",
            "description": "Unique product collection ID assigned by Voucherify."
          },
          "price": {
            "type": "integer",
            "description": "New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the `price_formula` parameter is present in the fixed price definition, this value becomes the **fallback value**. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price."
          },
          "price_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the discounted price of an item.",
            "example": "\"IF(ORDER_AMOUNT > 300;ORDER_ITEM_PRICE * 0.8;ORDER_ITEM_PRICE)"
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_product": {
        "title": "Product",
        "type": "object",
        "description": "Contains definition for a product.",
        "properties": {
          "object": {
            "type": "string",
            "default": "product",
            "description": "This object stores information about the product."
          },
          "id": {
            "type": "string",
            "description": "Unique product ID assigned by Voucherify.",
            "example": "prod_0bae2dc5a090fd0184"
          },
          "source_id": {
            "type": "string",
            "description": "The product ID from your inventory system."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_product_unit": {
        "title": "Product for Unit Discount",
        "type": "object",
        "description": "Contains definition for a product.",
        "properties": {
          "object": {
            "type": "string",
            "default": "product",
            "description": "This object stores information about the product."
          },
          "id": {
            "type": "string",
            "description": "Unique product ID assigned by Voucherify.",
            "example": "prod_0bae2dc5a090fd0184"
          },
          "source_id": {
            "type": "string",
            "description": "The product ID from your inventory system."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          },
          "quantity_limit": {
            "type": "integer",
            "description": "The maximum number of units allowed to be discounted per order line item."
          },
          "aggregated_quantity_limit": {
            "type": "integer",
            "description": "The maximum number of units allowed to be discounted combined across all matched order line items."
          }
        }
      },
      "6_res_product_fixed_amount": {
        "title": "Product for Fixed Amount Discount",
        "type": "object",
        "description": "Contains definition for a product.",
        "properties": {
          "object": {
            "type": "string",
            "default": "product",
            "description": "This object stores information about the product."
          },
          "id": {
            "type": "string",
            "description": "Unique product ID assigned by Voucherify.",
            "example": "prod_0bae2dc5a090fd0184"
          },
          "source_id": {
            "type": "string",
            "description": "The product ID from your inventory system."
          },
          "price": {
            "type": "integer",
            "description": "New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the `price_formula` parameter is present in the fixed price definition, this value becomes the **fallback value**. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price."
          },
          "price_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the discounted price of an item.",
            "example": "IF(ORDER_AMOUNT > 300;ORDER_ITEM_PRICE * 0.8;ORDER_ITEM_PRICE)"
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_sku": {
        "title": "SKU",
        "type": "object",
        "description": "Contains definition for a product variant.",
        "properties": {
          "object": {
            "type": "string",
            "default": "sku",
            "description": "This object stores information about the product variant."
          },
          "id": {
            "type": "string",
            "description": "Unique SKU ID assigned by Voucherify.",
            "example": "sku_0b7d7dfb090be5c619"
          },
          "source_id": {
            "type": "string",
            "description": "The source ID from your inventory system."
          },
          "product_id": {
            "type": "string",
            "description": "Parent product's unique ID assigned by Voucherify."
          },
          "product_source_id": {
            "type": "string",
            "description": "Parent product's source ID from your inventory system."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_sku_unit": {
        "title": "SKU for Unit Discount",
        "type": "object",
        "description": "Contains definition for a product variant.",
        "properties": {
          "object": {
            "type": "string",
            "default": "sku",
            "description": "This object stores information about the product variant."
          },
          "id": {
            "type": "string",
            "description": "Unique SKU ID assigned by Voucherify.",
            "example": "sku_0b7d7dfb090be5c619"
          },
          "source_id": {
            "type": "string",
            "description": "The source ID from your inventory system."
          },
          "product_id": {
            "type": "string",
            "description": "Parent product's unique ID assigned by Voucherify."
          },
          "product_source_id": {
            "type": "string",
            "description": "Parent product's source ID from your inventory system."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          },
          "quantity_limit": {
            "type": "integer",
            "description": "The maximum number of units allowed to be discounted per order line item."
          },
          "aggregated_quantity_limit": {
            "type": "integer",
            "description": "The maximum number of units allowed to be discounted combined across all matched order line items."
          }
        }
      },
      "6_res_sku_unit_fixed_amount": {
        "title": "SKU for Amount Discount",
        "type": "object",
        "description": "Contains definition for a product variant.",
        "properties": {
          "object": {
            "type": "string",
            "default": "sku",
            "description": "This object stores information about the product variant."
          },
          "id": {
            "type": "string",
            "description": "Unique SKU ID assigned by Voucherify.",
            "example": "sku_0b7d7dfb090be5c619"
          },
          "source_id": {
            "type": "string",
            "description": "The source ID from your inventory system."
          },
          "product_id": {
            "type": "string",
            "description": "Parent product's unique ID assigned by Voucherify."
          },
          "product_source_id": {
            "type": "string",
            "description": "Parent product's source ID from your inventory system."
          },
          "price": {
            "type": "integer",
            "description": "New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the `price_formula` parameter is present in the fixed price definition, this value becomes the **fallback value**. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price."
          },
          "price_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the discounted price of an item.",
            "example": "IF(ORDER_AMOUNT > 200;ORDER_ITEM_PRICE * 0.2;6)"
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_product_collection_excluded": {
        "title": "Product Collection",
        "type": "object",
        "description": "Contains definition for a product collection.",
        "properties": {
          "object": {
            "type": "string",
            "default": "products_collection",
            "description": "This object stores information about the product collection."
          },
          "id": {
            "type": "string",
            "example": "pc_4ndRXAsTOzwSdHcQcxf489uU",
            "description": "Unique product collection ID assigned by Voucherify."
          },
          "effect": {
            "type": "string",
            "default": "APPLY_TO_EVERY",
            "enum": [
              "APPLY_TO_EVERY"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_product_excluded": {
        "title": "Product",
        "type": "object",
        "description": "Contains definition for a product.",
        "properties": {
          "object": {
            "type": "string",
            "default": "product",
            "description": "This product stores information about the product."
          },
          "id": {
            "type": "string",
            "description": "Unique product ID assigned by Voucherify.",
            "example": "prod_0bae2dc5a090fd0184"
          },
          "source_id": {
            "type": "string",
            "description": "The product ID from your inventory system."
          },
          "effect": {
            "type": "string",
            "default": "APPLY_TO_EVERY",
            "enum": [
              "APPLY_TO_EVERY"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_sku_excluded": {
        "title": "SKU",
        "type": "object",
        "description": "Contains definition for a product variant.",
        "properties": {
          "object": {
            "type": "string",
            "default": "sku",
            "description": "This object stores information about the product variant."
          },
          "id": {
            "type": "string",
            "description": "Unique SKU ID assigned by Voucherify.",
            "example": "sku_0b7d7dfb090be5c619"
          },
          "source_id": {
            "type": "string",
            "description": "The source ID from your inventory system."
          },
          "effect": {
            "type": "string",
            "default": "APPLY_TO_EVERY",
            "enum": [
              "APPLY_TO_EVERY"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_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. This parameter is returned only if you use the order ID parameter of an already created and synced order in the Voucherify application, i.e by sending the `order.id` parameter in the request body."
          },
          "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. This parameter is returned only if you use the order ID parameter of an already created and synced order in the Voucherify application, i.e by sending the `order.id` parameter in the request body."
          },
          "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. This parameter is returned only if you use the order ID parameter of an already created and synced order in the Voucherify application, i.e by sending the `order.id` parameter in the request body."
          },
          "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. This parameter is returned only if you use the order ID parameter of an already created and synced order in the Voucherify application, i.e by sending the `order.id` parameter in the request body."
          },
          "status": {
            "type": "string",
            "description": "Order status. This parameter is returned if you use the order ID parameter of an already created and synced order in the Voucherify application, i.e by sending the `order.id` parameter in the request body or if you send the request body parameter when defining an order in the request body. This parameter can be passed but it's not required for validation at all. It's used in the redemption process. Normally after the redemption is done, the order is automatically to a `PAID` status. To avoid such default behaviour, the user can pass any of the other status options and it will be set the order status after the redemption instead of the default `PAID`.",
            "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 discounts."
          },
          "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 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`)."
                },
                "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`."
          }
        }
      },
      "6_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. This parameter is returned only if you use the order ID parameter of an already created and synced order in the Voucherify application, i.e by sending the `order.id` parameter in the request body."
          },
          "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. This parameter is returned only if you use the order ID parameter of an already created and synced order in the Voucherify application, i.e by sending the `order.id` parameter in the request body."
          },
          "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. This parameter is returned only if you use the order ID parameter of an already created and synced order in the Voucherify application, i.e by sending the `order.id` parameter in the request body."
          },
          "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. This parameter is returned only if you use the order ID parameter of an already created and synced order in the Voucherify application, i.e by sending the `order.id` parameter in the request body."
          },
          "status": {
            "type": "string",
            "description": "Order status. This parameter is returned if you use the order ID parameter of an already created and synced order in the Voucherify application, i.e by sending the `order.id` parameter in the request body or if you send the request body parameter when defining an order in the request body. This parameter can be passed but it's not required for validation at all. It's used in the redemption process. Normally after the redemption is done, the order is automatically to a `PAID` status. To avoid such default behaviour, the user can pass any of the other status options and it will be set the order status after the redemption instead of the default `PAID`.",
            "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.  \n`sum(items, i => i.discount_amount)`"
          },
          "total_discount_amount": {
            "type": "integer",
            "description": "Sum of all product-specific discounts applied."
          },
          "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": "Product-specifc discounts applied to all the items."
          },
          "total_applied_discount_amount": {
            "type": "integer",
            "description": "Product-specific discounts applied in 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`."
          }
        }
      },
      "6_res_validate_voucher_discount_unit_product": {
        "title": "Unit Discount, Product",
        "type": "object",
        "description": "This is an object representing the discount that the customer would receive in the context of the provided request body parameters. If the discount is calculated based on a formula, this object will return either the discount calculated based on the formula or the fallback value.",
        "properties": {
          "type": {
            "type": "string",
            "default": "UNIT",
            "description": "Discount type."
          },
          "effect": {
            "type": "string",
            "enum": [
              "ADD_MISSING_ITEMS",
              "ADD_NEW_ITEMS"
            ],
            "description": "Defines how the unit is added to the customer's order."
          },
          "unit_off": {
            "type": "integer",
            "description": "Number of units to be granted a full value discount."
          },
          "unit_type": {
            "type": "string",
            "example": "prod_0a9f9ab4ab019a42d5",
            "description": "The product deemed as free, chosen from product inventory (e.g. time, items)."
          },
          "product": {
            "type": "object",
            "description": "Contains information about the product.",
            "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."
              }
            }
          }
        }
      },
      "6_res_validate_voucher_discount_unit_sku": {
        "title": "Unit Discount, SKU",
        "type": "object",
        "description": "This is an object representing the discount that the customer would receive in the context of the provided request body parameters. If the discount is calculated based on a formula, this object will return either the discount calculated based on the formula or the fallback value.",
        "properties": {
          "type": {
            "type": "string",
            "default": "UNIT",
            "description": "Discount type."
          },
          "effect": {
            "type": "string",
            "enum": [
              "ADD_MISSING_ITEMS",
              "ADD_NEW_ITEMS"
            ],
            "description": "Defines how the unit is added to the customer's order."
          },
          "unit_off": {
            "type": "integer",
            "description": "Number of units to be granted a full value discount."
          },
          "unit_type": {
            "type": "string",
            "example": "sku_0bae3b28f610fd0da1",
            "description": "The product variant deemed as free, chosen from product inventory (e.g. time, items)."
          },
          "sku": {
            "type": "object",
            "description": "Contains information about the SKU.",
            "properties": {
              "id": {
                "type": "string",
                "example": "sku_0bae3b28f610fd0da1",
                "description": "Unique SKU ID, assigned by Voucherify."
              },
              "source_id": {
                "type": "string",
                "description": "Product variant's source ID."
              },
              "sku": {
                "type": "string",
                "description": "Product varient's name."
              }
            }
          },
          "product": {
            "type": "object",
            "description": "Contains information about the parent product.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique parent product ID, assigned by Voucherify.",
                "example": "prod_0bae2dc5a090fd0184"
              },
              "source_id": {
                "type": "string",
                "description": "Source ID of parent product."
              },
              "name": {
                "type": "string",
                "description": "Name of parent product."
              }
            }
          }
        }
      },
      "6_res_validate_voucher_discount_unit_product_multiple": {
        "title": "Product Item",
        "type": "object",
        "description": "This is an object representing the discount that the customer would receive in the context of the provided request body parameters. If the discount is calculated based on a formula, this object will return either the discount calculated based on the formula or the fallback value.",
        "properties": {
          "effect": {
            "type": "string",
            "enum": [
              "ADD_MISSING_ITEMS",
              "ADD_NEW_ITEMS"
            ],
            "description": "Defines how the unit is added to the customer's order."
          },
          "unit_off": {
            "type": "integer",
            "description": "Number of units to be granted a full value discount."
          },
          "unit_type": {
            "type": "string",
            "example": "prod_0a9f9ab4ab019a42d5",
            "description": "The product deemed as free, chosen from product inventory (e.g. time, items)."
          },
          "product": {
            "type": "object",
            "description": "Contains information about the product.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique product ID, assigned by Voucherify.",
                "example": "prod_0a9f9ab4ab019a42d5"
              },
              "source_id": {
                "type": "string",
                "description": "Product's source ID."
              },
              "name": {
                "type": "string",
                "description": "Product name."
              }
            }
          }
        }
      },
      "6_res_validate_voucher_discount_unit_sku_multiple": {
        "title": "SKU Item",
        "type": "object",
        "description": "This is an object representing the discount that the customer would receive in the context of the provided request body parameters. If the discount is calculated based on a formula, this object will return either the discount calculated based on the formula or the fallback value.",
        "properties": {
          "effect": {
            "type": "string",
            "enum": [
              "ADD_MISSING_ITEMS",
              "ADD_NEW_ITEMS"
            ],
            "description": "Defines how the unit is added to the customer's order."
          },
          "unit_off": {
            "type": "integer",
            "description": "Number of units to be granted a full value discount."
          },
          "unit_type": {
            "type": "string",
            "example": "sku_0bae3b28f610fd0da1",
            "description": "The product variant deemed as free, chosen from product inventory (e.g. time, items)."
          },
          "sku": {
            "type": "object",
            "description": "Contains information about the SKU.",
            "properties": {
              "id": {
                "type": "string",
                "example": "sku_0bae3b28f610fd0da1",
                "description": "Unique SKU ID, assigned by Voucherify."
              },
              "source_id": {
                "type": "string",
                "description": "Product variant's source ID."
              },
              "sku": {
                "type": "string",
                "description": "Product varient's name."
              }
            }
          },
          "product": {
            "type": "object",
            "description": "Contains information about the parent product.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique parent product ID, assigned by Voucherify.",
                "example": "prod_0b7d7dfb05cbe5c616"
              },
              "source_id": {
                "type": "string",
                "description": "Source ID of parent product."
              },
              "name": {
                "type": "string",
                "description": "Name of parent product."
              }
            }
          }
        }
      },
      "ApplicableToEffect": {
        "title": "Applicable To Effect",
        "type": "string",
        "enum": [
          "APPLY_TO_EVERY",
          "APPLY_TO_CHEAPEST",
          "APPLY_FROM_CHEAPEST",
          "APPLY_TO_MOST_EXPENSIVE",
          "APPLY_FROM_MOST_EXPENSIVE"
        ]
      },
      "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`."
            }
          }
        }
      }
    }
  }
}