Rollback Redemption Object

Redemption Rollback

AttributesDescription
id
string

Unique identifier of the redemption rollback.

Example:

rr_0efeb3dab05e62e599

object
string

The type of the object represented by the JSON

Available values: redemption_rollback
date
string

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

customer_id
string, null

Unique customer ID of the redeeming customer.

Example:

cust_i8t5Tt6eiKG5K79KQlJ0Vs64

tracking_id
string, null

Hashed customer source ID.

metadata
object, null

The metadata object stores all custom attributes assigned to the redemption.

amount
integer

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.

Example:

-10000

redemption
string, null

Unique redemption ID of the parent redemption.

Example:

r_0c656311b5878a2031

reason
string

System generated cause for the redemption being invalid in the context of the provided parameters.

result
string

Redemption result.

Available values: SUCCESS, FAILURE
status
string

Redemption status.

Available values: SUCCEEDED, FAILED
related_redemptions
object
AttributesDescription
rollbacks
array
Array of:

Redemption Rollback Related Redemptions Rollbacks Item

AttributesDescription
id
string

Unique identifier of the redemption rollback.

Example:

rr_0bc92f81a6801f9bca

date
string

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

redemptions
array
Array of:

Redemption Rollback Related Redemptions Item

AttributesDescription
id
string

Unique redemption ID.

Example:

r_0bc92f81a6801f9bca

date
string

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.

orderOrder Calculated No Customer Data
channel
object

Defines the details of the channel through which the redemption was issued.

AttributesDescription
channel_id
string

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_type
string

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
customerSimple Customer
related_object_type
string

Defines the related object.

Available values: voucher, promotion_tier, redemption
related_object_id
string

Unique identifier of the related object. It is assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher.

voucher

Defines the details of the voucher being originally redeemed.

Voucher
promotion_tier

Contains details of the promotion tier and the parent campaign.

Promotion Tier
rewardSee: Redemption Reward Result
gift
object

Contains the amount returned to the gift card in the redemption rollback. It is expressed as a negative integer.

AttributesDescription
amount
integer

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).

loyalty_card
object

Contains the number of points returned to the loyalty card in the reward redemption rollback. It is expressed as a negative integer.

AttributesDescription
points
integer

Number of points being returned to the loyalty card for the reward redemption rollback. It is expressed as a negative integer.

Order Calculated No Customer Data

AttributesDescription
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
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

updated_at
string, null

Timestamp representing the date and time when the order was last updated in ISO 8601 format.

Example:

2021-12-22T10:14:45.316Z

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

customerCustomer Id
referrerReferrer Id
redemptions
object
AttributesDescription
[propertyName]See: Order Redemptions

Simple Customer

AttributesDescription
id
string

Unique identifier of an existing customer. It is assigned by Voucherify.

name
string

Customer's first and last name.

email
string

Customer's email address.

source_id
string

A unique identifier of the customer. It can be a customer ID or email from a CRM system, database, or a third-party service.

metadata
object

A set of custom key/value pairs that are attached to the customer. It stores all custom attributes assigned to the customer.

object
string

The type of the object represented by JSON.

Available values: customer

Voucher

This is an object representing a voucher with categories and validation rules assignments.

All of:

  1. Voucher Base
  2. AttributesDescription
    categories
    array

    Contains details about the category.

    Array of Category
    validation_rules_assignmentsSee: Validation Rules Assignments List

Promotion Tier

AttributesDescription
id
string

Unique promotion tier ID.

Example:

promo_63fYCt81Aw0h7lzyRkrGZh9p

created_at
string

Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format.

Example:

2021-12-15T11:34:01.333Z

updated_at
string

Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format.

Example:

2022-02-09T09:20:05.603Z

name
string

Name of the promotion tier.

banner
string

Text to be displayed to your customers on your website.

action
object

Contains details about the discount applied by the promotion tier.

AttributesDescription
discountSee: Discount
metadata
object

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.

hierarchy
integer

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_id
string

Promotion unique ID.

campaign
object

Contains details about promotion tier's parent campaign.

AttributesDescription
id
string

Unique campaign ID.

start_date
string

Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive before this date.

Example:

2022-09-22T00:00:00.000Z

expiration_date
string

Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is inactive after this date.

Example:

2022-09-30T00:00:00.000Z

