diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 624c3612e..888d50ef8 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -271,7 +271,7 @@ In order to remove a category, remove its title from the list. Make sure to remo
- Make changes in the repository following the [patterns](#naming-convention) and [good practices](#good-practices).
- Run `npm run create-clean-version -- --vt={your name}-{pull request number}` to create a new project version with your tag number.
- then follow instructions from the console or add `--ua` or `--uploadAll` option to the script
-- If you need to make a change, run `npm run create-clean-version -- --vt={your name}-{pull request number}-{!!!any number!!!}`
+- If you need to make a change, run `npm run create-clean-version -- --vt={your name}-{pull request number}-{!!!any number!!!}`; note that the underscore `_` symbol in the version name will fail the upload
- then follow instructions from the console or add `--ua` or `--uploadAll` option to the script
- on the readme dashboard delete version that is not good.
- If changes are fine, then:
diff --git a/changelog/OPEN-API.md b/changelog/OPEN-API.md
index 19d7ad271..122563905 100644
--- a/changelog/OPEN-API.md
+++ b/changelog/OPEN-API.md
@@ -4,6 +4,33 @@
Older changes in [DEPRECATED.md](deprecated/DEPRECATED.md)
+## 2024-12-19
+
+Added `application_details` property to Qualifications, Validations, and Redemptions, and the associated `ApplicationDetails` schema
+
+## 2024-12-12
+
+- Removed `bundle_rules` from the `ValidationRuleBase` schema – the feature is not released yet
+- Added `holder_loyalty_tier` to OpenAPIWebhooks.json and OpenAPI.json with the following schemas:
+ - `EventCustomerLoyaltyCardPointsAdded`
+ - `EventCustomerVouchersLoyaltyPointsExpired`
+ - `EventCustomerLoyaltyCardPointsTransferred`
+ - `LoyaltyCardTransaction`
+ - `VoucherTransaction`
+
+
+## 2024-12-05
+
+- Added the `order_item_units` array to the `ApplicableTo` schema
+- Changed the following summary, file names, and titles:
+ - `Get Points Expiration` to `List Loyalty Card Point Expiration`
+ - `Create Points Expiration Export` to `Export Loyalty Campaign Point Expiration`
+
+
+## 2024-12-04
+
+Added `ValidationRuleBundleRules` schema and `bundle_rules` to the `ValidationRuleBase` schema
+
## 2024-12-03
Remove `validation_rules` from Create Loyalty Campaign endpoints by swapping `CampaignsCreateBaseValidationRules` to `CampaignsCreateBase` in `CampaignsCreateLoyaltyCampaign`.
diff --git a/docs/reference-docs/CAMPAIGNS-Campaign-Object.md b/docs/reference-docs/CAMPAIGNS-Campaign-Object.md
index 58fa4f1f2..ac1a962b4 100644
--- a/docs/reference-docs/CAMPAIGNS-Campaign-Object.md
+++ b/docs/reference-docs/CAMPAIGNS-Campaign-Object.md
@@ -230,7 +230,7 @@ One of:
|:-----|:--------|
| type`string` |
Discount type.
Available values: `UNIT` |
| unit_off`integer` | Number of units to be granted a full value discount.
|
-| unit_off_formula`string` | |
+| unit_off_formula`string` | Formula used to calculate the number of units.
|
| effect | Defines how the unit is added to the customer's order.
[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) |
| unit_type`string` | The product deemed as free, chosen from product inventory (e.g. time, items).
|
| product | Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) |
@@ -298,7 +298,7 @@ Available values: `ADD_MISSING_ITEMS`, `ADD_NEW_ITEMS`, `ADD_MANY_ITEMS`
| Attributes | Description |
|:-----|:--------|
| unit_off`number` | Number of units to be granted a full value discount.
|
-| unit_off_formula`string` | |
+| unit_off_formula`string` | Formula used to calculate the number of units.
|
| effect`string` | Defines how the unit is added to the customer's order.
Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` |
| unit_type`string` | The product deemed as free, chosen from product inventory (e.g. time, items).
|
| product | Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) |
diff --git a/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md b/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md
index 909dc9c74..a050983ed 100644
--- a/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md
+++ b/docs/reference-docs/CUSTOMERS-Customer-Activity-Object.md
@@ -235,7 +235,8 @@ One of:
| loyalty_tier | See: [Loyalty Tier](#loyalty-tier) |
| earning_rule | See: [Earning Rule](#earning-rule) |
| balance | See: [Voucher Balance](#voucher-balance) |
-| order | See: [Order Calculated No Customer Data](#order-calculated-no-customer-data) |
+| order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data)
+2. Attributes | Description |
---|
itemsarray | Array of items applied to the order. It can include up to 500 items. Array of Order Item Calculated |
|
| event | See: [Simple Event](#simple-event) |
## Event Customer Gift Voucher Balance Added
@@ -256,7 +257,7 @@ One of:
| voucher | See: [Simple Voucher](#simple-voucher) |
| balance | See: [Voucher Balance](#voucher-balance) |
| transaction | All of: 1. [Voucher Transaction Base](#voucher-transaction-base)
-2. Attributes | Description |
---|
detailsobject | Contains the detailed information about the transaction. Attributes | Description |
---|
balance | See: Voucher Balance | orderobject | Contains information about the original order. Attributes | Description |
---|
idstring | Unique order ID. | source_idstring | The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service. |
| eventobject | Contains information about the event that triggers the point accrual. Attributes | Description |
---|
idstring | Unique event ID. | typestring | Type of event. |
| earning_ruleobject | Contains information about the earning rule. Attributes | Description |
---|
idstring | Unique earning rule ID. | sourceobject | Contains the custom earning rule name. Attributes | Description |
---|
bannerstring | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. |
|
| segmentobject | Contains information about the segment. Attributes | Description |
---|
idstring | | namestring | |
| loyalty_tierobject | Contains information about the loyalty tier. Attributes | Description |
---|
idstring | | namestring | |
| redemptionobject | Contains information about the original redemption. Attributes | Description |
---|
idstring | Unique redemption ID. |
| rollbackobject | Contains information about the redemption rollback. Attributes | Description |
---|
idstring | Unique redemption rollback ID. |
| custom_eventobject | Contains information about the custom event that triggers the point accrual. Attributes | Description |
---|
idstring | Unique event ID. | typestring | Type of custom event. |
| event_schemaobject | Contains information about the custom event metadata schema. Attributes | Description |
---|
idstring | Unique metadata schema ID. | namestring | Type of custom event. |
| rewardobject | Contains information about the pay with points reward. Attributes | Description |
---|
idstring | Unique reward ID. | namestring | Reward name. |
| source_voucher | Contains information on how the balance on the donor loyalty card was affected by the transaction. Simple Voucher | destination_voucher | Contains information on how the balance on the receiving loyalty card was affected by the transaction. Simple Voucher |
|
typestring | Transaction type concerning loyalty card points. Available values: POINTS_ACCRUAL |
|
+2. Attributes | Description |
---|
detailsobject | Contains the detailed information about the transaction. Attributes | Description |
---|
balance | See: Voucher Balance | orderobject | Contains information about the original order. Attributes | Description |
---|
idstring | Unique order ID. | source_idstring | The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service. |
| eventobject | Contains information about the event that triggers the point accrual. Attributes | Description |
---|
idstring | Unique event ID. | typestring | Type of event. |
| earning_ruleobject | Contains information about the earning rule. Attributes | Description |
---|
idstring | Unique earning rule ID. | sourceobject | Contains the custom earning rule name. Attributes | Description |
---|
bannerstring | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. |
|
| segmentobject | Contains information about the segment. Attributes | Description |
---|
idstring | | namestring | |
| loyalty_tierobject | Contains information about the loyalty tier. Attributes | Description |
---|
idstring | | namestring | |
| redemptionobject | Contains information about the original redemption. Attributes | Description |
---|
idstring | Unique redemption ID. |
| rollbackobject | Contains information about the redemption rollback. Attributes | Description |
---|
idstring | Unique redemption rollback ID. |
| custom_eventobject | Contains information about the custom event that triggers the point accrual. Attributes | Description |
---|
idstring | Unique event ID. | typestring | Type of custom event. |
| holder_loyalty_tierobject | Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed. Attributes | Description |
---|
idstring | Unique identifier of the loyalty tier, assigned by Voucherify. | namestring | User-defined name of the loyalty tier. |
| event_schemaobject | Contains information about the custom event metadata schema. Attributes | Description |
---|
idstring | Unique metadata schema ID. | namestring | Type of custom event. |
| rewardobject | Contains information about the pay with points reward. Attributes | Description |
---|
idstring | Unique reward ID. | namestring | Reward name. |
| source_voucher | Contains information on how the balance on the donor loyalty card was affected by the transaction. Simple Voucher | destination_voucher | Contains information on how the balance on the receiving loyalty card was affected by the transaction. Simple Voucher |
|
typestring | Transaction type concerning loyalty card points. Available values: POINTS_ACCRUAL |
|
## Event Customer Loyalty Card Points Transferred
| Attributes | Description |
@@ -268,7 +269,7 @@ One of:
| destination_voucher | See: [Simple Voucher](#simple-voucher) |
| balance | See: [Voucher Balance](#voucher-balance) |
| transaction | All of: 1. [Voucher Transaction Base](#voucher-transaction-base)
-2. Attributes | Description |
---|
detailsobject | Contains the detailed information about the transaction. Attributes | Description |
---|
balance | See: Voucher Balance | orderobject | Contains information about the original order. Attributes | Description |
---|
idstring | Unique order ID. | source_idstring | The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service. |
| eventobject | Contains information about the event that triggers the point accrual. Attributes | Description |
---|
idstring | Unique event ID. | typestring | Type of event. |
| earning_ruleobject | Contains information about the earning rule. Attributes | Description |
---|
idstring | Unique earning rule ID. | sourceobject | Contains the custom earning rule name. Attributes | Description |
---|
bannerstring | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. |
|
| segmentobject | Contains information about the segment. Attributes | Description |
---|
idstring | | namestring | |
| loyalty_tierobject | Contains information about the loyalty tier. Attributes | Description |
---|
idstring | | namestring | |
| redemptionobject | Contains information about the original redemption. Attributes | Description |
---|
idstring | Unique redemption ID. |
| rollbackobject | Contains information about the redemption rollback. Attributes | Description |
---|
idstring | Unique redemption rollback ID. |
| custom_eventobject | Contains information about the custom event that triggers the point accrual. Attributes | Description |
---|
idstring | Unique event ID. | typestring | Type of custom event. |
| event_schemaobject | Contains information about the custom event metadata schema. Attributes | Description |
---|
idstring | Unique metadata schema ID. | namestring | Type of custom event. |
| rewardobject | Contains information about the pay with points reward. Attributes | Description |
---|
idstring | Unique reward ID. | namestring | Reward name. |
| source_voucher | Contains information on how the balance on the donor loyalty card was affected by the transaction. Simple Voucher | destination_voucher | Contains information on how the balance on the receiving loyalty card was affected by the transaction. Simple Voucher |
|
typestring | Transaction type concerning loyalty card points. Available values: POINTS_TRANSFER_IN , POINTS_TRANSFER_OUT |
|
+2. Attributes | Description |
---|
detailsobject | Contains the detailed information about the transaction. Attributes | Description |
---|
balance | See: Voucher Balance | orderobject | Contains information about the original order. Attributes | Description |
---|
idstring | Unique order ID. | source_idstring | The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service. |
| eventobject | Contains information about the event that triggers the point accrual. Attributes | Description |
---|
idstring | Unique event ID. | typestring | Type of event. |
| earning_ruleobject | Contains information about the earning rule. Attributes | Description |
---|
idstring | Unique earning rule ID. | sourceobject | Contains the custom earning rule name. Attributes | Description |
---|
bannerstring | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. |
|
| segmentobject | Contains information about the segment. Attributes | Description |
---|
idstring | | namestring | |
| loyalty_tierobject | Contains information about the loyalty tier. Attributes | Description |
---|
idstring | | namestring | |
| redemptionobject | Contains information about the original redemption. Attributes | Description |
---|
idstring | Unique redemption ID. |
| rollbackobject | Contains information about the redemption rollback. Attributes | Description |
---|
idstring | Unique redemption rollback ID. |
| custom_eventobject | Contains information about the custom event that triggers the point accrual. Attributes | Description |
---|
idstring | Unique event ID. | typestring | Type of custom event. |
| event_schemaobject | Contains information about the custom event metadata schema. Attributes | Description |
---|
idstring | Unique metadata schema ID. | namestring | Type of custom event. |
| holder_loyalty_tierobject | Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed. Attributes | Description |
---|
idstring | Unique identifier of the loyalty tier, assigned by Voucherify. | namestring | User-defined name of the loyalty tier. |
| rewardobject | Contains information about the pay with points reward. Attributes | Description |
---|
idstring | Unique reward ID. | namestring | Reward name. |
| source_voucher | Contains information on how the balance on the donor loyalty card was affected by the transaction. Simple Voucher | destination_voucher | Contains information on how the balance on the receiving loyalty card was affected by the transaction. Simple Voucher |
|
typestring | Transaction type concerning loyalty card points. Available values: POINTS_TRANSFER_IN , POINTS_TRANSFER_OUT |
|
## Event Customer Loyalty Card Points Expired
| Attributes | Description |
@@ -279,7 +280,7 @@ One of:
| points`integer` | The number of expired points.
|
| buckets`array` | Array of [Loyalty Point Bucket](#loyalty-point-bucket) |
| transaction | All of: 1. [Voucher Transaction Base](#voucher-transaction-base)
-2. Attributes | Description |
---|
detailsobject | Contains the detailed information about the transaction. Attributes | Description |
---|
balance | See: Voucher Balance | orderobject | Contains information about the original order. Attributes | Description |
---|
idstring | Unique order ID. | source_idstring | The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service. |
| eventobject | Contains information about the event that triggers the point accrual. Attributes | Description |
---|
idstring | Unique event ID. | typestring | Type of event. |
| earning_ruleobject | Contains information about the earning rule. Attributes | Description |
---|
idstring | Unique earning rule ID. | sourceobject | Contains the custom earning rule name. Attributes | Description |
---|
bannerstring | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. |
|
| segmentobject | Contains information about the segment. Attributes | Description |
---|
idstring | | namestring | |
| loyalty_tierobject | Contains information about the loyalty tier. Attributes | Description |
---|
idstring | | namestring | |
| redemptionobject | Contains information about the original redemption. Attributes | Description |
---|
idstring | Unique redemption ID. |
| rollbackobject | Contains information about the redemption rollback. Attributes | Description |
---|
idstring | Unique redemption rollback ID. |
| custom_eventobject | Contains information about the custom event that triggers the point accrual. Attributes | Description |
---|
idstring | Unique event ID. | typestring | Type of custom event. |
| event_schemaobject | Contains information about the custom event metadata schema. Attributes | Description |
---|
idstring | Unique metadata schema ID. | namestring | Type of custom event. |
| rewardobject | Contains information about the pay with points reward. Attributes | Description |
---|
idstring | Unique reward ID. | namestring | Reward name. |
| source_voucher | Contains information on how the balance on the donor loyalty card was affected by the transaction. Simple Voucher | destination_voucher | Contains information on how the balance on the receiving loyalty card was affected by the transaction. Simple Voucher |
|
typestring | Transaction type concerning loyalty card points. Available values: POINTS_EXPIRATION |
|
+2. Attributes | Description |
---|
detailsobject | Contains the detailed information about the transaction. Attributes | Description |
---|
balance | See: Voucher Balance | orderobject | Contains information about the original order. Attributes | Description |
---|
idstring | Unique order ID. | source_idstring | The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service. |
| eventobject | Contains information about the event that triggers the point accrual. Attributes | Description |
---|
idstring | Unique event ID. | typestring | Type of event. |
| earning_ruleobject | Contains information about the earning rule. Attributes | Description |
---|
idstring | Unique earning rule ID. | sourceobject | Contains the custom earning rule name. Attributes | Description |
---|
bannerstring | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. |
|
| segmentobject | Contains information about the segment. Attributes | Description |
---|
idstring | | namestring | |
| loyalty_tierobject | Contains information about the loyalty tier. Attributes | Description |
---|
idstring | | namestring | |
| redemptionobject | Contains information about the original redemption. Attributes | Description |
---|
idstring | Unique redemption ID. |
| rollbackobject | Contains information about the redemption rollback. Attributes | Description |
---|
idstring | Unique redemption rollback ID. |
| custom_eventobject | Contains information about the custom event that triggers the point accrual. Attributes | Description |
---|
idstring | Unique event ID. | typestring | Type of custom event. |
| event_schemaobject | Contains information about the custom event metadata schema. Attributes | Description |
---|
idstring | Unique metadata schema ID. | namestring | Type of custom event. |
| holder_loyalty_tierobject | Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed. Attributes | Description |
---|
idstring | Unique identifier of the loyalty tier, assigned by Voucherify. | namestring | User-defined name of the loyalty tier. |
| rewardobject | Contains information about the pay with points reward. Attributes | Description |
---|
idstring | Unique reward ID. | namestring | Reward name. |
| source_voucher | Contains information on how the balance on the donor loyalty card was affected by the transaction. Simple Voucher | destination_voucher | Contains information on how the balance on the receiving loyalty card was affected by the transaction. Simple Voucher |
|
typestring | Transaction type concerning loyalty card points. Available values: POINTS_EXPIRATION |
|
## Event Customer Voucher Deleted
| Attributes | Description |
@@ -551,8 +552,10 @@ All of:
| channel_id`string` | Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API.
**Example:** user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH
|
| failure_code`string` | If the result is FAILURE
, this parameter will provide a generic reason as to why the redemption failed.
**Example:** customer_rules_violated
|
| failure_message`string` | If the result is FAILURE
, this parameter will provide a more expanded reason as to why the redemption failed.
|
-| order | See: [Order Calculated No Customer Data](#order-calculated-no-customer-data) |
-| previous_order | See: [Order Calculated No Customer Data](#order-calculated-no-customer-data) |
+| order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data)
+2. Attributes | Description |
---|
itemsarray | Array of items applied to the order. It can include up to 500 items. Array of Order Item Calculated |
|
+| previous_order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data)
+2. Attributes | Description |
---|
itemsarray | Array of items applied to the order. It can include up to 500 items. Array of Order Item Calculated |
|
| reward | See: [Redemption Reward Result](#redemption-reward-result) |
| amount`integer` | For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits.
For loyalty cards, this is the number of loyalty points used in the transaction.
**Example:** 10000
|
| reason`string` | System generated cause for the redemption being invalid in the context of the provided parameters.
|
@@ -660,16 +663,15 @@ All of:
| id`string` | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.
|
| source_id`string`, `null` | Unique source ID of an existing order that will be linked to the redemption of this request.
|
| status`string` | The order status.
Available values: `CREATED`, `PAID`, `CANCELED`, `FULFILLED` |
-| amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
-| initial_amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
-| discount_amount`integer` | Sum of all order-level discounts applied to the order.
|
-| items_discount_amount`integer` | Sum of all product-specific discounts applied to the order.
|
-| total_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied to the order.
|
-| total_amount`integer` | Order amount after undoing all the discounts through the rollback redemption.
|
-| applied_discount_amount`integer` | This field shows the order-level discount applied.
|
-| items_applied_discount_amount`integer` | Sum of all product-specific discounts applied in a particular request.
sum(items, i => i.applied_discount_amount)
|
-| total_applied_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied in a particular request.
total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
|
-| items`array` | Array of items applied to the order. It can include up 500 items.
Array of [Order Item Calculated](#order-item-calculated) |
+| amount`integer` | This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| initial_amount`integer` | This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| discount_amount`integer` | Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| items_discount_amount`integer` | Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| total_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| total_amount`integer` | Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| applied_discount_amount`integer` | This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| items_applied_discount_amount`integer` | Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
sum(items, i => i.applied_discount_amount)
|
+| total_applied_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
|
| metadata`object` | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
|
| object`string` | The type of the object represented by JSON.
Available values: `order` |
| created_at`string` | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.
**Example:** 2021-12-22T10:13:06.487Z
|
@@ -680,6 +682,31 @@ All of:
| referrer | [Referrer Id](#referrer-id) |
| redemptions`object` | |
+## Order Item Calculated
+| Attributes | Description |
+|:-----|:--------|
+| id`string` | Unique identifier of the order line item.
|
+| sku_id`string` | Unique identifier of the SKU. It is assigned by Voucherify.
|
+| product_id`string` | Unique identifier of the product. It is assigned by Voucherify.
|
+| related_object`string` | Used along with the source_id property, can be set to either sku or product.
Available values: `product`, `sku` |
+| source_id`string` | The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.
|
+| quantity`integer` | The quantity of the particular item in the cart.
|
+| discount_quantity`integer` | Number of dicounted items.
|
+| initial_quantity`integer` | A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.
|
+| amount`integer` | The total amount of the order item (price * quantity).
|
+| discount_amount`integer` | Sum of all order-item-level discounts applied to the order.
|
+| applied_discount_amount`integer` | This field shows the order-level discount applied.
|
+| applied_discount_quantity`integer` | Number of the discounted items applied in the transaction.
|
+| applied_quantity`integer` | Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
|
+| applied_quantity_amount`integer` | Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
|
+| initial_amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
+| price`integer` | Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents
for $100.00
.
|
+| subtotal_amount`integer` | Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount
.
subtotal_amount
=amount
-applied_discount_amount
|
+| product`object` | An object containing details of the related product.
Attributes | Description |
---|
idstring | A unique identifier that represents the product and is assigned by Voucherify. |
source_idstring | The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. |
namestring | Product name. |
metadataobject | A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections. |
pricenumber | Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
|
+| sku`object` | An object containing details of the related SKU.
Attributes | Description |
---|
idstring | A unique identifier that represents the SKU and is assigned by Voucherify. |
source_idstring | The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. |
skustring | The SKU name. |
pricenumber | SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
metadataobject | A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections. |
|
+| object`string` | The type of the object represented by JSON.
Available values: `order_item` |
+| metadata`object` | A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.
|
+
## Simple Event
| Attributes | Description |
|:-----|:--------|
@@ -768,7 +795,8 @@ All of:
|:-----|:--------|
| customer | See: [Simple Customer](#simple-customer) |
| referrer | See: [Simple Customer](#simple-customer) |
-| order | See: [Order Calculated No Customer Data](#order-calculated-no-customer-data) |
+| order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data)
+2. Attributes | Description |
---|
itemsarray | Array of items applied to the order. It can include up to 500 items. Array of Order Item Calculated |
|
| redemption | See: [Redemption Internal](#redemption-internal) |
## Event Customer Reward Redemptions
@@ -1010,31 +1038,6 @@ One of:
| validity_hours | See: [Validity Hours](#validity-hours) |
| metadata`object` | The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format.
|
-## Order Item Calculated
-| Attributes | Description |
-|:-----|:--------|
-| id`string` | Unique identifier of the order line item.
|
-| sku_id`string` | Unique identifier of the SKU. It is assigned by Voucherify.
|
-| product_id`string` | Unique identifier of the product. It is assigned by Voucherify.
|
-| related_object`string` | Used along with the source_id property, can be set to either sku or product.
Available values: `product`, `sku` |
-| source_id`string` | The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.
|
-| quantity`integer` | The quantity of the particular item in the cart.
|
-| discount_quantity`integer` | Number of dicounted items.
|
-| initial_quantity`integer` | A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.
|
-| amount`integer` | The total amount of the order item (price * quantity).
|
-| discount_amount`integer` | Sum of all order-item-level discounts applied to the order.
|
-| applied_discount_amount`integer` | This field shows the order-level discount applied.
|
-| applied_discount_quantity`integer` | Number of the discounted items applied in the transaction.
|
-| applied_quantity`integer` | Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
|
-| applied_quantity_amount`integer` | Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
|
-| initial_amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
-| price`integer` | Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents
for $100.00
.
|
-| subtotal_amount`integer` | Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount
.
subtotal_amount
=amount
-applied_discount_amount
|
-| product`object` | An object containing details of the related product.
Attributes | Description |
---|
idstring | A unique identifier that represents the product and is assigned by Voucherify. |
source_idstring | The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. |
namestring | Product name. |
metadataobject | A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections. |
pricenumber | Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
|
-| sku`object` | An object containing details of the related SKU.
Attributes | Description |
---|
idstring | A unique identifier that represents the SKU and is assigned by Voucherify. |
source_idstring | The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. |
skustring | The SKU name. |
pricenumber | SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
metadataobject | A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections. |
|
-| object`string` | The type of the object represented by JSON.
Available values: `order_item` |
-| metadata`object` | A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.
|
-
## Customer Id
| Attributes | Description |
|:-----|:--------|
@@ -1091,14 +1094,14 @@ One of:
| customer_id`string`, `null` | Unique customer ID of the customer making the purchase.
**Example:** cust_7iUa6ICKyU6gH40dBU25kQU1
|
| referrer_id`string`, `null` | Unique referrer ID.
**Example:** cust_nM4jqPiaXUvQdVSA6vTRUnix
|
| amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
-| discount_amount`integer` | Sum of all order-level discounts applied to the order.
|
-| applied_discount_amount`integer` | This field shows the order-level discount applied.
|
-| items_discount_amount`integer` | Sum of all product-specific discounts applied to the order.
|
-| items_applied_discount_amount`integer` | Sum of all product-specific discounts applied in a particular request.
sum(items, i => i.applied_discount_amount)
|
-| total_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied to the order.
|
-| total_applied_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied in a particular request.
total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
|
-| total_amount`integer` | Order amount after undoing all the discounts through the rollback redemption.
|
-| items`array` | Array of items applied to the order. It can include up 500 items.
Array of [Simple Order Item](#simple-order-item) |
+| discount_amount`integer` | Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| applied_discount_amount`integer` | This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| items_discount_amount`integer` | Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| items_applied_discount_amount`integer` | Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
sum(items, i => i.applied_discount_amount)
|
+| total_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| total_applied_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
|
+| total_amount`integer` | Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| items`array` | Array of items applied to the order. It can include up to 500 items.
Array of [Simple Order Item](#simple-order-item) |
| metadata`object` | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
|
| object`string` | The type of the object represented by JSON.
Available values: `order` |
@@ -1178,7 +1181,7 @@ All of:
|:-----|:--------|
| type`string` | Discount type.
Available values: `UNIT` |
| unit_off`integer` | Number of units to be granted a full value discount.
|
-| unit_off_formula`string` | |
+| unit_off_formula`string` | Formula used to calculate the number of units.
|
| effect | Defines how the unit is added to the customer's order.
[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) |
| unit_type`string` | The product deemed as free, chosen from product inventory (e.g. time, items).
|
| product | Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) |
@@ -1391,7 +1394,7 @@ Available values: `ADD_MISSING_ITEMS`, `ADD_NEW_ITEMS`, `ADD_MANY_ITEMS`
| Attributes | Description |
|:-----|:--------|
| unit_off`number` | Number of units to be granted a full value discount.
|
-| unit_off_formula`string` | |
+| unit_off_formula`string` | Formula used to calculate the number of units.
|
| effect`string` | Defines how the unit is added to the customer's order.
Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` |
| unit_type`string` | The product deemed as free, chosen from product inventory (e.g. time, items).
|
| product | Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) |
diff --git a/docs/reference-docs/LOYALTIES-Create-Points-Expiration-Export.md b/docs/reference-docs/LOYALTIES-Export-Loyalty-Campaign-Point-Expiration.md
similarity index 90%
rename from docs/reference-docs/LOYALTIES-Create-Points-Expiration-Export.md
rename to docs/reference-docs/LOYALTIES-Export-Loyalty-Campaign-Point-Expiration.md
index 06f9957de..aa301f080 100644
--- a/docs/reference-docs/LOYALTIES-Create-Points-Expiration-Export.md
+++ b/docs/reference-docs/LOYALTIES-Export-Loyalty-Campaign-Point-Expiration.md
@@ -1,5 +1,5 @@
---
-title: Create Points Expiration Export
+title: Export Loyalty Campaign Point Expiration
type: endpoint
categorySlug: voucherify-api
slug: create-points-expiration-export
diff --git a/docs/reference-docs/LOYALTIES-Get-Points-Expiration.md b/docs/reference-docs/LOYALTIES-List-Loyalty-Card-Point-Expiration.md
similarity index 91%
rename from docs/reference-docs/LOYALTIES-Get-Points-Expiration.md
rename to docs/reference-docs/LOYALTIES-List-Loyalty-Card-Point-Expiration.md
index ad2c76884..87ce11c2b 100644
--- a/docs/reference-docs/LOYALTIES-Get-Points-Expiration.md
+++ b/docs/reference-docs/LOYALTIES-List-Loyalty-Card-Point-Expiration.md
@@ -1,5 +1,5 @@
---
-title: Get Points Expiration
+title: List Loyalty Card Point Expiration
type: endpoint
categorySlug: voucherify-api
slug: list-points-expiration
diff --git a/docs/reference-docs/ORDERS-Order-Object.md b/docs/reference-docs/ORDERS-Order-Object.md
index 55cb9c19b..dff79d84a 100644
--- a/docs/reference-docs/ORDERS-Order-Object.md
+++ b/docs/reference-docs/ORDERS-Order-Object.md
@@ -14,16 +14,15 @@ order: 1
| id`string` | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.
|
| source_id`string`, `null` | Unique source ID of an existing order that will be linked to the redemption of this request.
|
| status`string` | The order status.
Available values: `CREATED`, `PAID`, `CANCELED`, `FULFILLED` |
-| amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
-| initial_amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
-| discount_amount`integer` | Sum of all order-level discounts applied to the order.
|
-| items_discount_amount`integer` | Sum of all product-specific discounts applied to the order.
|
-| total_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied to the order.
|
-| total_amount`integer` | Order amount after undoing all the discounts through the rollback redemption.
|
-| applied_discount_amount`integer` | This field shows the order-level discount applied.
|
-| items_applied_discount_amount`integer` | Sum of all product-specific discounts applied in a particular request.
sum(items, i => i.applied_discount_amount)
|
-| total_applied_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied in a particular request.
total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
|
-| items`array` | Array of items applied to the order. It can include up 500 items.
Array of [Order Item Calculated](#order-item-calculated) |
+| amount`integer` | This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| initial_amount`integer` | This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| discount_amount`integer` | Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| items_discount_amount`integer` | Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| total_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| total_amount`integer` | Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| applied_discount_amount`integer` | This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| items_applied_discount_amount`integer` | Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
sum(items, i => i.applied_discount_amount)
|
+| total_applied_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
|
| metadata`object` | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
|
| object`string` | The type of the object represented by JSON.
Available values: `order` |
| created_at`string` | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.
**Example:** 2021-12-22T10:13:06.487Z
|
@@ -34,31 +33,6 @@ order: 1
| referrer | [Referrer Id](#referrer-id) |
| redemptions`object` | |
-## Order Item Calculated
-| Attributes | Description |
-|:-----|:--------|
-| id`string` | Unique identifier of the order line item.
|
-| sku_id`string` | Unique identifier of the SKU. It is assigned by Voucherify.
|
-| product_id`string` | Unique identifier of the product. It is assigned by Voucherify.
|
-| related_object`string` | Used along with the source_id property, can be set to either sku or product.
Available values: `product`, `sku` |
-| source_id`string` | The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.
|
-| quantity`integer` | The quantity of the particular item in the cart.
|
-| discount_quantity`integer` | Number of dicounted items.
|
-| initial_quantity`integer` | A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.
|
-| amount`integer` | The total amount of the order item (price * quantity).
|
-| discount_amount`integer` | Sum of all order-item-level discounts applied to the order.
|
-| applied_discount_amount`integer` | This field shows the order-level discount applied.
|
-| applied_discount_quantity`integer` | Number of the discounted items applied in the transaction.
|
-| applied_quantity`integer` | Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
|
-| applied_quantity_amount`integer` | Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
|
-| initial_amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
-| price`integer` | Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents
for $100.00
.
|
-| subtotal_amount`integer` | Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount
.
subtotal_amount
=amount
-applied_discount_amount
|
-| product`object` | An object containing details of the related product.
Attributes | Description |
---|
idstring | A unique identifier that represents the product and is assigned by Voucherify. |
source_idstring | The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. |
namestring | Product name. |
metadataobject | A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections. |
pricenumber | Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
|
-| sku`object` | An object containing details of the related SKU.
Attributes | Description |
---|
idstring | A unique identifier that represents the SKU and is assigned by Voucherify. |
source_idstring | The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. |
skustring | The SKU name. |
pricenumber | SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
metadataobject | A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections. |
|
-| object`string` | The type of the object represented by JSON.
Available values: `order_item` |
-| metadata`object` | A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.
|
-
## Customer Id
| Attributes | Description |
|:-----|:--------|
diff --git a/docs/reference-docs/PROMOTIONS-Promotion-Tier-Object.md b/docs/reference-docs/PROMOTIONS-Promotion-Tier-Object.md
index ff0e389e3..b1f553116 100644
--- a/docs/reference-docs/PROMOTIONS-Promotion-Tier-Object.md
+++ b/docs/reference-docs/PROMOTIONS-Promotion-Tier-Object.md
@@ -88,7 +88,7 @@ One of:
|:-----|:--------|
| type`string` | Discount type.
Available values: `UNIT` |
| unit_off`integer` | Number of units to be granted a full value discount.
|
-| unit_off_formula`string` | |
+| unit_off_formula`string` | Formula used to calculate the number of units.
|
| effect | Defines how the unit is added to the customer's order.
[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) |
| unit_type`string` | The product deemed as free, chosen from product inventory (e.g. time, items).
|
| product | Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) |
@@ -156,7 +156,7 @@ Available values: `ADD_MISSING_ITEMS`, `ADD_NEW_ITEMS`, `ADD_MANY_ITEMS`
| Attributes | Description |
|:-----|:--------|
| unit_off`number` | Number of units to be granted a full value discount.
|
-| unit_off_formula`string` | |
+| unit_off_formula`string` | Formula used to calculate the number of units.
|
| effect`string` | Defines how the unit is added to the customer's order.
Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` |
| unit_type`string` | The product deemed as free, chosen from product inventory (e.g. time, items).
|
| product | Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) |
diff --git a/docs/reference-docs/PUBLICATIONS-Publication-Object.md b/docs/reference-docs/PUBLICATIONS-Publication-Object.md
index c7678253f..2563852b5 100644
--- a/docs/reference-docs/PUBLICATIONS-Publication-Object.md
+++ b/docs/reference-docs/PUBLICATIONS-Publication-Object.md
@@ -216,7 +216,7 @@ One of:
|:-----|:--------|
| type`string` | Discount type.
Available values: `UNIT` |
| unit_off`integer` | Number of units to be granted a full value discount.
|
-| unit_off_formula`string` | |
+| unit_off_formula`string` | Formula used to calculate the number of units.
|
| effect | Defines how the unit is added to the customer's order.
[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) |
| unit_type`string` | The product deemed as free, chosen from product inventory (e.g. time, items).
|
| product | Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) |
@@ -274,7 +274,7 @@ Available values: `ADD_MISSING_ITEMS`, `ADD_NEW_ITEMS`, `ADD_MANY_ITEMS`
| Attributes | Description |
|:-----|:--------|
| unit_off`number` | Number of units to be granted a full value discount.
|
-| unit_off_formula`string` | |
+| unit_off_formula`string` | Formula used to calculate the number of units.
|
| effect`string` | Defines how the unit is added to the customer's order.
Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` |
| unit_type`string` | The product deemed as free, chosen from product inventory (e.g. time, items).
|
| product | Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) |
diff --git a/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md b/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md
index 3aa4ee0e3..86718021e 100644
--- a/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md
+++ b/docs/reference-docs/QUALIFICATIONS-Qualification-Object.md
@@ -17,7 +17,8 @@ order: 1
|:-----|:--------|
| redeemables | See: [Redeemables](#redeemables) |
| tracking_id`string` | This identifier is generated during voucher qualification based on your internal id (e.g., email, database ID). This is a hashed customer source ID.
|
-| order`object` | [Order Calculated No Customer Data](#order-calculated-no-customer-data) |
+| order`object` | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data)
+2. Attributes | Description |
---|
itemsarray | Array of items applied to the order. It can include up to 500 items. |
|
| stacking_rules | See: [Stacking Rules](#stacking-rules) |
## Redeemables
@@ -36,16 +37,15 @@ order: 1
| id`string` | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.
|
| source_id`string`, `null` | Unique source ID of an existing order that will be linked to the redemption of this request.
|
| status`string` | The order status.
Available values: `CREATED`, `PAID`, `CANCELED`, `FULFILLED` |
-| amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
-| initial_amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
-| discount_amount`integer` | Sum of all order-level discounts applied to the order.
|
-| items_discount_amount`integer` | Sum of all product-specific discounts applied to the order.
|
-| total_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied to the order.
|
-| total_amount`integer` | Order amount after undoing all the discounts through the rollback redemption.
|
-| applied_discount_amount`integer` | This field shows the order-level discount applied.
|
-| items_applied_discount_amount`integer` | Sum of all product-specific discounts applied in a particular request.
sum(items, i => i.applied_discount_amount)
|
-| total_applied_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied in a particular request.
total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
|
-| items`array` | Array of items applied to the order. It can include up 500 items.
Array of [Order Item Calculated](#order-item-calculated) |
+| amount`integer` | This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| initial_amount`integer` | This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| discount_amount`integer` | Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| items_discount_amount`integer` | Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| total_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| total_amount`integer` | Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| applied_discount_amount`integer` | This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| items_applied_discount_amount`integer` | Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
sum(items, i => i.applied_discount_amount)
|
+| total_applied_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
|
| metadata`object` | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
|
| object`string` | The type of the object represented by JSON.
Available values: `order` |
| created_at`string` | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.
**Example:** 2021-12-22T10:13:06.487Z
|
@@ -77,31 +77,6 @@ All of:
1. [Single redeemable](#single-redeemable)
2.
-## Order Item Calculated
-| Attributes | Description |
-|:-----|:--------|
-| id`string` | Unique identifier of the order line item.
|
-| sku_id`string` | Unique identifier of the SKU. It is assigned by Voucherify.
|
-| product_id`string` | Unique identifier of the product. It is assigned by Voucherify.
|
-| related_object`string` | Used along with the source_id property, can be set to either sku or product.
Available values: `product`, `sku` |
-| source_id`string` | The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.
|
-| quantity`integer` | The quantity of the particular item in the cart.
|
-| discount_quantity`integer` | Number of dicounted items.
|
-| initial_quantity`integer` | A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.
|
-| amount`integer` | The total amount of the order item (price * quantity).
|
-| discount_amount`integer` | Sum of all order-item-level discounts applied to the order.
|
-| applied_discount_amount`integer` | This field shows the order-level discount applied.
|
-| applied_discount_quantity`integer` | Number of the discounted items applied in the transaction.
|
-| applied_quantity`integer` | Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
|
-| applied_quantity_amount`integer` | Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
|
-| initial_amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
-| price`integer` | Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents
for $100.00
.
|
-| subtotal_amount`integer` | Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount
.
subtotal_amount
=amount
-applied_discount_amount
|
-| product`object` | An object containing details of the related product.
Attributes | Description |
---|
idstring | A unique identifier that represents the product and is assigned by Voucherify. |
source_idstring | The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. |
namestring | Product name. |
metadataobject | A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections. |
pricenumber | Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
|
-| sku`object` | An object containing details of the related SKU.
Attributes | Description |
---|
idstring | A unique identifier that represents the SKU and is assigned by Voucherify. |
source_idstring | The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. |
skustring | The SKU name. |
pricenumber | SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
metadataobject | A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections. |
|
-| object`string` | The type of the object represented by JSON.
Available values: `order_item` |
-| metadata`object` | A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.
|
-
## Customer Id
| Attributes | Description |
|:-----|:--------|
@@ -130,7 +105,8 @@ All of:
| object`string` | Object type of the redeemable.
Available values: `campaign`, `promotion_tier`, `promotion_stack`, `voucher` |
| created_at`string` | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.
**Example:** 2022-03-09T11:19:04.819Z
|
| result | See: [Redeemable Result](#redeemable-result) |
-| order | See: [Order Calculated No Customer Data](#order-calculated-no-customer-data) |
+| order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data)
+2. Attributes | Description |
---|
itemsarray | Array of items applied to the order. It can include up to 500 items. |
|
| validation_rule_id`string` | A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance.
|
| applicable_to | Contains list of items that qualify in the scope of the discount. These are definitions of included products, SKUs, and product collections. These can be discounted.
[Applicable To Result List](#applicable-to-result-list) |
| inapplicable_to | Contains list of items that do not qualify in the scope of the discount. These are definitions of excluded products, SKUs, and product collections. These CANNOT be discounted.
[Inapplicable To Result List](#inapplicable-to-result-list) |
@@ -232,10 +208,11 @@ One of:
| 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` | Determines the order in which the discount is applied to the products or SKUs sent in the order
object in the request. The counting begins from 0
.
|
+| 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 |
---|
indexinteger | Number assigned to the order line item in accordance with the order sent in the request. |
unitsarray | 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.
Available values: `ITEM` |
+| 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` |
## Inapplicable To
[Applicable To](#applicable-to)
@@ -278,7 +255,7 @@ One of:
|:-----|:--------|
| type`string` | Discount type.
Available values: `UNIT` |
| unit_off`integer` | Number of units to be granted a full value discount.
|
-| unit_off_formula`string` | |
+| unit_off_formula`string` | Formula used to calculate the number of units.
|
| effect | Defines how the unit is added to the customer's order.
[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) |
| unit_type`string` | The product deemed as free, chosen from product inventory (e.g. time, items).
|
| product | Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) |
@@ -347,7 +324,7 @@ Available values: `ADD_MISSING_ITEMS`, `ADD_NEW_ITEMS`, `ADD_MANY_ITEMS`
| Attributes | Description |
|:-----|:--------|
| unit_off`number` | Number of units to be granted a full value discount.
|
-| unit_off_formula`string` | |
+| unit_off_formula`string` | Formula used to calculate the number of units.
|
| effect`string` | Defines how the unit is added to the customer's order.
Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` |
| unit_type`string` | The product deemed as free, chosen from product inventory (e.g. time, items).
|
| product | Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) |
diff --git a/docs/reference-docs/REDEMPTIONS-Redemption-Object.md b/docs/reference-docs/REDEMPTIONS-Redemption-Object.md
index 8fa7a0771..0ebbd3fb1 100644
--- a/docs/reference-docs/REDEMPTIONS-Redemption-Object.md
+++ b/docs/reference-docs/REDEMPTIONS-Redemption-Object.md
@@ -13,7 +13,8 @@ order: 1
|:-----|:--------|
| redemptions`array` | Array of [Redemption](#redemption) |
| parent_redemption | See: [Redemption](#redemption) |
-| order | Contains the order details associated with the redemption.
[Order Calculated No Customer Data](#order-calculated-no-customer-data) |
+| order | Contains the order details associated with the redemption.
All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data)
+2. Attributes | Description |
---|
itemsarray | Array of items applied to the order. It can include up to 500 items. |
|
| inapplicable_redeemables`array` | Lists validation results of each inapplicable redeemable.
Array of [Inapplicable Redeemable](#inapplicable-redeemable) |
| skipped_redeemables`array` | Lists validation results of each redeemable. If a redeemable can be applied, the API returns "status": "APPLICABLE"
.
Array of [Skipped Redeemable](#skipped-redeemable) |
@@ -31,16 +32,15 @@ All of:
| id`string` | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.
|
| source_id`string`, `null` | Unique source ID of an existing order that will be linked to the redemption of this request.
|
| status`string` | The order status.
Available values: `CREATED`, `PAID`, `CANCELED`, `FULFILLED` |
-| amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
-| initial_amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
-| discount_amount`integer` | Sum of all order-level discounts applied to the order.
|
-| items_discount_amount`integer` | Sum of all product-specific discounts applied to the order.
|
-| total_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied to the order.
|
-| total_amount`integer` | Order amount after undoing all the discounts through the rollback redemption.
|
-| applied_discount_amount`integer` | This field shows the order-level discount applied.
|
-| items_applied_discount_amount`integer` | Sum of all product-specific discounts applied in a particular request.
sum(items, i => i.applied_discount_amount)
|
-| total_applied_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied in a particular request.
total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
|
-| items`array` | Array of items applied to the order. It can include up 500 items.
Array of [Order Item Calculated](#order-item-calculated) |
+| amount`integer` | This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| initial_amount`integer` | This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| discount_amount`integer` | Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| items_discount_amount`integer` | Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| total_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| total_amount`integer` | Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| applied_discount_amount`integer` | This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| items_applied_discount_amount`integer` | Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
sum(items, i => i.applied_discount_amount)
|
+| total_applied_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
|
| metadata`object` | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
|
| object`string` | The type of the object represented by JSON.
Available values: `order` |
| created_at`string` | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.
**Example:** 2021-12-22T10:13:06.487Z
|
@@ -93,7 +93,8 @@ All of:
| related_redemptions`object` | Attributes | Description |
---|
rollbacksarray | Array of: Redemption Related Redemptions Rollbacks ItemAttributes | Description |
---|
idstring | Unique rollback redemption ID. Example: rr_0bc92f81a6801f9bca | datestring | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. Example: 2021-12-22T10:13:06.487Z |
|
redemptionsarray | Array of: Redemption Related Redemptions ItemAttributes | Description |
---|
idstring | Unique redemption ID. Example: r_0bc92f81a6801f9bca | datestring | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. Example: 2021-12-22T10:13:06.487Z |
|
|
| failure_code`string` | If the result is FAILURE
, this parameter will provide a generic reason as to why the redemption failed.
**Example:** customer_rules_violated
|
| failure_message`string` | If the result is FAILURE
, this parameter will provide a more expanded reason as to why the redemption failed.
|
-| order | [Order Calculated No Customer Data](#order-calculated-no-customer-data) |
+| order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data)
+2. Attributes | Description |
---|
itemsarray | Array of items applied to the order. It can include up to 500 items. Array of Order Item Calculated |
|
| channel`object` | Defines the details of the channel through which the redemption was issued.
Attributes | Description |
---|
channel_idstring | Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API. For AUTO_REDEEM , it is the reward assignment ID. Example: user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH |
channel_typestring | The source of the channel for the redemption. A USER corresponds to the Voucherify Dashboard, API corresponds to the API, and AUTO_REDEEM corresponds to a loyalty campaign reward that has been redeemed automatically. Available values: USER , API , AUTO_REDEEM |
|
| customer | [Simple Customer](#simple-customer) |
| related_object_type`string` | Defines the related object.
Available values: `voucher`, `promotion_tier`, `redemption` |
@@ -116,31 +117,6 @@ All of:
|:-----|:--------|
| holder | See: [Simple Customer](#simple-customer) |
-## Order Item Calculated
-| Attributes | Description |
-|:-----|:--------|
-| id`string` | Unique identifier of the order line item.
|
-| sku_id`string` | Unique identifier of the SKU. It is assigned by Voucherify.
|
-| product_id`string` | Unique identifier of the product. It is assigned by Voucherify.
|
-| related_object`string` | Used along with the source_id property, can be set to either sku or product.
Available values: `product`, `sku` |
-| source_id`string` | The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.
|
-| quantity`integer` | The quantity of the particular item in the cart.
|
-| discount_quantity`integer` | Number of dicounted items.
|
-| initial_quantity`integer` | A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.
|
-| amount`integer` | The total amount of the order item (price * quantity).
|
-| discount_amount`integer` | Sum of all order-item-level discounts applied to the order.
|
-| applied_discount_amount`integer` | This field shows the order-level discount applied.
|
-| applied_discount_quantity`integer` | Number of the discounted items applied in the transaction.
|
-| applied_quantity`integer` | Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
|
-| applied_quantity_amount`integer` | Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
|
-| initial_amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
-| price`integer` | Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents
for $100.00
.
|
-| subtotal_amount`integer` | Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount
.
subtotal_amount
=amount
-applied_discount_amount
|
-| product`object` | An object containing details of the related product.
Attributes | Description |
---|
idstring | A unique identifier that represents the product and is assigned by Voucherify. |
source_idstring | The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. |
namestring | Product name. |
metadataobject | A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections. |
pricenumber | Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
|
-| sku`object` | An object containing details of the related SKU.
Attributes | Description |
---|
idstring | A unique identifier that represents the SKU and is assigned by Voucherify. |
source_idstring | The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. |
skustring | The SKU name. |
pricenumber | SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
metadataobject | A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections. |
|
-| object`string` | The type of the object represented by JSON.
Available values: `order_item` |
-| metadata`object` | A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.
|
-
## Customer Id
| Attributes | Description |
|:-----|:--------|
@@ -218,6 +194,31 @@ All of:
| key`string` | Available values: `preceding_validation_failed` |
| message`string` | **Example:** Redeemable cannot be applied due to preceding validation failure
|
+## Order Item Calculated
+| Attributes | Description |
+|:-----|:--------|
+| id`string` | Unique identifier of the order line item.
|
+| sku_id`string` | Unique identifier of the SKU. It is assigned by Voucherify.
|
+| product_id`string` | Unique identifier of the product. It is assigned by Voucherify.
|
+| related_object`string` | Used along with the source_id property, can be set to either sku or product.
Available values: `product`, `sku` |
+| source_id`string` | The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.
|
+| quantity`integer` | The quantity of the particular item in the cart.
|
+| discount_quantity`integer` | Number of dicounted items.
|
+| initial_quantity`integer` | A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.
|
+| amount`integer` | The total amount of the order item (price * quantity).
|
+| discount_amount`integer` | Sum of all order-item-level discounts applied to the order.
|
+| applied_discount_amount`integer` | This field shows the order-level discount applied.
|
+| applied_discount_quantity`integer` | Number of the discounted items applied in the transaction.
|
+| applied_quantity`integer` | Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
|
+| applied_quantity_amount`integer` | Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
|
+| initial_amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
+| price`integer` | Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents
for $100.00
.
|
+| subtotal_amount`integer` | Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount
.
subtotal_amount
=amount
-applied_discount_amount
|
+| product`object` | An object containing details of the related product.
Attributes | Description |
---|
idstring | A unique identifier that represents the product and is assigned by Voucherify. |
source_idstring | The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. |
namestring | Product name. |
metadataobject | A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections. |
pricenumber | Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
|
+| sku`object` | An object containing details of the related SKU.
Attributes | Description |
---|
idstring | A unique identifier that represents the SKU and is assigned by Voucherify. |
source_idstring | The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. |
skustring | The SKU name. |
pricenumber | SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
metadataobject | A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections. |
|
+| object`string` | The type of the object represented by JSON.
Available values: `order_item` |
+| metadata`object` | A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.
|
+
## Simple Customer
| Attributes | Description |
|:-----|:--------|
@@ -416,7 +417,7 @@ All of:
|:-----|:--------|
| type`string` | Discount type.
Available values: `UNIT` |
| unit_off`integer` | Number of units to be granted a full value discount.
|
-| unit_off_formula`string` | |
+| unit_off_formula`string` | Formula used to calculate the number of units.
|
| effect | Defines how the unit is added to the customer's order.
[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) |
| unit_type`string` | The product deemed as free, chosen from product inventory (e.g. time, items).
|
| product | Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) |
@@ -506,7 +507,7 @@ Available values: `ADD_MISSING_ITEMS`, `ADD_NEW_ITEMS`, `ADD_MANY_ITEMS`
| Attributes | Description |
|:-----|:--------|
| unit_off`number` | Number of units to be granted a full value discount.
|
-| unit_off_formula`string` | |
+| unit_off_formula`string` | Formula used to calculate the number of units.
|
| effect`string` | Defines how the unit is added to the customer's order.
Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` |
| unit_type`string` | The product deemed as free, chosen from product inventory (e.g. time, items).
|
| product | Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) |
diff --git a/docs/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md b/docs/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md
index ab40a4661..99574ea53 100644
--- a/docs/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md
+++ b/docs/reference-docs/REDEMPTIONS-Rollback-Redemption-Object.md
@@ -25,7 +25,8 @@ order: 2
| related_redemptions`object` | Attributes | Description |
---|
rollbacksarray | Array of: Redemption Rollback Related Redemptions Rollbacks ItemAttributes | Description |
---|
idstring | Unique identifier of the redemption rollback. Example: rr_0bc92f81a6801f9bca | datestring | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. Example: 2021-12-22T10:13:06.487Z |
|
redemptionsarray | Array of: Redemption Rollback Related Redemptions ItemAttributes | Description |
---|
idstring | Unique redemption ID. Example: r_0bc92f81a6801f9bca | datestring | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. Example: 2021-12-22T10:13:06.487Z |
|
|
| failure_code`string` | If the result is FAILURE
, this parameter will provide a generic reason as to why the redemption failed.
**Example:** customer_rules_violated
|
| failure_message`string` | If the result is FAILURE
, this parameter will provide a more expanded reason as to why the redemption failed.
|
-| order | [Order Calculated No Customer Data](#order-calculated-no-customer-data) |
+| order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data)
+2. Attributes | Description |
---|
itemsarray | Array of items applied to the order. It can include up to 500 items. Array of Order Item Calculated |
|
| channel`object` | Defines the details of the channel through which the redemption was issued.
Attributes | Description |
---|
channel_idstring | Unique identifier of the channel which was used by the user performing the redemption rollback. This is either a user ID from the user using the Voucherify Dashboard or an X-APP-Id of a user using the API. Example: user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH |
channel_typestring | The source of the channel for the redemption. A USER corresponds to the Voucherify Dashboard and an API corresponds to the API. Available values: USER , API |
|
| customer | [Simple Customer](#simple-customer) |
| related_object_type`string` | Defines the related object.
Available values: `voucher`, `promotion_tier`, `redemption` |
@@ -42,16 +43,15 @@ order: 2
| id`string` | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.
|
| source_id`string`, `null` | Unique source ID of an existing order that will be linked to the redemption of this request.
|
| status`string` | The order status.
Available values: `CREATED`, `PAID`, `CANCELED`, `FULFILLED` |
-| amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
-| initial_amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
-| discount_amount`integer` | Sum of all order-level discounts applied to the order.
|
-| items_discount_amount`integer` | Sum of all product-specific discounts applied to the order.
|
-| total_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied to the order.
|
-| total_amount`integer` | Order amount after undoing all the discounts through the rollback redemption.
|
-| applied_discount_amount`integer` | This field shows the order-level discount applied.
|
-| items_applied_discount_amount`integer` | Sum of all product-specific discounts applied in a particular request.
sum(items, i => i.applied_discount_amount)
|
-| total_applied_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied in a particular request.
total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
|
-| items`array` | Array of items applied to the order. It can include up 500 items.
Array of [Order Item Calculated](#order-item-calculated) |
+| amount`integer` | This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| initial_amount`integer` | This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| discount_amount`integer` | Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| items_discount_amount`integer` | Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| total_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| total_amount`integer` | Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| applied_discount_amount`integer` | This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| items_applied_discount_amount`integer` | Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
sum(items, i => i.applied_discount_amount)
|
+| total_applied_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
|
| metadata`object` | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
|
| object`string` | The type of the object represented by JSON.
Available values: `order` |
| created_at`string` | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.
**Example:** 2021-12-22T10:13:06.487Z
|
@@ -62,6 +62,31 @@ order: 2
| referrer | [Referrer Id](#referrer-id) |
| redemptions`object` | |
+## Order Item Calculated
+| Attributes | Description |
+|:-----|:--------|
+| id`string` | Unique identifier of the order line item.
|
+| sku_id`string` | Unique identifier of the SKU. It is assigned by Voucherify.
|
+| product_id`string` | Unique identifier of the product. It is assigned by Voucherify.
|
+| related_object`string` | Used along with the source_id property, can be set to either sku or product.
Available values: `product`, `sku` |
+| source_id`string` | The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.
|
+| quantity`integer` | The quantity of the particular item in the cart.
|
+| discount_quantity`integer` | Number of dicounted items.
|
+| initial_quantity`integer` | A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.
|
+| amount`integer` | The total amount of the order item (price * quantity).
|
+| discount_amount`integer` | Sum of all order-item-level discounts applied to the order.
|
+| applied_discount_amount`integer` | This field shows the order-level discount applied.
|
+| applied_discount_quantity`integer` | Number of the discounted items applied in the transaction.
|
+| applied_quantity`integer` | Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
|
+| applied_quantity_amount`integer` | Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
|
+| initial_amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
+| price`integer` | Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents
for $100.00
.
|
+| subtotal_amount`integer` | Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount
.
subtotal_amount
=amount
-applied_discount_amount
|
+| product`object` | An object containing details of the related product.
Attributes | Description |
---|
idstring | A unique identifier that represents the product and is assigned by Voucherify. |
source_idstring | The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. |
namestring | Product name. |
metadataobject | A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections. |
pricenumber | Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
|
+| sku`object` | An object containing details of the related SKU.
Attributes | Description |
---|
idstring | A unique identifier that represents the SKU and is assigned by Voucherify. |
source_idstring | The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. |
skustring | The SKU name. |
pricenumber | SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
metadataobject | A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections. |
|
+| object`string` | The type of the object represented by JSON.
Available values: `order_item` |
+| metadata`object` | A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.
|
+
## Simple Customer
| Attributes | Description |
|:-----|:--------|
@@ -124,31 +149,6 @@ All of:
| metadata`object` | A set of custom key/value pairs that you can attach to a reward. The metadata object stores all custom attributes assigned to the reward.
|
| type`string` | Reward type.
Available values: `CAMPAIGN`, `COIN`, `MATERIAL` |
-## Order Item Calculated
-| Attributes | Description |
-|:-----|:--------|
-| id`string` | Unique identifier of the order line item.
|
-| sku_id`string` | Unique identifier of the SKU. It is assigned by Voucherify.
|
-| product_id`string` | Unique identifier of the product. It is assigned by Voucherify.
|
-| related_object`string` | Used along with the source_id property, can be set to either sku or product.
Available values: `product`, `sku` |
-| source_id`string` | The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.
|
-| quantity`integer` | The quantity of the particular item in the cart.
|
-| discount_quantity`integer` | Number of dicounted items.
|
-| initial_quantity`integer` | A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.
|
-| amount`integer` | The total amount of the order item (price * quantity).
|
-| discount_amount`integer` | Sum of all order-item-level discounts applied to the order.
|
-| applied_discount_amount`integer` | This field shows the order-level discount applied.
|
-| applied_discount_quantity`integer` | Number of the discounted items applied in the transaction.
|
-| applied_quantity`integer` | Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
|
-| applied_quantity_amount`integer` | Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
|
-| initial_amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
-| price`integer` | Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents
for $100.00
.
|
-| subtotal_amount`integer` | Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount
.
subtotal_amount
=amount
-applied_discount_amount
|
-| product`object` | An object containing details of the related product.
Attributes | Description |
---|
idstring | A unique identifier that represents the product and is assigned by Voucherify. |
source_idstring | The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. |
namestring | Product name. |
metadataobject | A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections. |
pricenumber | Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
|
-| sku`object` | An object containing details of the related SKU.
Attributes | Description |
---|
idstring | A unique identifier that represents the SKU and is assigned by Voucherify. |
source_idstring | The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. |
skustring | The SKU name. |
pricenumber | SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
metadataobject | A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections. |
|
-| object`string` | The type of the object represented by JSON.
Available values: `order_item` |
-| metadata`object` | A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.
|
-
## Customer Id
| Attributes | Description |
|:-----|:--------|
@@ -306,7 +306,7 @@ All of:
|:-----|:--------|
| type`string` | Discount type.
Available values: `UNIT` |
| unit_off`integer` | Number of units to be granted a full value discount.
|
-| unit_off_formula`string` | |
+| unit_off_formula`string` | Formula used to calculate the number of units.
|
| effect | Defines how the unit is added to the customer's order.
[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) |
| unit_type`string` | The product deemed as free, chosen from product inventory (e.g. time, items).
|
| product | Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) |
@@ -396,7 +396,7 @@ Available values: `ADD_MISSING_ITEMS`, `ADD_NEW_ITEMS`, `ADD_MANY_ITEMS`
| Attributes | Description |
|:-----|:--------|
| unit_off`number` | Number of units to be granted a full value discount.
|
-| unit_off_formula`string` | |
+| unit_off_formula`string` | Formula used to calculate the number of units.
|
| effect`string` | Defines how the unit is added to the customer's order.
Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` |
| unit_type`string` | The product deemed as free, chosen from product inventory (e.g. time, items).
|
| product | Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) |
diff --git a/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md b/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md
index d75af972d..127df158f 100644
--- a/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md
+++ b/docs/reference-docs/VALIDATION-RULES-Validation-Rule-Object.md
@@ -28,7 +28,7 @@ All of:
| 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 | Description |
---|
namestring | Voucherify specific rule name. The list of available names is provided below. Type | Name |
---|
Customer | customer.segment customer.metadata* | Order | order.amount order.initial_amount order.items.count order.items.price_any order.items.price_each order.items.metadata_any order.items.metadata_each order.metadata* | Campaign | campaign.orders.amount_discounted campaign.orders.amount campaign.redemptions.count campaign.redemptions.count.daily campaign.redemptions.count.monthly campaign.redemptions.customers_count campaign.redemptions.customers_count.daily campaign.redemptions.customers_count.monthly | Redemption | redemption.gift.amount redemption.count.daily redemption.count.monthly redemption.count.per_customer redemption.count.per_customer.daily redemption.count.per_customer.monthly redemption.api_key redemption.count.per_api_key redemption.user.login redemption.count.per_user redemption.metadata redemption.reward.pay_with_points.points_used | Product | product.id product.price product.quantity product.discount_applicable product.metadata* product.metadata.aggregated_quantity product.metadata.aggregated_amount product.metadata.discount_applicable product.metadata.match_all | SKU | sku.id sku.price sku.quantity sku.discount_applicable | Publication | publication.redeemable_by_linked_customer | Custom Event | custom_event.metadata* | Order items | order.items.every order.items.any order.items.none order.items.cheapest order.items.most_expensive |
*Requires the property field to be defined. |
propertystring , null | 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 |
conditions | See: Validation Rule Conditions |
rules | See: Validation Rule Rules |
errorobject | Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule. Attributes | Description |
---|
messagestring | The error message returned from API when validation / redemption fails to meet requirements of defined rule. |
|
|
+| [propertyName]`object` | Contains the name of the validation rule.
Attributes | Description |
---|
namestring | Voucherify's specific rule name. The list of available names is provided below. Type | Name |
---|
Customer | customer.segment customer.metadata* | Order | order.amount order.initial_amount order.items.count order.items.price_any order.items.price_each order.items.metadata_any order.items.metadata_each order.metadata* | Campaign | campaign.orders.amount_discounted campaign.orders.amount campaign.redemptions.count campaign.redemptions.count.daily campaign.redemptions.count.monthly campaign.redemptions.customers_count campaign.redemptions.customers_count.daily campaign.redemptions.customers_count.monthly | Redemption | redemption.gift.amount redemption.count.daily redemption.count.monthly redemption.count.per_customer redemption.count.per_customer.daily redemption.count.per_customer.monthly redemption.api_key redemption.count.per_api_key redemption.user.login redemption.count.per_user redemption.metadata redemption.reward.pay_with_points.points_used | Product | product.id product.price product.quantity product.discount_applicable product.metadata* product.metadata.aggregated_quantity product.metadata.aggregated_amount product.metadata.discount_applicable product.metadata.match_all | SKU | sku.id sku.price sku.quantity sku.discount_applicable | Publication | publication.redeemable_by_linked_customer | Custom Event | custom_event.metadata* | Order items | order.items.every order.items.any order.items.none order.items.cheapest order.items.most_expensive |
*Requires the property field to be defined. |
propertystring , null | 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 |
conditions | See: Validation Rule Conditions |
rules | See: Validation Rule Rules |
errorobject | Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule. Attributes | Description |
---|
messagestring | The error message returned from API when validation / redemption fails to meet requirements of defined rule. |
|
|
## Applicable To
| Attributes | Description |
@@ -46,10 +46,11 @@ All of:
| 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` | Determines the order in which the discount is applied to the products or SKUs sent in the order
object in the request. The counting begins from 0
.
|
+| 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 |
---|
indexinteger | Number assigned to the order line item in accordance with the order sent in the request. |
unitsarray | 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.
Available values: `ITEM` |
+| 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 |
@@ -88,7 +89,7 @@ All of:
| 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 | Description |
---|
namestring | Voucherify specific rule name. The list of available names is provided below. Type | Name |
---|
Customer | customer.segment customer.metadata* | Order | order.amount order.initial_amount order.items.count order.items.price_any order.items.price_each order.items.metadata_any order.items.metadata_each order.metadata* | Campaign | campaign.orders.amount_discounted campaign.orders.amount campaign.redemptions.count campaign.redemptions.count.daily campaign.redemptions.count.monthly campaign.redemptions.customers_count campaign.redemptions.customers_count.daily campaign.redemptions.customers_count.monthly | Redemption | redemption.gift.amount redemption.count.daily redemption.count.monthly redemption.count.per_customer redemption.count.per_customer.daily redemption.count.per_customer.monthly redemption.api_key redemption.count.per_api_key redemption.user.login redemption.count.per_user redemption.metadata redemption.reward.pay_with_points.points_used | Product | product.id product.price product.quantity product.discount_applicable product.metadata* product.metadata.aggregated_quantity product.metadata.aggregated_amount product.metadata.discount_applicable product.metadata.match_all | SKU | sku.id sku.price sku.quantity sku.discount_applicable | Publication | publication.redeemable_by_linked_customer | Custom Event | custom_event.metadata* | Order items | order.items.every order.items.any order.items.none order.items.cheapest order.items.most_expensive |
*Requires the property field to be defined. |
propertystring , null | 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 |
conditions | See: Validation Rule Conditions |
rules | See: Validation Rule Rules |
errorobject | Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule. Attributes | Description |
---|
messagestring | The error message returned from API when validation / redemption fails to meet requirements of defined rule. |
|
|
+| [propertyName]`object` | Contains the name of the validation rule.
Attributes | Description |
---|
namestring | Voucherify's specific rule name. The list of available names is provided below. Type | Name |
---|
Customer | customer.segment customer.metadata* | Order | order.amount order.initial_amount order.items.count order.items.price_any order.items.price_each order.items.metadata_any order.items.metadata_each order.metadata* | Campaign | campaign.orders.amount_discounted campaign.orders.amount campaign.redemptions.count campaign.redemptions.count.daily campaign.redemptions.count.monthly campaign.redemptions.customers_count campaign.redemptions.customers_count.daily campaign.redemptions.customers_count.monthly | Redemption | redemption.gift.amount redemption.count.daily redemption.count.monthly redemption.count.per_customer redemption.count.per_customer.daily redemption.count.per_customer.monthly redemption.api_key redemption.count.per_api_key redemption.user.login redemption.count.per_user redemption.metadata redemption.reward.pay_with_points.points_used | Product | product.id product.price product.quantity product.discount_applicable product.metadata* product.metadata.aggregated_quantity product.metadata.aggregated_amount product.metadata.discount_applicable product.metadata.match_all | SKU | sku.id sku.price sku.quantity sku.discount_applicable | Publication | publication.redeemable_by_linked_customer | Custom Event | custom_event.metadata* | Order items | order.items.every order.items.any order.items.none order.items.cheapest order.items.most_expensive |
*Requires the property field to be defined. |
propertystring , null | 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 |
conditions | See: Validation Rule Conditions |
rules | See: Validation Rule Rules |
errorobject | Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule. Attributes | Description |
---|
messagestring | 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`
@@ -112,13 +113,13 @@ Array any of: string, string
| 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 | Description |
---|
namestring | Voucherify specific rule name. The list of available names is provided below. Type | Name |
---|
Customer | customer.segment customer.metadata* | Order | order.amount order.initial_amount order.items.count order.items.price_any order.items.price_each order.items.metadata_any order.items.metadata_each order.metadata* | Campaign | campaign.orders.amount_discounted campaign.orders.amount campaign.redemptions.count campaign.redemptions.count.daily campaign.redemptions.count.monthly campaign.redemptions.customers_count campaign.redemptions.customers_count.daily campaign.redemptions.customers_count.monthly | Redemption | redemption.gift.amount redemption.count.daily redemption.count.monthly redemption.count.per_customer redemption.count.per_customer.daily redemption.count.per_customer.monthly redemption.api_key redemption.count.per_api_key redemption.user.login redemption.count.per_user redemption.metadata redemption.reward.pay_with_points.points_used | Product | product.id product.price product.quantity product.discount_applicable product.metadata* product.metadata.aggregated_quantity product.metadata.aggregated_amount product.metadata.discount_applicable product.metadata.match_all | SKU | sku.id sku.price sku.quantity sku.discount_applicable | Publication | publication.redeemable_by_linked_customer | Custom Event | custom_event.metadata* | Order items | order.items.every order.items.any order.items.none order.items.cheapest order.items.most_expensive |
*Requires the property field to be defined. |
propertystring , null | 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 |
conditions | See: Validation Rule Conditions |
rules | See: Validation Rule Rules |
errorobject | Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule. Attributes | Description |
---|
messagestring | The error message returned from API when validation / redemption fails to meet requirements of defined rule. |
|
|
+| [propertyName]`object` | Contains the name of the validation rule.
Attributes | Description |
---|
namestring | Voucherify's specific rule name. The list of available names is provided below. Type | Name |
---|
Customer | customer.segment customer.metadata* | Order | order.amount order.initial_amount order.items.count order.items.price_any order.items.price_each order.items.metadata_any order.items.metadata_each order.metadata* | Campaign | campaign.orders.amount_discounted campaign.orders.amount campaign.redemptions.count campaign.redemptions.count.daily campaign.redemptions.count.monthly campaign.redemptions.customers_count campaign.redemptions.customers_count.daily campaign.redemptions.customers_count.monthly | Redemption | redemption.gift.amount redemption.count.daily redemption.count.monthly redemption.count.per_customer redemption.count.per_customer.daily redemption.count.per_customer.monthly redemption.api_key redemption.count.per_api_key redemption.user.login redemption.count.per_user redemption.metadata redemption.reward.pay_with_points.points_used | Product | product.id product.price product.quantity product.discount_applicable product.metadata* product.metadata.aggregated_quantity product.metadata.aggregated_amount product.metadata.discount_applicable product.metadata.match_all | SKU | sku.id sku.price sku.quantity sku.discount_applicable | Publication | publication.redeemable_by_linked_customer | Custom Event | custom_event.metadata* | Order items | order.items.every order.items.any order.items.none order.items.cheapest order.items.most_expensive |
*Requires the property field to be defined. |
propertystring , null | 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 |
conditions | See: Validation Rule Conditions |
rules | See: Validation Rule Rules |
errorobject | Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule. Attributes | Description |
---|
messagestring | 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 | Description |
---|
namestring | Voucherify specific rule name. The list of available names is provided below. Type | Name |
---|
Customer | customer.segment customer.metadata* | Order | order.amount order.initial_amount order.items.count order.items.price_any order.items.price_each order.items.metadata_any order.items.metadata_each order.metadata* | Campaign | campaign.orders.amount_discounted campaign.orders.amount campaign.redemptions.count campaign.redemptions.count.daily campaign.redemptions.count.monthly campaign.redemptions.customers_count campaign.redemptions.customers_count.daily campaign.redemptions.customers_count.monthly | Redemption | redemption.gift.amount redemption.count.daily redemption.count.monthly redemption.count.per_customer redemption.count.per_customer.daily redemption.count.per_customer.monthly redemption.api_key redemption.count.per_api_key redemption.user.login redemption.count.per_user redemption.metadata redemption.reward.pay_with_points.points_used | Product | product.id product.price product.quantity product.discount_applicable product.metadata* product.metadata.aggregated_quantity product.metadata.aggregated_amount product.metadata.discount_applicable product.metadata.match_all | SKU | sku.id sku.price sku.quantity sku.discount_applicable | Publication | publication.redeemable_by_linked_customer | Custom Event | custom_event.metadata* | Order items | order.items.every order.items.any order.items.none order.items.cheapest order.items.most_expensive |
*Requires the property field to be defined. |
propertystring , null | 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 |
conditions | See: Validation Rule Conditions |
rulesobject | Another set of validation rules. If you need to create complex rules with more nested rules, use the validation rule builder in the dashboard. |
errorobject | Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule. Attributes | Description |
---|
messagestring | The error message returned from API when validation / redemption fails to meet requirements of defined rule. |
|
|
+| [propertyName]`object` | Contains the name of the validation rule.
Attributes | Description |
---|
namestring | Voucherify's specific rule name. The list of available names is provided below. Type | Name |
---|
Customer | customer.segment customer.metadata* | Order | order.amount order.initial_amount order.items.count order.items.price_any order.items.price_each order.items.metadata_any order.items.metadata_each order.metadata* | Campaign | campaign.orders.amount_discounted campaign.orders.amount campaign.redemptions.count campaign.redemptions.count.daily campaign.redemptions.count.monthly campaign.redemptions.customers_count campaign.redemptions.customers_count.daily campaign.redemptions.customers_count.monthly | Redemption | redemption.gift.amount redemption.count.daily redemption.count.monthly redemption.count.per_customer redemption.count.per_customer.daily redemption.count.per_customer.monthly redemption.api_key redemption.count.per_api_key redemption.user.login redemption.count.per_user redemption.metadata redemption.reward.pay_with_points.points_used | Product | product.id product.price product.quantity product.discount_applicable product.metadata* product.metadata.aggregated_quantity product.metadata.aggregated_amount product.metadata.discount_applicable product.metadata.match_all | SKU | sku.id sku.price sku.quantity sku.discount_applicable | Publication | publication.redeemable_by_linked_customer | Custom Event | custom_event.metadata* | Order items | order.items.every order.items.any order.items.none order.items.cheapest order.items.most_expensive |
*Requires the property field to be defined. |
propertystring , null | 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 |
conditions | See: Validation Rule Conditions |
rulesobject | Another set of validation rules. If you need to create complex rules with more nested rules, use the validation rule builder in the dashboard. |
errorobject | Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule. Attributes | Description |
---|
messagestring | The error message returned from API when validation / redemption fails to meet requirements of defined rule. |
|
|
[block:html]
{
diff --git a/docs/reference-docs/VALIDATIONS-Validation-Object.md b/docs/reference-docs/VALIDATIONS-Validation-Object.md
index 467fda5bc..ac0e00ab1 100644
--- a/docs/reference-docs/VALIDATIONS-Validation-Object.md
+++ b/docs/reference-docs/VALIDATIONS-Validation-Object.md
@@ -29,7 +29,8 @@ One of:
| gift | Gift object response
[Gift](#gift) |
| loyalty`object` | Contains the cost of reward in points.
Attributes | Description |
---|
points_costnumber | Number of points that wlil be deducted from loyaty card for the associated reward. |
|
| reward`object` | Contains information about the reward that is being validated.
Attributes | Description |
---|
idstring | Unique reward ID assigned by Voucherify. |
assignment_idstring | Unique reward assignment ID assigned by Voucherify. |
pointsnumber | Number of points applied to the reward. |
|
-| order | See: [Order Calculated No Customer Data](#order-calculated-no-customer-data) |
+| order | All of: 1. [Order Calculated No Customer Data](#order-calculated-no-customer-data)
+2. Attributes | Description |
---|
itemsarray | Array of items applied to the order. It can include up to 500 items. Array of Order Item Calculated |
|
| session | Schema model for session lock object. The session object contains information about the session key that was used to establish a session between multiple parallel validation and redemption requests.
[Session](#session) |
| start_date`string` | Activation timestamp defines when the voucher starts to be active in ISO 8601 format. Voucher is inactive before this date.
|
| expiration_date`string` | Expiration timestamp defines when the voucher expires in ISO 8601 format. Voucher is inactive after this date.
|
@@ -82,16 +83,15 @@ One of:
| id`string` | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.
|
| source_id`string`, `null` | Unique source ID of an existing order that will be linked to the redemption of this request.
|
| status`string` | The order status.
Available values: `CREATED`, `PAID`, `CANCELED`, `FULFILLED` |
-| amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
-| initial_amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
-| discount_amount`integer` | Sum of all order-level discounts applied to the order.
|
-| items_discount_amount`integer` | Sum of all product-specific discounts applied to the order.
|
-| total_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied to the order.
|
-| total_amount`integer` | Order amount after undoing all the discounts through the rollback redemption.
|
-| applied_discount_amount`integer` | This field shows the order-level discount applied.
|
-| items_applied_discount_amount`integer` | Sum of all product-specific discounts applied in a particular request.
sum(items, i => i.applied_discount_amount)
|
-| total_applied_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied in a particular request.
total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
|
-| items`array` | Array of items applied to the order. It can include up 500 items.
Array of [Order Item Calculated](#order-item-calculated) |
+| amount`integer` | This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| initial_amount`integer` | This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| discount_amount`integer` | Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| items_discount_amount`integer` | Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| total_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| total_amount`integer` | Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| applied_discount_amount`integer` | This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
|
+| items_applied_discount_amount`integer` | Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
sum(items, i => i.applied_discount_amount)
|
+| total_applied_discount_amount`integer` | Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).
total_applied_discount_amount
= applied_discount_amount
+ items_applied_discount_amount
|
| metadata`object` | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
|
| object`string` | The type of the object represented by JSON.
Available values: `order` |
| created_at`string` | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.
**Example:** 2021-12-22T10:13:06.487Z
|
@@ -102,6 +102,31 @@ One of:
| referrer | [Referrer Id](#referrer-id) |
| redemptions`object` | |
+## Order Item Calculated
+| Attributes | Description |
+|:-----|:--------|
+| id`string` | Unique identifier of the order line item.
|
+| sku_id`string` | Unique identifier of the SKU. It is assigned by Voucherify.
|
+| product_id`string` | Unique identifier of the product. It is assigned by Voucherify.
|
+| related_object`string` | Used along with the source_id property, can be set to either sku or product.
Available values: `product`, `sku` |
+| source_id`string` | The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.
|
+| quantity`integer` | The quantity of the particular item in the cart.
|
+| discount_quantity`integer` | Number of dicounted items.
|
+| initial_quantity`integer` | A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.
|
+| amount`integer` | The total amount of the order item (price * quantity).
|
+| discount_amount`integer` | Sum of all order-item-level discounts applied to the order.
|
+| applied_discount_amount`integer` | This field shows the order-level discount applied.
|
+| applied_discount_quantity`integer` | Number of the discounted items applied in the transaction.
|
+| applied_quantity`integer` | Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
|
+| applied_quantity_amount`integer` | Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
|
+| initial_amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
+| price`integer` | Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents
for $100.00
.
|
+| subtotal_amount`integer` | Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount
.
subtotal_amount
=amount
-applied_discount_amount
|
+| product`object` | An object containing details of the related product.
Attributes | Description |
---|
idstring | A unique identifier that represents the product and is assigned by Voucherify. |
source_idstring | The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. |
namestring | Product name. |
metadataobject | A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections. |
pricenumber | Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
|
+| sku`object` | An object containing details of the related SKU.
Attributes | Description |
---|
idstring | A unique identifier that represents the SKU and is assigned by Voucherify. |
source_idstring | The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. |
skustring | The SKU name. |
pricenumber | SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
metadataobject | A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections. |
|
+| object`string` | The type of the object represented by JSON.
Available values: `order_item` |
+| metadata`object` | A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.
|
+
## Session
| Attributes | Description |
|:-----|:--------|
@@ -126,10 +151,11 @@ One of:
| 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` | Determines the order in which the discount is applied to the products or SKUs sent in the order
object in the request. The counting begins from 0
.
|
+| 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 |
---|
indexinteger | Number assigned to the order line item in accordance with the order sent in the request. |
unitsarray | 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.
Available values: `ITEM` |
+| 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` |
## Inapplicable To
[Applicable To](#applicable-to)
@@ -149,7 +175,7 @@ One of:
|:-----|:--------|
| type`string` | Discount type.
Available values: `UNIT` |
| unit_off`integer` | Number of units to be granted a full value discount.
|
-| unit_off_formula`string` | |
+| unit_off_formula`string` | Formula used to calculate the number of units.
|
| effect | Defines how the unit is added to the customer's order.
[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) |
| unit_type`string` | The product deemed as free, chosen from product inventory (e.g. time, items).
|
| product | Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) |
@@ -183,31 +209,6 @@ One of:
| effect | Defines how the discount is applied to the customer's order.
[Discount Fixed Vouchers Effect Types](#discount-fixed-vouchers-effect-types) |
| is_dynamic`boolean` | Flag indicating whether the discount was calculated using a formula.
|
-## Order Item Calculated
-| Attributes | Description |
-|:-----|:--------|
-| id`string` | Unique identifier of the order line item.
|
-| sku_id`string` | Unique identifier of the SKU. It is assigned by Voucherify.
|
-| product_id`string` | Unique identifier of the product. It is assigned by Voucherify.
|
-| related_object`string` | Used along with the source_id property, can be set to either sku or product.
Available values: `product`, `sku` |
-| source_id`string` | The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.
|
-| quantity`integer` | The quantity of the particular item in the cart.
|
-| discount_quantity`integer` | Number of dicounted items.
|
-| initial_quantity`integer` | A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.
|
-| amount`integer` | The total amount of the order item (price * quantity).
|
-| discount_amount`integer` | Sum of all order-item-level discounts applied to the order.
|
-| applied_discount_amount`integer` | This field shows the order-level discount applied.
|
-| applied_discount_quantity`integer` | Number of the discounted items applied in the transaction.
|
-| applied_quantity`integer` | Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
|
-| applied_quantity_amount`integer` | Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.
|
-| initial_amount`integer` | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.
|
-| price`integer` | Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents
for $100.00
.
|
-| subtotal_amount`integer` | Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount
.
subtotal_amount
=amount
-applied_discount_amount
|
-| product`object` | An object containing details of the related product.
Attributes | Description |
---|
idstring | A unique identifier that represents the product and is assigned by Voucherify. |
source_idstring | The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. |
namestring | Product name. |
metadataobject | A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections. |
pricenumber | Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
|
-| sku`object` | An object containing details of the related SKU.
Attributes | Description |
---|
idstring | A unique identifier that represents the SKU and is assigned by Voucherify. |
source_idstring | The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. |
overrideboolean | The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. |
skustring | The SKU name. |
pricenumber | SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). |
metadataobject | A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections. |
|
-| object`string` | The type of the object represented by JSON.
Available values: `order_item` |
-| metadata`object` | A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.
|
-
## Customer Id
| Attributes | Description |
|:-----|:--------|
@@ -256,7 +257,7 @@ Available values: `ADD_MISSING_ITEMS`, `ADD_NEW_ITEMS`, `ADD_MANY_ITEMS`
| Attributes | Description |
|:-----|:--------|
| unit_off`number` | Number of units to be granted a full value discount.
|
-| unit_off_formula`string` | |
+| unit_off_formula`string` | Formula used to calculate the number of units.
|
| effect`string` | Defines how the unit is added to the customer's order.
Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` |
| unit_type`string` | The product deemed as free, chosen from product inventory (e.g. time, items).
|
| product | Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) |
diff --git a/docs/reference-docs/VOUCHERS-Voucher-Object.md b/docs/reference-docs/VOUCHERS-Voucher-Object.md
index 5b2c2ebc8..4d5058d47 100644
--- a/docs/reference-docs/VOUCHERS-Voucher-Object.md
+++ b/docs/reference-docs/VOUCHERS-Voucher-Object.md
@@ -120,7 +120,7 @@ One of:
|:-----|:--------|
| type`string` | Discount type.
Available values: `UNIT` |
| unit_off`integer` | Number of units to be granted a full value discount.
|
-| unit_off_formula`string` | |
+| unit_off_formula`string` | Formula used to calculate the number of units.
|
| effect | Defines how the unit is added to the customer's order.
[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) |
| unit_type`string` | The product deemed as free, chosen from product inventory (e.g. time, items).
|
| product | Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) |
@@ -178,7 +178,7 @@ Available values: `ADD_MISSING_ITEMS`, `ADD_NEW_ITEMS`, `ADD_MANY_ITEMS`
| Attributes | Description |
|:-----|:--------|
| unit_off`number` | Number of units to be granted a full value discount.
|
-| unit_off_formula`string` | |
+| unit_off_formula`string` | Formula used to calculate the number of units.
|
| effect`string` | Defines how the unit is added to the customer's order.
Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` |
| unit_type`string` | The product deemed as free, chosen from product inventory (e.g. time, items).
|
| product | Contains information about the product.
[Simple Product Discount Unit](#simple-product-discount-unit) |
diff --git a/production/ENDPOINTS-COVERAGE.md b/production/ENDPOINTS-COVERAGE.md
index 126b90964..128877bdc 100644
--- a/production/ENDPOINTS-COVERAGE.md
+++ b/production/ENDPOINTS-COVERAGE.md
@@ -126,54 +126,54 @@
| /v1/rewards/{rewardId}/assignments/{assignmentId} | delete | Delete Reward Assignment | supported | |
| /v1/rewards/{rewardId}/assignments/{assignmentId} | get | Get Reward Assignment | supported | |
## Loyalties
-| endpoint | method | summary | is supported | is deprecated |
-| ------------------------------------------------------------------- | ------ | ------------------------------------ | ------------------------------------ | ------------- |
-| /v1/loyalties | get | List Loyalty Campaigns | supported | |
-| /v1/loyalties | post | Create Loyalty Campaign | supported | |
-| /v1/loyalties/{campaignId} | get | Get Loyalty Campaign | supported | |
-| /v1/loyalties/{campaignId} | put | Update Loyalty Campaign | supported | |
-| /v1/loyalties/{campaignId} | delete | Delete Loyalty Campaign | supported | |
-| /v1/loyalties/{campaignId}/members | get | List Members | supported | |
-| /v1/loyalties/{campaignId}/members | post | Add Member | supported | |
-| /v1/loyalties/{campaignId}/members/{memberId} | get | Get Member | supported | |
-| /v1/loyalties/members/{memberId} | get | Get Member | supported | |
-| /v1/loyalties/{campaignId}/members/{memberId}/activity | get | List Member Activity | supported | |
-| /v1/loyalties/members/{memberId}/activity | get | List Member Activity | supported | |
-| /v1/loyalties/{campaignId}/members/{memberId}/balance | post | Add or Remove Loyalty Card Balance | supported | |
-| /v1/loyalties/members/{memberId}/balance | post | Add or Remove Loyalty Card Balance | supported | |
-| /v1/loyalties/{campaignId}/members/{memberId}/transfers | post | Transfer Loyalty Points | supported | |
-| /v1/loyalties/{campaignId}/transactions | get | List Loyalty Campaign Transactions | | |
-| /v1/loyalties/{campaignId}/transactions/export | post | Export Loyalty Campaign Transactions | | |
-| /v1/loyalties/{campaignId}/members/{memberId}/transactions | get | List Loyalty Card Transactions | supported | |
-| /v1/loyalties/members/{memberId}/transactions | get | List Loyalty Card Transactions | supported | |
-| /v1/loyalties/members/{memberId}/transactions/export | post | Export Loyalty Card Transactions | supported | |
-| /v1/loyalties/{campaignId}/members/{memberId}/transactions/export | post | Export Loyalty Card Transactions | supported | |
-| /v1/loyalties/{campaignId}/members/{memberId}/points-expiration | get | Get Points Expiration | supported | |
-| /v1/loyalties/{campaignId}/points-expiration/export | post | Create Points Expiration Export | supported | |
-| /v1/loyalties/{campaignId}/earning-rules | get | List Earning Rules | supported | |
-| /v1/loyalties/{campaignId}/earning-rules | post | Create Earning Rule | supported | |
-| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId} | get | Get Earning Rule | supported | |
-| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId} | put | Update Earning Rule | supported | |
-| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId} | delete | Delete Earning Rule | supported | |
-| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/enable | post | Enable Earning Rule | supported | |
-| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/disable | post | Disable Earning Rule | supported | |
-| /v1/loyalties/members/{memberId}/rewards | get | List Member Rewards | supported | |
-| /v1/loyalties/{campaignId}/reward-assignments/{assignmentId}/reward | get | Get Reward Details | supported | |
-| /v1/loyalties/{campaignId}/reward-assignments | get | List Reward Assignments | supported | |
-| /v1/loyalties/{campaignId}/rewards | get | List Reward Assignments | supported | |
-| /v1/loyalties/{campaignId}/rewards | post | Create Reward Assignment | supported | |
-| /v1/loyalties/{campaignId}/reward-assignments/{assignmentId} | get | Get Reward Assignment | supported | |
-| /v1/loyalties/{campaignId}/rewards/{assignmentId} | get | Get Reward Assignment | supported | |
-| /v1/loyalties/{campaignId}/rewards/{assignmentId} | put | Update Reward Assignment | supported | |
-| /v1/loyalties/{campaignId}/rewards/{assignmentId} | delete | Delete Reward Assignment | supported | |
-| /v1/loyalties/{campaignId}/members/{memberId}/redemption | post | Redeem Reward | supported | |
-| /v1/loyalties/members/{memberId}/redemption | post | Redeem Reward | supported | |
-| /v1/loyalties/{campaignId}/tiers | get | List Loyalty Tiers | supported | |
-| /v1/loyalties/{campaignId}/tiers | post | Create loyalty tiers | supported | |
-| /v1/loyalties/{campaignId}/tiers/{loyaltyTierId} | get | Get Loyalty Tier | supported | |
-| /v1/loyalties/members/{memberId}/tiers | get | List Member's Loyalty Tiers | supported | |
-| /v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/earning-rules | get | List Loyalty Tier Earning Rules | supported | |
-| /v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/rewards | get | List Loyalty Tier Rewards | supported | |
+| endpoint | method | summary | is supported | is deprecated |
+| ------------------------------------------------------------------- | ------ | ---------------------------------------- | ------------------------------------ | ------------- |
+| /v1/loyalties | get | List Loyalty Campaigns | supported | |
+| /v1/loyalties | post | Create Loyalty Campaign | supported | |
+| /v1/loyalties/{campaignId} | get | Get Loyalty Campaign | supported | |
+| /v1/loyalties/{campaignId} | put | Update Loyalty Campaign | supported | |
+| /v1/loyalties/{campaignId} | delete | Delete Loyalty Campaign | supported | |
+| /v1/loyalties/{campaignId}/members | get | List Members | supported | |
+| /v1/loyalties/{campaignId}/members | post | Add Member | supported | |
+| /v1/loyalties/{campaignId}/members/{memberId} | get | Get Member | supported | |
+| /v1/loyalties/members/{memberId} | get | Get Member | supported | |
+| /v1/loyalties/{campaignId}/members/{memberId}/activity | get | List Member Activity | supported | |
+| /v1/loyalties/members/{memberId}/activity | get | List Member Activity | supported | |
+| /v1/loyalties/{campaignId}/members/{memberId}/balance | post | Add or Remove Loyalty Card Balance | supported | |
+| /v1/loyalties/members/{memberId}/balance | post | Add or Remove Loyalty Card Balance | supported | |
+| /v1/loyalties/{campaignId}/members/{memberId}/transfers | post | Transfer Loyalty Points | supported | |
+| /v1/loyalties/{campaignId}/transactions | get | List Loyalty Campaign Transactions | | |
+| /v1/loyalties/{campaignId}/transactions/export | post | Export Loyalty Campaign Transactions | | |
+| /v1/loyalties/{campaignId}/members/{memberId}/transactions | get | List Loyalty Card Transactions | supported | |
+| /v1/loyalties/members/{memberId}/transactions | get | List Loyalty Card Transactions | supported | |
+| /v1/loyalties/members/{memberId}/transactions/export | post | Export Loyalty Card Transactions | supported | |
+| /v1/loyalties/{campaignId}/members/{memberId}/transactions/export | post | Export Loyalty Card Transactions | supported | |
+| /v1/loyalties/{campaignId}/members/{memberId}/points-expiration | get | List Loyalty Card Point Expiration | supported | |
+| /v1/loyalties/{campaignId}/points-expiration/export | post | Export Loyalty Campaign Point Expiration | supported | |
+| /v1/loyalties/{campaignId}/earning-rules | get | List Earning Rules | supported | |
+| /v1/loyalties/{campaignId}/earning-rules | post | Create Earning Rule | supported | |
+| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId} | get | Get Earning Rule | supported | |
+| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId} | put | Update Earning Rule | supported | |
+| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId} | delete | Delete Earning Rule | supported | |
+| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/enable | post | Enable Earning Rule | supported | |
+| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/disable | post | Disable Earning Rule | supported | |
+| /v1/loyalties/members/{memberId}/rewards | get | List Member Rewards | supported | |
+| /v1/loyalties/{campaignId}/reward-assignments/{assignmentId}/reward | get | Get Reward Details | supported | |
+| /v1/loyalties/{campaignId}/reward-assignments | get | List Reward Assignments | supported | |
+| /v1/loyalties/{campaignId}/rewards | get | List Reward Assignments | supported | |
+| /v1/loyalties/{campaignId}/rewards | post | Create Reward Assignment | supported | |
+| /v1/loyalties/{campaignId}/reward-assignments/{assignmentId} | get | Get Reward Assignment | supported | |
+| /v1/loyalties/{campaignId}/rewards/{assignmentId} | get | Get Reward Assignment | supported | |
+| /v1/loyalties/{campaignId}/rewards/{assignmentId} | put | Update Reward Assignment | supported | |
+| /v1/loyalties/{campaignId}/rewards/{assignmentId} | delete | Delete Reward Assignment | supported | |
+| /v1/loyalties/{campaignId}/members/{memberId}/redemption | post | Redeem Reward | supported | |
+| /v1/loyalties/members/{memberId}/redemption | post | Redeem Reward | supported | |
+| /v1/loyalties/{campaignId}/tiers | get | List Loyalty Tiers | supported | |
+| /v1/loyalties/{campaignId}/tiers | post | Create loyalty tiers | supported | |
+| /v1/loyalties/{campaignId}/tiers/{loyaltyTierId} | get | Get Loyalty Tier | supported | |
+| /v1/loyalties/members/{memberId}/tiers | get | List Member's Loyalty Tiers | supported | |
+| /v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/earning-rules | get | List Loyalty Tier Earning Rules | supported | |
+| /v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/rewards | get | List Loyalty Tier Rewards | supported | |
## Customers
| endpoint | method | summary | is supported | is deprecated |
| --------------------------------------------- | ------ | ------------------------------------- | ------------------------------------ | ------------------------------------ |
diff --git a/production/readOnly-openAPI.json b/production/readOnly-openAPI.json
index 215ddc8d9..a8d3f3890 100644
--- a/production/readOnly-openAPI.json
+++ b/production/readOnly-openAPI.json
@@ -952,12 +952,33 @@
},
"order_item_indices": {
"type": "array",
- "description": "Determines the order in which the discount is applied to the products or SKUs sent in the `order` object in the request. The counting begins from `0`.",
+ "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.",
"items": {
"type": "integer"
},
"nullable": true
},
+ "order_item_units": {
+ "type": "array",
+ "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "index": {
+ "type": "integer",
+ "description": "Number assigned to the order line item in accordance with the order sent in the request."
+ },
+ "units": {
+ "type": "array",
+ "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.",
+ "items": {
+ "type": "integer"
+ }
+ }
+ }
+ },
+ "nullable": true
+ },
"repeat": {
"type": "integer",
"description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item.",
@@ -970,9 +991,10 @@
},
"target": {
"type": "string",
- "description": "Determines to which kinds of objects the discount is applicable. `\"ITEM\"` includes products and SKUs.",
+ "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.",
"enum": [
- "ITEM"
+ "ITEM",
+ "UNIT"
],
"nullable": true
}
@@ -1031,6 +1053,47 @@
},
"required": []
},
+ "ApplicationDetails": {
+ "type": "array",
+ "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.",
+ "items": {
+ "type": "object",
+ "description": "Object representing item replacement.",
+ "properties": {
+ "source_index": {
+ "type": "integer",
+ "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.",
+ "minimum": 0
+ },
+ "source_applied_quantity": {
+ "type": "integer",
+ "description": "Number of source units that are replaced.",
+ "maximum": -1
+ },
+ "source_applied_quantity_amount": {
+ "type": "integer",
+ "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.",
+ "maximum": 0
+ },
+ "target_index": {
+ "type": "integer",
+ "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`."
+ },
+ "target_applied_quantity": {
+ "type": "integer",
+ "description": "Number of added target units that are replacements."
+ },
+ "target_applied_quantity_amount": {
+ "type": "integer",
+ "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity."
+ },
+ "target_applied_discount_amount": {
+ "type": "integer",
+ "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`."
+ }
+ }
+ }
+ },
"AreaStoreCampaignAssignment": {
"title": "Areas and Stores Campain Assignment",
"type": "object",
@@ -3387,6 +3450,31 @@
"allOf": [
{
"$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "application_details": {
+ "$ref": "#/components/schemas/ApplicationDetails"
+ }
+ }
+ }
+ ]
+ },
+ "nullable": true
+ }
+ }
}
],
"nullable": true
@@ -3452,6 +3540,31 @@
"allOf": [
{
"$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "application_details": {
+ "$ref": "#/components/schemas/ApplicationDetails"
+ }
+ }
+ }
+ ]
+ },
+ "nullable": true
+ }
+ }
}
]
},
@@ -5295,6 +5408,7 @@
},
"unit_off_formula": {
"type": "string",
+ "description": "Formula used to calculate the number of units.",
"nullable": true
},
"effect": {
@@ -5372,6 +5486,7 @@
},
"unit_off_formula": {
"type": "string",
+ "description": "Formula used to calculate the number of units.",
"nullable": true
},
"effect": {
@@ -6956,6 +7071,24 @@
"required": [],
"nullable": true
},
+ "holder_loyalty_tier": {
+ "type": "object",
+ "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier of the loyalty tier, assigned by Voucherify.",
+ "nullable": true
+ },
+ "name": {
+ "type": "string",
+ "description": "User-defined name of the loyalty tier.",
+ "nullable": true
+ }
+ },
+ "required": [],
+ "nullable": true
+ },
"event_schema": {
"type": "object",
"description": "Contains information about the custom event metadata schema.",
@@ -7219,6 +7352,24 @@
"required": [],
"nullable": true
},
+ "holder_loyalty_tier": {
+ "type": "object",
+ "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier of the loyalty tier, assigned by Voucherify.",
+ "nullable": true
+ },
+ "name": {
+ "type": "string",
+ "description": "User-defined name of the loyalty tier.",
+ "nullable": true
+ }
+ },
+ "required": [],
+ "nullable": true
+ },
"reward": {
"type": "object",
"description": "Contains information about the pay with points reward.",
@@ -7523,7 +7674,24 @@
"$ref": "#/components/schemas/SimpleCustomer"
},
"order": {
- "$ref": "#/components/schemas/OrderCalculated"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
+ }
+ }
+ }
+ ]
},
"redemption": {
"$ref": "#/components/schemas/RedemptionInternal"
@@ -7837,7 +8005,24 @@
"$ref": "#/components/schemas/VoucherBalance"
},
"order": {
- "$ref": "#/components/schemas/OrderCalculated"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
+ }
+ }
+ }
+ ]
},
"event": {
"$ref": "#/components/schemas/SimpleEvent"
@@ -8274,6 +8459,24 @@
"required": [],
"nullable": true
},
+ "holder_loyalty_tier": {
+ "type": "object",
+ "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier of the loyalty tier, assigned by Voucherify.",
+ "nullable": true
+ },
+ "name": {
+ "type": "string",
+ "description": "User-defined name of the loyalty tier.",
+ "nullable": true
+ }
+ },
+ "required": [],
+ "nullable": true
+ },
"reward": {
"type": "object",
"description": "Contains information about the pay with points reward.",
@@ -12887,6 +13090,24 @@
"required": [],
"nullable": true
},
+ "holder_loyalty_tier": {
+ "type": "object",
+ "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier of the loyalty tier, assigned by Voucherify.",
+ "nullable": true
+ },
+ "name": {
+ "type": "string",
+ "description": "User-defined name of the loyalty tier.",
+ "nullable": true
+ }
+ },
+ "required": [],
+ "nullable": true
+ },
"reward": {
"type": "object",
"description": "Contains information about the pay with points reward.",
@@ -16461,12 +16682,12 @@
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items": {
"type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
"items": {
"$ref": "#/components/schemas/OrderItem"
},
@@ -16507,55 +16728,47 @@
},
"amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"initial_amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
+ "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
+ "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_amount": {
"type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
+ "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"applied_discount_amount": {
"type": "integer",
- "description": "This field shows the order-level discount applied.",
+ "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
+ "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`",
"nullable": true
},
"total_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
+ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
"nullable": true
},
"metadata": {
@@ -17062,6 +17275,19 @@
"allOf": [
{
"$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
+ }
+ }
}
]
},
@@ -17121,6 +17347,19 @@
"allOf": [
{
"$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
+ }
+ }
}
]
},
@@ -17208,7 +17447,23 @@
"type": "array",
"description": "Contains array of order objects.",
"items": {
- "$ref": "#/components/schemas/OrderCalculated"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ }
+ }
+ }
+ }
+ ]
},
"nullable": true
},
@@ -17271,6 +17526,19 @@
"allOf": [
{
"$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
+ }
+ }
}
]
},
@@ -20833,6 +21101,23 @@
"allOf": [
{
"$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ }
+ ]
+ },
+ "nullable": true
+ }
+ }
}
],
"nullable": true
@@ -21163,7 +21448,36 @@
"$ref": "#/components/schemas/RedeemableResult"
},
"order": {
- "$ref": "#/components/schemas/OrderCalculated"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "application_details": {
+ "$ref": "#/components/schemas/ApplicationDetails"
+ }
+ }
+ }
+ ]
+ },
+ "nullable": true
+ }
+ }
+ }
+ ]
},
"validation_rule_id": {
"type": "string",
@@ -22155,6 +22469,19 @@
"allOf": [
{
"$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
+ }
+ }
}
]
},
@@ -22314,10 +22641,44 @@
"nullable": true
},
"order": {
- "$ref": "#/components/schemas/OrderCalculated"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
+ }
+ }
+ }
+ ]
},
"previous_order": {
- "$ref": "#/components/schemas/OrderCalculated"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
+ }
+ }
+ }
+ ]
},
"reward": {
"$ref": "#/components/schemas/RedemptionRewardResult"
@@ -22774,6 +23135,19 @@
"allOf": [
{
"$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
+ }
+ }
}
]
},
@@ -22976,6 +23350,31 @@
"allOf": [
{
"$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "application_details": {
+ "$ref": "#/components/schemas/ApplicationDetails"
+ }
+ }
+ }
+ ]
+ },
+ "nullable": true
+ }
+ }
}
]
},
@@ -23078,9 +23477,23 @@
"parent_rollback": {
"$ref": "#/components/schemas/RedemptionRollback"
},
- "order": {
- "$ref": "#/components/schemas/OrderCalculated"
- }
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ }
+ }
+ }
+ }
+ ]
}
},
"RedemptionWithVoucherWithoutStackingRulesTypeCategories": {
@@ -24874,42 +25287,42 @@
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"applied_discount_amount": {
"type": "integer",
- "description": "This field shows the order-level discount applied.",
+ "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
+ "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
+ "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`",
"nullable": true
},
"total_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
+ "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
+ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).\n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
"nullable": true
},
"total_amount": {
"type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
+ "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items": {
"type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
"items": {
"$ref": "#/components/schemas/SimpleOrderItem"
},
@@ -27158,7 +27571,24 @@
"nullable": true
},
"order": {
- "$ref": "#/components/schemas/OrderCalculated"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
+ }
+ }
+ }
+ ]
},
"applicable_to": {
"$ref": "#/components/schemas/ApplicableToResultList"
@@ -27600,7 +28030,36 @@
"nullable": true
},
"order": {
- "$ref": "#/components/schemas/OrderCalculated"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "application_details": {
+ "$ref": "#/components/schemas/ApplicationDetails"
+ }
+ }
+ }
+ ]
+ },
+ "nullable": true
+ }
+ }
+ }
+ ]
},
"tracking_id": {
"type": "string",
@@ -29246,6 +29705,24 @@
"required": [],
"nullable": true
},
+ "holder_loyalty_tier": {
+ "type": "object",
+ "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier of the loyalty tier, assigned by Voucherify.",
+ "nullable": true
+ },
+ "name": {
+ "type": "string",
+ "description": "User-defined name of the loyalty tier.",
+ "nullable": true
+ }
+ },
+ "required": [],
+ "nullable": true
+ },
"reward": {
"type": "object",
"description": "Contains information about the pay with points reward.",
@@ -44821,7 +45298,7 @@
"tags": [
"Loyalties"
],
- "summary": "Get Points Expiration",
+ "summary": "List Loyalty Card Point Expiration",
"description": "Retrieve loyalty point expiration buckets for a given loyalty card. Expired point buckets are not returned in this endpoint. You can use the [Exports API](ref:create-export) to retrieve a list of both `ACTIVE` and `EXPIRED` point buckets.",
"parameters": [
{
@@ -44928,7 +45405,7 @@
"tags": [
"Loyalties"
],
- "summary": "Create Points Expiration Export",
+ "summary": "Export Loyalty Campaign Point Expiration",
"description": "Schedule the generation of a points expiration CSV file for a particular campaign.",
"parameters": [],
"security": [
diff --git a/reference/OpenAPI.json b/reference/OpenAPI.json
index f97ea1438..5123a90e6 100644
--- a/reference/OpenAPI.json
+++ b/reference/OpenAPI.json
@@ -2101,35 +2101,35 @@
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order."
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
},
"applied_discount_amount": {
"type": "integer",
- "description": "This field shows the order-level discount applied."
+ "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
},
"items_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied to the order."
+ "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
},
"items_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`"
+ "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`"
},
"total_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order."
+ "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
},
"total_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`"
+ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).\n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`"
},
"total_amount": {
"type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption."
+ "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
},
"items": {
"type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
"items": {
"$ref": "#/components/schemas/SimpleOrderItem"
}
@@ -2181,11 +2181,11 @@
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order."
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
},
"items": {
"type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
"items": {
"$ref": "#/components/schemas/OrderItem"
}
@@ -2241,46 +2241,39 @@
},
"amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts."
+ "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
},
"initial_amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts."
+ "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order."
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
},
"items_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied to the order."
+ "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
},
"total_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order."
+ "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
},
"total_amount": {
"type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption."
+ "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
},
"applied_discount_amount": {
"type": "integer",
- "description": "This field shows the order-level discount applied."
+ "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
},
"items_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`"
+ "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`"
},
"total_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`"
- },
- "items": {
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- }
+ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`"
},
"metadata": {
"type": "object",
@@ -2347,6 +2340,18 @@
"allOf": [
{
"$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ }
+ }
+ }
}
]
},
@@ -3589,6 +3594,47 @@
"object"
]
},
+ "ApplicationDetails": {
+ "type": "array",
+ "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.",
+ "items": {
+ "type": "object",
+ "description": "Object representing item replacement.",
+ "properties": {
+ "source_index": {
+ "type": "integer",
+ "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.",
+ "minimum": 0
+ },
+ "source_applied_quantity": {
+ "type": "integer",
+ "description": "Number of source units that are replaced.",
+ "maximum": -1
+ },
+ "source_applied_quantity_amount": {
+ "type": "integer",
+ "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.",
+ "maximum": 0
+ },
+ "target_index": {
+ "type": "integer",
+ "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`."
+ },
+ "target_applied_quantity": {
+ "type": "integer",
+ "description": "Number of added target units that are replacements."
+ },
+ "target_applied_quantity_amount": {
+ "type": "integer",
+ "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity."
+ },
+ "target_applied_discount_amount": {
+ "type": "integer",
+ "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`."
+ }
+ }
+ }
+ },
"Session": {
"type": "object",
"title": "Session",
@@ -3714,7 +3760,23 @@
]
},
"order": {
- "$ref": "#/components/schemas/OrderCalculated"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ }
+ }
+ }
+ }
+ ]
},
"session": {
"description": "Schema model for session lock object. The session object contains information about the session key that was used to establish a session between multiple parallel validation and redemption requests.\n\n\n",
@@ -3877,7 +3939,8 @@
"description": "Number of units to be granted a full value discount."
},
"unit_off_formula": {
- "type": "string"
+ "type": "string",
+ "description": "Formula used to calculate the number of units."
},
"effect": {
"description": "Defines how the unit is added to the customer's order.",
@@ -3953,7 +4016,8 @@
"description": "Number of units to be granted a full value discount."
},
"unit_off_formula": {
- "type": "string"
+ "type": "string",
+ "description": "Formula used to calculate the number of units."
},
"effect": {
"type": "string",
@@ -15585,7 +15649,35 @@
}
},
"order": {
- "$ref": "#/components/schemas/OrderCalculated"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "application_details": {
+ "$ref": "#/components/schemas/ApplicationDetails"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
},
"tracking_id": {
"type": "string",
@@ -15630,7 +15722,23 @@
]
},
"order": {
- "$ref": "#/components/schemas/OrderCalculated"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ }
+ }
+ }
+ }
+ ]
},
"applicable_to": {
"$ref": "#/components/schemas/ApplicableToResultList"
@@ -16637,6 +16745,30 @@
"allOf": [
{
"$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "application_details": {
+ "$ref": "#/components/schemas/ApplicationDetails"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
}
]
},
@@ -17821,6 +17953,18 @@
"allOf": [
{
"$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ }
+ }
+ }
}
]
},
@@ -18125,6 +18269,18 @@
"allOf": [
{
"$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ }
+ }
+ }
}
]
},
@@ -18270,10 +18426,42 @@
"description": "If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed."
},
"order": {
- "$ref": "#/components/schemas/OrderCalculated"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ }
+ }
+ }
+ }
+ ]
},
"previous_order": {
- "$ref": "#/components/schemas/OrderCalculated"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ }
+ }
+ }
+ }
+ ]
},
"reward": {
"$ref": "#/components/schemas/RedemptionRewardResult"
@@ -26884,7 +27072,23 @@
"$ref": "#/components/schemas/VoucherBalance"
},
"order": {
- "$ref": "#/components/schemas/OrderCalculated"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ }
+ }
+ }
+ }
+ ]
},
"event": {
"$ref": "#/components/schemas/SimpleEvent"
@@ -27300,6 +27504,24 @@
"type"
]
},
+ "holder_loyalty_tier": {
+ "type": "object",
+ "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier of the loyalty tier, assigned by Voucherify."
+ },
+ "name": {
+ "type": "string",
+ "description": "User-defined name of the loyalty tier."
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ]
+ },
"event_schema": {
"type": "object",
"description": "Contains information about the custom event metadata schema.",
@@ -27562,6 +27784,24 @@
"name"
]
},
+ "holder_loyalty_tier": {
+ "type": "object",
+ "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier of the loyalty tier, assigned by Voucherify."
+ },
+ "name": {
+ "type": "string",
+ "description": "User-defined name of the loyalty tier."
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ]
+ },
"reward": {
"type": "object",
"description": "Contains information about the pay with points reward.",
@@ -27808,6 +28048,24 @@
"name"
]
},
+ "holder_loyalty_tier": {
+ "type": "object",
+ "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier of the loyalty tier, assigned by Voucherify."
+ },
+ "name": {
+ "type": "string",
+ "description": "User-defined name of the loyalty tier."
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ]
+ },
"reward": {
"type": "object",
"description": "Contains information about the pay with points reward.",
@@ -28024,7 +28282,23 @@
"$ref": "#/components/schemas/SimpleCustomer"
},
"order": {
- "$ref": "#/components/schemas/OrderCalculated"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ }
+ }
+ }
+ }
+ ]
},
"redemption": {
"$ref": "#/components/schemas/RedemptionInternal"
@@ -28467,6 +28741,18 @@
"allOf": [
{
"$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ }
+ }
+ }
}
]
},
@@ -28477,6 +28763,18 @@
"allOf": [
{
"$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ }
+ }
+ }
}
]
},
@@ -28576,7 +28874,23 @@
"type": "array",
"description": "Contains array of order objects.",
"items": {
- "$ref": "#/components/schemas/OrderCalculated"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ }
+ }
+ }
+ }
+ ]
}
},
"total": {
@@ -29524,6 +29838,135 @@
"total"
]
},
+ "ValidationRuleBundleRules": {
+ "title": "Validation Rule Bundle Rules",
+ "type": "object",
+ "description": "Contains all the definitions for the bundle rules. It is a set of key value pairs representing the rules and logic between them. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.\n\nWhile updating with the PUT method, you can pass `\"bundle_rules\": null` to delete the configuration; in the response, an empty object is then returned.",
+ "properties": {
+ "logic": {
+ "type": "string",
+ "example": "(1 and 2) and (3)",
+ "description": "Defines the logic between the rules."
+ }
+ },
+ "additionalProperties": {
+ "type": "object",
+ "description": "Contains the name of the bundle rule.",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Voucherify's specific bundle rule name. Currently, it is only `order.items.any`.",
+ "enum": [
+ "order.items.any"
+ ]
+ },
+ "conditions": {
+ "type": "object",
+ "description": "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`.",
+ "properties": {
+ "$is": {
+ "type": "array",
+ "maxItems": 1,
+ "items": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier of the product, SKU, or collection assigned by Voucherify."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the order item. It can be a `product_or_sku` or `products_collection`",
+ "enum": [
+ "product_or_sku",
+ "products_collection"
+ ]
+ },
+ "object": {
+ "type": "string",
+ "description": "Object used in the bundle rule. It can be a `products_collection`, `product`, or `sku`.",
+ "enum": [
+ "products_collection",
+ "product",
+ "sku"
+ ]
+ }
+ },
+ "required": [
+ "id",
+ "type",
+ "object"
+ ]
+ }
+ }
+ }
+ },
+ "rules": {
+ "properties": {
+ "logic": {
+ "type": "string",
+ "example": "(1 and 2) and (3)",
+ "description": "Defines the logic between the sub-rules."
+ }
+ },
+ "additionalProperties": {
+ "type": "object",
+ "description": "Contains the name of the validation sub-rule.",
+ "maxProperties": 1,
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Voucherify's specific sub-rule name. Currently, it is only `order.items.aggregated_quantity`.",
+ "enum": [
+ "order.items.aggregated_quantity"
+ ]
+ },
+ "conditions": {
+ "type": "object",
+ "description": "Defines the conditions of the bundle rule. The quantity of order items in the customer's cart must meet the conditions.",
+ "properties": {
+ "$more_than_or_equal": {
+ "type": "array",
+ "maxItems": 1,
+ "items": {
+ "type": "number",
+ "minimum": 1,
+ "description": "The number of units in the customer's cart must be equal or higher than the defined number."
+ }
+ }
+ }
+ },
+ "rules": {
+ "type": "object",
+ "description": "An empty object."
+ },
+ "error": {
+ "type": "object",
+ "description": "**CURRENTLY UNSUPPORTED**. Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.",
+ "properties": {
+ "message": {
+ "type": "string",
+ "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule."
+ }
+ }
+ }
+ }
+ }
+ },
+ "error": {
+ "type": "object",
+ "description": "**CURRENTLY UNSUPPORTED**. Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.",
+ "properties": {
+ "message": {
+ "type": "string",
+ "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule."
+ }
+ }
+ }
+ }
+ }
+ },
"ValidationRuleRules": {
"title": "Validation Rule Rules",
"type": "object",
@@ -29541,7 +29984,7 @@
"properties": {
"name": {
"type": "string",
- "description": "Voucherify specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined."
+ "description": "Voucherify's specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined."
},
"property": {
"type": "string",
@@ -29584,7 +30027,7 @@
"properties": {
"name": {
"type": "string",
- "description": "Voucherify specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined."
+ "description": "Voucherify's specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined."
},
"property": {
"type": "string",
@@ -29627,7 +30070,7 @@
"properties": {
"name": {
"type": "string",
- "description": "Voucherify specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined."
+ "description": "Voucherify's specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined."
},
"property": {
"type": "string",
@@ -29670,7 +30113,7 @@
"properties": {
"name": {
"type": "string",
- "description": "Voucherify specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined."
+ "description": "Voucherify's specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined."
},
"property": {
"type": "string",
@@ -29700,7 +30143,7 @@
"ValidationRuleConditions": {
"title": "Validation Rule Conditions",
"type": "object",
- "description": "A set of key value pairs representing the condition name and value. The list of available conditions is provided below: \n\n| **Condition (key)** | **Definition** | \n|---------------------|---------------------------------------------------------------|\n| `$is` | A property is a predefined value. | \n| `$is_not` | A property is not a predefined value. | \n| `$in` | A property is one value of the values in a predefined list of values. | \n|`$not_in` | A property is not one of the values in a predefined list of values. | \n| `$less_than` | A property is less than a predefined value. Can be also used with datetime. | \n| `$less_than_or_equal` | A property is less than or equal to a predefined value. Can be also used with datetime. | \n| `$more_than` | A property is more than a predefined value. Can be also used with datetime. | \n| `$more_than_or_equal` | A property is more than or equal to a predefined value. Can be also used with datetime. | \n| `$starts_with` | A property starts with the predefined sequence of characters. | \n| `$ends_with ` | A property ends with the predefined sequence of characters. | \n| `$contains` | A property contains the predefined sequence of characters. | \n| `$timeframe` | A property occurs within the time frame, i.e. every 1 day for 1 hour, e.g. `$timeframe: [\"2024-11-12T14:59:23.019Z;P1D;PT1H\"]` | \n| `$timeframe_absolute` | A property occurs between two dates and times, e.g. `2024-11-14T16:02:00.000Z;2024-11-28T16:02:00.000Z` | \n| `$timeframe_daily_hours` | A property occurs between selected hours on selected days of the week, e.g. `18:00;20:01;2,3`, where `0` equals Sunday, `1` equals Monday, `2` equals Tuesday, `3` equals Wednesday, `4` equals Thursday, `5` equals Friday, and `6` equals Saturday. | \n| `$dow` | A property occurs within given days of the week, where `0` equals Sunday, `1` equals Monday, `2` equals Tuesday, `3` equals Wednesday, `4` equals Thursday, `5` equals Friday, and `6` equals Saturday. | \n| `$count` | For array metadata; the property must have exactly the defined number of elements. | \n| `$count_more` | For array metadata; the property must have more elements than the defined number. | \n| `$count_less` | For array metadata; the property must have less elements than the defined number. | \n| `$from` | The property must belong to the predefined value. Related to product collections and best used together with the `$is` condition. | \n | `$after` | The value is after the date. | \n| `$before` | The value is before the date. | \n| `$more_than_ago` | The date is more than the defined value ago, relative to today. | \n| `$less_than_ago` | The date is less than the defined value ago, relative to today. | \n| `is_days_ago` | The date is exactly the defined value ago, relative to today. | \n| `$more_than_future` | The date is more than the defined value in the future, relative to today. | \n| `$less_than_ago` | The date is less than the defined value in the future, relative to today. | \n| `$is_days_in_future` | The date is exactly the defined value in the future, relative to today. | \n",
+ "description": "A set of key value pairs representing the condition name and value. The list of available conditions is provided below: \n\n| **Condition (key)** | **Definition** | \n|---------------------|---------------------------------------------------------------|\n| `$is` | A property is a predefined value. | \n| `$is_not` | A property is not a predefined value. | \n| `$in` | A property is one value of the values in a predefined list of values. | \n|`$not_in` | A property is not one of the values in a predefined list of values. | \n| `$less_than` | A property is less than a predefined value. Can be also used with datetime. | \n| `$less_than_or_equal` | A property is less than or equal to a predefined value. Can be also used with datetime. | \n| `$more_than` | A property is more than a predefined value. Can be also used with datetime. | \n| `$more_than_or_equal` | A property is more than or equal to a predefined value. Can be also used with datetime. | \n| `$starts_with` | A property starts with the predefined sequence of characters. | \n| `$ends_with ` | A property ends with the predefined sequence of characters. | \n| `$contains` | A property contains the predefined sequence of characters. | \n| `$timeframe` | A property occurs within the time frame, i.e. every 1 day for 1 hour, e.g. `$timeframe: [\"2024-11-12T14:59:23.019Z;P1D;PT1H\"]` | \n| `$timeframe_absolute` | A property occurs between two dates and times, e.g. `2024-11-14T16:02:00.000Z;2024-11-28T16:02:00.000Z` | \n| `$timeframe_daily_hours` | A property occurs between selected hours on selected days of the week, e.g. `18:00;20:01;2,3`, where `0` equals Sunday, `1` equals Monday, `2` equals Tuesday, `3` equals Wednesday, `4` equals Thursday, `5` equals Friday, and `6` equals Saturday. | \n| `$dow` | A property occurs within given days of the week, where `0` equals Sunday, `1` equals Monday, `2` equals Tuesday, `3` equals Wednesday, `4` equals Thursday, `5` equals Friday, and `6` equals Saturday. | \n| `$count` | For array metadata; the property must have exactly the defined number of elements. | \n| `$count_more` | For array metadata; the property must have more elements than the defined number. | \n| `$count_less` | For array metadata; the property must have less elements than the defined number. | \n| `$from` | The property must belong to the predefined value. Related to product collections and best used together with the `$is` condition. | \n | `$after` | The value is after the date. | \n| `$before` | The value is before the date. | \n| `$more_than_ago` | The date is more than the defined value ago expressed in number of days, relative to today, e.g. more than 3 days ago. | \n| `$less_than_ago` | The date is less than the defined value ago expressed in number of days, relative to today, less than 3 days ago. | \n| `is_days_ago` | The date is exactly the defined value ago expressed in number of days, relative to today, e.g. exactly 3 days ago. | \n| `$more_than_future` | The date is more than the defined value in the future expressed in number of days, relative to today, e.g. more than 3 days in the future. | \n| `$less_than_ago` | The date is less than the defined value in the future expressed in number of days, relative to today, e.g. less than 3 days in the future. | \n| `$is_days_in_future` | The date is exactly the defined value in the future expressed in number of days, relative to today, e.g. exactly 3 days in the future. | \n",
"properties": {
"$is": {
"$ref": "#/components/schemas/AnyOne"
@@ -33718,6 +34161,22 @@
"allOf": [
{
"$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ }
+ ]
+ }
+ }
+ }
}
]
},
@@ -34201,7 +34660,35 @@
"$ref": "#/components/schemas/RedeemableResult"
},
"order": {
- "$ref": "#/components/schemas/OrderCalculated"
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "application_details": {
+ "$ref": "#/components/schemas/ApplicationDetails"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
},
"validation_rule_id": {
"type": "string",
@@ -35703,6 +36190,24 @@
"name"
]
},
+ "holder_loyalty_tier": {
+ "type": "object",
+ "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier of the loyalty tier, assigned by Voucherify."
+ },
+ "name": {
+ "type": "string",
+ "description": "User-defined name of the loyalty tier."
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ]
+ },
"reward": {
"type": "object",
"description": "Contains information about the pay with points reward.",
@@ -36142,6 +36647,24 @@
"name"
]
},
+ "holder_loyalty_tier": {
+ "type": "object",
+ "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier of the loyalty tier, assigned by Voucherify."
+ },
+ "name": {
+ "type": "string",
+ "description": "User-defined name of the loyalty tier."
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ]
+ },
"reward": {
"type": "object",
"description": "Contains information about the pay with points reward.",
@@ -39848,11 +40371,31 @@
},
"order_item_indices": {
"type": "array",
- "description": "Determines the order in which the discount is applied to the products or SKUs sent in the `order` object in the request. The counting begins from `0`.",
+ "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.",
"items": {
"type": "integer"
}
},
+ "order_item_units": {
+ "type": "array",
+ "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "index": {
+ "type": "integer",
+ "description": "Number assigned to the order line item in accordance with the order sent in the request."
+ },
+ "units": {
+ "type": "array",
+ "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.",
+ "items": {
+ "type": "integer"
+ }
+ }
+ }
+ }
+ },
"repeat": {
"type": "integer",
"description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item."
@@ -39863,9 +40406,10 @@
},
"target": {
"type": "string",
- "description": "Determines to which kinds of objects the discount is applicable. `\"ITEM\"` includes products and SKUs.",
+ "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.",
"enum": [
- "ITEM"
+ "ITEM",
+ "UNIT"
]
}
},
@@ -41015,6 +41559,30 @@
"allOf": [
{
"$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "application_details": {
+ "$ref": "#/components/schemas/ApplicationDetails"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
}
]
},
@@ -41058,9 +41626,23 @@
"parent_rollback": {
"$ref": "#/components/schemas/RedemptionRollback"
},
- "order": {
- "$ref": "#/components/schemas/OrderCalculated"
- }
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ }
+ }
+ }
+ }
+ ]
}
},
"LoyaltiesMembersBalanceUpdateResponseBody": {
@@ -41970,6 +42552,30 @@
"allOf": [
{
"$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "application_details": {
+ "$ref": "#/components/schemas/ApplicationDetails"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
}
]
},
@@ -68846,7 +69452,7 @@
"tags": [
"Loyalties"
],
- "summary": "Get Points Expiration",
+ "summary": "List Loyalty Card Point Expiration",
"description": "Retrieve loyalty point expiration buckets for a given loyalty card. Expired point buckets are not returned in this endpoint. You can use the [Exports API](ref:create-export) to retrieve a list of both `ACTIVE` and `EXPIRED` point buckets.",
"parameters": [
{
@@ -68953,7 +69559,7 @@
"tags": [
"Loyalties"
],
- "summary": "Create Points Expiration Export",
+ "summary": "Export Loyalty Campaign Point Expiration",
"description": "Schedule the generation of a points expiration CSV file for a particular campaign.",
"parameters": [],
"security": [
diff --git a/reference/OpenAPIWebhooks.json b/reference/OpenAPIWebhooks.json
index 1748c9fa6..d06fa180d 100644
--- a/reference/OpenAPIWebhooks.json
+++ b/reference/OpenAPIWebhooks.json
@@ -7621,6 +7621,72 @@
],
"title": "Any"
},
+ "AnyOne": {
+ "title": "Any",
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "title": "string",
+ "type": "string"
+ },
+ {
+ "title": "string - date",
+ "type": "string",
+ "format": "date"
+ },
+ {
+ "title": "string - date-time",
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "title": "number",
+ "type": "number"
+ },
+ {
+ "title": "object",
+ "type": "object"
+ }
+ ]
+ },
+ "maxItems": 1
+ },
+ "AnyNumber": {
+ "title": "Any Number",
+ "type": "array",
+ "items": {
+ "type": "number",
+ "minimum": 0
+ },
+ "maxItems": 1
+ },
+ "AnyString": {
+ "title": "Any String",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "AnyDateDateTime": {
+ "title": "Any Date and Date-Time",
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string",
+ "title": "Date",
+ "format": "date"
+ },
+ {
+ "type": "string",
+ "title": "Date-time",
+ "format": "date-time"
+ }
+ ]
+ },
+ "maxItems": 1
+ },
"ApplicableTo": {
"title": "Applicable To",
"type": "object",
@@ -7687,11 +7753,31 @@
},
"order_item_indices": {
"type": "array",
- "description": "Determines the order in which the discount is applied to the products or SKUs sent in the `order` object in the request. The counting begins from `0`.",
+ "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.",
"items": {
"type": "integer"
}
},
+ "order_item_units": {
+ "type": "array",
+ "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "index": {
+ "type": "integer",
+ "description": "Number assigned to the order line item in accordance with the order sent in the request."
+ },
+ "units": {
+ "type": "array",
+ "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.",
+ "items": {
+ "type": "integer"
+ }
+ }
+ }
+ }
+ },
"repeat": {
"type": "integer",
"description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item."
@@ -7702,9 +7788,10 @@
},
"target": {
"type": "string",
- "description": "Determines to which kinds of objects the discount is applicable. `\"ITEM\"` includes products and SKUs.",
+ "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.",
"enum": [
- "ITEM"
+ "ITEM",
+ "UNIT"
]
}
},
@@ -14394,17 +14481,17 @@
"type": "object",
"title": "Order Item Calculated",
"properties": {
- "object": {
+ "id": {
"type": "string",
- "default": "order_item",
- "enum": [
- "order_item"
- ],
- "description": "The type of the object represented by JSON."
+ "description": "Unique identifier of the order line item."
},
- "source_id": {
+ "sku_id": {
+ "type": "string",
+ "description": "Unique identifier of the SKU. It is assigned by Voucherify."
+ },
+ "product_id": {
"type": "string",
- "description": "The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID)."
+ "description": "Unique identifier of the product. It is assigned by Voucherify."
},
"related_object": {
"type": "string",
@@ -14412,15 +14499,11 @@
"product",
"sku"
],
- "description": "Used along with the `source_id` property, can be set to either SKU or product."
+ "description": "Used along with the source_id property, can be set to either sku or product."
},
- "product_id": {
- "type": "string",
- "description": "Unique product ID assigned by Voucherify."
- },
- "sku_id": {
+ "source_id": {
"type": "string",
- "description": "Unique SKU ID assigned by Voucherify."
+ "description": "The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service."
},
"quantity": {
"type": "integer",
@@ -14432,7 +14515,7 @@
},
"initial_quantity": {
"type": "integer",
- "description": "The original number of the item in the cart."
+ "description": "A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity."
},
"amount": {
"type": "integer",
@@ -14442,31 +14525,45 @@
"type": "integer",
"description": "Sum of all order-item-level discounts applied to the order."
},
- "initial_amount": {
+ "applied_discount_amount": {
"type": "integer",
- "description": "The original amount of the order total amount."
+ "description": "This field shows the order-level discount applied."
},
- "total_applied_discount_amount": {
+ "applied_discount_quantity": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`"
+ "description": "Number of the discounted items applied in the transaction."
+ },
+ "applied_quantity": {
+ "type": "integer",
+ "description": "Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced."
+ },
+ "applied_quantity_amount": {
+ "type": "integer",
+ "description": "Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced."
+ },
+ "initial_amount": {
+ "type": "integer",
+ "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts."
},
"price": {
"type": "integer",
- "description": "Unit price of an item. The value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`."
+ "description": "Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`."
},
"subtotal_amount": {
"type": "integer",
"description": "Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the `amount`. \n`subtotal_amount`=`amount`-`applied_discount_amount`"
},
- "product": {
- "$ref": "#/components/schemas/OrderItemProduct"
- },
- "sku": {
- "$ref": "#/components/schemas/OrderItemSku"
+ "object": {
+ "type": "string",
+ "default": "order_item",
+ "enum": [
+ "order_item"
+ ],
+ "description": "The type of the object represented by JSON."
},
"metadata": {
"type": "object",
- "description": "A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format."
+ "description": "A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas."
}
},
"required": [
@@ -17314,23 +17411,23 @@
{
"title": "Validation Rule",
"type": "object",
- "description": "Object representing a validation rule.",
+ "description": "This is an object representing a response validation rule.",
"properties": {
"id": {
"type": "string",
"example": "val_eR1c41hu0vUU",
- "description": "Unique identifier of the validation rule."
+ "description": "Unique validation rule ID."
},
"created_at": {
"type": "string",
"example": "2022-03-23T07:44:00.444Z",
- "description": "Timestamp representing the date and time when the validation rule was created in the ISO 8601 format.",
+ "description": "Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format.",
"format": "date-time"
},
"updated_at": {
"type": "string",
"example": "2022-04-26T08:35:54.960Z",
- "description": "Timestamp representing the date and time when the validation rule was updated in the ISO 8601 format.",
+ "description": "Timestamp representing the date and time when the validation rule was updated. The value is shown in the ISO 8601 format.",
"format": "date-time"
},
"assignments_count": {
@@ -17490,11 +17587,11 @@
"ValidationRuleBase": {
"title": "Validation Rule Base",
"type": "object",
- "description": "Object representing a validation rule.",
+ "description": "This is an object representing a request validation rule.",
"properties": {
"name": {
"type": "string",
- "description": "Custom name for the validation rule.",
+ "description": "Custom, unique name for set of validation rules.",
"example": "Business Validation Rule"
},
"rules": {
@@ -17502,11 +17599,11 @@
},
"error": {
"type": "object",
- "description": "Contains the error message returned from the API when validation / redemption fails to meet requirements of defined rules.",
+ "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rules.",
"properties": {
"message": {
"type": "string",
- "description": "The error message returned from the API when validation / redemption fails to meet requirements of defined rules."
+ "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rules."
}
}
},
@@ -17604,7 +17701,136 @@
"reward_assignment.pay_with_points",
"global"
],
- "description": "Validation rule context type."
+ "description": "Validation rule context type. \n\n| **Context Type** | **Definition** |\n|:---|:---|\n| earning_rule.order.paid | |\n| earning_rule.custom_event | |\n| earning_rule.customer.segment.entered | |\n| campaign.discount_coupons | |\n| campaign.discount_coupons.discount.apply_to_order | |\n| campaign.discount_coupons.discount.apply_to_items | |\n| campaign.discount_coupons.discount.apply_to_items_proportionally | |\n| campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | |\n| campaign.discount_coupons.discount.fixed.apply_to_items | |\n| campaign.gift_vouchers | |\n| campaign.gift_vouchers.gift.apply_to_order | |\n| campaign.gift_vouchers.gift.apply_to_items | |\n| campaign.referral_program | |\n| campaign.referral_program.discount.apply_to_order | |\n| campaign.referral_program.discount.apply_to_items | |\n| campaign.referral_program.discount.apply_to_items_proportionally | |\n| campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | |\n| campaign.referral_program.discount.fixed.apply_to_items | |\n| campaign.promotion | |\n| campaign.promotion.discount.apply_to_order | |\n| campaign.promotion.discount.apply_to_items | |\n| campaign.promotion.discount.apply_to_items_proportionally | |\n| campaign.promotion.discount.apply_to_items_proportionally_by_quantity | |\n| campaign.promotion.discount.fixed.apply_to_items | |\n| campaign.loyalty_program | |\n| voucher.discount_voucher | |\n| voucher.discount_voucher.discount.apply_to_order | |\n| voucher.discount_voucher.discount.apply_to_items | |\n| voucher.discount_voucher.discount.apply_to_items_proportionally | |\n| voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | |\n| voucher.discount_voucher.discount.fixed.apply_to_items | |\n| voucher.gift_voucher | |\n| voucher.gift_voucher.gift.apply_to_order | |\n| voucher.gift_voucher.gift.apply_to_items | |\n| voucher.loyalty_card | |\n| distribution.custom_event | |\n| reward_assignment.pay_with_points | |\n| global | |"
+ }
+ }
+ },
+ "ValidationRuleBundleRules": {
+ "title": "Validation Rule Bundle Rules",
+ "type": "object",
+ "description": "Contains all the definitions for the bundle rules. It is a set of key value pairs representing the rules and logic between them. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.\n\nWhile updating with the PUT method, you can pass `\"bundle_rules\": null` to delete the configuration; in the response, an empty object is then returned.",
+ "properties": {
+ "logic": {
+ "type": "string",
+ "example": "(1 and 2) and (3)",
+ "description": "Defines the logic between the rules."
+ }
+ },
+ "additionalProperties": {
+ "type": "object",
+ "description": "Contains the name of the bundle rule.",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Voucherify's specific bundle rule name. Currently, it is only `order.items.any`.",
+ "enum": [
+ "order.items.any"
+ ]
+ },
+ "conditions": {
+ "type": "object",
+ "description": "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`.",
+ "properties": {
+ "$is": {
+ "type": "array",
+ "maxItems": 1,
+ "items": {
+ "type": "object",
+ "description": "",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier of the product, SKU, or collection assigned by Voucherify."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the order item. It can be a `product_or_sku` or `products_collection`",
+ "enum": [
+ "product_or_sku",
+ "products_collection"
+ ]
+ },
+ "object": {
+ "type": "string",
+ "description": "Object used in the bundle rule. It can be a `products_collection`, `product`, or `sku`.",
+ "enum": [
+ "products_collection",
+ "product",
+ "sku"
+ ]
+ }
+ },
+ "required": [
+ "id",
+ "type",
+ "object"
+ ]
+ }
+ }
+ }
+ },
+ "rules": {
+ "properties": {
+ "logic": {
+ "type": "string",
+ "example": "(1 and 2) and (3)",
+ "description": "Defines the logic between the sub-rules."
+ }
+ },
+ "additionalProperties": {
+ "type": "object",
+ "description": "Contains the name of the validation sub-rule.",
+ "maxProperties": 1,
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Voucherify's specific sub-rule name. Currently, it is only `order.items.aggregated_quantity`.",
+ "enum": [
+ "order.items.aggregated_quantity"
+ ]
+ },
+ "conditions": {
+ "type": "object",
+ "description": "Defines the conditions of the bundle rule. The quantity of order items in the customer's cart must meet the conditions.",
+ "properties": {
+ "$more_than_or_equal": {
+ "type": "array",
+ "maxItems": 1,
+ "items": {
+ "type": "number",
+ "minimum": 1,
+ "description": "The number of units in the customer's cart must be equal or higher than the defined number."
+ }
+ }
+ }
+ },
+ "rules": {
+ "type": "object",
+ "description": "An empty object."
+ },
+ "error": {
+ "type": "object",
+ "description": "**CURRENTLY UNSUPPORTED**. Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.",
+ "properties": {
+ "message": {
+ "type": "string",
+ "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule."
+ }
+ }
+ }
+ }
+ }
+ },
+ "error": {
+ "type": "object",
+ "description": "**CURRENTLY UNSUPPORTED**. Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.",
+ "properties": {
+ "message": {
+ "type": "string",
+ "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule."
+ }
+ }
+ }
}
}
},
@@ -17621,68 +17847,140 @@
},
"additionalProperties": {
"type": "object",
- "description": "Contains the details about the point balances left on loyalty cards and the number of referred customers in each campaign.",
+ "description": "Contains the name of the validation rule.",
"properties": {
"name": {
"type": "string",
- "description": "Voucherify specific rule name.",
- "enum": [
- "customer.segment",
- "customer.metadata",
- "order.amount",
- "order.initial_amount",
- "order.items.count",
- "order.items.price_any",
- "order.items.price_each",
- "order.items.metadata_any",
- "order.items.metadata_each",
- "order.metadata",
- "campaign.orders.amount_discounted",
- "campaign.orders.amount",
- "campaign.redemptions.count",
- "campaign.redemptions.count.daily",
- "campaign.redemptions.count.monthly",
- "campaign.redemptions.customers_count",
- "campaign.redemptions.customers_count.daily",
- "campaign.redemptions.customers_count.monthly",
- "redemption.gift.amount",
- "redemption.count.daily",
- "redemption.count.monthly",
- "redemption.count.per_customer",
- "redemption.count.per_customer.daily",
- "redemption.count.per_customer.monthly",
- "redemption.api_key",
- "redemption.count.per_api_key",
- "redemption.user.login",
- "redemption.count.per_user",
- "redemption.metadata*",
- "redemption.reward.pay_with_points.points_used",
- "product.id",
- "product.price",
- "product.quantity",
- "product.discount_applicable",
- "product.metadata*",
- "product.metadata.aggregated_quantity",
- "product.metadata.aggregated_amount",
- "product.metadata.discount_applicable",
- "product.metadata.match_all",
- "sku.id",
- "sku.price",
- "sku.quantity",
- "sku.discount_applicable",
- "publication.redeemable_by_linked_customer",
- "custom_event.metadata",
- "order.items.every",
- "order.items.any",
- "order.items.none",
- "order.items.cheapest",
- "order.items.most_expensive",
- "order.items.quantity",
- "order.items.aggregated_quantity",
- "order.items.price",
- "order.items.aggregated_amount",
- "order.items.metadata"
- ]
+ "description": "Voucherify's specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined."
+ },
+ "property": {
+ "type": "string",
+ "nullable": true,
+ "description": "Custom name for a metadata property associated with the condition to be satisfied. **Required** if the property `name` is any of the following: \n customer_metadata
custom_event_metadata
order_items_metadata
order_metadata
product_metadata
redemption_metadata"
+ },
+ "conditions": {
+ "$ref": "#/components/schemas/ValidationRuleConditions"
+ },
+ "rules": {
+ "$ref": "#/components/schemas/ValidationRuleRules01"
+ },
+ "error": {
+ "type": "object",
+ "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.",
+ "properties": {
+ "message": {
+ "type": "string",
+ "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule."
+ }
+ }
+ }
+ }
+ }
+ },
+ "ValidationRuleRules01": {
+ "title": "Validation Rule Rules",
+ "type": "object",
+ "description": "Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.",
+ "properties": {
+ "logic": {
+ "type": "string",
+ "example": "(1 and 2) and (3)",
+ "description": "Defines the logic between the rules."
+ }
+ },
+ "additionalProperties": {
+ "type": "object",
+ "description": "Contains the name of the validation rule.",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Voucherify's specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined."
+ },
+ "property": {
+ "type": "string",
+ "nullable": true,
+ "description": "Custom name for a metadata property associated with the condition to be satisfied. **Required** if the property `name` is any of the following: \n customer_metadata
custom_event_metadata
order_items_metadata
order_metadata
product_metadata
redemption_metadata"
+ },
+ "conditions": {
+ "$ref": "#/components/schemas/ValidationRuleConditions"
+ },
+ "rules": {
+ "$ref": "#/components/schemas/ValidationRuleRules02"
+ },
+ "error": {
+ "type": "object",
+ "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.",
+ "properties": {
+ "message": {
+ "type": "string",
+ "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule."
+ }
+ }
+ }
+ }
+ }
+ },
+ "ValidationRuleRules02": {
+ "title": "Validation Rule Rules",
+ "type": "object",
+ "description": "Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.",
+ "properties": {
+ "logic": {
+ "type": "string",
+ "example": "(1 and 2) and (3)",
+ "description": "Defines the logic between the rules."
+ }
+ },
+ "additionalProperties": {
+ "type": "object",
+ "description": "Contains the name of the validation rule.",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Voucherify's specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined."
+ },
+ "property": {
+ "type": "string",
+ "nullable": true,
+ "description": "Custom name for a metadata property associated with the condition to be satisfied. **Required** if the property `name` is any of the following: \n customer_metadata
custom_event_metadata
order_items_metadata
order_metadata
product_metadata
redemption_metadata"
+ },
+ "conditions": {
+ "$ref": "#/components/schemas/ValidationRuleConditions"
+ },
+ "rules": {
+ "$ref": "#/components/schemas/ValidationRuleRules03"
+ },
+ "error": {
+ "type": "object",
+ "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.",
+ "properties": {
+ "message": {
+ "type": "string",
+ "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule."
+ }
+ }
+ }
+ }
+ }
+ },
+ "ValidationRuleRules03": {
+ "title": "Validation Rule Rules",
+ "type": "object",
+ "description": "Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.",
+ "properties": {
+ "logic": {
+ "type": "string",
+ "example": "(1 and 2) and (3)",
+ "description": "Defines the logic between the rules."
+ }
+ },
+ "additionalProperties": {
+ "type": "object",
+ "description": "Contains the name of the validation rule.",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Voucherify's specific rule name. The list of available names is provided below. \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment
customer.metadata* |\n|**Order** |order.amount
order.initial_amount
order.items.count
order.items.price_any
order.items.price_each
order.items.metadata_any
order.items.metadata_each
order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted
campaign.orders.amount
campaign.redemptions.count
campaign.redemptions.count.daily
campaign.redemptions.count.monthly
campaign.redemptions.customers_count
campaign.redemptions.customers_count.daily
campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount
redemption.count.daily
redemption.count.monthly
redemption.count.per_customer
redemption.count.per_customer.daily
redemption.count.per_customer.monthly
redemption.api_key
redemption.count.per_api_key
redemption.user.login
redemption.count.per_user
redemption.metadata
redemption.reward.pay_with_points.points_used |\n| **Product** | product.id
product.price
product.quantity
product.discount_applicable
product.metadata*
product.metadata.aggregated_quantity
product.metadata.aggregated_amount
product.metadata.discount_applicable
product.metadata.match_all |\n| **SKU** | sku.id
sku.price
sku.quantity
sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every
order.items.any
order.items.none
order.items.cheapest
order.items.most_expensive | order.items.quantity
order.items.aggregated_quantity
order.items.price
order.items.aggregated_amount
order.items.metadata* | \n\n\n\n*Requires the `property` field to be defined."
},
"property": {
"type": "string",
@@ -17694,15 +17992,15 @@
},
"rules": {
"type": "object",
- "description": "Validation rule object nested within the current validation rule."
+ "description": "Another set of validation rules. If you need to create complex rules with more nested rules, use the validation rule builder in the dashboard."
},
"error": {
"type": "object",
- "description": "Contains the error message returned from the API when validation / redemption fails to meet requirements of defined rule.",
+ "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.",
"properties": {
"message": {
"type": "string",
- "description": "The error message returned from the API when validation / redemption fails to meet requirements of defined rule."
+ "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule."
}
}
}
@@ -17712,13 +18010,13 @@
"ValidationRuleConditions": {
"title": "Validation Rule Conditions",
"type": "object",
- "description": "A set of key value pairs representing the condition name and value. The list of available conditions is provided below: \n\n| **Condition (key)** | **Definition** | \n|---------------------|---------------------------------------------------------------|\n| $is | A property is a predefined value. | \n| $is_not | A property is not a predefined value. | \n| $in | A property either one value in a predefined list of values. | \n| $less_than | A property is less than a predefined value. | \n| $less_than_or_equal | A property is less than or equal to a predefined value. | \n| $more_than | A property is more than a predefined value. | \n| $more_than_or_equal | A property is more than or equal to a predefined value. | \n| $starts_with | A property starts with the predefined sequence of characters. | \n| $ends_with | A property ends with the predefined sequence of characters. | \n| $contains | A property contains the predefined sequence of characters. | \n| $timeframe | | \n| $timeframe_absolute | | \n| $dow | | \n| $count | | \n| $count_more | | \n| $count_less | | \n| $from | | \n",
+ "description": "A set of key value pairs representing the condition name and value. The list of available conditions is provided below: \n\n| **Condition (key)** | **Definition** | \n|---------------------|---------------------------------------------------------------|\n| `$is` | A property is a predefined value. | \n| `$is_not` | A property is not a predefined value. | \n| `$in` | A property is one value of the values in a predefined list of values. | \n|`$not_in` | A property is not one of the values in a predefined list of values. | \n| `$less_than` | A property is less than a predefined value. Can be also used with datetime. | \n| `$less_than_or_equal` | A property is less than or equal to a predefined value. Can be also used with datetime. | \n| `$more_than` | A property is more than a predefined value. Can be also used with datetime. | \n| `$more_than_or_equal` | A property is more than or equal to a predefined value. Can be also used with datetime. | \n| `$starts_with` | A property starts with the predefined sequence of characters. | \n| `$ends_with ` | A property ends with the predefined sequence of characters. | \n| `$contains` | A property contains the predefined sequence of characters. | \n| `$timeframe` | A property occurs within the time frame, i.e. every 1 day for 1 hour, e.g. `$timeframe: [\"2024-11-12T14:59:23.019Z;P1D;PT1H\"]` | \n| `$timeframe_absolute` | A property occurs between two dates and times, e.g. `2024-11-14T16:02:00.000Z;2024-11-28T16:02:00.000Z` | \n| `$timeframe_daily_hours` | A property occurs between selected hours on selected days of the week, e.g. `18:00;20:01;2,3`, where `0` equals Sunday, `1` equals Monday, `2` equals Tuesday, `3` equals Wednesday, `4` equals Thursday, `5` equals Friday, and `6` equals Saturday. | \n| `$dow` | A property occurs within given days of the week, where `0` equals Sunday, `1` equals Monday, `2` equals Tuesday, `3` equals Wednesday, `4` equals Thursday, `5` equals Friday, and `6` equals Saturday. | \n| `$count` | For array metadata; the property must have exactly the defined number of elements. | \n| `$count_more` | For array metadata; the property must have more elements than the defined number. | \n| `$count_less` | For array metadata; the property must have less elements than the defined number. | \n| `$from` | The property must belong to the predefined value. Related to product collections and best used together with the `$is` condition. | \n | `$after` | The value is after the date. | \n| `$before` | The value is before the date. | \n| `$more_than_ago` | The date is more than the defined value ago expressed in number of days, relative to today, e.g. more than 3 days ago. | \n| `$less_than_ago` | The date is less than the defined value ago expressed in number of days, relative to today, less than 3 days ago. | \n| `is_days_ago` | The date is exactly the defined value ago expressed in number of days, relative to today, e.g. exactly 3 days ago. | \n| `$more_than_future` | The date is more than the defined value in the future expressed in number of days, relative to today, e.g. more than 3 days in the future. | \n| `$less_than_ago` | The date is less than the defined value in the future expressed in number of days, relative to today, e.g. less than 3 days in the future. | \n| `$is_days_in_future` | The date is exactly the defined value in the future expressed in number of days, relative to today, e.g. exactly 3 days in the future. | \n",
"properties": {
"$is": {
- "$ref": "#/components/schemas/Any"
+ "$ref": "#/components/schemas/AnyOne"
},
"$is_not": {
- "$ref": "#/components/schemas/Any"
+ "$ref": "#/components/schemas/AnyOne"
},
"$in": {
"$ref": "#/components/schemas/Any"
@@ -17727,46 +18025,84 @@
"$ref": "#/components/schemas/Any"
},
"$less_than": {
- "$ref": "#/components/schemas/Any"
+ "$ref": "#/components/schemas/AnyOne"
},
"$less_than_or_equal": {
- "$ref": "#/components/schemas/Any"
+ "$ref": "#/components/schemas/AnyOne"
},
"$more_than": {
- "$ref": "#/components/schemas/Any"
+ "$ref": "#/components/schemas/AnyOne"
},
"$more_than_or_equal": {
- "$ref": "#/components/schemas/Any"
+ "$ref": "#/components/schemas/AnyOne"
},
"$starts_with": {
- "$ref": "#/components/schemas/Any"
+ "$ref": "#/components/schemas/AnyString"
},
"$ends_with": {
- "$ref": "#/components/schemas/Any"
+ "$ref": "#/components/schemas/AnyString"
},
"$contains": {
- "$ref": "#/components/schemas/Any"
+ "$ref": "#/components/schemas/AnyString"
},
"$timeframe": {
- "$ref": "#/components/schemas/Any"
+ "$ref": "#/components/schemas/AnyString"
},
"$timeframe_absolute": {
- "$ref": "#/components/schemas/Any"
+ "$ref": "#/components/schemas/AnyString"
+ },
+ "$timeframe_daily_hours": {
+ "$ref": "#/components/schemas/AnyString"
},
"$dow": {
- "$ref": "#/components/schemas/Any"
+ "type": "array",
+ "items": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 6
+ }
},
"$count": {
- "$ref": "#/components/schemas/Any"
+ "$ref": "#/components/schemas/AnyNumber"
},
"$count_more": {
- "$ref": "#/components/schemas/Any"
+ "$ref": "#/components/schemas/AnyNumber"
},
"$count_less": {
+ "$ref": "#/components/schemas/AnyNumber"
+ },
+ "$not_differ": {
+ "$ref": "#/components/schemas/Any"
+ },
+ "$not_intersect": {
"$ref": "#/components/schemas/Any"
},
"$from": {
"$ref": "#/components/schemas/Any"
+ },
+ "$after": {
+ "$ref": "#/components/schemas/AnyDateDateTime"
+ },
+ "$before": {
+ "$ref": "#/components/schemas/AnyDateDateTime"
+ },
+ "$more_than_ago": {
+ "$ref": "#/components/schemas/AnyNumber"
+ },
+ "$less_than_ago": {
+ "$ref": "#/components/schemas/AnyNumber"
+ },
+ "$is_days_ago": {
+ "$ref": "#/components/schemas/AnyNumber"
+ },
+ "$more_than_future": {
+ "$ref": "#/components/schemas/AnyNumber"
+ },
+ "$less_than_future": {
+ "$ref": "#/components/schemas/AnyNumber"
+ },
+ "$is_days_in_future": {
+ "$ref": "#/components/schemas/AnyNumber"
}
}
},
@@ -18463,6 +18799,24 @@
"name"
]
},
+ "holder_loyalty_tier": {
+ "type": "object",
+ "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier of the loyalty tier, assigned by Voucherify."
+ },
+ "name": {
+ "type": "string",
+ "description": "User-defined name of the loyalty tier."
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ]
+ },
"reward": {
"type": "object",
"description": "Contains information about the pay with points reward.",
diff --git a/reference/readonly-sdks/java/OpenAPI.json b/reference/readonly-sdks/java/OpenAPI.json
index 0ec3e706a..904624d86 100644
--- a/reference/readonly-sdks/java/OpenAPI.json
+++ b/reference/readonly-sdks/java/OpenAPI.json
@@ -523,6 +523,9 @@
"description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.",
"nullable": true
},
+ "access_settings": {
+ "$ref": "#/components/schemas/AccessSettings"
+ },
"validation_rules": {
"title": "CampaignsCreateRequestBodyValidationRules",
"type": "array",
@@ -1153,6 +1156,9 @@
"example": "cat_0b688929a2476386a7",
"nullable": true
},
+ "access_settings": {
+ "$ref": "#/components/schemas/AccessSettings"
+ },
"activity_duration_after_publishing": {
"type": "string",
"description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.",
@@ -2834,6 +2840,7 @@
},
"unit_off_formula": {
"type": "string",
+ "description": "Formula used to calculate the number of units.",
"nullable": true
},
"unit_type": {
@@ -5127,6 +5134,9 @@
"description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.",
"nullable": true
},
+ "access_settings": {
+ "$ref": "#/components/schemas/AccessSettings"
+ },
"validation_rules": {
"title": "LoyaltiesCreateCampaignRequestBodyValidationRules",
"type": "array",
@@ -11206,6 +11216,9 @@
"example": "cat_0b688929a2476386a7",
"nullable": true
},
+ "access_settings": {
+ "$ref": "#/components/schemas/AccessSettings"
+ },
"activity_duration_after_publishing": {
"type": "string",
"description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.",
@@ -15682,13 +15695,13 @@
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items": {
"title": "OrdersCreateRequestBodyItems",
"type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
"items": {
"$ref": "#/components/schemas/OrderItem"
},
@@ -15749,56 +15762,47 @@
},
"amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"initial_amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
+ "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
+ "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_amount": {
"type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
+ "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"applied_discount_amount": {
"type": "integer",
- "description": "This field shows the order-level discount applied.",
+ "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
+ "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`",
"nullable": true
},
"total_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "OrdersCreateResponseBodyItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
+ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
"nullable": true
},
"metadata": {
@@ -15855,6 +15859,15 @@
"$ref": "#/components/schemas/OrderRedemptionsEntry"
},
"nullable": true
+ },
+ "items": {
+ "title": "OrdersCreateResponseBodyItems",
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
}
},
"description": "Response body schema for **POST** `v1/orders`."
@@ -16000,56 +16013,47 @@
},
"amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"initial_amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
+ "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
+ "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_amount": {
"type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
+ "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"applied_discount_amount": {
"type": "integer",
- "description": "This field shows the order-level discount applied.",
+ "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
+ "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`",
"nullable": true
},
"total_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "OrdersGetResponseBodyItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
+ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
"nullable": true
},
"metadata": {
@@ -16106,6 +16110,15 @@
"$ref": "#/components/schemas/OrderRedemptionsEntry"
},
"nullable": true
+ },
+ "items": {
+ "title": "OrdersGetResponseBodyItems",
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
}
},
"description": "Response body schema for **GET** `v1/orders/{orderId}`."
@@ -16234,13 +16247,13 @@
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items": {
"title": "OrdersUpdateRequestBodyItems",
"type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
"items": {
"$ref": "#/components/schemas/OrderItem"
},
@@ -16301,56 +16314,47 @@
},
"amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"initial_amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
+ "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
+ "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_amount": {
"type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
+ "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"applied_discount_amount": {
"type": "integer",
- "description": "This field shows the order-level discount applied.",
+ "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
+ "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`",
"nullable": true
},
"total_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "OrdersUpdateResponseBodyItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
+ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
"nullable": true
},
"metadata": {
@@ -16407,6 +16411,15 @@
"$ref": "#/components/schemas/OrderRedemptionsEntry"
},
"nullable": true
+ },
+ "items": {
+ "title": "OrdersUpdateResponseBodyItems",
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
}
},
"description": "Response body schema for **PUT** `v1/orders/{orderId}`."
@@ -21263,177 +21276,7 @@
"nullable": true
},
"order": {
- "title": "RedemptionsGetResponseBodyOrder",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.",
- "nullable": true
- },
- "source_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique source ID of an existing order that will be linked to the redemption of this request."
- },
- "status": {
- "type": "string",
- "description": "The order status.",
- "enum": [
- "CREATED",
- "PAID",
- "CANCELED",
- "FULFILLED"
- ],
- "nullable": true
- },
- "amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "initial_amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
- "nullable": true
- },
- "items_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_amount": {
- "type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
- "nullable": true
- },
- "applied_discount_amount": {
- "type": "integer",
- "description": "This field shows the order-level discount applied.",
- "nullable": true
- },
- "items_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
- "nullable": true
- },
- "total_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "RedemptionsGetResponseBodyOrderItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
- "nullable": true
- },
- "metadata": {
- "title": "RedemptionsGetResponseBodyOrderMetadata",
- "type": "object",
- "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "order",
- "enum": [
- "order"
- ],
- "nullable": true
- },
- "created_at": {
- "type": "string",
- "example": "2021-12-22T10:13:06.487Z",
- "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.",
- "format": "date-time",
- "nullable": true
- },
- "updated_at": {
- "type": "string",
- "nullable": true,
- "example": "2021-12-22T10:14:45.316Z",
- "format": "date-time",
- "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format."
- },
- "customer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique customer ID of the customer making the purchase.",
- "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
- },
- "referrer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique referrer ID.",
- "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
- },
- "customer": {
- "title": "RedemptionsGetResponseBodyOrderCustomer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- },
- "nullable": true
- },
- "referrer": {
- "title": "RedemptionsGetResponseBodyOrderReferrer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- },
- "nullable": true
- },
- "redemptions": {
- "title": "RedemptionsGetResponseBodyOrderRedemptionsEntry",
- "type": "object",
- "additionalProperties": {
- "$ref": "#/components/schemas/OrderRedemptionsEntry"
- },
- "nullable": true
- }
- },
- "nullable": true
+ "$ref": "#/components/schemas/OrderCalculated"
},
"channel": {
"title": "RedemptionsGetResponseBodyChannel",
@@ -22165,174 +22008,7 @@
"nullable": true
},
"order": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrder",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.",
- "nullable": true
- },
- "source_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique source ID of an existing order that will be linked to the redemption of this request."
- },
- "status": {
- "type": "string",
- "description": "The order status.",
- "enum": [
- "CREATED",
- "PAID",
- "CANCELED",
- "FULFILLED"
- ],
- "nullable": true
- },
- "amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "initial_amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
- "nullable": true
- },
- "items_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_amount": {
- "type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
- "nullable": true
- },
- "applied_discount_amount": {
- "type": "integer",
- "description": "This field shows the order-level discount applied.",
- "nullable": true
- },
- "items_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
- "nullable": true
- },
- "total_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrderItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
- "nullable": true
- },
- "metadata": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrderMetadata",
- "type": "object",
- "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "order",
- "enum": [
- "order"
- ],
- "nullable": true
- },
- "created_at": {
- "type": "string",
- "example": "2021-12-22T10:13:06.487Z",
- "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.",
- "format": "date-time",
- "nullable": true
- },
- "updated_at": {
- "type": "string",
- "nullable": true,
- "example": "2021-12-22T10:14:45.316Z",
- "format": "date-time",
- "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format."
- },
- "customer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique customer ID of the customer making the purchase.",
- "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
- },
- "referrer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique referrer ID.",
- "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
- },
- "customer": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrderCustomer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- }
- },
- "referrer": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrderReferrer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- }
- },
- "redemptions": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrderRedemptionsEntry",
- "type": "object",
- "additionalProperties": {
- "$ref": "#/components/schemas/OrderRedemptionsEntry"
- },
- "nullable": true
- }
- }
+ "$ref": "#/components/schemas/OrderCalculated"
},
"channel": {
"title": "RedemptionsListResponseBodyRedemptionsItemChannel",
@@ -23303,7 +22979,9 @@
"nullable": true
}
},
- "required": [],
+ "required": [
+ "order"
+ ],
"description": "Response body schema for **POST** `v1/redemptions/{redemptionId}/rollback`."
},
"RedemptionsRollbacksCreateRequestBody": {
@@ -23352,9 +23030,23 @@
"parent_rollback": {
"$ref": "#/components/schemas/RedemptionRollback"
},
- "order": {
- "$ref": "#/components/schemas/OrderCalculated"
- }
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ }
+ }
+ }
+ }
+ ]
}
},
"ReferralsMembersHoldersCreateInBulkRequestBody": {
@@ -24665,6 +24357,9 @@
"description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.",
"nullable": true
},
+ "access_settings": {
+ "$ref": "#/components/schemas/AccessSettings"
+ },
"voucher": {
"title": "TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher",
"type": "object",
@@ -26301,6 +25996,7 @@
},
"unit_off_formula": {
"type": "string",
+ "description": "Formula used to calculate the number of units.",
"nullable": true
},
"unit_type": {
@@ -28643,6 +28339,69 @@
"type": "string",
"format": "hostname"
},
+ "AccessSettings": {
+ "title": "AccessSettings",
+ "type": "object",
+ "description": "Assigns or unassigns an area or store to the campaign.\n\n**NOTE**: this object can be sent if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.",
+ "properties": {
+ "assign": {
+ "title": "AccessSettingsAssign",
+ "type": "object",
+ "description": "Assigns the campaign to an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it from the area. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assign to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.",
+ "properties": {
+ "areas_ids": {
+ "title": "AccessSettingsAssignAreasIds",
+ "type": "array",
+ "description": "List all area IDs to which the campaign will be assigned.",
+ "items": {
+ "title": "AccessSettingsAssignAreasIdsItem",
+ "type": "string"
+ },
+ "nullable": true
+ },
+ "area_stores_ids": {
+ "title": "AccessSettingsAssignAreaStoresIds",
+ "type": "array",
+ "description": "List all store IDs to which the campaign will be assigned.",
+ "items": {
+ "title": "AccessSettingsAssignAreaStoresIdsItem",
+ "type": "string"
+ },
+ "nullable": true
+ }
+ },
+ "nullable": true
+ },
+ "unassign": {
+ "title": "AccessSettingsUnassign",
+ "type": "object",
+ "description": "Unassigns the campaign from an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it first. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assigned to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.",
+ "properties": {
+ "areas_ids": {
+ "title": "AccessSettingsUnassignAreasIds",
+ "type": "array",
+ "description": "List all area IDs from which the campaign will be unassigned.",
+ "items": {
+ "title": "AccessSettingsUnassignAreasIdsItem",
+ "type": "string"
+ },
+ "nullable": true
+ },
+ "area_stores_ids": {
+ "title": "AccessSettingsUnassignAreaStoresIds",
+ "type": "array",
+ "description": "List all store IDs to which the campaign will be unassigned.",
+ "items": {
+ "title": "AccessSettingsUnassignAreaStoresIdsItem",
+ "type": "string"
+ },
+ "nullable": true
+ }
+ },
+ "nullable": true
+ }
+ }
+ },
"AccessSettingsCampaignAssignmentsList": {
"title": "AccessSettingsCampaignAssignmentsList",
"type": "object",
@@ -28758,13 +28517,38 @@
"order_item_indices": {
"title": "ApplicableToOrderItemIndices",
"type": "array",
- "description": "Determines the order in which the discount is applied to the products or SKUs sent in the `order` object in the request. The counting begins from `0`.",
+ "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.",
"items": {
"title": "ApplicableToOrderItemIndicesItem",
"type": "integer"
},
"nullable": true
},
+ "order_item_units": {
+ "title": "ApplicableToOrderItemUnits",
+ "type": "array",
+ "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.",
+ "items": {
+ "title": "ApplicableToOrderItemUnitsItem",
+ "type": "object",
+ "properties": {
+ "index": {
+ "type": "integer",
+ "description": "Number assigned to the order line item in accordance with the order sent in the request."
+ },
+ "units": {
+ "title": "ApplicableToOrderItemUnitsItemUnits",
+ "type": "array",
+ "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.",
+ "items": {
+ "title": "ApplicableToOrderItemUnitsItemUnitsItem",
+ "type": "integer"
+ }
+ }
+ }
+ },
+ "nullable": true
+ },
"repeat": {
"type": "integer",
"description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item.",
@@ -28777,7 +28561,7 @@
},
"target": {
"type": "string",
- "description": "Determines to which kinds of objects the discount is applicable. `\"ITEM\"` includes products and SKUs.",
+ "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.",
"nullable": true
}
},
@@ -30211,6 +29995,7 @@
},
"unit_off_formula": {
"type": "string",
+ "description": "Formula used to calculate the number of units.",
"nullable": true
},
"unit_type": {
@@ -30288,6 +30073,7 @@
},
"unit_off_formula": {
"type": "string",
+ "description": "Formula used to calculate the number of units.",
"nullable": true
},
"effect": {
@@ -32134,6 +31920,25 @@
"required": [],
"nullable": true
},
+ "holder_loyalty_tier": {
+ "title": "LoyaltyCardTransactionDetailsHolderLoyaltyTier",
+ "type": "object",
+ "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier of the loyalty tier, assigned by Voucherify.",
+ "nullable": true
+ },
+ "name": {
+ "type": "string",
+ "description": "User-defined name of the loyalty tier.",
+ "nullable": true
+ }
+ },
+ "required": [],
+ "nullable": true
+ },
"reward": {
"title": "LoyaltyCardTransactionDetailsReward",
"type": "object",
@@ -33901,13 +33706,13 @@
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items": {
"title": "OrderItems",
"type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
"items": {
"$ref": "#/components/schemas/OrderItem"
},
@@ -33950,56 +33755,47 @@
},
"amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"initial_amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
+ "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
+ "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_amount": {
"type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
+ "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"applied_discount_amount": {
"type": "integer",
- "description": "This field shows the order-level discount applied.",
+ "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
+ "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`",
"nullable": true
},
"total_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "OrderCalculatedItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
+ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
"nullable": true
},
"metadata": {
@@ -34056,6 +33852,15 @@
"$ref": "#/components/schemas/OrderRedemptionsEntry"
},
"nullable": true
+ },
+ "items": {
+ "title": "OrderCalculatedItems",
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
}
}
},
@@ -34244,6 +34049,9 @@
"type": "object",
"description": "A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.",
"nullable": true
+ },
+ "application_details": {
+ "$ref": "#/components/schemas/ApplicationDetails"
}
},
"required": []
@@ -36175,177 +35983,7 @@
"nullable": true
},
"order": {
- "title": "RedemptionEntryOrder",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.",
- "nullable": true
- },
- "source_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique source ID of an existing order that will be linked to the redemption of this request."
- },
- "status": {
- "type": "string",
- "description": "The order status.",
- "enum": [
- "CREATED",
- "PAID",
- "CANCELED",
- "FULFILLED"
- ],
- "nullable": true
- },
- "amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "initial_amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
- "nullable": true
- },
- "items_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_amount": {
- "type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
- "nullable": true
- },
- "applied_discount_amount": {
- "type": "integer",
- "description": "This field shows the order-level discount applied.",
- "nullable": true
- },
- "items_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
- "nullable": true
- },
- "total_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "RedemptionEntryOrderItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
- "nullable": true
- },
- "metadata": {
- "title": "RedemptionEntryOrderMetadata",
- "type": "object",
- "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "order",
- "enum": [
- "order"
- ],
- "nullable": true
- },
- "created_at": {
- "type": "string",
- "example": "2021-12-22T10:13:06.487Z",
- "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.",
- "format": "date-time",
- "nullable": true
- },
- "updated_at": {
- "type": "string",
- "nullable": true,
- "example": "2021-12-22T10:14:45.316Z",
- "format": "date-time",
- "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format."
- },
- "customer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique customer ID of the customer making the purchase.",
- "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
- },
- "referrer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique referrer ID.",
- "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
- },
- "customer": {
- "title": "RedemptionEntryOrderCustomer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- },
- "nullable": true
- },
- "referrer": {
- "title": "RedemptionEntryOrderReferrer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- },
- "nullable": true
- },
- "redemptions": {
- "title": "RedemptionEntryOrderRedemptionsEntry",
- "type": "object",
- "additionalProperties": {
- "$ref": "#/components/schemas/OrderRedemptionsEntry"
- },
- "nullable": true
- }
- },
- "nullable": true
+ "$ref": "#/components/schemas/OrderCalculated"
},
"channel": {
"title": "RedemptionEntryChannel",
@@ -37306,7 +36944,9 @@
"nullable": true
}
},
- "required": []
+ "required": [
+ "order"
+ ]
},
"ReferralProgram": {
"title": "ReferralProgram",
@@ -39412,6 +39052,25 @@
"required": [],
"nullable": true
},
+ "holder_loyalty_tier": {
+ "title": "VoucherTransactionDetailsHolderLoyaltyTier",
+ "type": "object",
+ "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier of the loyalty tier, assigned by Voucherify.",
+ "nullable": true
+ },
+ "name": {
+ "type": "string",
+ "description": "User-defined name of the loyalty tier.",
+ "nullable": true
+ }
+ },
+ "required": [],
+ "nullable": true
+ },
"reward": {
"title": "VoucherTransactionDetailsReward",
"type": "object",
@@ -39921,6 +39580,49 @@
"APPLY_FROM_MOST_EXPENSIVE"
]
},
+ "ApplicationDetails": {
+ "title": "ApplicationDetails",
+ "type": "array",
+ "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.",
+ "items": {
+ "title": "ApplicationDetailsItem",
+ "type": "object",
+ "description": "Object representing item replacement.",
+ "properties": {
+ "source_index": {
+ "type": "integer",
+ "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.",
+ "minimum": 0
+ },
+ "source_applied_quantity": {
+ "type": "integer",
+ "description": "Number of source units that are replaced.",
+ "maximum": -1
+ },
+ "source_applied_quantity_amount": {
+ "type": "integer",
+ "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.",
+ "maximum": 0
+ },
+ "target_index": {
+ "type": "integer",
+ "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`."
+ },
+ "target_applied_quantity": {
+ "type": "integer",
+ "description": "Number of added target units that are replacements."
+ },
+ "target_applied_quantity_amount": {
+ "type": "integer",
+ "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity."
+ },
+ "target_applied_discount_amount": {
+ "type": "integer",
+ "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`."
+ }
+ }
+ }
+ },
"AreaStoreCampaignAssignment": {
"title": "AreaStoreCampaignAssignment",
"type": "object",
@@ -40238,13 +39940,38 @@
"order_item_indices": {
"title": "InapplicableToOrderItemIndices",
"type": "array",
- "description": "Determines the order in which the discount is applied to the products or SKUs sent in the `order` object in the request. The counting begins from `0`.",
+ "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.",
"items": {
"title": "InapplicableToOrderItemIndicesItem",
"type": "integer"
},
"nullable": true
},
+ "order_item_units": {
+ "title": "InapplicableToOrderItemUnits",
+ "type": "array",
+ "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.",
+ "items": {
+ "title": "InapplicableToOrderItemUnitsItem",
+ "type": "object",
+ "properties": {
+ "index": {
+ "type": "integer",
+ "description": "Number assigned to the order line item in accordance with the order sent in the request."
+ },
+ "units": {
+ "title": "InapplicableToOrderItemUnitsItemUnits",
+ "type": "array",
+ "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.",
+ "items": {
+ "title": "InapplicableToOrderItemUnitsItemUnitsItem",
+ "type": "integer"
+ }
+ }
+ }
+ },
+ "nullable": true
+ },
"repeat": {
"type": "integer",
"description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item.",
@@ -40257,7 +39984,7 @@
},
"target": {
"type": "string",
- "description": "Determines to which kinds of objects the discount is applicable. `\"ITEM\"` includes products and SKUs.",
+ "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.",
"nullable": true
}
},
@@ -56496,7 +56223,7 @@
"tags": [
"Loyalties"
],
- "summary": "Get Points Expiration",
+ "summary": "List Loyalty Card Point Expiration",
"description": "Retrieve loyalty point expiration buckets for a given loyalty card. Expired point buckets are not returned in this endpoint. You can use the Exports API to retrieve a list of both ACTIVE and EXPIRED point buckets.",
"parameters": [
{
@@ -56603,7 +56330,7 @@
"tags": [
"Loyalties"
],
- "summary": "Create Points Expiration Export",
+ "summary": "Export Loyalty Campaign Point Expiration",
"description": "Schedule the generation of a points expiration CSV file for a particular campaign.",
"parameters": [],
"security": [
diff --git a/reference/readonly-sdks/php/OpenAPI.json b/reference/readonly-sdks/php/OpenAPI.json
index 180247f87..328962b02 100644
--- a/reference/readonly-sdks/php/OpenAPI.json
+++ b/reference/readonly-sdks/php/OpenAPI.json
@@ -539,6 +539,9 @@
"description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.",
"nullable": true
},
+ "access_settings": {
+ "$ref": "#/components/schemas/AccessSettings"
+ },
"validation_rules": {
"title": "CampaignsCreateRequestBodyValidationRules",
"type": "array",
@@ -1217,6 +1220,9 @@
"example": "cat_0b688929a2476386a7",
"nullable": true
},
+ "access_settings": {
+ "$ref": "#/components/schemas/AccessSettings"
+ },
"activity_duration_after_publishing": {
"type": "string",
"description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.",
@@ -2946,6 +2952,7 @@
},
"unit_off_formula": {
"type": "string",
+ "description": "Formula used to calculate the number of units.",
"nullable": true
},
"unit_type": {
@@ -5255,6 +5262,9 @@
"description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.",
"nullable": true
},
+ "access_settings": {
+ "$ref": "#/components/schemas/AccessSettings"
+ },
"validation_rules": {
"title": "LoyaltiesCreateCampaignRequestBodyValidationRules",
"type": "array",
@@ -11613,6 +11623,9 @@
"example": "cat_0b688929a2476386a7",
"nullable": true
},
+ "access_settings": {
+ "$ref": "#/components/schemas/AccessSettings"
+ },
"activity_duration_after_publishing": {
"type": "string",
"description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.",
@@ -16105,13 +16118,13 @@
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items": {
"title": "OrdersCreateRequestBodyItems",
"type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
"items": {
"$ref": "#/components/schemas/OrderItem"
},
@@ -16172,56 +16185,47 @@
},
"amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"initial_amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
+ "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
+ "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_amount": {
"type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
+ "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"applied_discount_amount": {
"type": "integer",
- "description": "This field shows the order-level discount applied.",
+ "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
+ "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`",
"nullable": true
},
"total_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "OrdersCreateResponseBodyItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
+ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
"nullable": true
},
"metadata": {
@@ -16278,6 +16282,15 @@
"$ref": "#/components/schemas/OrderRedemptionsEntry"
},
"nullable": true
+ },
+ "items": {
+ "title": "OrdersCreateResponseBodyItems",
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
}
},
"description": "Response body schema for **POST** `v1/orders`."
@@ -16473,56 +16486,47 @@
},
"amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"initial_amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
+ "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
+ "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_amount": {
"type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
+ "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"applied_discount_amount": {
"type": "integer",
- "description": "This field shows the order-level discount applied.",
+ "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
+ "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`",
"nullable": true
},
"total_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "OrdersGetResponseBodyItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
+ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
"nullable": true
},
"metadata": {
@@ -16579,6 +16583,15 @@
"$ref": "#/components/schemas/OrderRedemptionsEntry"
},
"nullable": true
+ },
+ "items": {
+ "title": "OrdersGetResponseBodyItems",
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
}
},
"description": "Response body schema for **GET** `v1/orders/{orderId}`."
@@ -16707,13 +16720,13 @@
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items": {
"title": "OrdersUpdateRequestBodyItems",
"type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
"items": {
"$ref": "#/components/schemas/OrderItem"
},
@@ -16774,56 +16787,47 @@
},
"amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"initial_amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
+ "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
+ "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_amount": {
"type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
+ "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"applied_discount_amount": {
"type": "integer",
- "description": "This field shows the order-level discount applied.",
+ "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
+ "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`",
"nullable": true
},
"total_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "OrdersUpdateResponseBodyItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
+ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
"nullable": true
},
"metadata": {
@@ -16880,6 +16884,15 @@
"$ref": "#/components/schemas/OrderRedemptionsEntry"
},
"nullable": true
+ },
+ "items": {
+ "title": "OrdersUpdateResponseBodyItems",
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
}
},
"description": "Response body schema for **PUT** `v1/orders/{orderId}`."
@@ -21970,177 +21983,7 @@
"nullable": true
},
"order": {
- "title": "RedemptionsGetResponseBodyOrder",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.",
- "nullable": true
- },
- "source_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique source ID of an existing order that will be linked to the redemption of this request."
- },
- "status": {
- "type": "string",
- "description": "The order status.",
- "enum": [
- "CREATED",
- "PAID",
- "CANCELED",
- "FULFILLED"
- ],
- "nullable": true
- },
- "amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "initial_amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
- "nullable": true
- },
- "items_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_amount": {
- "type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
- "nullable": true
- },
- "applied_discount_amount": {
- "type": "integer",
- "description": "This field shows the order-level discount applied.",
- "nullable": true
- },
- "items_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
- "nullable": true
- },
- "total_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "RedemptionsGetResponseBodyOrderItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
- "nullable": true
- },
- "metadata": {
- "title": "RedemptionsGetResponseBodyOrderMetadata",
- "type": "object",
- "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "order",
- "enum": [
- "order"
- ],
- "nullable": true
- },
- "created_at": {
- "type": "string",
- "example": "2021-12-22T10:13:06.487Z",
- "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.",
- "format": "date-time",
- "nullable": true
- },
- "updated_at": {
- "type": "string",
- "nullable": true,
- "example": "2021-12-22T10:14:45.316Z",
- "format": "date-time",
- "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format."
- },
- "customer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique customer ID of the customer making the purchase.",
- "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
- },
- "referrer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique referrer ID.",
- "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
- },
- "customer": {
- "title": "RedemptionsGetResponseBodyOrderCustomer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- },
- "nullable": true
- },
- "referrer": {
- "title": "RedemptionsGetResponseBodyOrderReferrer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- },
- "nullable": true
- },
- "redemptions": {
- "title": "RedemptionsGetResponseBodyOrderRedemptionsEntry",
- "type": "object",
- "additionalProperties": {
- "$ref": "#/components/schemas/OrderRedemptionsEntry"
- },
- "nullable": true
- }
- },
- "nullable": true
+ "$ref": "#/components/schemas/OrderCalculated"
},
"channel": {
"title": "RedemptionsGetResponseBodyChannel",
@@ -22920,174 +22763,7 @@
"nullable": true
},
"order": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrder",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.",
- "nullable": true
- },
- "source_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique source ID of an existing order that will be linked to the redemption of this request."
- },
- "status": {
- "type": "string",
- "description": "The order status.",
- "enum": [
- "CREATED",
- "PAID",
- "CANCELED",
- "FULFILLED"
- ],
- "nullable": true
- },
- "amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "initial_amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
- "nullable": true
- },
- "items_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_amount": {
- "type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
- "nullable": true
- },
- "applied_discount_amount": {
- "type": "integer",
- "description": "This field shows the order-level discount applied.",
- "nullable": true
- },
- "items_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
- "nullable": true
- },
- "total_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrderItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
- "nullable": true
- },
- "metadata": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrderMetadata",
- "type": "object",
- "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "order",
- "enum": [
- "order"
- ],
- "nullable": true
- },
- "created_at": {
- "type": "string",
- "example": "2021-12-22T10:13:06.487Z",
- "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.",
- "format": "date-time",
- "nullable": true
- },
- "updated_at": {
- "type": "string",
- "nullable": true,
- "example": "2021-12-22T10:14:45.316Z",
- "format": "date-time",
- "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format."
- },
- "customer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique customer ID of the customer making the purchase.",
- "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
- },
- "referrer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique referrer ID.",
- "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
- },
- "customer": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrderCustomer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- }
- },
- "referrer": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrderReferrer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- }
- },
- "redemptions": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrderRedemptionsEntry",
- "type": "object",
- "additionalProperties": {
- "$ref": "#/components/schemas/OrderRedemptionsEntry"
- },
- "nullable": true
- }
- }
+ "$ref": "#/components/schemas/OrderCalculated"
},
"channel": {
"title": "RedemptionsListResponseBodyRedemptionsItemChannel",
@@ -24106,7 +23782,9 @@
"nullable": true
}
},
- "required": [],
+ "required": [
+ "order"
+ ],
"description": "Response body schema for **POST** `v1/redemptions/{redemptionId}/rollback`."
},
"RedemptionsRollbacksCreateRequestBody": {
@@ -24155,9 +23833,23 @@
"parent_rollback": {
"$ref": "#/components/schemas/RedemptionRollback"
},
- "order": {
- "$ref": "#/components/schemas/OrderCalculated"
- }
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ }
+ }
+ }
+ }
+ ]
}
},
"ReferralsMembersHoldersCreateInBulkRequestBody": {
@@ -25484,6 +25176,9 @@
"description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.",
"nullable": true
},
+ "access_settings": {
+ "$ref": "#/components/schemas/AccessSettings"
+ },
"voucher": {
"title": "TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher",
"type": "object",
@@ -27136,6 +26831,7 @@
},
"unit_off_formula": {
"type": "string",
+ "description": "Formula used to calculate the number of units.",
"nullable": true
},
"unit_type": {
@@ -29606,6 +29302,69 @@
"type": "string",
"format": "hostname"
},
+ "AccessSettings": {
+ "title": "AccessSettings",
+ "type": "object",
+ "description": "Assigns or unassigns an area or store to the campaign.\n\n**NOTE**: this object can be sent if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.",
+ "properties": {
+ "assign": {
+ "title": "AccessSettingsAssign",
+ "type": "object",
+ "description": "Assigns the campaign to an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it from the area. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assign to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.",
+ "properties": {
+ "areas_ids": {
+ "title": "AccessSettingsAssignAreasIds",
+ "type": "array",
+ "description": "List all area IDs to which the campaign will be assigned.",
+ "items": {
+ "title": "AccessSettingsAssignAreasIdsItem",
+ "type": "string"
+ },
+ "nullable": true
+ },
+ "area_stores_ids": {
+ "title": "AccessSettingsAssignAreaStoresIds",
+ "type": "array",
+ "description": "List all store IDs to which the campaign will be assigned.",
+ "items": {
+ "title": "AccessSettingsAssignAreaStoresIdsItem",
+ "type": "string"
+ },
+ "nullable": true
+ }
+ },
+ "nullable": true
+ },
+ "unassign": {
+ "title": "AccessSettingsUnassign",
+ "type": "object",
+ "description": "Unassigns the campaign from an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it first. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assigned to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.",
+ "properties": {
+ "areas_ids": {
+ "title": "AccessSettingsUnassignAreasIds",
+ "type": "array",
+ "description": "List all area IDs from which the campaign will be unassigned.",
+ "items": {
+ "title": "AccessSettingsUnassignAreasIdsItem",
+ "type": "string"
+ },
+ "nullable": true
+ },
+ "area_stores_ids": {
+ "title": "AccessSettingsUnassignAreaStoresIds",
+ "type": "array",
+ "description": "List all store IDs to which the campaign will be unassigned.",
+ "items": {
+ "title": "AccessSettingsUnassignAreaStoresIdsItem",
+ "type": "string"
+ },
+ "nullable": true
+ }
+ },
+ "nullable": true
+ }
+ }
+ },
"AccessSettingsCampaignAssignmentsList": {
"title": "AccessSettingsCampaignAssignmentsList",
"type": "object",
@@ -29729,13 +29488,38 @@
"order_item_indices": {
"title": "ApplicableToOrderItemIndices",
"type": "array",
- "description": "Determines the order in which the discount is applied to the products or SKUs sent in the `order` object in the request. The counting begins from `0`.",
+ "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.",
"items": {
"title": "ApplicableToOrderItemIndicesItem",
"type": "integer"
},
"nullable": true
},
+ "order_item_units": {
+ "title": "ApplicableToOrderItemUnits",
+ "type": "array",
+ "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.",
+ "items": {
+ "title": "ApplicableToOrderItemUnitsItem",
+ "type": "object",
+ "properties": {
+ "index": {
+ "type": "integer",
+ "description": "Number assigned to the order line item in accordance with the order sent in the request."
+ },
+ "units": {
+ "title": "ApplicableToOrderItemUnitsItemUnits",
+ "type": "array",
+ "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.",
+ "items": {
+ "title": "ApplicableToOrderItemUnitsItemUnitsItem",
+ "type": "integer"
+ }
+ }
+ }
+ },
+ "nullable": true
+ },
"repeat": {
"type": "integer",
"description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item.",
@@ -29748,7 +29532,7 @@
},
"target": {
"type": "string",
- "description": "Determines to which kinds of objects the discount is applicable. `\"ITEM\"` includes products and SKUs.",
+ "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.",
"nullable": true
}
},
@@ -31244,6 +31028,7 @@
},
"unit_off_formula": {
"type": "string",
+ "description": "Formula used to calculate the number of units.",
"nullable": true
},
"unit_type": {
@@ -31321,6 +31106,7 @@
},
"unit_off_formula": {
"type": "string",
+ "description": "Formula used to calculate the number of units.",
"nullable": true
},
"effect": {
@@ -33152,6 +32938,25 @@
"required": [],
"nullable": true
},
+ "holder_loyalty_tier": {
+ "title": "LoyaltyCardTransactionDetailsHolderLoyaltyTier",
+ "type": "object",
+ "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier of the loyalty tier, assigned by Voucherify.",
+ "nullable": true
+ },
+ "name": {
+ "type": "string",
+ "description": "User-defined name of the loyalty tier.",
+ "nullable": true
+ }
+ },
+ "required": [],
+ "nullable": true
+ },
"reward": {
"title": "LoyaltyCardTransactionDetailsReward",
"type": "object",
@@ -34947,13 +34752,13 @@
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items": {
"title": "OrderItems",
"type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
"items": {
"$ref": "#/components/schemas/OrderItem"
},
@@ -34996,56 +34801,47 @@
},
"amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"initial_amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
+ "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
+ "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_amount": {
"type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
+ "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"applied_discount_amount": {
"type": "integer",
- "description": "This field shows the order-level discount applied.",
+ "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
+ "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`",
"nullable": true
},
"total_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "OrderCalculatedItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
+ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
"nullable": true
},
"metadata": {
@@ -35102,6 +34898,15 @@
"$ref": "#/components/schemas/OrderRedemptionsEntry"
},
"nullable": true
+ },
+ "items": {
+ "title": "OrderCalculatedItems",
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
}
}
},
@@ -35290,6 +35095,50 @@
"type": "object",
"description": "A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.",
"nullable": true
+ },
+ "application_details": {
+ "title": "OrderCalculatedItemApplicationDetails",
+ "type": "array",
+ "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.",
+ "items": {
+ "title": "OrderCalculatedItemApplicationDetailsItem",
+ "type": "object",
+ "description": "Object representing item replacement.",
+ "properties": {
+ "source_index": {
+ "type": "integer",
+ "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.",
+ "minimum": 0
+ },
+ "source_applied_quantity": {
+ "type": "integer",
+ "description": "Number of source units that are replaced.",
+ "maximum": -1
+ },
+ "source_applied_quantity_amount": {
+ "type": "integer",
+ "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.",
+ "maximum": 0
+ },
+ "target_index": {
+ "type": "integer",
+ "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`."
+ },
+ "target_applied_quantity": {
+ "type": "integer",
+ "description": "Number of added target units that are replacements."
+ },
+ "target_applied_quantity_amount": {
+ "type": "integer",
+ "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity."
+ },
+ "target_applied_discount_amount": {
+ "type": "integer",
+ "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`."
+ }
+ }
+ },
+ "nullable": true
}
},
"required": []
@@ -37342,177 +37191,7 @@
"nullable": true
},
"order": {
- "title": "RedemptionEntryOrder",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.",
- "nullable": true
- },
- "source_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique source ID of an existing order that will be linked to the redemption of this request."
- },
- "status": {
- "type": "string",
- "description": "The order status.",
- "enum": [
- "CREATED",
- "PAID",
- "CANCELED",
- "FULFILLED"
- ],
- "nullable": true
- },
- "amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "initial_amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
- "nullable": true
- },
- "items_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_amount": {
- "type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
- "nullable": true
- },
- "applied_discount_amount": {
- "type": "integer",
- "description": "This field shows the order-level discount applied.",
- "nullable": true
- },
- "items_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
- "nullable": true
- },
- "total_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "RedemptionEntryOrderItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
- "nullable": true
- },
- "metadata": {
- "title": "RedemptionEntryOrderMetadata",
- "type": "object",
- "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "order",
- "enum": [
- "order"
- ],
- "nullable": true
- },
- "created_at": {
- "type": "string",
- "example": "2021-12-22T10:13:06.487Z",
- "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.",
- "format": "date-time",
- "nullable": true
- },
- "updated_at": {
- "type": "string",
- "nullable": true,
- "example": "2021-12-22T10:14:45.316Z",
- "format": "date-time",
- "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format."
- },
- "customer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique customer ID of the customer making the purchase.",
- "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
- },
- "referrer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique referrer ID.",
- "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
- },
- "customer": {
- "title": "RedemptionEntryOrderCustomer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- },
- "nullable": true
- },
- "referrer": {
- "title": "RedemptionEntryOrderReferrer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- },
- "nullable": true
- },
- "redemptions": {
- "title": "RedemptionEntryOrderRedemptionsEntry",
- "type": "object",
- "additionalProperties": {
- "$ref": "#/components/schemas/OrderRedemptionsEntry"
- },
- "nullable": true
- }
- },
- "nullable": true
+ "$ref": "#/components/schemas/OrderCalculated"
},
"channel": {
"title": "RedemptionEntryChannel",
@@ -38521,7 +38200,9 @@
"nullable": true
}
},
- "required": []
+ "required": [
+ "order"
+ ]
},
"ReferralProgram": {
"title": "ReferralProgram",
@@ -40625,6 +40306,25 @@
"required": [],
"nullable": true
},
+ "holder_loyalty_tier": {
+ "title": "VoucherTransactionDetailsHolderLoyaltyTier",
+ "type": "object",
+ "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier of the loyalty tier, assigned by Voucherify.",
+ "nullable": true
+ },
+ "name": {
+ "type": "string",
+ "description": "User-defined name of the loyalty tier.",
+ "nullable": true
+ }
+ },
+ "required": [],
+ "nullable": true
+ },
"reward": {
"title": "VoucherTransactionDetailsReward",
"type": "object",
@@ -41463,13 +41163,38 @@
"order_item_indices": {
"title": "InapplicableToOrderItemIndices",
"type": "array",
- "description": "Determines the order in which the discount is applied to the products or SKUs sent in the `order` object in the request. The counting begins from `0`.",
+ "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.",
"items": {
"title": "InapplicableToOrderItemIndicesItem",
"type": "integer"
},
"nullable": true
},
+ "order_item_units": {
+ "title": "InapplicableToOrderItemUnits",
+ "type": "array",
+ "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.",
+ "items": {
+ "title": "InapplicableToOrderItemUnitsItem",
+ "type": "object",
+ "properties": {
+ "index": {
+ "type": "integer",
+ "description": "Number assigned to the order line item in accordance with the order sent in the request."
+ },
+ "units": {
+ "title": "InapplicableToOrderItemUnitsItemUnits",
+ "type": "array",
+ "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.",
+ "items": {
+ "title": "InapplicableToOrderItemUnitsItemUnitsItem",
+ "type": "integer"
+ }
+ }
+ }
+ },
+ "nullable": true
+ },
"repeat": {
"type": "integer",
"description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item.",
@@ -41482,7 +41207,7 @@
},
"target": {
"type": "string",
- "description": "Determines to which kinds of objects the discount is applicable. `\"ITEM\"` includes products and SKUs.",
+ "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.",
"nullable": true
}
},
@@ -57722,7 +57447,7 @@
"tags": [
"Loyalties"
],
- "summary": "Get Points Expiration",
+ "summary": "List Loyalty Card Point Expiration",
"description": "Retrieve loyalty point expiration buckets for a given loyalty card. Expired point buckets are not returned in this endpoint. You can use the Exports API to retrieve a list of both ACTIVE and EXPIRED point buckets.",
"parameters": [
{
@@ -57829,7 +57554,7 @@
"tags": [
"Loyalties"
],
- "summary": "Create Points Expiration Export",
+ "summary": "Export Loyalty Campaign Point Expiration",
"description": "Schedule the generation of a points expiration CSV file for a particular campaign.",
"parameters": [],
"security": [
diff --git a/reference/readonly-sdks/python/OpenAPI.json b/reference/readonly-sdks/python/OpenAPI.json
index a784a7ba8..e6c108b82 100644
--- a/reference/readonly-sdks/python/OpenAPI.json
+++ b/reference/readonly-sdks/python/OpenAPI.json
@@ -523,6 +523,9 @@
"description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.",
"nullable": true
},
+ "access_settings": {
+ "$ref": "#/components/schemas/AccessSettings"
+ },
"validation_rules": {
"title": "CampaignsCreateRequestBodyValidationRules",
"type": "array",
@@ -1153,6 +1156,9 @@
"example": "cat_0b688929a2476386a7",
"nullable": true
},
+ "access_settings": {
+ "$ref": "#/components/schemas/AccessSettings"
+ },
"activity_duration_after_publishing": {
"type": "string",
"description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.",
@@ -2834,6 +2840,7 @@
},
"unit_off_formula": {
"type": "string",
+ "description": "Formula used to calculate the number of units.",
"nullable": true
},
"unit_type": {
@@ -5127,6 +5134,9 @@
"description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.",
"nullable": true
},
+ "access_settings": {
+ "$ref": "#/components/schemas/AccessSettings"
+ },
"validation_rules": {
"title": "LoyaltiesCreateCampaignRequestBodyValidationRules",
"type": "array",
@@ -11200,6 +11210,9 @@
"example": "cat_0b688929a2476386a7",
"nullable": true
},
+ "access_settings": {
+ "$ref": "#/components/schemas/AccessSettings"
+ },
"activity_duration_after_publishing": {
"type": "string",
"description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.",
@@ -15497,13 +15510,13 @@
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items": {
"title": "OrdersCreateRequestBodyItems",
"type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
"items": {
"$ref": "#/components/schemas/OrderItem"
},
@@ -15564,56 +15577,47 @@
},
"amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"initial_amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
+ "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
+ "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_amount": {
"type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
+ "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"applied_discount_amount": {
"type": "integer",
- "description": "This field shows the order-level discount applied.",
+ "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
+ "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`",
"nullable": true
},
"total_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "OrdersCreateResponseBodyItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
+ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
"nullable": true
},
"metadata": {
@@ -15667,6 +15671,15 @@
"title": "OrdersCreateResponseBodyRedemptions",
"type": "object",
"nullable": true
+ },
+ "items": {
+ "title": "OrdersCreateResponseBodyItems",
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
}
},
"description": "Response body schema for **POST** `v1/orders`."
@@ -15812,56 +15825,47 @@
},
"amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"initial_amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
+ "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
+ "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_amount": {
"type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
+ "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"applied_discount_amount": {
"type": "integer",
- "description": "This field shows the order-level discount applied.",
+ "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
+ "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`",
"nullable": true
},
"total_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "OrdersGetResponseBodyItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
+ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
"nullable": true
},
"metadata": {
@@ -15915,6 +15919,15 @@
"title": "OrdersGetResponseBodyRedemptions",
"type": "object",
"nullable": true
+ },
+ "items": {
+ "title": "OrdersGetResponseBodyItems",
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
}
},
"description": "Response body schema for **GET** `v1/orders/{orderId}`."
@@ -16043,13 +16056,13 @@
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items": {
"title": "OrdersUpdateRequestBodyItems",
"type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
"items": {
"$ref": "#/components/schemas/OrderItem"
},
@@ -16110,56 +16123,47 @@
},
"amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"initial_amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
+ "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
+ "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_amount": {
"type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
+ "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"applied_discount_amount": {
"type": "integer",
- "description": "This field shows the order-level discount applied.",
+ "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
+ "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`",
"nullable": true
},
"total_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "OrdersUpdateResponseBodyItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
+ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
"nullable": true
},
"metadata": {
@@ -16213,6 +16217,15 @@
"title": "OrdersUpdateResponseBodyRedemptions",
"type": "object",
"nullable": true
+ },
+ "items": {
+ "title": "OrdersUpdateResponseBodyItems",
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
}
},
"description": "Response body schema for **PUT** `v1/orders/{orderId}`."
@@ -21069,174 +21082,7 @@
"nullable": true
},
"order": {
- "title": "RedemptionsGetResponseBodyOrder",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.",
- "nullable": true
- },
- "source_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique source ID of an existing order that will be linked to the redemption of this request."
- },
- "status": {
- "type": "string",
- "description": "The order status.",
- "enum": [
- "CREATED",
- "PAID",
- "CANCELED",
- "FULFILLED"
- ],
- "nullable": true
- },
- "amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "initial_amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
- "nullable": true
- },
- "items_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_amount": {
- "type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
- "nullable": true
- },
- "applied_discount_amount": {
- "type": "integer",
- "description": "This field shows the order-level discount applied.",
- "nullable": true
- },
- "items_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
- "nullable": true
- },
- "total_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "RedemptionsGetResponseBodyOrderItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
- "nullable": true
- },
- "metadata": {
- "title": "RedemptionsGetResponseBodyOrderMetadata",
- "type": "object",
- "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "order",
- "enum": [
- "order"
- ],
- "nullable": true
- },
- "created_at": {
- "type": "string",
- "example": "2021-12-22T10:13:06.487Z",
- "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.",
- "format": "date-time",
- "nullable": true
- },
- "updated_at": {
- "type": "string",
- "nullable": true,
- "example": "2021-12-22T10:14:45.316Z",
- "format": "date-time",
- "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format."
- },
- "customer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique customer ID of the customer making the purchase.",
- "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
- },
- "referrer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique referrer ID.",
- "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
- },
- "customer": {
- "title": "RedemptionsGetResponseBodyOrderCustomer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- },
- "nullable": true
- },
- "referrer": {
- "title": "RedemptionsGetResponseBodyOrderReferrer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- },
- "nullable": true
- },
- "redemptions": {
- "title": "RedemptionsGetResponseBodyOrderRedemptions",
- "type": "object",
- "nullable": true
- }
- },
- "nullable": true
+ "$ref": "#/components/schemas/OrderCalculated"
},
"channel": {
"title": "RedemptionsGetResponseBodyChannel",
@@ -21968,171 +21814,7 @@
"nullable": true
},
"order": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrder",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.",
- "nullable": true
- },
- "source_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique source ID of an existing order that will be linked to the redemption of this request."
- },
- "status": {
- "type": "string",
- "description": "The order status.",
- "enum": [
- "CREATED",
- "PAID",
- "CANCELED",
- "FULFILLED"
- ],
- "nullable": true
- },
- "amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "initial_amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
- "nullable": true
- },
- "items_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_amount": {
- "type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
- "nullable": true
- },
- "applied_discount_amount": {
- "type": "integer",
- "description": "This field shows the order-level discount applied.",
- "nullable": true
- },
- "items_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
- "nullable": true
- },
- "total_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrderItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
- "nullable": true
- },
- "metadata": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrderMetadata",
- "type": "object",
- "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "order",
- "enum": [
- "order"
- ],
- "nullable": true
- },
- "created_at": {
- "type": "string",
- "example": "2021-12-22T10:13:06.487Z",
- "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.",
- "format": "date-time",
- "nullable": true
- },
- "updated_at": {
- "type": "string",
- "nullable": true,
- "example": "2021-12-22T10:14:45.316Z",
- "format": "date-time",
- "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format."
- },
- "customer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique customer ID of the customer making the purchase.",
- "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
- },
- "referrer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique referrer ID.",
- "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
- },
- "customer": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrderCustomer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- }
- },
- "referrer": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrderReferrer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- }
- },
- "redemptions": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrderRedemptions",
- "type": "object",
- "nullable": true
- }
- }
+ "$ref": "#/components/schemas/OrderCalculated"
},
"channel": {
"title": "RedemptionsListResponseBodyRedemptionsItemChannel",
@@ -23103,7 +22785,9 @@
"nullable": true
}
},
- "required": [],
+ "required": [
+ "order"
+ ],
"description": "Response body schema for **POST** `v1/redemptions/{redemptionId}/rollback`."
},
"RedemptionsRollbacksCreateRequestBody": {
@@ -23152,9 +22836,23 @@
"parent_rollback": {
"$ref": "#/components/schemas/RedemptionRollback"
},
- "order": {
- "$ref": "#/components/schemas/OrderCalculated"
- }
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ }
+ }
+ }
+ }
+ ]
}
},
"ReferralsMembersHoldersCreateInBulkRequestBody": {
@@ -24465,6 +24163,9 @@
"description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.",
"nullable": true
},
+ "access_settings": {
+ "$ref": "#/components/schemas/AccessSettings"
+ },
"voucher": {
"title": "TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher",
"type": "object",
@@ -26101,6 +25802,7 @@
},
"unit_off_formula": {
"type": "string",
+ "description": "Formula used to calculate the number of units.",
"nullable": true
},
"unit_type": {
@@ -28443,6 +28145,69 @@
"type": "string",
"format": "hostname"
},
+ "AccessSettings": {
+ "title": "AccessSettings",
+ "type": "object",
+ "description": "Assigns or unassigns an area or store to the campaign.\n\n**NOTE**: this object can be sent if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.",
+ "properties": {
+ "assign": {
+ "title": "AccessSettingsAssign",
+ "type": "object",
+ "description": "Assigns the campaign to an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it from the area. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assign to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.",
+ "properties": {
+ "areas_ids": {
+ "title": "AccessSettingsAssignAreasIds",
+ "type": "array",
+ "description": "List all area IDs to which the campaign will be assigned.",
+ "items": {
+ "title": "AccessSettingsAssignAreasIdsItem",
+ "type": "string"
+ },
+ "nullable": true
+ },
+ "area_stores_ids": {
+ "title": "AccessSettingsAssignAreaStoresIds",
+ "type": "array",
+ "description": "List all store IDs to which the campaign will be assigned.",
+ "items": {
+ "title": "AccessSettingsAssignAreaStoresIdsItem",
+ "type": "string"
+ },
+ "nullable": true
+ }
+ },
+ "nullable": true
+ },
+ "unassign": {
+ "title": "AccessSettingsUnassign",
+ "type": "object",
+ "description": "Unassigns the campaign from an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it first. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assigned to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.",
+ "properties": {
+ "areas_ids": {
+ "title": "AccessSettingsUnassignAreasIds",
+ "type": "array",
+ "description": "List all area IDs from which the campaign will be unassigned.",
+ "items": {
+ "title": "AccessSettingsUnassignAreasIdsItem",
+ "type": "string"
+ },
+ "nullable": true
+ },
+ "area_stores_ids": {
+ "title": "AccessSettingsUnassignAreaStoresIds",
+ "type": "array",
+ "description": "List all store IDs to which the campaign will be unassigned.",
+ "items": {
+ "title": "AccessSettingsUnassignAreaStoresIdsItem",
+ "type": "string"
+ },
+ "nullable": true
+ }
+ },
+ "nullable": true
+ }
+ }
+ },
"AccessSettingsCampaignAssignmentsList": {
"title": "AccessSettingsCampaignAssignmentsList",
"type": "object",
@@ -28558,13 +28323,38 @@
"order_item_indices": {
"title": "ApplicableToOrderItemIndices",
"type": "array",
- "description": "Determines the order in which the discount is applied to the products or SKUs sent in the `order` object in the request. The counting begins from `0`.",
+ "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.",
"items": {
"title": "ApplicableToOrderItemIndicesItem",
"type": "integer"
},
"nullable": true
},
+ "order_item_units": {
+ "title": "ApplicableToOrderItemUnits",
+ "type": "array",
+ "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.",
+ "items": {
+ "title": "ApplicableToOrderItemUnitsItem",
+ "type": "object",
+ "properties": {
+ "index": {
+ "type": "integer",
+ "description": "Number assigned to the order line item in accordance with the order sent in the request."
+ },
+ "units": {
+ "title": "ApplicableToOrderItemUnitsItemUnits",
+ "type": "array",
+ "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.",
+ "items": {
+ "title": "ApplicableToOrderItemUnitsItemUnitsItem",
+ "type": "integer"
+ }
+ }
+ }
+ },
+ "nullable": true
+ },
"repeat": {
"type": "integer",
"description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item.",
@@ -28577,7 +28367,7 @@
},
"target": {
"type": "string",
- "description": "Determines to which kinds of objects the discount is applicable. `\"ITEM\"` includes products and SKUs.",
+ "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.",
"nullable": true
}
},
@@ -29992,6 +29782,7 @@
},
"unit_off_formula": {
"type": "string",
+ "description": "Formula used to calculate the number of units.",
"nullable": true
},
"unit_type": {
@@ -30069,6 +29860,7 @@
},
"unit_off_formula": {
"type": "string",
+ "description": "Formula used to calculate the number of units.",
"nullable": true
},
"effect": {
@@ -31915,6 +31707,25 @@
"required": [],
"nullable": true
},
+ "holder_loyalty_tier": {
+ "title": "LoyaltyCardTransactionDetailsHolderLoyaltyTier",
+ "type": "object",
+ "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier of the loyalty tier, assigned by Voucherify.",
+ "nullable": true
+ },
+ "name": {
+ "type": "string",
+ "description": "User-defined name of the loyalty tier.",
+ "nullable": true
+ }
+ },
+ "required": [],
+ "nullable": true
+ },
"reward": {
"title": "LoyaltyCardTransactionDetailsReward",
"type": "object",
@@ -33419,13 +33230,13 @@
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items": {
"title": "OrderItems",
"type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
"items": {
"$ref": "#/components/schemas/OrderItem"
},
@@ -33468,56 +33279,47 @@
},
"amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"initial_amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
+ "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
+ "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_amount": {
"type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
+ "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"applied_discount_amount": {
"type": "integer",
- "description": "This field shows the order-level discount applied.",
+ "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
+ "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`",
"nullable": true
},
"total_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "OrderCalculatedItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
+ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
"nullable": true
},
"metadata": {
@@ -33571,6 +33373,15 @@
"title": "OrderCalculatedRedemptions",
"type": "object",
"nullable": true
+ },
+ "items": {
+ "title": "OrderCalculatedItems",
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
}
}
},
@@ -33759,6 +33570,9 @@
"type": "object",
"description": "A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.",
"nullable": true
+ },
+ "application_details": {
+ "$ref": "#/components/schemas/ApplicationDetails"
}
},
"required": []
@@ -35627,174 +35441,7 @@
"nullable": true
},
"order": {
- "title": "RedemptionEntryOrder",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.",
- "nullable": true
- },
- "source_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique source ID of an existing order that will be linked to the redemption of this request."
- },
- "status": {
- "type": "string",
- "description": "The order status.",
- "enum": [
- "CREATED",
- "PAID",
- "CANCELED",
- "FULFILLED"
- ],
- "nullable": true
- },
- "amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "initial_amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
- "nullable": true
- },
- "items_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_amount": {
- "type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
- "nullable": true
- },
- "applied_discount_amount": {
- "type": "integer",
- "description": "This field shows the order-level discount applied.",
- "nullable": true
- },
- "items_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
- "nullable": true
- },
- "total_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "RedemptionEntryOrderItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
- "nullable": true
- },
- "metadata": {
- "title": "RedemptionEntryOrderMetadata",
- "type": "object",
- "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "order",
- "enum": [
- "order"
- ],
- "nullable": true
- },
- "created_at": {
- "type": "string",
- "example": "2021-12-22T10:13:06.487Z",
- "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.",
- "format": "date-time",
- "nullable": true
- },
- "updated_at": {
- "type": "string",
- "nullable": true,
- "example": "2021-12-22T10:14:45.316Z",
- "format": "date-time",
- "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format."
- },
- "customer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique customer ID of the customer making the purchase.",
- "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
- },
- "referrer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique referrer ID.",
- "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
- },
- "customer": {
- "title": "RedemptionEntryOrderCustomer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- },
- "nullable": true
- },
- "referrer": {
- "title": "RedemptionEntryOrderReferrer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- },
- "nullable": true
- },
- "redemptions": {
- "title": "RedemptionEntryOrderRedemptions",
- "type": "object",
- "nullable": true
- }
- },
- "nullable": true
+ "$ref": "#/components/schemas/OrderCalculated"
},
"channel": {
"title": "RedemptionEntryChannel",
@@ -36755,7 +36402,9 @@
"nullable": true
}
},
- "required": []
+ "required": [
+ "order"
+ ]
},
"ReferralProgram": {
"title": "ReferralProgram",
@@ -38857,6 +38506,25 @@
"required": [],
"nullable": true
},
+ "holder_loyalty_tier": {
+ "title": "VoucherTransactionDetailsHolderLoyaltyTier",
+ "type": "object",
+ "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier of the loyalty tier, assigned by Voucherify.",
+ "nullable": true
+ },
+ "name": {
+ "type": "string",
+ "description": "User-defined name of the loyalty tier.",
+ "nullable": true
+ }
+ },
+ "required": [],
+ "nullable": true
+ },
"reward": {
"title": "VoucherTransactionDetailsReward",
"type": "object",
@@ -39366,6 +39034,49 @@
"APPLY_FROM_MOST_EXPENSIVE"
]
},
+ "ApplicationDetails": {
+ "title": "ApplicationDetails",
+ "type": "array",
+ "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.",
+ "items": {
+ "title": "ApplicationDetailsItem",
+ "type": "object",
+ "description": "Object representing item replacement.",
+ "properties": {
+ "source_index": {
+ "type": "integer",
+ "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.",
+ "minimum": 0
+ },
+ "source_applied_quantity": {
+ "type": "integer",
+ "description": "Number of source units that are replaced.",
+ "maximum": -1
+ },
+ "source_applied_quantity_amount": {
+ "type": "integer",
+ "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.",
+ "maximum": 0
+ },
+ "target_index": {
+ "type": "integer",
+ "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`."
+ },
+ "target_applied_quantity": {
+ "type": "integer",
+ "description": "Number of added target units that are replacements."
+ },
+ "target_applied_quantity_amount": {
+ "type": "integer",
+ "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity."
+ },
+ "target_applied_discount_amount": {
+ "type": "integer",
+ "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`."
+ }
+ }
+ }
+ },
"AreaStoreCampaignAssignment": {
"title": "AreaStoreCampaignAssignment",
"type": "object",
@@ -39683,13 +39394,38 @@
"order_item_indices": {
"title": "InapplicableToOrderItemIndices",
"type": "array",
- "description": "Determines the order in which the discount is applied to the products or SKUs sent in the `order` object in the request. The counting begins from `0`.",
+ "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.",
"items": {
"title": "InapplicableToOrderItemIndicesItem",
"type": "integer"
},
"nullable": true
},
+ "order_item_units": {
+ "title": "InapplicableToOrderItemUnits",
+ "type": "array",
+ "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.",
+ "items": {
+ "title": "InapplicableToOrderItemUnitsItem",
+ "type": "object",
+ "properties": {
+ "index": {
+ "type": "integer",
+ "description": "Number assigned to the order line item in accordance with the order sent in the request."
+ },
+ "units": {
+ "title": "InapplicableToOrderItemUnitsItemUnits",
+ "type": "array",
+ "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.",
+ "items": {
+ "title": "InapplicableToOrderItemUnitsItemUnitsItem",
+ "type": "integer"
+ }
+ }
+ }
+ },
+ "nullable": true
+ },
"repeat": {
"type": "integer",
"description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item.",
@@ -39702,7 +39438,7 @@
},
"target": {
"type": "string",
- "description": "Determines to which kinds of objects the discount is applicable. `\"ITEM\"` includes products and SKUs.",
+ "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.",
"nullable": true
}
},
@@ -55941,7 +55677,7 @@
"tags": [
"Loyalties"
],
- "summary": "Get Points Expiration",
+ "summary": "List Loyalty Card Point Expiration",
"description": "Retrieve loyalty point expiration buckets for a given loyalty card. Expired point buckets are not returned in this endpoint. You can use the Exports API to retrieve a list of both ACTIVE and EXPIRED point buckets.",
"parameters": [
{
@@ -56048,7 +55784,7 @@
"tags": [
"Loyalties"
],
- "summary": "Create Points Expiration Export",
+ "summary": "Export Loyalty Campaign Point Expiration",
"description": "Schedule the generation of a points expiration CSV file for a particular campaign.",
"parameters": [],
"security": [
diff --git a/reference/readonly-sdks/ruby/OpenAPI.json b/reference/readonly-sdks/ruby/OpenAPI.json
index 27ede7725..e6611b0ea 100644
--- a/reference/readonly-sdks/ruby/OpenAPI.json
+++ b/reference/readonly-sdks/ruby/OpenAPI.json
@@ -523,6 +523,9 @@
"description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.",
"nullable": true
},
+ "access_settings": {
+ "$ref": "#/components/schemas/AccessSettings"
+ },
"validation_rules": {
"title": "CampaignsCreateRequestBodyValidationRules",
"type": "array",
@@ -1153,6 +1156,9 @@
"example": "cat_0b688929a2476386a7",
"nullable": true
},
+ "access_settings": {
+ "$ref": "#/components/schemas/AccessSettings"
+ },
"activity_duration_after_publishing": {
"type": "string",
"description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.",
@@ -2834,6 +2840,7 @@
},
"unit_off_formula": {
"type": "string",
+ "description": "Formula used to calculate the number of units.",
"nullable": true
},
"unit_type": {
@@ -5161,6 +5168,9 @@
"description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.",
"nullable": true
},
+ "access_settings": {
+ "$ref": "#/components/schemas/AccessSettings"
+ },
"validation_rules": {
"title": "LoyaltiesCreateCampaignRequestBodyValidationRules",
"type": "array",
@@ -11240,6 +11250,9 @@
"example": "cat_0b688929a2476386a7",
"nullable": true
},
+ "access_settings": {
+ "$ref": "#/components/schemas/AccessSettings"
+ },
"activity_duration_after_publishing": {
"type": "string",
"description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.",
@@ -15716,13 +15729,13 @@
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items": {
"title": "OrdersCreateRequestBodyItems",
"type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
"items": {
"$ref": "#/components/schemas/OrderItem"
},
@@ -15783,56 +15796,47 @@
},
"amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"initial_amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
+ "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
+ "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_amount": {
"type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
+ "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"applied_discount_amount": {
"type": "integer",
- "description": "This field shows the order-level discount applied.",
+ "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
+ "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`",
"nullable": true
},
"total_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "OrdersCreateResponseBodyItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
+ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
"nullable": true
},
"metadata": {
@@ -15889,6 +15893,15 @@
"$ref": "#/components/schemas/OrderRedemptionsEntry"
},
"nullable": true
+ },
+ "items": {
+ "title": "OrdersCreateResponseBodyItems",
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
}
},
"description": "Response body schema for **POST** `v1/orders`."
@@ -16034,56 +16047,47 @@
},
"amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"initial_amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
+ "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
+ "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_amount": {
"type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
+ "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"applied_discount_amount": {
"type": "integer",
- "description": "This field shows the order-level discount applied.",
+ "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
+ "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`",
"nullable": true
},
"total_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "OrdersGetResponseBodyItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
+ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
"nullable": true
},
"metadata": {
@@ -16140,6 +16144,15 @@
"$ref": "#/components/schemas/OrderRedemptionsEntry"
},
"nullable": true
+ },
+ "items": {
+ "title": "OrdersGetResponseBodyItems",
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
}
},
"description": "Response body schema for **GET** `v1/orders/{orderId}`."
@@ -16268,13 +16281,13 @@
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items": {
"title": "OrdersUpdateRequestBodyItems",
"type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
"items": {
"$ref": "#/components/schemas/OrderItem"
},
@@ -16335,56 +16348,47 @@
},
"amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"initial_amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
+ "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
+ "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_amount": {
"type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
+ "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"applied_discount_amount": {
"type": "integer",
- "description": "This field shows the order-level discount applied.",
+ "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
+ "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`",
"nullable": true
},
"total_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "OrdersUpdateResponseBodyItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
+ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
"nullable": true
},
"metadata": {
@@ -16441,6 +16445,15 @@
"$ref": "#/components/schemas/OrderRedemptionsEntry"
},
"nullable": true
+ },
+ "items": {
+ "title": "OrdersUpdateResponseBodyItems",
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
}
},
"description": "Response body schema for **PUT** `v1/orders/{orderId}`."
@@ -21297,177 +21310,7 @@
"nullable": true
},
"order": {
- "title": "RedemptionsGetResponseBodyOrder",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.",
- "nullable": true
- },
- "source_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique source ID of an existing order that will be linked to the redemption of this request."
- },
- "status": {
- "type": "string",
- "description": "The order status.",
- "enum": [
- "CREATED",
- "PAID",
- "CANCELED",
- "FULFILLED"
- ],
- "nullable": true
- },
- "amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "initial_amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
- "nullable": true
- },
- "items_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_amount": {
- "type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
- "nullable": true
- },
- "applied_discount_amount": {
- "type": "integer",
- "description": "This field shows the order-level discount applied.",
- "nullable": true
- },
- "items_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
- "nullable": true
- },
- "total_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "RedemptionsGetResponseBodyOrderItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
- "nullable": true
- },
- "metadata": {
- "title": "RedemptionsGetResponseBodyOrderMetadata",
- "type": "object",
- "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "order",
- "enum": [
- "order"
- ],
- "nullable": true
- },
- "created_at": {
- "type": "string",
- "example": "2021-12-22T10:13:06.487Z",
- "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.",
- "format": "date-time",
- "nullable": true
- },
- "updated_at": {
- "type": "string",
- "nullable": true,
- "example": "2021-12-22T10:14:45.316Z",
- "format": "date-time",
- "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format."
- },
- "customer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique customer ID of the customer making the purchase.",
- "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
- },
- "referrer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique referrer ID.",
- "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
- },
- "customer": {
- "title": "RedemptionsGetResponseBodyOrderCustomer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- },
- "nullable": true
- },
- "referrer": {
- "title": "RedemptionsGetResponseBodyOrderReferrer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- },
- "nullable": true
- },
- "redemptions": {
- "title": "RedemptionsGetResponseBodyOrderRedemptionsEntry",
- "type": "object",
- "additionalProperties": {
- "$ref": "#/components/schemas/OrderRedemptionsEntry"
- },
- "nullable": true
- }
- },
- "nullable": true
+ "$ref": "#/components/schemas/OrderCalculated"
},
"channel": {
"title": "RedemptionsGetResponseBodyChannel",
@@ -22199,174 +22042,7 @@
"nullable": true
},
"order": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrder",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.",
- "nullable": true
- },
- "source_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique source ID of an existing order that will be linked to the redemption of this request."
- },
- "status": {
- "type": "string",
- "description": "The order status.",
- "enum": [
- "CREATED",
- "PAID",
- "CANCELED",
- "FULFILLED"
- ],
- "nullable": true
- },
- "amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "initial_amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
- "nullable": true
- },
- "items_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_amount": {
- "type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
- "nullable": true
- },
- "applied_discount_amount": {
- "type": "integer",
- "description": "This field shows the order-level discount applied.",
- "nullable": true
- },
- "items_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
- "nullable": true
- },
- "total_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrderItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
- "nullable": true
- },
- "metadata": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrderMetadata",
- "type": "object",
- "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "order",
- "enum": [
- "order"
- ],
- "nullable": true
- },
- "created_at": {
- "type": "string",
- "example": "2021-12-22T10:13:06.487Z",
- "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.",
- "format": "date-time",
- "nullable": true
- },
- "updated_at": {
- "type": "string",
- "nullable": true,
- "example": "2021-12-22T10:14:45.316Z",
- "format": "date-time",
- "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format."
- },
- "customer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique customer ID of the customer making the purchase.",
- "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
- },
- "referrer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique referrer ID.",
- "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
- },
- "customer": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrderCustomer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- }
- },
- "referrer": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrderReferrer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- }
- },
- "redemptions": {
- "title": "RedemptionsListResponseBodyRedemptionsItemOrderRedemptionsEntry",
- "type": "object",
- "additionalProperties": {
- "$ref": "#/components/schemas/OrderRedemptionsEntry"
- },
- "nullable": true
- }
- }
+ "$ref": "#/components/schemas/OrderCalculated"
},
"channel": {
"title": "RedemptionsListResponseBodyRedemptionsItemChannel",
@@ -23337,7 +23013,9 @@
"nullable": true
}
},
- "required": [],
+ "required": [
+ "order"
+ ],
"description": "Response body schema for **POST** `v1/redemptions/{redemptionId}/rollback`."
},
"RedemptionsRollbacksCreateRequestBody": {
@@ -23386,9 +23064,23 @@
"parent_rollback": {
"$ref": "#/components/schemas/RedemptionRollback"
},
- "order": {
- "$ref": "#/components/schemas/OrderCalculated"
- }
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OrderCalculated"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ }
+ }
+ }
+ }
+ ]
}
},
"ReferralsMembersHoldersCreateInBulkRequestBody": {
@@ -24699,6 +24391,9 @@
"description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.",
"nullable": true
},
+ "access_settings": {
+ "$ref": "#/components/schemas/AccessSettings"
+ },
"voucher": {
"title": "TemplatesCampaignsCampaignSetupCreateRequestBodyVoucher",
"type": "object",
@@ -26335,6 +26030,7 @@
},
"unit_off_formula": {
"type": "string",
+ "description": "Formula used to calculate the number of units.",
"nullable": true
},
"unit_type": {
@@ -28677,6 +28373,69 @@
"type": "string",
"format": "hostname"
},
+ "AccessSettings": {
+ "title": "AccessSettings",
+ "type": "object",
+ "description": "Assigns or unassigns an area or store to the campaign.\n\n**NOTE**: this object can be sent if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.",
+ "properties": {
+ "assign": {
+ "title": "AccessSettingsAssign",
+ "type": "object",
+ "description": "Assigns the campaign to an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it from the area. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assign to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.",
+ "properties": {
+ "areas_ids": {
+ "title": "AccessSettingsAssignAreasIds",
+ "type": "array",
+ "description": "List all area IDs to which the campaign will be assigned.",
+ "items": {
+ "title": "AccessSettingsAssignAreasIdsItem",
+ "type": "string"
+ },
+ "nullable": true
+ },
+ "area_stores_ids": {
+ "title": "AccessSettingsAssignAreaStoresIds",
+ "type": "array",
+ "description": "List all store IDs to which the campaign will be assigned.",
+ "items": {
+ "title": "AccessSettingsAssignAreaStoresIdsItem",
+ "type": "string"
+ },
+ "nullable": true
+ }
+ },
+ "nullable": true
+ },
+ "unassign": {
+ "title": "AccessSettingsUnassign",
+ "type": "object",
+ "description": "Unassigns the campaign from an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it first. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assigned to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.",
+ "properties": {
+ "areas_ids": {
+ "title": "AccessSettingsUnassignAreasIds",
+ "type": "array",
+ "description": "List all area IDs from which the campaign will be unassigned.",
+ "items": {
+ "title": "AccessSettingsUnassignAreasIdsItem",
+ "type": "string"
+ },
+ "nullable": true
+ },
+ "area_stores_ids": {
+ "title": "AccessSettingsUnassignAreaStoresIds",
+ "type": "array",
+ "description": "List all store IDs to which the campaign will be unassigned.",
+ "items": {
+ "title": "AccessSettingsUnassignAreaStoresIdsItem",
+ "type": "string"
+ },
+ "nullable": true
+ }
+ },
+ "nullable": true
+ }
+ }
+ },
"AccessSettingsCampaignAssignmentsList": {
"title": "AccessSettingsCampaignAssignmentsList",
"type": "object",
@@ -28792,13 +28551,38 @@
"order_item_indices": {
"title": "ApplicableToOrderItemIndices",
"type": "array",
- "description": "Determines the order in which the discount is applied to the products or SKUs sent in the `order` object in the request. The counting begins from `0`.",
+ "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.",
"items": {
"title": "ApplicableToOrderItemIndicesItem",
"type": "integer"
},
"nullable": true
},
+ "order_item_units": {
+ "title": "ApplicableToOrderItemUnits",
+ "type": "array",
+ "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.",
+ "items": {
+ "title": "ApplicableToOrderItemUnitsItem",
+ "type": "object",
+ "properties": {
+ "index": {
+ "type": "integer",
+ "description": "Number assigned to the order line item in accordance with the order sent in the request."
+ },
+ "units": {
+ "title": "ApplicableToOrderItemUnitsItemUnits",
+ "type": "array",
+ "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.",
+ "items": {
+ "title": "ApplicableToOrderItemUnitsItemUnitsItem",
+ "type": "integer"
+ }
+ }
+ }
+ },
+ "nullable": true
+ },
"repeat": {
"type": "integer",
"description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item.",
@@ -28811,7 +28595,7 @@
},
"target": {
"type": "string",
- "description": "Determines to which kinds of objects the discount is applicable. `\"ITEM\"` includes products and SKUs.",
+ "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.",
"nullable": true
}
},
@@ -30245,6 +30029,7 @@
},
"unit_off_formula": {
"type": "string",
+ "description": "Formula used to calculate the number of units.",
"nullable": true
},
"unit_type": {
@@ -30322,6 +30107,7 @@
},
"unit_off_formula": {
"type": "string",
+ "description": "Formula used to calculate the number of units.",
"nullable": true
},
"effect": {
@@ -32168,6 +31954,25 @@
"required": [],
"nullable": true
},
+ "holder_loyalty_tier": {
+ "title": "LoyaltyCardTransactionDetailsHolderLoyaltyTier",
+ "type": "object",
+ "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier of the loyalty tier, assigned by Voucherify.",
+ "nullable": true
+ },
+ "name": {
+ "type": "string",
+ "description": "User-defined name of the loyalty tier.",
+ "nullable": true
+ }
+ },
+ "required": [],
+ "nullable": true
+ },
"reward": {
"title": "LoyaltyCardTransactionDetailsReward",
"type": "object",
@@ -33935,13 +33740,13 @@
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items": {
"title": "OrderItems",
"type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
+ "description": "Array of items applied to the order. It can include up to 500 items.",
"items": {
"$ref": "#/components/schemas/OrderItem"
},
@@ -33984,56 +33789,47 @@
},
"amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"initial_amount": {
"type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
+ "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"discount_amount": {
"type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
+ "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
+ "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
+ "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"total_amount": {
"type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
+ "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"applied_discount_amount": {
"type": "integer",
- "description": "This field shows the order-level discount applied.",
+ "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).",
"nullable": true
},
"items_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
+ "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`sum(items, i => i.applied_discount_amount)`",
"nullable": true
},
"total_applied_discount_amount": {
"type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "OrderCalculatedItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
+ "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00). \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
"nullable": true
},
"metadata": {
@@ -34090,6 +33886,15 @@
"$ref": "#/components/schemas/OrderRedemptionsEntry"
},
"nullable": true
+ },
+ "items": {
+ "title": "OrderCalculatedItems",
+ "type": "array",
+ "description": "Array of items applied to the order. It can include up 500 items.",
+ "items": {
+ "$ref": "#/components/schemas/OrderCalculatedItem"
+ },
+ "nullable": true
}
}
},
@@ -34278,6 +34083,9 @@
"type": "object",
"description": "A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.",
"nullable": true
+ },
+ "application_details": {
+ "$ref": "#/components/schemas/ApplicationDetails"
}
},
"required": []
@@ -36209,177 +36017,7 @@
"nullable": true
},
"order": {
- "title": "RedemptionEntryOrder",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.",
- "nullable": true
- },
- "source_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique source ID of an existing order that will be linked to the redemption of this request."
- },
- "status": {
- "type": "string",
- "description": "The order status.",
- "enum": [
- "CREATED",
- "PAID",
- "CANCELED",
- "FULFILLED"
- ],
- "nullable": true
- },
- "amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "initial_amount": {
- "type": "integer",
- "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.",
- "nullable": true
- },
- "discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level discounts applied to the order.",
- "nullable": true
- },
- "items_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied to the order.",
- "nullable": true
- },
- "total_amount": {
- "type": "integer",
- "description": "Order amount after undoing all the discounts through the rollback redemption.",
- "nullable": true
- },
- "applied_discount_amount": {
- "type": "integer",
- "description": "This field shows the order-level discount applied.",
- "nullable": true
- },
- "items_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all product-specific discounts applied in a particular request. \n`sum(items, i => i.applied_discount_amount)`",
- "nullable": true
- },
- "total_applied_discount_amount": {
- "type": "integer",
- "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`",
- "nullable": true
- },
- "items": {
- "title": "RedemptionEntryOrderItems",
- "type": "array",
- "description": "Array of items applied to the order. It can include up 500 items.",
- "items": {
- "$ref": "#/components/schemas/OrderCalculatedItem"
- },
- "nullable": true
- },
- "metadata": {
- "title": "RedemptionEntryOrderMetadata",
- "type": "object",
- "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "order",
- "enum": [
- "order"
- ],
- "nullable": true
- },
- "created_at": {
- "type": "string",
- "example": "2021-12-22T10:13:06.487Z",
- "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.",
- "format": "date-time",
- "nullable": true
- },
- "updated_at": {
- "type": "string",
- "nullable": true,
- "example": "2021-12-22T10:14:45.316Z",
- "format": "date-time",
- "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format."
- },
- "customer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique customer ID of the customer making the purchase.",
- "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
- },
- "referrer_id": {
- "type": "string",
- "nullable": true,
- "description": "Unique referrer ID.",
- "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
- },
- "customer": {
- "title": "RedemptionEntryOrderCustomer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- },
- "nullable": true
- },
- "referrer": {
- "title": "RedemptionEntryOrderReferrer",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "A unique identifier of an existing customer.",
- "nullable": true
- },
- "object": {
- "type": "string",
- "description": "The type of the object represented by JSON.",
- "default": "customer",
- "enum": [
- "customer"
- ],
- "nullable": true
- }
- },
- "nullable": true
- },
- "redemptions": {
- "title": "RedemptionEntryOrderRedemptionsEntry",
- "type": "object",
- "additionalProperties": {
- "$ref": "#/components/schemas/OrderRedemptionsEntry"
- },
- "nullable": true
- }
- },
- "nullable": true
+ "$ref": "#/components/schemas/OrderCalculated"
},
"channel": {
"title": "RedemptionEntryChannel",
@@ -37340,7 +36978,9 @@
"nullable": true
}
},
- "required": []
+ "required": [
+ "order"
+ ]
},
"ReferralProgram": {
"title": "ReferralProgram",
@@ -39446,6 +39086,25 @@
"required": [],
"nullable": true
},
+ "holder_loyalty_tier": {
+ "title": "VoucherTransactionDetailsHolderLoyaltyTier",
+ "type": "object",
+ "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier of the loyalty tier, assigned by Voucherify.",
+ "nullable": true
+ },
+ "name": {
+ "type": "string",
+ "description": "User-defined name of the loyalty tier.",
+ "nullable": true
+ }
+ },
+ "required": [],
+ "nullable": true
+ },
"reward": {
"title": "VoucherTransactionDetailsReward",
"type": "object",
@@ -39955,6 +39614,49 @@
"APPLY_FROM_MOST_EXPENSIVE"
]
},
+ "ApplicationDetails": {
+ "title": "ApplicationDetails",
+ "type": "array",
+ "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.",
+ "items": {
+ "title": "ApplicationDetailsItem",
+ "type": "object",
+ "description": "Object representing item replacement.",
+ "properties": {
+ "source_index": {
+ "type": "integer",
+ "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.",
+ "minimum": 0
+ },
+ "source_applied_quantity": {
+ "type": "integer",
+ "description": "Number of source units that are replaced.",
+ "maximum": -1
+ },
+ "source_applied_quantity_amount": {
+ "type": "integer",
+ "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.",
+ "maximum": 0
+ },
+ "target_index": {
+ "type": "integer",
+ "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`."
+ },
+ "target_applied_quantity": {
+ "type": "integer",
+ "description": "Number of added target units that are replacements."
+ },
+ "target_applied_quantity_amount": {
+ "type": "integer",
+ "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity."
+ },
+ "target_applied_discount_amount": {
+ "type": "integer",
+ "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`."
+ }
+ }
+ }
+ },
"AreaStoreCampaignAssignment": {
"title": "AreaStoreCampaignAssignment",
"type": "object",
@@ -40272,13 +39974,38 @@
"order_item_indices": {
"title": "InapplicableToOrderItemIndices",
"type": "array",
- "description": "Determines the order in which the discount is applied to the products or SKUs sent in the `order` object in the request. The counting begins from `0`.",
+ "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.",
"items": {
"title": "InapplicableToOrderItemIndicesItem",
"type": "integer"
},
"nullable": true
},
+ "order_item_units": {
+ "title": "InapplicableToOrderItemUnits",
+ "type": "array",
+ "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.",
+ "items": {
+ "title": "InapplicableToOrderItemUnitsItem",
+ "type": "object",
+ "properties": {
+ "index": {
+ "type": "integer",
+ "description": "Number assigned to the order line item in accordance with the order sent in the request."
+ },
+ "units": {
+ "title": "InapplicableToOrderItemUnitsItemUnits",
+ "type": "array",
+ "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`.",
+ "items": {
+ "title": "InapplicableToOrderItemUnitsItemUnitsItem",
+ "type": "integer"
+ }
+ }
+ }
+ },
+ "nullable": true
+ },
"repeat": {
"type": "integer",
"description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item.",
@@ -40291,7 +40018,7 @@
},
"target": {
"type": "string",
- "description": "Determines to which kinds of objects the discount is applicable. `\"ITEM\"` includes products and SKUs.",
+ "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.",
"nullable": true
}
},
@@ -56530,7 +56257,7 @@
"tags": [
"Loyalties"
],
- "summary": "Get Points Expiration",
+ "summary": "List Loyalty Card Point Expiration",
"description": "Retrieve loyalty point expiration buckets for a given loyalty card. Expired point buckets are not returned in this endpoint. You can use the Exports API to retrieve a list of both ACTIVE and EXPIRED point buckets.",
"parameters": [
{
@@ -56637,7 +56364,7 @@
"tags": [
"Loyalties"
],
- "summary": "Create Points Expiration Export",
+ "summary": "Export Loyalty Campaign Point Expiration",
"description": "Schedule the generation of a points expiration CSV file for a particular campaign.",
"parameters": [],
"security": [
diff --git a/scripts/prepare-open-api-for-sdk/index.ts b/scripts/prepare-open-api-for-sdk/index.ts
index 6d654af80..fd6ac2403 100644
--- a/scripts/prepare-open-api-for-sdk/index.ts
+++ b/scripts/prepare-open-api-for-sdk/index.ts
@@ -5,7 +5,7 @@ import minimist from "minimist";
import colors from "colors";
import { parseNullsToNullableObjects, removeStoplightTag } from "./utils";
import originalOpenAPIContent from "../../reference/OpenAPI.json";
-import _ from "lodash";
+import _, { omit } from "lodash";
let openAPIContent = originalOpenAPIContent;
import { removedNotUsedParameters } from "./removed-not-used-parameters";
@@ -91,10 +91,7 @@ const main = async (languageOptions: LanguageOptions) => {
});
//////////////////////////////////////////////////////////////////////////////
removeStoplightTag(openAPIContent);
- openAPIContent = removeUnwantedProperties(openAPIContent, [
- "readmeTitle",
- "access_settings", //@todo remove when fixed
- ]);
+ openAPIContent = removeUnwantedProperties(openAPIContent, ["readmeTitle"]);
openAPIContent.components.schemas = removeUnwantedProperties(
openAPIContent.components.schemas,
["title"],
@@ -195,6 +192,24 @@ const main = async (languageOptions: LanguageOptions) => {
//ValidationRuleRules fix for Readme – should stay forever
openAPIContent.components.schemas.ValidationRuleRules.additionalProperties.properties.rules.$ref =
"#/components/schemas/ValidationRuleRules";
+ //Do not add breaking change on application_details
+ openAPIContent.components.schemas.OrderCalculated.properties["items"] = {
+ type: "array",
+ description:
+ "Array of items applied to the order. It can include up 500 items.",
+ items: {
+ $ref: "#/components/schemas/OrderCalculatedItem",
+ },
+ nullable: true,
+ };
+ openAPIContent.components.schemas.OrderCalculatedItem.properties[
+ "application_details"
+ ] = {
+ $ref: "#/components/schemas/ApplicationDetails",
+ };
+ openAPIContent.components.schemas = fixOrderCalculated(
+ openAPIContent.components.schemas,
+ );
//////////////////////////////////////////////////////////////////////////////
openAPIContent = addMissingDefaults(openAPIContent);
const { paths, newSchemas } = getPathsWithoutDeprecated(
@@ -284,7 +299,7 @@ const main = async (languageOptions: LanguageOptions) => {
},
paths: pathsWithFixedResponses,
});
-
+ ////////////////
newOpenApiFile.components.schemas.LoyaltiesMembersPointsExpirationListResponseBody.properties.data.items =
newOpenApiFile.components.schemas.LoyaltyPointsBucket;
newOpenApiFile.components.schemas.LoyaltyCardTransaction.properties.details.properties.balance =
@@ -522,6 +537,47 @@ const moveSchemasOnTheBack = (schemas: any, schemasNames: string[]) => ({
..._.pick(schemas, schemasNames),
});
+const fixOrderCalculated = (object: any) => {
+ if (Array.isArray(object)) {
+ return object.map((value) => fixOrderCalculated(value));
+ }
+ if (object instanceof Object) {
+ if (
+ object.properties?.order?.allOf?.find(
+ (e) => e?.$ref === "#/components/schemas/OrderCalculated",
+ )
+ ) {
+ object.properties.order.allOf = object.properties?.order?.allOf.filter(
+ (e) => !e?.properties?.items,
+ );
+ if (object.properties.order.allOf.length === 1) {
+ object.properties.order = object.properties.order.allOf[0];
+ }
+ }
+ if (
+ object.properties?.orders?.items?.allOf?.find(
+ (e) => e?.$ref === "#/components/schemas/OrderCalculated",
+ )
+ ) {
+ object.properties.orders.items.allOf =
+ object.properties?.orders.items?.allOf.filter(
+ (e) => !e?.properties?.items,
+ );
+ if (object.properties.orders.items.allOf.length === 1) {
+ object.properties.orders.items =
+ object.properties.orders.items.allOf[0];
+ }
+ }
+ return Object.fromEntries(
+ Object.entries(object).map((keyAndEntry) => {
+ const [key, entry] = keyAndEntry;
+ return [key, fixOrderCalculated(entry)];
+ }),
+ );
+ }
+ return object;
+};
+
if (!("language" in options)) {
console.log(colors.red("invalid arguments, missing language parameter"));
} else if (