curl --request POST \
--url https://{cluster}.voucherify.io/v1/promotions/tiers/{tierId}/validation \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"customer": {
"source_id": "test-user@email.io"
},
"order": {
"id": "ord_71uW6qnB5CFZlLHCeCNC4qtS"
}
}
'{
"valid": true,
"applicable_to": {
"data": [],
"total": 0,
"data_ref": "data",
"object": "list"
},
"inapplicable_to": {
"data": [],
"total": 0,
"data_ref": "data",
"object": "list"
},
"tracking_id": "track_OWyBVb1mg1qnieLLNygh19A0Ia7FsJck",
"order": {
"id": "ord_71uW6qnB5CFZlLHCeCNC4qtS",
"source_id": null,
"created_at": "2022-11-17T12:17:55.096Z",
"updated_at": null,
"status": "CREATED",
"amount": 9918200,
"initial_amount": 468200,
"items_discount_amount": 9450000,
"total_discount_amount": 9450000,
"total_amount": 468200,
"items_applied_discount_amount": 9450000,
"total_applied_discount_amount": 9450000,
"items": [
{
"object": "order_item",
"source_id": "webinar_BF_sweater_pink_sweater",
"related_object": "product",
"quantity": 1,
"amount": 6500,
"price": 6500,
"subtotal_amount": 6500
},
{
"object": "order_item",
"source_id": "webinar_BF_pants_navy_sweat_pants",
"related_object": "product",
"quantity": 1,
"amount": 6000,
"price": 6000,
"subtotal_amount": 6000
},
{
"object": "order_item",
"source_id": "5h1pp1ng",
"related_object": "product",
"quantity": 1,
"amount": 2000,
"price": 2000,
"subtotal_amount": 2000,
"product": {
"id": "prod_5h1pp1ng",
"source_id": "5h1pp1ng",
"name": "Shipping"
}
},
{
"object": "order_item",
"source_id": "webinar_BF_pants_gray_sweat_pants",
"related_object": "product",
"quantity": 2,
"amount": 10000,
"price": 5000,
"subtotal_amount": 10000
},
{
"object": "order_item",
"source_id": "webinar_BF_sweater_pearl",
"related_object": "product",
"quantity": 2,
"amount": 22000,
"price": 11000,
"subtotal_amount": 22000
},
{
"object": "order_item",
"product_id": "prod_0b7d7dfb05cbe5c616",
"sku_id": "sku_0b7d7dfb090be5c619",
"quantity": 1,
"amount": 1700,
"price": 1700,
"subtotal_amount": 1700,
"product": {
"id": "prod_0b7d7dfb05cbe5c616",
"source_id": "Books",
"name": "Comic Books1",
"price": 2100
},
"sku": {
"id": "sku_0b7d7dfb090be5c619",
"source_id": "ComicBook_1",
"sku": "Comics1",
"price": 1700
}
},
{
"object": "order_item",
"product_id": "prod_0bae32322150fd0546",
"quantity": 2,
"amount": 420000,
"price": 210000,
"subtotal_amount": 420000,
"product": {
"id": "prod_0bae32322150fd0546",
"name": "Samsung Phone",
"price": 210000
}
},
{
"object": "order_item",
"product_id": "prod_0bae2dc5a090fd0184",
"sku_id": "sku_0bae3b28f610fd0da1",
"quantity": 45,
"discount_quantity": 45,
"initial_quantity": 0,
"amount": 9450000,
"discount_amount": 9450000,
"initial_amount": 0,
"applied_discount_amount": 9450000,
"price": 210000,
"subtotal_amount": 0,
"product": {
"id": "prod_0bae2dc5a090fd0184",
"source_id": "first_product",
"name": "Samsung Phone 1",
"price": 220000
},
"sku": {
"id": "sku_0bae3b28f610fd0da1",
"source_id": "first_product_sku_1",
"sku": "Samsung phone 256GB",
"price": 210000
}
}
],
"metadata": {},
"customer_id": null,
"referrer_id": null,
"object": "order"
},
"id": "promo_ZWkx6R0I1Ts3N9HL4kfTdxOm",
"name": "Add new SKU",
"discount": {
"type": "UNIT",
"effect": "ADD_NEW_ITEMS",
"unit_off": 45,
"unit_type": "sku_0bae3b28f610fd0da1",
"sku": {
"id": "sku_0bae3b28f610fd0da1",
"source_id": "first_product_sku_1",
"sku": "Samsung phone 256GB"
},
"product": {
"id": "prod_0bae2dc5a090fd0184",
"source_id": "first_product",
"name": "Samsung Phone 1"
}
},
"campaign": {
"id": "camp_40LC42P5NFbkkD4RWoJ4btks",
"start_date": null,
"expiration_date": null,
"active": true,
"object": "campaign"
},
"hierarchy": 4,
"discount_amount": 9450000,
"applied_discount_amount": 9450000,
"metadata": {},
"object": "promotion_tier"
}Validate Promotion Tier
This endpoint represents the deprecated version of the API responsible for promotion tier redemption, and we do not recommend using it. The new Stackable Discounts API introduces additional features and improvements while maintaining backward compatibility, including applying a combination of coupon codes and promotion tiers. Developers are encouraged to migrate to the latest version to take advantage of the latest enhancements and bug fixes. No updates will be provided to the deprecated endpoint.
To verify whether the promotion tier discount can be applied to an order. This method is designed for server side integration which means that it is accessible only through private keys.
curl --request POST \
--url https://{cluster}.voucherify.io/v1/promotions/tiers/{tierId}/validation \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"customer": {
"source_id": "test-user@email.io"
},
"order": {
"id": "ord_71uW6qnB5CFZlLHCeCNC4qtS"
}
}
'{
"valid": true,
"applicable_to": {
"data": [],
"total": 0,
"data_ref": "data",
"object": "list"
},
"inapplicable_to": {
"data": [],
"total": 0,
"data_ref": "data",
"object": "list"
},
"tracking_id": "track_OWyBVb1mg1qnieLLNygh19A0Ia7FsJck",
"order": {
"id": "ord_71uW6qnB5CFZlLHCeCNC4qtS",
"source_id": null,
"created_at": "2022-11-17T12:17:55.096Z",
"updated_at": null,
"status": "CREATED",
"amount": 9918200,
"initial_amount": 468200,
"items_discount_amount": 9450000,
"total_discount_amount": 9450000,
"total_amount": 468200,
"items_applied_discount_amount": 9450000,
"total_applied_discount_amount": 9450000,
"items": [
{
"object": "order_item",
"source_id": "webinar_BF_sweater_pink_sweater",
"related_object": "product",
"quantity": 1,
"amount": 6500,
"price": 6500,
"subtotal_amount": 6500
},
{
"object": "order_item",
"source_id": "webinar_BF_pants_navy_sweat_pants",
"related_object": "product",
"quantity": 1,
"amount": 6000,
"price": 6000,
"subtotal_amount": 6000
},
{
"object": "order_item",
"source_id": "5h1pp1ng",
"related_object": "product",
"quantity": 1,
"amount": 2000,
"price": 2000,
"subtotal_amount": 2000,
"product": {
"id": "prod_5h1pp1ng",
"source_id": "5h1pp1ng",
"name": "Shipping"
}
},
{
"object": "order_item",
"source_id": "webinar_BF_pants_gray_sweat_pants",
"related_object": "product",
"quantity": 2,
"amount": 10000,
"price": 5000,
"subtotal_amount": 10000
},
{
"object": "order_item",
"source_id": "webinar_BF_sweater_pearl",
"related_object": "product",
"quantity": 2,
"amount": 22000,
"price": 11000,
"subtotal_amount": 22000
},
{
"object": "order_item",
"product_id": "prod_0b7d7dfb05cbe5c616",
"sku_id": "sku_0b7d7dfb090be5c619",
"quantity": 1,
"amount": 1700,
"price": 1700,
"subtotal_amount": 1700,
"product": {
"id": "prod_0b7d7dfb05cbe5c616",
"source_id": "Books",
"name": "Comic Books1",
"price": 2100
},
"sku": {
"id": "sku_0b7d7dfb090be5c619",
"source_id": "ComicBook_1",
"sku": "Comics1",
"price": 1700
}
},
{
"object": "order_item",
"product_id": "prod_0bae32322150fd0546",
"quantity": 2,
"amount": 420000,
"price": 210000,
"subtotal_amount": 420000,
"product": {
"id": "prod_0bae32322150fd0546",
"name": "Samsung Phone",
"price": 210000
}
},
{
"object": "order_item",
"product_id": "prod_0bae2dc5a090fd0184",
"sku_id": "sku_0bae3b28f610fd0da1",
"quantity": 45,
"discount_quantity": 45,
"initial_quantity": 0,
"amount": 9450000,
"discount_amount": 9450000,
"initial_amount": 0,
"applied_discount_amount": 9450000,
"price": 210000,
"subtotal_amount": 0,
"product": {
"id": "prod_0bae2dc5a090fd0184",
"source_id": "first_product",
"name": "Samsung Phone 1",
"price": 220000
},
"sku": {
"id": "sku_0bae3b28f610fd0da1",
"source_id": "first_product_sku_1",
"sku": "Samsung phone 256GB",
"price": 210000
}
}
],
"metadata": {},
"customer_id": null,
"referrer_id": null,
"object": "order"
},
"id": "promo_ZWkx6R0I1Ts3N9HL4kfTdxOm",
"name": "Add new SKU",
"discount": {
"type": "UNIT",
"effect": "ADD_NEW_ITEMS",
"unit_off": 45,
"unit_type": "sku_0bae3b28f610fd0da1",
"sku": {
"id": "sku_0bae3b28f610fd0da1",
"source_id": "first_product_sku_1",
"sku": "Samsung phone 256GB"
},
"product": {
"id": "prod_0bae2dc5a090fd0184",
"source_id": "first_product",
"name": "Samsung Phone 1"
}
},
"campaign": {
"id": "camp_40LC42P5NFbkkD4RWoJ4btks",
"start_date": null,
"expiration_date": null,
"active": true,
"object": "campaign"
},
"hierarchy": 4,
"discount_amount": 9450000,
"applied_discount_amount": 9450000,
"metadata": {},
"object": "promotion_tier"
}Authorizations
Scopes
Body
Provide the customer and order context.
Request schema model for validating a promotion using POST v1/promotions/tiers/{tierId}/validation.
A set of key/value pairs that you can send in the request body to check against vouchers requiring redemption metadata validation rules to be satisfied. The validation runs against rules that are defined through the Create Validation Rules endpoint or via the Dashboard; in the Advanced Rule Builder → Advanced → Redemption metadata satisfy or Basic Builder → Attributes match → REDEMPTION METADATA. Read more.
Response
Returns validation result in valid key of the promotion tier object. Returns true if the promotion tier rules and validation rules are satisfied given the request body parameters. Returns false if the data provided in the payload does not meet validation rules or promotion tier requirements.
- Promotion Tier Valid
- Promotion Tier Not Valid
Response schema model for valid promotion tier when validating a promotion using POST v1/promotions/tiers/{tierId}/validation.