validity_timeframeSee: Validity Timeframe
validity_day_of_weekSee: Validity Day Of Week
validity_hoursSee: Validity Hours
active
boolean

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 campaign
  • false indicates an inactive campaign
category_id
string

Unique category ID that this campaign belongs to.

Example:

cat_0b688929a2476386a6

object
string

The type of the object represented by the campaign object. This object stores information about the campaign.

campaign_id
string

Promotion tier's parent campaign's unique ID.

active
boolean

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 tier
  • false indicates an inactive promotion tier
start_date
string

Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is inactive before this date.

Example:

2022-09-23T00:00:00.000Z

expiration_date
string

Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is inactive after this date.

Example:

2022-09-26T00:00:00.000Z

validity_timeframeSee: Validity Timeframe
validity_day_of_weekSee: Validity Day Of Week
validity_hoursSee: Validity Hours
summary
object

Contains statistics about promotion tier redemptions and orders.

AttributesDescription
redemptions
object

Contains statistics about promotion tier redemptions.

AttributesDescription
total_redeemed
integer

Number of times the promotion tier was redeemed.

orders
object

Contains statistics about orders related to the promotion tier.

AttributesDescription
total_amount
integer

Sum of order totals.

total_discount_amount
integer

Sum of total discount applied using the promotion tier.

object
string

The type of the object represented by JSON. This object stores information about the promotion tier.

validation_rule_assignmentsSee: Validation Rule Assignments List
category_id
string

Promotion tier category ID.

Example:

cat_0c9da30e7116ba6bba

categories
array
Array of Category

Redemption Reward Result

AttributesDescription
customerSimple Customer
assignment_id
string, null

Unique reward assignment ID assigned by Voucherify.

voucherVoucher
productProduct
skuSKU Object
loyalty_tier_id
string, null

Unique loyalty tier ID assigned by Voucherify.

id
string

Unique reward ID.

Example:

rew_0bc92f81a6801f9bca

name
string

Name of the reward.

Example:

Reward Name

object
string

The type of the object represented by the JSON

Available values: reward
created_at
string

Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

updated_at
string

Timestamp in ISO 8601 format indicating when the reward was updated.

Example:

2022-10-03T12:24:58.008Z

parameters
object

These are parameters representing a material reward.

AttributesDescription
campaign
object

Defines the product redeemed as a reward.

AttributesDescription
id
string

Campaign unique ID.

Example:

camp_13BbZ0kQsNinhqsX3wUts2UP

balance
integer

Points available for reward redemption.

type
string

Defines the type of the campaign.

product
object

Defines the product redeemed as a reward.

AttributesDescription
id
string

Unique product ID, assigned by Voucherify.

Example:

prod_0b7d7dfb05cbe5c616

sku_id
string

Unique identifier of the SKU. It is assigned by Voucherify.

Example:

sku_0a41e31c7b41c28358

coin
object

Defines the ratio by mapping the number of loyalty points in points_ratio to a predefined cash amount in exchange_ratio.

AttributesDescription
exchange_ratio
integer

The cash equivalent of the points defined in the points_ratio property.

points_ratio
integer

The number of loyalty points that will map to the predefined cash amount defined by the exchange_ratio property.

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

AttributesDescription
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.

AttributesDescription
id
string

A unique identifier that represents the product and is assigned by Voucherify.

source_id
string

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.

override
boolean

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.

name
string

Product name.

metadata
object

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.

price
number

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.

AttributesDescription
id
string

A unique identifier that represents the SKU and is assigned by Voucherify.

source_id
string

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.

override
boolean

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.

sku
string

The SKU name.

price
number

SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

metadata
object

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

AttributesDescription
id
string

A unique identifier of an existing customer.

object
string

The type of the object represented by JSON.

Available values: customer

Referrer Id

Customer Id

Order Redemptions

AttributesDescription
date
string

Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.

Example:

2022-09-02T17:06:56.649Z

rollback_id
string

Unique ID of the redemption rollback.

Example:

rr_0c63c84eb78ee0a6c0

rollback_date
string

Timestamp representing the date and tiem when the redemption rollback was created. The value is shown in the ISO 8601 format.

Example:

2023-01-31T14:18:37.150Z

related_object_type
string

The source of the incentive.

related_object_id
string

