> ## Documentation Index
> Fetch the complete documentation index at: https://voucherify-pz-test.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

## Validation Rule

All of:

1. [Validation Rule Base](#validation-rule-base)

2. ### Validation Rule

   | Attributes                  | Description                                                                                                                                                   |
   | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | id`string`                  | Unique validation rule ID.**Example:**val\_eR1c41hu0vUU                                                                                                       |
   | created\_at`string`         | Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format.**Example:**2022-03-23T07:44:00.444Z |
   | updated\_at`string`         | Timestamp representing the date and time when the validation rule was updated. The value is shown in the ISO 8601 format.**Example:**2022-04-26T08:35:54.960Z |
   | assignments\_count`integer` | The number of instances the validation rule has been assigned to different types of redeemables.                                                              |
   | object`string`              | The type of the object represented by JSON. This object stores information about the validation rule.                                                         |

## Validation Rule Base

| Attributes             | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name`string`           | Custom, unique name for set of validation rules.**Example:**Business Validation Rule                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| rules                  | See: [Validation Rule Rules](#validation-rule-rules)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| bundle\_rules          | See: [Validation Rule Bundle Rules](#validation-rule-bundle-rules)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| error`object`          | Contains the error message returned from API when validation / redemption fails to meet requirements of defined rules.Attributes	Descriptionmessagestring&#xA;&#xA;The error message returned from API when validation / redemption fails to meet requirements of defined rules.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| applicable\_to`object` | Attributes	Descriptionexcludedarray&#xA;&#xA;Defines which items are excluded from a discount.&#xA;&#xA;Array of Applicable To&#xA;includedarray	&#xA;&#xA;Defines which items are included in a discount.&#xA;&#xA;Array of Applicable To&#xA;included\_allboolean	&#xA;&#xA;Indicates whether all items are included in the discount.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| type`string`           | Type of validation rule.Available values: `expression`, `basic`, `advanced`, `complex`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| context\_type`string`  | Validation rule context type.Context Type	Definitionearning\_rule.order.paid&#xA;earning\_rule.custom\_event	&#xA;earning\_rule.customer.segment.entered	&#xA;campaign.discount\_coupons	&#xA;campaign.discount\_coupons.discount.apply\_to\_order	&#xA;campaign.discount\_coupons.discount.apply\_to\_items	&#xA;campaign.discount\_coupons.discount.apply\_to\_items\_proportionally	&#xA;campaign.discount\_coupons.discount.apply\_to\_items\_proportionally\_by\_quantity	&#xA;campaign.discount\_coupons.discount.fixed.apply\_to\_items	&#xA;campaign.gift\_vouchers	&#xA;campaign.gift\_vouchers.gift.apply\_to\_order	&#xA;campaign.gift\_vouchers.gift.apply\_to\_items	&#xA;campaign.referral\_program	&#xA;campaign.referral\_program.discount.apply\_to\_order	&#xA;campaign.referral\_program.discount.apply\_to\_items	&#xA;campaign.referral\_program.discount.apply\_to\_items\_proportionally	&#xA;campaign.referral\_program.discount.apply\_to\_items\_proportionally\_by\_quantity	&#xA;campaign.referral\_program.discount.fixed.apply\_to\_items	&#xA;campaign.promotion	&#xA;campaign.promotion.discount.apply\_to\_order	&#xA;campaign.promotion.discount.apply\_to\_items	&#xA;campaign.promotion.discount.apply\_to\_items\_proportionally	&#xA;campaign.promotion.discount.apply\_to\_items\_proportionally\_by\_quantity	&#xA;campaign.promotion.discount.fixed.apply\_to\_items	&#xA;campaign.loyalty\_program	&#xA;voucher.discount\_voucher	&#xA;voucher.discount\_voucher.discount.apply\_to\_order	&#xA;voucher.discount\_voucher.discount.apply\_to\_items	&#xA;voucher.discount\_voucher.discount.apply\_to\_items\_proportionally	&#xA;voucher.discount\_voucher.discount.apply\_to\_items\_proportionally\_by\_quantity	&#xA;voucher.discount\_voucher.discount.fixed.apply\_to\_items	&#xA;voucher.gift\_voucher	&#xA;voucher.gift\_voucher.gift.apply\_to\_order	&#xA;voucher.gift\_voucher.gift.apply\_to\_items	&#xA;voucher.loyalty\_card	&#xA;distribution.custom\_event	&#xA;reward\_assignment.pay\_with\_points	&#xA;globalAvailable values: `earning_rule.order.paid`, `earning_rule.custom_event`, `earning_rule.customer.segment.entered`, `earning_rule.customer.tier.joined`, `earning_rule.customer.tier.left`, `earning_rule.customer.tier.upgraded`, `earning_rule.customer.tier.downgraded`, `earning_rule.customer.tier.prolonged`, `campaign.discount_coupons`, `campaign.discount_coupons.discount.apply_to_order`, `campaign.discount_coupons.discount.apply_to_items`, `campaign.discount_coupons.discount.apply_to_items_proportionally`, `campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity`, `campaign.discount_coupons.discount.apply_to_items_by_quantity`, `campaign.discount_coupons.discount.fixed.apply_to_items`, `campaign.discount_coupons.discount.percent.apply_to_items`, `campaign.gift_vouchers`, `campaign.gift_vouchers.gift.apply_to_order`, `campaign.gift_vouchers.gift.apply_to_items`, `campaign.referral_program`, `campaign.referral_program.discount.apply_to_order`, `campaign.referral_program.discount.apply_to_items`, `campaign.referral_program.discount.apply_to_items_proportionally`, `campaign.referral_program.discount.apply_to_items_proportionally_by_quantity`, `campaign.referral_program.discount.apply_to_items_by_quantity`, `campaign.referral_program.discount.fixed.apply_to_items`, `campaign.referral_program.discount.percent.apply_to_items`, `campaign.promotion`, `campaign.promotion.discount.apply_to_order`, `campaign.promotion.discount.apply_to_items`, `campaign.promotion.discount.apply_to_items_proportionally`, `campaign.promotion.discount.apply_to_items_proportionally_by_quantity`, `campaign.promotion.discount.apply_to_items_by_quantity`, `campaign.promotion.discount.fixed.apply_to_items`, `campaign.promotion.discount.percent.apply_to_items`, `campaign.loyalty_program`, `voucher.discount_voucher`, `voucher.discount_voucher.discount.apply_to_order`, `voucher.discount_voucher.discount.apply_to_items`, `voucher.discount_voucher.discount.apply_to_items_proportionally`, `voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity`, `voucher.discount_voucher.discount.apply_to_items_by_quantity`, `voucher.discount_voucher.discount.fixed.apply_to_items`, `voucher.discount_voucher.discount.percent.apply_to_items`, `voucher.gift_voucher`, `voucher.gift_voucher.gift.apply_to_order`, `voucher.gift_voucher.gift.apply_to_items`, `voucher.loyalty_card`, `distribution.custom_event`, `distribution.order.paid`, `distribution.order.created`, `distribution.order.canceled`, `distribution.order.updated`, `reward_assignment.pay_with_points`, `global` |

## Validation Rule Rules

| Attributes              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| logic`string`           | Defines the logic between the rules.**Example:**(1 and 2) and (3)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| \[propertyName]`object` | Contains the name of the validation rule.Attributes	Descriptionnamestring&#xA;&#xA;Voucherify's specific rule name. The list of available names is provided below.&#xA;&#xA;Type	NameCustomer	customer.segmentcustomer.metadata&#xA;Order	order.amountorder.initial\_amountorder.items.countorder.items.price\_anyorder.items.price\_eachorder.items.metadata\_anyorder.items.metadata\_eachorder.metadata&#xA;Campaign	campaign.orders.amount\_discountedcampaign.orders.amountcampaign.redemptions.countcampaign.redemptions.count.dailycampaign.redemptions.count.monthlycampaign.redemptions.customers\_countcampaign.redemptions.customers\_count.dailycampaign.redemptions.customers\_count.monthly&#xA;Redemption	redemption.gift.amountredemption.count.dailyredemption.count.monthlyredemption.count.per\_customerredemption.count.per\_customer.dailyredemption.count.per\_customer.monthlyredemption.api\_keyredemption.count.per\_api\_keyredemption.user.loginredemption.count.per\_userredemption.metadataredemption.reward.pay\_with\_points.points\_used&#xA;Product	product.idproduct.priceproduct.quantityproduct.discount\_applicableproduct.metadataproduct.metadata.aggregated\_quantityproduct.metadata.aggregated\_amountproduct.metadata.discount\_applicableproduct.metadata.match\_all&#xA;SKU	sku.idsku.pricesku.quantitysku.discount\_applicable&#xA;Publication	publication.redeemable\_by\_linked\_customer&#xA;Custom Event	custom\_event.metadata&#xA;Order items	order.items.everyorder.items.anyorder.items.noneorder.items.cheapestorder.items.most\_expensive&#xA;&#xA;\*Requires the property field to be defined.&#xA;&#xA;&#xA;propertystring, null	&#xA;&#xA;Custom name for a metadata property associated with the condition to be satisfied. Required if the property name is any of the following:customer\_metadatacustom\_event\_metadataorder\_items\_metadataorder\_metadataproduct\_metadataredemption\_metadata&#xA;&#xA;&#xA;conditions	See: Validation Rule Conditions&#xA;rules	See: Validation Rule Rules&#xA;errorobject	&#xA;&#xA;Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.&#xA;&#xA;Attributes	Descriptionmessagestring	&#xA;&#xA;The error message returned from API when validation / redemption fails to meet requirements of defined rule. |

## Validation Rule Bundle Rules

| Attributes              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| limit`integer`, `null`  | Defines how many bundles can be identified in the order and the maximum multiplier of the discount per identified bundle. For example, if the order meets 3 bundles, but `limit: 2`, the discount will be multiplied by 2.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| \[propertyName]`object` | Contains the name of the bundle rule.Attributes	Descriptionnamestring&#xA;&#xA;Voucherify's specific bundle rule name. Currently, it is only order.items.any.&#xA;&#xA;Available values: order.items.any&#xA;conditionsobject	&#xA;&#xA;Defines the conditions of the bundle rule. The order items in the customer's cart must meet the conditions. Because the rule concerns order items, the only permissible condition is $is.&#xA;&#xA;Attributes	Description$isarray	Array of:&#xA;Attributes	Descriptionidstring	&#xA;&#xA;Unique identifier of the product, SKU, or collection assigned by Voucherify.&#xA;&#xA;&#xA;typestring	&#xA;&#xA;Type of the order item. It can be a product\_or\_sku or products\_collection&#xA;&#xA;Available values: product\_or\_sku, products\_collection&#xA;objectstring	&#xA;&#xA;Object used in the bundle rule. It can be a products\_collection, product, or sku.&#xA;&#xA;Available values: products\_collection, product, sku&#xA;&#xA;rules	&#xA;errorobject	&#xA;&#xA;CURRENTLY UNSUPPORTED. Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.&#xA;&#xA;Attributes	Descriptionmessagestring	&#xA;&#xA;The error message returned from API when validation / redemption fails to meet requirements of defined rule. |

## Applicable To

| Attributes                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| object`string`                       | This object stores information about the resource to which the discount is applicable.Available values: `product`, `sku`, `products_collection`                                                                                                                                                                                                                                                                                                                           |
| id`string`                           | Unique product collection, product, or SKU identifier assigned by Voucherify.                                                                                                                                                                                                                                                                                                                                                                                             |
| source\_id`string`                   | The source identifier from your inventory system.                                                                                                                                                                                                                                                                                                                                                                                                                         |
| product\_id`string`                  | Parent product's unique ID assigned by Voucherify.                                                                                                                                                                                                                                                                                                                                                                                                                        |
| product\_source\_id`string`          | Parent product's source ID from your inventory system.                                                                                                                                                                                                                                                                                                                                                                                                                    |
| price`number`                        | 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`number`               | Formula used to dynamically calculate the discounted price of an item.                                                                                                                                                                                                                                                                                                                                                                                                    |
| effect                               | Defines how the discount is applied to the customer's order.[Applicable To Effect](#applicable-to-effect)                                                                                                                                                                                                                                                                                                                                                                 |
| quantity\_limit`integer`             | The maximum number of units allowed to be discounted per order line item.                                                                                                                                                                                                                                                                                                                                                                                                 |
| aggregated\_quantity\_limit`integer` | The maximum number of units allowed to be discounted combined across all matched order line items.                                                                                                                                                                                                                                                                                                                                                                        |
| amount\_limit`integer`               | 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`integer`   | 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:- `APPLY_TO_ITEMS` (each item subtotal is discounted equally)                                                                                                                                                                |

* `APPLY_TO_ITEMS_BY_QUANTITY` (each unit of matched products has the same discount value)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
  \| order\_item\_indices`array`          | 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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
  \| order\_item\_units`array`            | 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.Array of:Attributes	Descriptionindexinteger

  Number assigned to the order line item in accordance with the order sent in the request.

  unitsarray&#x9;

  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.

  units\_limit\_exceededboolean&#x9;

  Returned as true only when the sum total of quantity of all order items exceeds 1000. |
  \| repeat`integer`                      | Determines the recurrence of the discount, e.g. `"repeat": 3` means that the discount is applied to every third item.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
  \| skip\_initially`integer`             | Determines how many items are skipped before the discount is applied.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
  \| target`string`                       | Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.Available values: `ITEM`, `UNIT`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |

## Validation Rule Conditions

| Attributes                | Description                                            |
| ------------------------- | ------------------------------------------------------ |
| \$is                      | See: [Any](#any)                                       |
| \$is\_not                 | See: [Any](#any)                                       |
| \$in                      | See: [Any](#any)                                       |
| \$not\_in                 | See: [Any](#any)                                       |
| \$less\_than              | See: [Any](#any)                                       |
| \$less\_than\_or\_equal   | See: [Any](#any)                                       |
| \$more\_than              | See: [Any](#any)                                       |
| \$more\_than\_or\_equal   | See: [Any](#any)                                       |
| \$starts\_with            | See: [Any String](#any-string)                         |
| \$ends\_with              | See: [Any String](#any-string)                         |
| \$contains                | See: [Any String](#any-string)                         |
| \$timeframe               | See: [Any String](#any-string)                         |
| \$timeframe\_absolute     | See: [Any String](#any-string)                         |
| \$timeframe\_daily\_hours | See: [Any String](#any-string)                         |
| \$dow`array`              |                                                        |
| \$count                   | See: [Any Number](#any-number)                         |
| \$count\_more             | See: [Any Number](#any-number)                         |
| \$count\_less             | See: [Any Number](#any-number)                         |
| \$not\_differ             | See: [Any](#any)                                       |
| \$not\_intersect          | See: [Any](#any)                                       |
| \$from                    | See: [Any](#any)                                       |
| \$after                   | See: [Any Date and Date-Time](#any-date-and-date-time) |
| \$before                  | See: [Any Date and Date-Time](#any-date-and-date-time) |
| \$more\_than\_ago         | See: [Any Number](#any-number)                         |
| \$less\_than\_ago         | See: [Any Number](#any-number)                         |
| \$is\_days\_ago           | See: [Any Number](#any-number)                         |
| \$more\_than\_future      | See: [Any Number](#any-number)                         |
| \$less\_than\_future      | See: [Any Number](#any-number)                         |
| \$is\_days\_in\_future    | See: [Any Number](#any-number)                         |

## Validation Rule Rules

| Attributes              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| logic`string`           | Defines the logic between the rules.**Example:**(1 and 2) and (3)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| \[propertyName]`object` | Contains the name of the validation rule.Attributes	Descriptionnamestring&#xA;&#xA;Voucherify's specific rule name. The list of available names is provided below.&#xA;&#xA;Type	NameCustomer	customer.segmentcustomer.metadata&#xA;Order	order.amountorder.initial\_amountorder.items.countorder.items.price\_anyorder.items.price\_eachorder.items.metadata\_anyorder.items.metadata\_eachorder.metadata&#xA;Campaign	campaign.orders.amount\_discountedcampaign.orders.amountcampaign.redemptions.countcampaign.redemptions.count.dailycampaign.redemptions.count.monthlycampaign.redemptions.customers\_countcampaign.redemptions.customers\_count.dailycampaign.redemptions.customers\_count.monthly&#xA;Redemption	redemption.gift.amountredemption.count.dailyredemption.count.monthlyredemption.count.per\_customerredemption.count.per\_customer.dailyredemption.count.per\_customer.monthlyredemption.api\_keyredemption.count.per\_api\_keyredemption.user.loginredemption.count.per\_userredemption.metadataredemption.reward.pay\_with\_points.points\_used&#xA;Product	product.idproduct.priceproduct.quantityproduct.discount\_applicableproduct.metadataproduct.metadata.aggregated\_quantityproduct.metadata.aggregated\_amountproduct.metadata.discount\_applicableproduct.metadata.match\_all&#xA;SKU	sku.idsku.pricesku.quantitysku.discount\_applicable&#xA;Publication	publication.redeemable\_by\_linked\_customer&#xA;Custom Event	custom\_event.metadata&#xA;Order items	order.items.everyorder.items.anyorder.items.noneorder.items.cheapestorder.items.most\_expensive&#xA;&#xA;\*Requires the property field to be defined.&#xA;&#xA;&#xA;propertystring, null	&#xA;&#xA;Custom name for a metadata property associated with the condition to be satisfied. Required if the property name is any of the following:customer\_metadatacustom\_event\_metadataorder\_items\_metadataorder\_metadataproduct\_metadataredemption\_metadata&#xA;&#xA;&#xA;conditions	See: Validation Rule Conditions&#xA;rules	See: Validation Rule Rules&#xA;errorobject	&#xA;&#xA;Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.&#xA;&#xA;Attributes	Descriptionmessagestring	&#xA;&#xA;The error message returned from API when validation / redemption fails to meet requirements of defined rule. |

## Applicable To Effect

Available values: `APPLY_TO_EVERY`, `APPLY_TO_CHEAPEST`, `APPLY_FROM_CHEAPEST`, `APPLY_TO_MOST_EXPENSIVE`, `APPLY_FROM_MOST_EXPENSIVE`

## Any

Array any of: string, string, string, number, object

## Any

Array any of: string, string, string, number, object

## Any String

## Any Number

## Any Date and Date-Time

Array any of: string, string

## Validation Rule Rules

| Attributes              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| logic`string`           | Defines the logic between the rules.**Example:**(1 and 2) and (3)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| \[propertyName]`object` | Contains the name of the validation rule.Attributes	Descriptionnamestring&#xA;&#xA;Voucherify's specific rule name. The list of available names is provided below.&#xA;&#xA;Type	NameCustomer	customer.segmentcustomer.metadata&#xA;Order	order.amountorder.initial\_amountorder.items.countorder.items.price\_anyorder.items.price\_eachorder.items.metadata\_anyorder.items.metadata\_eachorder.metadata&#xA;Campaign	campaign.orders.amount\_discountedcampaign.orders.amountcampaign.redemptions.countcampaign.redemptions.count.dailycampaign.redemptions.count.monthlycampaign.redemptions.customers\_countcampaign.redemptions.customers\_count.dailycampaign.redemptions.customers\_count.monthly&#xA;Redemption	redemption.gift.amountredemption.count.dailyredemption.count.monthlyredemption.count.per\_customerredemption.count.per\_customer.dailyredemption.count.per\_customer.monthlyredemption.api\_keyredemption.count.per\_api\_keyredemption.user.loginredemption.count.per\_userredemption.metadataredemption.reward.pay\_with\_points.points\_used&#xA;Product	product.idproduct.priceproduct.quantityproduct.discount\_applicableproduct.metadataproduct.metadata.aggregated\_quantityproduct.metadata.aggregated\_amountproduct.metadata.discount\_applicableproduct.metadata.match\_all&#xA;SKU	sku.idsku.pricesku.quantitysku.discount\_applicable&#xA;Publication	publication.redeemable\_by\_linked\_customer&#xA;Custom Event	custom\_event.metadata&#xA;Order items	order.items.everyorder.items.anyorder.items.noneorder.items.cheapestorder.items.most\_expensive&#xA;&#xA;\*Requires the property field to be defined.&#xA;&#xA;&#xA;propertystring, null	&#xA;&#xA;Custom name for a metadata property associated with the condition to be satisfied. Required if the property name is any of the following:customer\_metadatacustom\_event\_metadataorder\_items\_metadataorder\_metadataproduct\_metadataredemption\_metadata&#xA;&#xA;&#xA;conditions	See: Validation Rule Conditions&#xA;rules	See: Validation Rule Rules&#xA;errorobject	&#xA;&#xA;Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.&#xA;&#xA;Attributes	Descriptionmessagestring	&#xA;&#xA;The error message returned from API when validation / redemption fails to meet requirements of defined rule. |

## Validation Rule Rules

| Attributes              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| logic`string`           | Defines the logic between the rules.**Example:**(1 and 2) and (3)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| \[propertyName]`object` | Contains the name of the validation rule.Attributes	Descriptionnamestring&#xA;&#xA;Voucherify's specific rule name. The list of available names is provided below.&#xA;&#xA;Type	NameCustomer	customer.segmentcustomer.metadata&#xA;Order	order.amountorder.initial\_amountorder.items.countorder.items.price\_anyorder.items.price\_eachorder.items.metadata\_anyorder.items.metadata\_eachorder.metadata&#xA;Campaign	campaign.orders.amount\_discountedcampaign.orders.amountcampaign.redemptions.countcampaign.redemptions.count.dailycampaign.redemptions.count.monthlycampaign.redemptions.customers\_countcampaign.redemptions.customers\_count.dailycampaign.redemptions.customers\_count.monthly&#xA;Redemption	redemption.gift.amountredemption.count.dailyredemption.count.monthlyredemption.count.per\_customerredemption.count.per\_customer.dailyredemption.count.per\_customer.monthlyredemption.api\_keyredemption.count.per\_api\_keyredemption.user.loginredemption.count.per\_userredemption.metadataredemption.reward.pay\_with\_points.points\_used&#xA;Product	product.idproduct.priceproduct.quantityproduct.discount\_applicableproduct.metadataproduct.metadata.aggregated\_quantityproduct.metadata.aggregated\_amountproduct.metadata.discount\_applicableproduct.metadata.match\_all&#xA;SKU	sku.idsku.pricesku.quantitysku.discount\_applicable&#xA;Publication	publication.redeemable\_by\_linked\_customer&#xA;Custom Event	custom\_event.metadata&#xA;Order items	order.items.everyorder.items.anyorder.items.noneorder.items.cheapestorder.items.most\_expensive&#xA;&#xA;\*Requires the property field to be defined.&#xA;&#xA;&#xA;propertystring, null	&#xA;&#xA;Custom name for a metadata property associated with the condition to be satisfied. Required if the property name is any of the following:customer\_metadatacustom\_event\_metadataorder\_items\_metadataorder\_metadataproduct\_metadataredemption\_metadata&#xA;&#xA;&#xA;conditions	See: Validation Rule Conditions&#xA;rulesobject	&#xA;&#xA;Another set of validation rules. If you need to create complex rules with more nested rules, use the validation rule builder in the dashboard.&#xA;&#xA;&#xA;errorobject	&#xA;&#xA;Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.&#xA;&#xA;Attributes	Descriptionmessagestring	&#xA;&#xA;The error message returned from API when validation / redemption fails to meet requirements of defined rule. |
