Custom name for a metadata property associated with the condition to be satisfied. Required if the property name is any of the following: customer_metadata custom_event_metadata order_items_metadata order_metadata product_metadata redemption_metadata
Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.
Attributes
Description
message string
The error message returned from API when validation / redemption fails to meet requirements of defined rule.
Validation Rule Bundle Rules
Attributes
Description
logic string
Defines the logic between the rules.
Example:
(1 and 2) and (3)
[propertyName] object
Contains the name of the bundle rule.
Attributes
Description
name string
Voucherify's specific bundle rule name. Currently, it is only order.items.any.
Available values: order.items.any
conditions object
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.
Attributes
Description
$is array
Array of:
Attributes
Description
id string
Unique identifier of the product, SKU, or collection assigned by Voucherify.
type string
Type of the order item. It can be a product_or_sku or products_collection
Available values: product_or_sku, products_collection
object string
Object used in the bundle rule. It can be a products_collection, product, or sku.
Available values: products_collection, product, sku
rules
error object
CURRENTLY UNSUPPORTED. Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.
Attributes
Description
message string
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.
strict boolean
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 calculate the discounted price of an item.
effect
Defines how the discount is applied to the customer's order.
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
Description
index integer
Number assigned to the order line item in accordance with the order sent in the request.
units array
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.
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.
Custom name for a metadata property associated with the condition to be satisfied. Required if the property name is any of the following: customer_metadata custom_event_metadata order_items_metadata order_metadata product_metadata redemption_metadata
Custom name for a metadata property associated with the condition to be satisfied. Required if the property name is any of the following: customer_metadata custom_event_metadata order_items_metadata order_metadata product_metadata redemption_metadata
Custom name for a metadata property associated with the condition to be satisfied. Required if the property name is any of the following: customer_metadata custom_event_metadata order_items_metadata order_metadata product_metadata redemption_metadata