Unique ID of the parent redemption.

Example:

r_0ba186c4824e4881e1

related_object_parent_id
string

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.

stacked
array

Contains a list of unique IDs of child redemptions, which belong to the stacked incentives.

rollback_stacked
array

Lists the rollback redemption IDs of the particular child redemptions.

Voucher Base

AttributesDescription
id
string

Assigned by the Voucherify API, identifies the voucher.

Example:

v_mkZN9v7vjYUadXnHrMza8W5c34fE5KiV

code
string

A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters.

Example:

WVPblOYX

campaign
string

A unique campaign name, identifies the voucher's parent campaign.

Example:

Gift Card Campaign

campaign_id
string

Assigned by the Voucherify API, identifies the voucher's parent campaign.

Example:

camp_FNYR4jhqZBM9xTptxDGgeNBV

category
string

Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint.

category_id
string

Unique category ID assigned by Voucherify.

Example:

cat_0bb343dee3cdb5ec0c

type
string

Defines the type of the voucher.

Available values: GIFT_VOUCHER, DISCOUNT_VOUCHER, LOYALTY_CARD
discountSee: Discount
gift
object

Object representing gift parameters. Child attributes are present only if type is GIFT_VOUCHER. Defaults to null.

AttributesDescription
amount
integer

Total gift card income over the lifetime of the card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000.

Example:

10000

balance
integer

Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000.

Example:

500

effect
string

Defines how the credits are applied to the customer's order.

Available values: APPLY_TO_ORDER, APPLY_TO_ITEMS
loyalty_card
object

Object representing loyalty card parameters. Child attributes are present only if type is LOYALTY_CARD. Defaults to null.

AttributesDescription
points
integer

Total points incurred over the lifespan of the loyalty card.

Example:

7000

balance
integer

Points available for reward redemption.

Example:

6970

next_expiration_date
string

The next closest date when the next set of points are due to expire.

Example:

2023-05-30

next_expiration_points
integer

The amount of points that are set to expire next.

start_date
string

Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is inactive before this date.

Example:

2021-12-01T00:00:00.000Z

expiration_date
string

Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is inactive after this date.

Example:

2021-12-31T00:00:00.000Z

validity_timeframeSee: Validity Timeframe
validity_day_of_weekSee: Validity Day Of Week
validity_hoursSee: Validity Hours
active
boolean, null

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 voucher
  • false indicates an inactive voucher
additional_info
string

An optional field to keep any extra textual information about the code such as a code description and details.

metadata
object

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.

assetsSee: Voucher Assets
is_referral_code
boolean, null

Flag indicating whether this voucher is a referral code; true for campaign type REFERRAL_PROGRAM.

created_at
string

Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

updated_at
string

Timestamp representing the date and time when the voucher was last updated in ISO 8601 format.

Example:

2021-12-22T10:14:45.316Z

holder_id
string

Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify.

Example:

cust_eWgXlBBiY6THFRJwX45Iakv4

referrer_id
string

Unique identifier of the referring person.

Example:

cust_Vzck5i8U3OhcEUFY6MKhN9Rv

object
string

The type of the object represented by JSON. Default is voucher.

publish
object

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.

AttributesDescription
object
string

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.

count
integer

Publication events counter.

Example:

0

url
string

The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/{voucher_code}/publications

Example:

/v1/vouchers/WVPblOYX/publications?page=1&limit=10

redemption
object

Stores a summary of redemptions that have been applied to the voucher.

AttributesDescription
quantity
integer

How many times a voucher can be redeemed. A null value means unlimited.

redeemed_quantity
integer

How many times a voucher has already been redeemed.

Example:

1

redeemed_points
integer

Total loyalty points redeemed.

Example:

100000

object
string

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.

url
string

The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/{voucher_code}/redemptions

Example:

/v1/vouchers/WVPblOYX/redemptions?page=1&limit=10

Category

AttributesDescription
id
string

Unique category ID assigned by Voucherify.

name
string

Category name.

hierarchy
integer

Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.

object
string

The type of the object represented by the JSON. This object stores information about the category.

Available values: category
created_at
string

Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.

Example:

2022-07-14T10:45:13.156Z

updated_at
string

Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.

Example:

2022-08-16T10:52:08.094Z

Validation Rules Assignments List

AttributesDescription
object
string

