curl --request POST \
--url https://{cluster}.voucherify.io/v1/redemptions/{redemptionId}/rollback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"customer": {
"id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
"name": "Annie Lemons",
"email": "annie@lemon.com",
"phone": "+1 933 222 3334",
"birthday": "1900-12-02",
"birthdate": "1900-12-01",
"address": {
"city": "New York",
"state": "NY",
"line_1": "123 Main St.",
"line_2": "APT 3 BLG 5",
"country": "United States",
"postal_code": "100012"
},
"metadata": {
"age": 23
}
},
"order": {
"source_id": "test_rollback_8"
},
"metadata": {
"location_id": [
"L2"
]
}
}
'{
"id": "rr_0c5eba630bc4979e70",
"object": "redemption_rollback",
"date": "2023-01-27T16:05:23.631Z",
"customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
"tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
"metadata": null,
"amount": -2,
"redemption": "r_0c5bf3323008a35032",
"reason": "A UI rollback to check for result in API response to listing.",
"result": "SUCCESS",
"order": {
"id": "ord_dqxr4uzaYWkTZnrSEMoQtCF8",
"source_id": null,
"created_at": "2023-01-25T12:18:09.203Z",
"updated_at": "2023-01-27T16:05:23.687Z",
"status": "CANCELED",
"amount": 2100,
"total_amount": 2100,
"items": [
{
"object": "order_item",
"product_id": "prod_0bc3bd8a4e072c5275",
"quantity": 3,
"amount": 2100,
"price": 700,
"subtotal_amount": 2100,
"product": {
"name": "Bouquet - Romantic Roses",
"price": 700
}
}
],
"metadata": {},
"customer": {
"id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
"object": "customer"
},
"customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
"referrer_id": null,
"object": "order",
"redemptions": {
"r_0c5bf3323008a35032": {
"date": "2023-01-25T12:18:09.216Z",
"rollback_id": "rr_0c5eba630bc4979e70",
"rollback_date": "2023-01-27T16:05:23.631Z",
"related_object_type": "voucher",
"related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
"related_object_parent_id": "camp_22noMlhTADb7Fq2UL3vWu3d1"
}
}
},
"channel": {
"channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
"channel_type": "USER"
},
"customer": {
"id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
"name": "Bob Jones",
"email": "bob.jones@email.com",
"source_id": "36_bob",
"metadata": {
"age": 26,
"favorite_brands": [
"Nike",
"Adidas",
"Reebok"
],
"accepts_marketing": false,
"acquisition_channel": "Facebook"
},
"object": "customer"
},
"related_object_type": "voucher",
"related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
"voucher": {
"id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
"code": "AnsvocvP",
"campaign": "Loyalty Campaign - Test Points",
"campaign_id": "camp_22noMlhTADb7Fq2UL3vWu3d1",
"category": null,
"categories": [],
"discount": null,
"gift": null,
"loyalty_card": null,
"start_date": null,
"expiration_date": null,
"validity_timeframe": null,
"validity_day_of_week": null,
"additional_info": null,
"assets": {
"qr": {},
"barcode": {}
},
"updated_at": null,
"object": "voucher"
},
"reward": {
"customer": {
"id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
"name": "Bob Jones",
"email": "bob.jones@email.com",
"source_id": "36_bob",
"metadata": {
"age": 26,
"favorite_brands": [
"Nike",
"Adidas",
"Reebok"
],
"accepts_marketing": false,
"acquisition_channel": "Facebook"
},
"object": "customer"
},
"assignment_id": "rewa_0ZwLAHgeU9IrI2V1ofYRmW7g",
"voucher": {
"id": "v_4GaEX7clyqMaveT7vHhoyRpsIgxv95Q6",
"code": "HAPPY-ORDER5My",
"campaign": "$20 off the entire order",
"campaign_id": "camp_5h0wc453_4",
"category": null,
"category_id": "cat_0b688929a2476386a6",
"categories": [],
"type": "DISCOUNT_VOUCHER",
"discount": {
"type": "AMOUNT",
"amount_off": 2000,
"effect": "APPLY_TO_ORDER"
},
"gift": null,
"loyalty_card": null,
"start_date": "2022-09-20T00:00:00.000Z",
"expiration_date": "2022-09-30T00:00:00.000Z",
"validity_timeframe": null,
"validity_day_of_week": null,
"active": true,
"additional_info": null,
"metadata": {},
"assets": {
"qr": {
"id": "21ceb848-4869-4dac-ba41-f854bda3a101",
"url": "{{internalVoucherifyURL}}"
},
"barcode": {
"id": "1dba9cb2-fb28-4c8d-8548-5edb2eb01f5a",
"url": "{{internalVoucherifyURL}}"
}
},
"is_referral_code": false,
"created_at": "2023-01-25T12:18:09.256Z",
"updated_at": null,
"holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
"redemption": {
"quantity": null,
"redeemed_quantity": 0,
"object": "list",
"url": "/v1/vouchers/HAPPY-ORDER5My/redemptions?page=1&limit=10"
},
"publish": {
"object": "list",
"count": 1,
"url": "/v1/vouchers/HAPPY-ORDER5My/publications?page=1&limit=10"
},
"object": "voucher"
},
"id": "rew_MF4hKh1IKYgJkPjbcFbH94Ho",
"object": "reward",
"name": "Digital Present",
"created_at": "2023-01-25T12:16:44.557Z",
"updated_at": null,
"parameters": {
"campaign": {
"id": "camp_5h0wc453_4",
"type": "DISCOUNT_COUPONS"
}
},
"type": "CAMPAIGN"
},
"loyalty_card": {
"points": -2
}
}Your business logic may include a case when you need to undo a redemption. You can revert a redemption by calling this API endpoint. This endpoint rolls back only single redemptions, meaning those that are not stacked. Stacked redemptions belong to a parent redemption. To roll back a parent redemption, including all of its individual redemptions, use the POST Rollback Stackable Redemptions
🚧 You can roll back a redemption up to 3 months back.
The operation
redemption.redemption_entries) andredeemed_quantity by 1).In case of gift card vouchers, this method returns funds back according to the source redemption. In case of loyalty card vouchers, this method returns points back according to the source redemption.
curl --request POST \
--url https://{cluster}.voucherify.io/v1/redemptions/{redemptionId}/rollback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"customer": {
"id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
"name": "Annie Lemons",
"email": "annie@lemon.com",
"phone": "+1 933 222 3334",
"birthday": "1900-12-02",
"birthdate": "1900-12-01",
"address": {
"city": "New York",
"state": "NY",
"line_1": "123 Main St.",
"line_2": "APT 3 BLG 5",
"country": "United States",
"postal_code": "100012"
},
"metadata": {
"age": 23
}
},
"order": {
"source_id": "test_rollback_8"
},
"metadata": {
"location_id": [
"L2"
]
}
}
'{
"id": "rr_0c5eba630bc4979e70",
"object": "redemption_rollback",
"date": "2023-01-27T16:05:23.631Z",
"customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
"tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
"metadata": null,
"amount": -2,
"redemption": "r_0c5bf3323008a35032",
"reason": "A UI rollback to check for result in API response to listing.",
"result": "SUCCESS",
"order": {
"id": "ord_dqxr4uzaYWkTZnrSEMoQtCF8",
"source_id": null,
"created_at": "2023-01-25T12:18:09.203Z",
"updated_at": "2023-01-27T16:05:23.687Z",
"status": "CANCELED",
"amount": 2100,
"total_amount": 2100,
"items": [
{
"object": "order_item",
"product_id": "prod_0bc3bd8a4e072c5275",
"quantity": 3,
"amount": 2100,
"price": 700,
"subtotal_amount": 2100,
"product": {
"name": "Bouquet - Romantic Roses",
"price": 700
}
}
],
"metadata": {},
"customer": {
"id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
"object": "customer"
},
"customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
"referrer_id": null,
"object": "order",
"redemptions": {
"r_0c5bf3323008a35032": {
"date": "2023-01-25T12:18:09.216Z",
"rollback_id": "rr_0c5eba630bc4979e70",
"rollback_date": "2023-01-27T16:05:23.631Z",
"related_object_type": "voucher",
"related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
"related_object_parent_id": "camp_22noMlhTADb7Fq2UL3vWu3d1"
}
}
},
"channel": {
"channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
"channel_type": "USER"
},
"customer": {
"id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
"name": "Bob Jones",
"email": "bob.jones@email.com",
"source_id": "36_bob",
"metadata": {
"age": 26,
"favorite_brands": [
"Nike",
"Adidas",
"Reebok"
],
"accepts_marketing": false,
"acquisition_channel": "Facebook"
},
"object": "customer"
},
"related_object_type": "voucher",
"related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
"voucher": {
"id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
"code": "AnsvocvP",
"campaign": "Loyalty Campaign - Test Points",
"campaign_id": "camp_22noMlhTADb7Fq2UL3vWu3d1",
"category": null,
"categories": [],
"discount": null,
"gift": null,
"loyalty_card": null,
"start_date": null,
"expiration_date": null,
"validity_timeframe": null,
"validity_day_of_week": null,
"additional_info": null,
"assets": {
"qr": {},
"barcode": {}
},
"updated_at": null,
"object": "voucher"
},
"reward": {
"customer": {
"id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
"name": "Bob Jones",
"email": "bob.jones@email.com",
"source_id": "36_bob",
"metadata": {
"age": 26,
"favorite_brands": [
"Nike",
"Adidas",
"Reebok"
],
"accepts_marketing": false,
"acquisition_channel": "Facebook"
},
"object": "customer"
},
"assignment_id": "rewa_0ZwLAHgeU9IrI2V1ofYRmW7g",
"voucher": {
"id": "v_4GaEX7clyqMaveT7vHhoyRpsIgxv95Q6",
"code": "HAPPY-ORDER5My",
"campaign": "$20 off the entire order",
"campaign_id": "camp_5h0wc453_4",
"category": null,
"category_id": "cat_0b688929a2476386a6",
"categories": [],
"type": "DISCOUNT_VOUCHER",
"discount": {
"type": "AMOUNT",
"amount_off": 2000,
"effect": "APPLY_TO_ORDER"
},
"gift": null,
"loyalty_card": null,
"start_date": "2022-09-20T00:00:00.000Z",
"expiration_date": "2022-09-30T00:00:00.000Z",
"validity_timeframe": null,
"validity_day_of_week": null,
"active": true,
"additional_info": null,
"metadata": {},
"assets": {
"qr": {
"id": "21ceb848-4869-4dac-ba41-f854bda3a101",
"url": "{{internalVoucherifyURL}}"
},
"barcode": {
"id": "1dba9cb2-fb28-4c8d-8548-5edb2eb01f5a",
"url": "{{internalVoucherifyURL}}"
}
},
"is_referral_code": false,
"created_at": "2023-01-25T12:18:09.256Z",
"updated_at": null,
"holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
"redemption": {
"quantity": null,
"redeemed_quantity": 0,
"object": "list",
"url": "/v1/vouchers/HAPPY-ORDER5My/redemptions?page=1&limit=10"
},
"publish": {
"object": "list",
"count": 1,
"url": "/v1/vouchers/HAPPY-ORDER5My/publications?page=1&limit=10"
},
"object": "voucher"
},
"id": "rew_MF4hKh1IKYgJkPjbcFbH94Ho",
"object": "reward",
"name": "Digital Present",
"created_at": "2023-01-25T12:16:44.557Z",
"updated_at": null,
"parameters": {
"campaign": {
"id": "camp_5h0wc453_4",
"type": "DISCOUNT_COUPONS"
}
},
"type": "CAMPAIGN"
},
"loyalty_card": {
"points": -2
}
}The access token received from the authorization server in the OAuth 2.0 flow.
The original redemption ID to be rolled back (undone).
"r_0ba186c4824e4881e1"
Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body.
Request body schema for POST v1/redemptions/{redemptionId}/rollback.
Reason for the rollback.
Customer's source_id.
Show child attributes
The ID of an existing customer.
A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored.
Customer's first and last name.
An arbitrary string that you can attach to a customer object.
Customer's email address.
Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel.
Deprecated. Customer's birthdate; format YYYY-MM-DD.
Customer's birthdate; format YYYY-MM-DD.
A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments.
Order information. Order information.
Show child attributes
Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.
Unique source ID of an existing order that will be linked to the redemption of this request.
The order status.
CREATED, PAID, CANCELED, FULFILLED 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.
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.
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).
Array of items applied to the order. It can include up to 500 items.
Show child attributes
Unique identifier of the SKU. It is assigned by Voucherify.
Unique identifier of the product. It is assigned by Voucherify.
Used along with the source_id property, can be set to either sku or product.
product, sku 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.
The quantity of the particular item in the cart.
Number of dicounted items.
A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.
The total amount of the order item (price * quantity).
Sum of all order-item-level discounts applied to the order.
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.
Unit price of an item. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.
An object containing details of the related product.
Show child attributes
A unique identifier that represents the product and is assigned by Voucherify.
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.
The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. Override works only for endpoints that create an order in the database.
Product name.
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.
Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).
An object containing details of the related SKU.
Show child attributes
A unique identifier that represents the SKU and is assigned by Voucherify.
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.
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.
The SKU name.
SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).
A set of custom key/value pairs that you can attach to an order item. It can be useful for storing additional information about the order item in a structured format. It can be used to create product collections.
A set of custom key/value pairs that you can attach to an order item. It can be useful for storing additional information about the order item in a structured format. It can be used to define business validation rules.
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.
A set of key/value pairs that you can send in the request body to update redemption metadata.
Returns a redemption rollback object indicating the result of the rollback.
Response body schema for POST v1/redemptions/{redemptionId}/rollback.
Unique identifier of the redemption rollback.
"rr_0efeb3dab05e62e599"
The type of the object represented by the JSON
redemption_rollback Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.
"2021-12-22T10:13:06.487Z"
Unique customer ID of the redeeming customer.
"cust_i8t5Tt6eiKG5K79KQlJ0Vs64"
Hashed customer source ID.
The metadata object stores all custom attributes assigned to the redemption.
Unique redemption ID of the parent redemption.
"r_0c656311b5878a2031"
Redemption result.
SUCCESS, FAILURE Redemption status.
SUCCEEDED, FAILED Order information.
Show child attributes
Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.
Unique source ID of an existing order that will be linked to the redemption of this request.
The order status.
CREATED, PAID, CANCELED, FULFILLED 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).
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).
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).
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).
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).
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).
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).
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)
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
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.
The type of the object represented by JSON.
order Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.
"2021-12-22T10:13:06.487Z"
Timestamp representing the date and time when the order was last updated in ISO 8601 format.
"2021-12-22T10:14:45.316Z"
Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.
"cust_7iUa6ICKyU6gH40dBU25kQU1"
Unique referrer ID.
"cust_nM4jqPiaXUvQdVSA6vTRUnix"
Show child attributes
Show child attributes
Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.
"2022-09-02T17:06:56.649Z"
Unique ID of the redemption rollback.
"rr_0c63c84eb78ee0a6c0"
Timestamp representing the date and time when the redemption rollback was created. The value is shown in the ISO 8601 format.
"2023-01-31T14:18:37.150Z"
The source of the incentive.
Unique ID of the parent redemption.
"r_0ba186c4824e4881e1"
Represent's the campaign ID of the voucher if the redemption was based on a voucher that was part of bulk codes generated within a campaign. In case of a promotion tier, this represents the campaign ID of the promotion tier's parent campaign.
Contains a list of unique IDs of child redemptions, which belong to the stacked incentives.
Lists the rollback redemption IDs of the particular child redemptions.
Array of items applied to the order. It can include up to 500 items.
Show child attributes
The type of the object represented by JSON.
order_item Unique identifier of the order line item.
Unique identifier of the SKU. It is assigned by Voucherify.
Unique identifier of the product. It is assigned by Voucherify.
Used along with the source_id property, can be set to either sku or product.
product, sku 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.
The quantity of the particular item in the cart.
Number of dicounted items.
A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.
The total amount of the order item (price * quantity).
Sum of all order-item-level discounts applied to the order.
This field shows the order-level discount applied.
Number of the discounted items applied in the transaction.
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.
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.
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.
Unit price of an item. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.
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
An object containing details of the related product.
Show child attributes
A unique identifier that represents the product and is assigned by Voucherify.
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.
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.
Product name.
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.
Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).
An object containing details of the related SKU.
Show child attributes
A unique identifier that represents the SKU and is assigned by Voucherify.
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.
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.
The SKU name.
SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).
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.
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.
Defines the details of the channel through which the redemption was issued.
Show child attributes
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.
"user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH"
The source of the channel for the redemption. A USER corresponds to the Voucherify Dashboard and an API corresponds to the API.
USER, API Simplified customer data.
Show child attributes
Unique identifier of an existing customer. It is assigned by Voucherify.
Customer's first and last name.
Customer's email address.
A unique identifier of the customer. It can be a customer ID or email from a CRM system, database, or a third-party service.
A set of custom key/value pairs that are attached to the customer. It stores all custom attributes assigned to the customer.
The type of the object represented by JSON.
customer Defines the related object.
voucher, promotion_tier, redemption Unique identifier of the related object. It is assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher.
For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card. For loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer.
-10000
System generated cause for the redemption being invalid in the context of the provided parameters.
If the result is FAILURE, this parameter will provide a generic reason as to why the redemption failed.
"customer_rules_violated"
If the result is FAILURE, this parameter will provide a more expanded reason as to why the redemption failed.
Defines the details of the voucher being originally redeemed.
Show child attributes
Assigned by the Voucherify API, identifies the voucher.
"v_mkZN9v7vjYUadXnHrMza8W5c34fE5KiV"
A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters.
"WVPblOYX"
A unique campaign name, identifies the voucher's parent campaign.
"Gift Card Campaign"
Assigned by the Voucherify API, identifies the voucher's parent campaign.
"camp_FNYR4jhqZBM9xTptxDGgeNBV"
Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint.
Unique category ID assigned by Voucherify.
"cat_0bb343dee3cdb5ec0c"
Defines the type of the voucher.
GIFT_VOUCHER, DISCOUNT_VOUCHER, LOYALTY_CARD Contains information about discount.
Show child attributes
Defines the type of the voucher.
AMOUNT Amount taken off the subtotal of a price. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000.
Formula used to dynamically calculate the discount.
Maximum discount amount per order.
Defines how the discount is applied to the customer's order.
APPLY_TO_ORDER, APPLY_TO_ITEMS, APPLY_TO_ITEMS_PROPORTIONALLY, APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY, APPLY_TO_ITEMS_BY_QUANTITY Flag indicating whether the discount was calculated using a formula.
Object representing gift parameters. Child attributes are present only if type is GIFT_VOUCHER. Defaults to null.
Show child attributes
Total gift card income over the lifetime of the card. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.
10000
Total amount of subtracted credits over the gift card lifetime. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.
Available funds. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.
500
Defines how the credits are applied to the customer's order.
APPLY_TO_ORDER, APPLY_TO_ITEMS Object representing loyalty card parameters. Child attributes are present only if type is LOYALTY_CARD. Defaults to null.
Show child attributes
Total number of points added to the loyalty card over its lifespan.
7000
Points available for reward redemption. This is calculated as follows: balance = points - expired_points - subtracted_points - redemption.redeemed_points.
6970
The next closest date when the next set of points are due to expire.
"2023-05-30"
The amount of points that are set to expire next.
Shows the number of pending points that will be added to the loyalty card when they are activated automatically or manually.
Shows the total number of expired points over the lifetime of the loyalty card.
Shows the total number of subtracted points over the lifetime of the loyalty card.
Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is inactive before this date.
"2021-12-01T00:00:00.000Z"
Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is inactive after this date.
"2021-12-31T00:00:00.000Z"
Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.start_date required when including the validity_timeframe.
Show child attributes
Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a duration of PT1H will be valid for a duration of one hour.
"PT1H"
Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an interval of P2D will be valid every other day.
"P2D"
Integer array corresponding to the particular days of the week in which the voucher is valid.
0 Sunday1 Monday2 Tuesday3 Wednesday4 Thursday5 Friday6 Saturday0, 1, 2, 3, 4, 5, 6 Determines the hours of validity, e.g. to create a happy hours scenario.
Show child attributes
Defines the recurring period(s) when the resource is active. The periods should not overlap.
Show child attributes
Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time.
"12:00"
Integer array corresponding to the particular days of the week in which the resource is valid.
0 Sunday1 Monday2 Tuesday3 Wednesday4 Thursday5 Friday6 Saturday0, 1, 2, 3, 4, 5, 6 Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time.
"14:00"
A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the start_date and expiration_date.
true indicates an active voucherfalse indicates an inactive voucherAn optional field to keep any extra textual information about the code such as a code description and details.
The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format.
Stores links to images of QR and barcode that correspond to an encrypted voucher code.
Show child attributes
Stores Quick Response (QR) representation of encrypted code.
Show child attributes
Encrypted voucher code ID.
"U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q=="
URL to QR code
Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.
size: integer value from 1 to 100format: string, either png (default) or svg"https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D"
Stores barcode representation of encrypted code.
Show child attributes
Encrypted voucher code ID.
"U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ=="
URL to barcode
Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.
size: integer value from 1 to 100format: string, either png (default) or svg"https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D"
Flag indicating whether this voucher is a referral code; true for campaign type REFERRAL_PROGRAM.
Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format.
"2021-12-22T10:13:06.487Z"
Timestamp representing the date and time when the voucher was last updated in ISO 8601 format.
"2021-12-22T10:14:45.316Z"
Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify.
"cust_eWgXlBBiY6THFRJwX45Iakv4"
Unique identifier of the referring person.
"cust_Vzck5i8U3OhcEUFY6MKhN9Rv"
The type of the object represented by JSON. Default is voucher.
Stores a summary of publication events: an event counter and endpoint to return details of each event. Publication is an assignment of a code to a customer, e.g. through a distribution.
Show child attributes
The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute.
Publication events counter.
0
The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/{voucher_code}/publications
"/v1/vouchers/WVPblOYX/publications?page=1&limit=10"
Stores a summary of redemptions that have been applied to the voucher.
Show child attributes
How many times a voucher can be redeemed. A null value means unlimited.
How many times a voucher has already been redeemed.
1
Total loyalty points redeemed.
100000
The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute.
The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/{voucher_code}/redemptions
"/v1/vouchers/WVPblOYX/redemptions?page=1&limit=10"
Contains details about the category.
Show child attributes
Unique category ID assigned by Voucherify.
Category name.
Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
x >= 0The type of the object represented by the JSON. This object stores information about the category.
category Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.
"2022-07-14T10:45:13.156Z"
Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.
"2022-08-16T10:52:08.094Z"
List of Validation Rules Assignments
Show child attributes
The type of the object represented by JSON. This object stores information about validation rules assignments.
list Identifies the name of the attribute that contains the array of validation rules assignments.
data Contains array of validation rules assignments.
Show child attributes
The unique identifier for a assignment
The unique identifier for a rule
The unique identifier for a related object
The type of related object
The type of the object represented by JSON.
validation_rules_assignment Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.
"2022-03-09T11:19:04.819Z"
Timestamp representing the date and time when the object was last updated in ISO 8601 format.
"2022-03-09T11:19:04.819Z"
The validation status of the assignment
VALID, PARTIALLY_VALID, INVALID The list of omitted rules
Total number of validation rules assignments.
x >= 0Contains details of the promotion tier and the parent campaign.
Show child attributes
Unique promotion tier ID.
"promo_63fYCt81Aw0h7lzyRkrGZh9p"
Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format.
"2021-12-15T11:34:01.333Z"
Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format.
"2022-02-09T09:20:05.603Z"
Name of the promotion tier.
Text to be displayed to your customers on your website.
Contains details about the discount applied by the promotion tier.
Show child attributes
Contains information about discount.
Show child attributes
Defines the type of the voucher.
AMOUNT Amount taken off the subtotal of a price. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000.
Formula used to dynamically calculate the discount.
Maximum discount amount per order.
Defines how the discount is applied to the customer's order.
APPLY_TO_ORDER, APPLY_TO_ITEMS, APPLY_TO_ITEMS_PROPORTIONALLY, APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY, APPLY_TO_ITEMS_BY_QUANTITY Flag indicating whether the discount was calculated using a formula.
The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format.
The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy.
Promotion unique ID.
Contains details about promotion tier's parent campaign.
Show child attributes
Unique campaign ID.
Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive before this date.
"2022-09-22T00:00:00.000Z"
Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is inactive after this date.
"2022-09-30T00:00:00.000Z"
Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.start_date required when including the validity_timeframe.
Show child attributes
Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a duration of PT1H will be valid for a duration of one hour.
"PT1H"
Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an interval of P2D will be valid every other day.
"P2D"
Integer array corresponding to the particular days of the week in which the voucher is valid.
0 Sunday1 Monday2 Tuesday3 Wednesday4 Thursday5 Friday6 Saturday0, 1, 2, 3, 4, 5, 6 Determines the hours of validity, e.g. to create a happy hours scenario.
Show child attributes
Defines the recurring period(s) when the resource is active. The periods should not overlap.
Show child attributes
Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time.
"12:00"
Integer array corresponding to the particular days of the week in which the resource is valid.
0 Sunday1 Monday2 Tuesday3 Wednesday4 Thursday5 Friday6 Saturday0, 1, 2, 3, 4, 5, 6 Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time.
"14:00"
A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the start_date and expiration_date using the Disable Campaign endpoint.
true indicates an active campaignfalse indicates an inactive campaignUnique category ID that this campaign belongs to.
"cat_0b688929a2476386a6"
The type of the object represented by the campaign object. This object stores information about the campaign.
Promotion tier's parent campaign's unique ID.
A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the start_date and expiration_date.
true indicates an active promotion tierfalse indicates an inactive promotion tierActivation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is inactive before this date.
"2022-09-23T00:00:00.000Z"
Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is inactive after this date.
"2022-09-26T00:00:00.000Z"
Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.start_date required when including the validity_timeframe.
Show child attributes
Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a duration of PT1H will be valid for a duration of one hour.
"PT1H"
Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an interval of P2D will be valid every other day.
"P2D"
Integer array corresponding to the particular days of the week in which the voucher is valid.
0 Sunday1 Monday2 Tuesday3 Wednesday4 Thursday5 Friday6 Saturday0, 1, 2, 3, 4, 5, 6 Determines the hours of validity, e.g. to create a happy hours scenario.
Show child attributes
Defines the recurring period(s) when the resource is active. The periods should not overlap.
Show child attributes
Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time.
"12:00"
Integer array corresponding to the particular days of the week in which the resource is valid.
0 Sunday1 Monday2 Tuesday3 Wednesday4 Thursday5 Friday6 Saturday0, 1, 2, 3, 4, 5, 6 Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time.
"14:00"
Contains statistics about promotion tier redemptions and orders.
Show child attributes
The type of the object represented by JSON. This object stores information about the promotion tier.
Validation Rule Assignments List
Show child attributes
The type of the object represented by JSON. This object stores information about validation rule assignments.
Identifies the name of the JSON property that contains the array of validation rule assignments.
A dictionary that contains an array of validation rule assignments.
Show child attributes
Validation rule assignment ID.
"asgm_74F7QZoYbUoljwQO"
Validation rule ID.
"val_4j7DCRm2IS59"
The resource ID to which the validation rule was assigned.
"v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT"
The type of resource to which the validation rule was assigned.
voucher, campaign, earning_rule, reward_assignment, promotion_tier, distribution Timestamp representing the date and time when the validation rule assignment was created. The value is shown in the ISO 8601 format.
"2022-02-17T08:18:15.085Z"
The type of the object represented by the ID.
validation_rules_assignment Total number of validation rule assignments.
Promotion tier category ID.
"cat_0c9da30e7116ba6bba"
Show child attributes
Unique category ID assigned by Voucherify.
Category name.
Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
x >= 0The type of the object represented by the JSON. This object stores information about the category.
category Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.
"2022-07-14T10:45:13.156Z"
Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.
"2022-08-16T10:52:08.094Z"
Show child attributes
Simplified customer data.
Show child attributes
Unique identifier of an existing customer. It is assigned by Voucherify.
Customer's first and last name.
Customer's email address.
A unique identifier of the customer. It can be a customer ID or email from a CRM system, database, or a third-party service.
A set of custom key/value pairs that are attached to the customer. It stores all custom attributes assigned to the customer.
The type of the object represented by JSON.
customer Unique reward assignment ID assigned by Voucherify.
This is an object representing a voucher with categories and validation rules assignments.
Show child attributes
Assigned by the Voucherify API, identifies the voucher.
"v_mkZN9v7vjYUadXnHrMza8W5c34fE5KiV"
A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters.
"WVPblOYX"
A unique campaign name, identifies the voucher's parent campaign.
"Gift Card Campaign"
Assigned by the Voucherify API, identifies the voucher's parent campaign.
"camp_FNYR4jhqZBM9xTptxDGgeNBV"
Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint.
Unique category ID assigned by Voucherify.
"cat_0bb343dee3cdb5ec0c"
Defines the type of the voucher.
GIFT_VOUCHER, DISCOUNT_VOUCHER, LOYALTY_CARD Contains information about discount.
Show child attributes
Defines the type of the voucher.
AMOUNT Amount taken off the subtotal of a price. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000.
Formula used to dynamically calculate the discount.
Maximum discount amount per order.
Defines how the discount is applied to the customer's order.
APPLY_TO_ORDER, APPLY_TO_ITEMS, APPLY_TO_ITEMS_PROPORTIONALLY, APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY, APPLY_TO_ITEMS_BY_QUANTITY Flag indicating whether the discount was calculated using a formula.
Object representing gift parameters. Child attributes are present only if type is GIFT_VOUCHER. Defaults to null.
Show child attributes
Total gift card income over the lifetime of the card. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.
10000
Total amount of subtracted credits over the gift card lifetime. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.
Available funds. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.
500
Defines how the credits are applied to the customer's order.
APPLY_TO_ORDER, APPLY_TO_ITEMS Object representing loyalty card parameters. Child attributes are present only if type is LOYALTY_CARD. Defaults to null.
Show child attributes
Total number of points added to the loyalty card over its lifespan.
7000
Points available for reward redemption. This is calculated as follows: balance = points - expired_points - subtracted_points - redemption.redeemed_points.
6970
The next closest date when the next set of points are due to expire.
"2023-05-30"
The amount of points that are set to expire next.
Shows the number of pending points that will be added to the loyalty card when they are activated automatically or manually.
Shows the total number of expired points over the lifetime of the loyalty card.
Shows the total number of subtracted points over the lifetime of the loyalty card.
Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is inactive before this date.
"2021-12-01T00:00:00.000Z"
Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is inactive after this date.
"2021-12-31T00:00:00.000Z"
Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.start_date required when including the validity_timeframe.
Show child attributes
Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a duration of PT1H will be valid for a duration of one hour.
"PT1H"
Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an interval of P2D will be valid every other day.
"P2D"
Integer array corresponding to the particular days of the week in which the voucher is valid.
0 Sunday1 Monday2 Tuesday3 Wednesday4 Thursday5 Friday6 Saturday0, 1, 2, 3, 4, 5, 6 Determines the hours of validity, e.g. to create a happy hours scenario.
Show child attributes
Defines the recurring period(s) when the resource is active. The periods should not overlap.
Show child attributes
Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time.
"12:00"
Integer array corresponding to the particular days of the week in which the resource is valid.
0 Sunday1 Monday2 Tuesday3 Wednesday4 Thursday5 Friday6 Saturday0, 1, 2, 3, 4, 5, 6 Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time.
"14:00"
A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the start_date and expiration_date.
true indicates an active voucherfalse indicates an inactive voucherAn optional field to keep any extra textual information about the code such as a code description and details.
The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format.
Stores links to images of QR and barcode that correspond to an encrypted voucher code.
Show child attributes
Stores Quick Response (QR) representation of encrypted code.
Show child attributes
Encrypted voucher code ID.
"U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q=="
URL to QR code
Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.
size: integer value from 1 to 100format: string, either png (default) or svg"https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D"
Stores barcode representation of encrypted code.
Show child attributes
Encrypted voucher code ID.
"U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ=="
URL to barcode
Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.
size: integer value from 1 to 100format: string, either png (default) or svg"https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D"
Flag indicating whether this voucher is a referral code; true for campaign type REFERRAL_PROGRAM.
Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format.
"2021-12-22T10:13:06.487Z"
Timestamp representing the date and time when the voucher was last updated in ISO 8601 format.
"2021-12-22T10:14:45.316Z"
Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify.
"cust_eWgXlBBiY6THFRJwX45Iakv4"
Unique identifier of the referring person.
"cust_Vzck5i8U3OhcEUFY6MKhN9Rv"
The type of the object represented by JSON. Default is voucher.
Stores a summary of publication events: an event counter and endpoint to return details of each event. Publication is an assignment of a code to a customer, e.g. through a distribution.
Show child attributes
The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute.
Publication events counter.
0
The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/{voucher_code}/publications
"/v1/vouchers/WVPblOYX/publications?page=1&limit=10"
Stores a summary of redemptions that have been applied to the voucher.
Show child attributes
How many times a voucher can be redeemed. A null value means unlimited.
How many times a voucher has already been redeemed.
1
Total loyalty points redeemed.
100000
The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute.
The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/{voucher_code}/redemptions
"/v1/vouchers/WVPblOYX/redemptions?page=1&limit=10"
Contains details about the category.
Show child attributes
Unique category ID assigned by Voucherify.
Category name.
Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
x >= 0The type of the object represented by the JSON. This object stores information about the category.
category Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.
"2022-07-14T10:45:13.156Z"
Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.
"2022-08-16T10:52:08.094Z"
List of Validation Rules Assignments
Show child attributes
The type of the object represented by JSON. This object stores information about validation rules assignments.
list Identifies the name of the attribute that contains the array of validation rules assignments.
data Contains array of validation rules assignments.
Show child attributes
The unique identifier for a assignment
The unique identifier for a rule
The unique identifier for a related object
The type of related object
The type of the object represented by JSON.
validation_rules_assignment Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.
"2022-03-09T11:19:04.819Z"
Timestamp representing the date and time when the object was last updated in ISO 8601 format.
"2022-03-09T11:19:04.819Z"
The validation status of the assignment
VALID, PARTIALLY_VALID, INVALID The list of omitted rules
Total number of validation rules assignments.
x >= 0This is an object representing a product.
This entity should be used to map product items from your inventory management system. The aim of products is to build which reflect product-specific campaigns.
Show child attributes
Unique product ID assigned by Voucherify.
"prod_0b1da8105693710357"
Unique product source ID.
"productSourceID16"
Unique user-defined product name.
"T-shirt"
Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as $100.00 being expressed as 10000.
A list of product attributes whose values you can customize for given SKUs: ["color","size","ranking"]. Each child SKU can have a unique value for a given attribute.
The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.
The type of the object represented by JSON. This object stores information about the product.
product The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image.
"https://images.com/original.jpg"
Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format.
"2022-05-23T06:52:55.008Z"
Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format.
"2022-05-23T09:24:07.405Z"
Contains information about child SKUs.
Show child attributes
The type of the object represented by JSON. This object stores information about SKUs.
Identifies the name of the JSON property that contains the array of SKUs.
A dictionary that contains an array of SKUs.
Show child attributes
A unique identifier that represents the SKU and is assigned by Voucherify.
"sku_0b1621b319d248b79f"
A unique SKU identifier from your inventory system.
"sku_source_id_4"
The parent product's unique ID.
"prod_0b15f6b9f650c16990"
Unique user-defined SKU name.
"Large Pink Shirt"
Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as $100.00 being expressed as 10000.
The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family.
The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image.
The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.
Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format.
"2022-05-17T10:36:30.187Z"
Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format.
"2022-05-17T10:55:09.137Z"
The type of the object represented by JSON. This object stores information about the SKU.
sku SKU price currency.
"USD"
Total number of SKUs in the product.
This is an object representing a product SKU.
Show child attributes
A unique identifier that represents the SKU and is assigned by Voucherify.
"sku_0b1621b319d248b79f"
A unique SKU identifier from your inventory system.
"sku_source_id_4"
The parent product's unique ID.
"prod_0b15f6b9f650c16990"
Unique user-defined SKU name.
"Large Pink Shirt"
Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as $100.00 being expressed as 10000.
The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family.
The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image.
The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.
Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format.
"2022-05-17T10:36:30.187Z"
Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format.
"2022-05-17T10:55:09.137Z"
The type of the object represented by JSON. This object stores information about the SKU.
sku SKU price currency.
"USD"
Unique loyalty tier ID assigned by Voucherify.
Unique reward ID.
"rew_0bc92f81a6801f9bca"
Name of the reward.
"Reward Name"
The type of the object represented by the JSON
reward Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.
"2021-12-22T10:13:06.487Z"
Timestamp in ISO 8601 format indicating when the reward was updated.
"2022-10-03T12:24:58.008Z"
These are parameters representing a material reward.
Show child attributes
Defines the product redeemed as a reward.
Show child attributes
Campaign unique ID.
"camp_13BbZ0kQsNinhqsX3wUts2UP"
Points available for reward redemption. This is calculated as follows: balance = points - expired_points - subtracted_points - redemption.redeemed_points.
Defines the type of the campaign.
Defines the product redeemed as a reward.
Defines the ratio by mapping the number of loyalty points in points_ratio to a predefined cash amount in exchange_ratio.
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.
Reward type.
CAMPAIGN, COIN, MATERIAL Contains the amount returned to the gift card in the redemption rollback. It is expressed as a negative integer.
Show child attributes
Amount returned to the gift card as a result of the redemption rollback and expressed as a negative integer. The amount is expressed as the smallest currency unit (e.g. -100 cents for $1.00 returned).
Contains the number of points returned to the loyalty card in the reward redemption rollback. It is expressed as a negative integer.
Show child attributes
Number of points being returned to the loyalty card for the reward redemption rollback. It is expressed as a negative integer.
Was this page helpful?