The type of the object represented by JSON. This object stores information about validation rules assignments.

Available values: list
data_ref
string

Identifies the name of the attribute that contains the array of validation rules assignments.

Available values: data
data
array

Contains array of validation rules assignments.

Array of Business Validation Rule Assignment
total
integer

Total number of validation rules assignments.

Discount

Contains information about discount.

One of:

Amount, Unit, Unit Multiple, Percent, Fixed

Validity Timeframe

AttributesDescription
duration
string

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.

Example:

PT1H

interval
string

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.

Example:

P2D

Validity Day Of Week

Integer array corresponding to the particular days of the week in which the voucher is valid.

  • 0 Sunday
  • 1 Monday
  • 2 Tuesday
  • 3 Wednesday
  • 4 Thursday
  • 5 Friday
  • 6 Saturday

Validity Hours

AttributesDescription
daily
array

Defines the reccuring period(s) when the resource is active. The periods should not overlap.

Array of:
AttributesDescription
start_time
string

Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time.

Example:

12:00

days_of_week
array

Integer array corresponding to the particular days of the week in which the resource is valid.

  • 0 Sunday
  • 1 Monday
  • 2 Tuesday
  • 3 Wednesday
  • 4 Thursday
  • 5 Friday
  • 6 Saturday
expiration_time
string

Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time.

Example:

14:00

Validation Rule Assignments List

AttributesDescription
object
string

The type of the object represented by JSON. This object stores information about validation rule assignments.

data_ref
string

Identifies the name of the JSON property that contains the array of validation rule assignments.

data
array

A dictionary that contains an array of validation rule assignments.

Array of Validation Rule Assignment
total
integer

Total number of validation rule assignments.

Product

This 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.

All of:

  1. Product without Skus Object
  2. AttributesDescription
    skusSee: Skus List For Product

SKU Object

AttributesDescription
id
string

A unique identifier that represents the SKU and is assigned by Voucherify.

Example:

sku_0b1621b319d248b79f

source_id
string, null

A unique SKU identifier from your inventory system.

Example:

sku_source_id_4

product_id
string

The parent product's unique ID.

Example:

prod_0b15f6b9f650c16990

sku
string, null

Unique user-defined SKU name.

Example:

Large Pink Shirt

price
integer, null

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.

currency
string, null

SKU price currency.

Example:

USD

attributes
object

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.

image_url
string, null

The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image.

metadata
object

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.

created_at
string

Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format.

Example:

2022-05-17T10:36:30.187Z

updated_at
string, null

Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format.

Example:

2022-05-17T10:55:09.137Z

object
string

The type of the object represented by JSON. This object stores information about the SKU.

Available values: sku

Voucher Assets

AttributesDescription
qr
object

Stores Quick Response (QR) representation of encrypted code.

AttributesDescription
id
string

Encrypted voucher code ID.

Example:

U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q==

url
string

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 100
  • format: string, either png (default) or svg
Example:

https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D

barcode
object

Stores barcode representation of encrypted code.

AttributesDescription
id
string

Encrypted voucher code ID.

Example:

U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ==

url
string

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 100
  • format: string, either png (default) or svg
Example:

https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D

Business Validation Rule Assignment

AttributesDescription
id
string

The unique identifier for a assignment

rule_id
string

The unique identifier for a rule

related_object_id
string

The unique identifier for a related object

related_object_type
string

The type of related object

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

updated_at
string

Timestamp representing the date and time when the object was last updated in ISO 8601 format.

Example:

2022-03-09T11:19:04.819Z

object
string

The type of the object represented by JSON.

Available values: validation_rules_assignment
validation_status
string

The validation status of the assignment

Available values: VALID, PARTIALLY_VALID, INVALID
validation_omitted_rules
array

The list of omitted rules

Amount

AttributesDescription
type
string

Defines the type of the voucher.

Available values: AMOUNT
amount_off
number

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.

amount_off_formula
string
aggregated_amount_limit
integer

Maximum discount amount per order.

effect

Defines how the discount is applied to the customer's order.

Discount Amount Vouchers Effect Types
is_dynamic
boolean

Flag indicating whether the discount was calculated using a formula.

Unit

AttributesDescription
type
string

Discount type.

Available values: UNIT
unit_off
integer

Number of units to be granted a full value discount.

unit_off_formula
string
effect

Defines how the unit is added to the customer's order.

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
skuSee: Simple Sku Discount Unit
is_dynamic
boolean

Flag indicating whether the discount was calculated using a formula.

Unit Multiple

AttributesDescription
type
string

Discount type.

Available values: UNIT
effect
string

Defines how the discount is applied to the customer's order.

Available values: ADD_MANY_ITEMS
units
array
Array of One Unit

Percent

AttributesDescription
type
string

Defines the type of the voucher.

Available values: PERCENT
percent_off
number

The percent discount that the customer will receive.

percent_off_formula
string
amount_limit
number

Upper limit allowed to be applied as a discount. 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.

effect

Defines how the discount is applied to the customer's order.

Discount Percent Vouchers Effect Types
is_dynamic
boolean

Flag indicating whether the discount was calculated using a formula.

Fixed

AttributesDescription
type
string

Defines the type of the voucher.

Available values: FIXED
fixed_amount
number

Sets a fixed value for an order total or the item price. The value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000. If the fixed amount is calculated by the formula, i.e. the fixed_amount_formula parameter is present in the fixed amount definition, this value becomes the fallback value. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value.

fixed_amount_formula
string
effect

Defines how the discount is applied to the customer's order.

Discount Fixed Vouchers Effect Types
is_dynamic
boolean

Flag indicating whether the discount was calculated using a formula.

Validation Rule Assignment

AttributesDescription
id
string

Validation rule assignment ID.

Example:

asgm_74F7QZoYbUoljwQO

rule_id
string

Validation rule ID.

Example:

val_4j7DCRm2IS59

related_object_id
string

The resource ID to which the validation rule was assigned.

Example:

v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT

related_object_type
string

The type of resource to which the validation rule was assigned.

Available values: voucher, campaign, earning_rule, reward_assignment, promotion_tier, distribution
created_at
string

Timestamp representing the date and time when the validation rule assignment was created. The value is shown in the ISO 8601 format.

Example:

2022-02-17T08:18:15.085Z

object
string

The type of the object represented by the ID.

Available values: validation_rules_assignment

Product without Skus Object

AttributesDescription
id
string

Unique product ID assigned by Voucherify.

Example:

prod_0b1da8105693710357

source_id
string, null

Unique product source ID.

Example:

productSourceID16

name
string, null

Unique user-defined product name.

Example:

T-shirt

price
integer, null

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.

attributes
array

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.

metadata
object

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.

image_url
string, null

The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image.

Example:

https://images.com/original.jpg

created_at
string

Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format.

Example:

2022-05-23T06:52:55.008Z

updated_at
string, null

Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format.

Example:

2022-05-23T09:24:07.405Z

object
string

The type of the object represented by JSON. This object stores information about the product.

Available values: product

Skus List For Product

AttributesDescription
object
string

The type of the object represented by JSON. This object stores information about SKUs.

data_ref
string

Identifies the name of the JSON property that contains the array of SKUs.

data
array

A dictionary that contains an array of SKUs.

Array of SKU Object
total
integer

Total number of SKUs in the product.

Discount Amount Vouchers Effect Types

Available values: APPLY_TO_ORDER, APPLY_TO_ITEMS, APPLY_TO_ITEMS_PROPORTIONALLY, APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY, APPLY_TO_ITEMS_BY_QUANTITY

Discount Unit Vouchers Effect Types

Available values: ADD_MISSING_ITEMS, ADD_NEW_ITEMS, ADD_MANY_ITEMS

Simple Product Discount Unit

AttributesDescription
id
string

Unique product ID, assigned by Voucherify.

source_id
string

Product's source ID.

name
string

Product name.

Simple Sku Discount Unit

AttributesDescription
id
string

Unique SKU ID, assigned by Voucherify.

source_id
string

Product variant's source ID.

name
string

Sku name

One Unit

AttributesDescription
unit_off
number

Number of units to be granted a full value discount.

unit_off_formula
string
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
sku

Contains information about the sku.

Simple Sku Discount Unit

Discount Percent Vouchers Effect Types

Available values: APPLY_TO_ORDER, APPLY_TO_ITEMS

Discount Fixed Vouchers Effect Types

Available values: APPLY_TO_ORDER, APPLY_TO_ITEMS