Reward Object

Reward

AttributesDescription
id
string

Unique reward ID, assigned by Voucherify.

Example:

rew_nIy4gHpQHle2c3pNMwuj7G6j

name
string

Reward name.

stock
integer, null

Configurable for material rewards. The number of units of the product that you want to share as reward.

redeemed
integer, null

Defines the number of already invoked (successful) reward redemptions.

attributes
object

These properties are configurable for material rewards.

AttributesDescription
image_url
string

The HTTPS URL pointing to the .png or .jpg file.

description
string

An arbitrary string that you can attach to a material reward.

metadata
object

The metadata object stores all custom attributes assigned to the reward. A set of key/value pairs that you can attach to a reward object. It can be useful for storing additional information about the reward in a structured format.

type
string

Reward type.

Available values: CAMPAIGN, COIN, MATERIAL
parameters

Defines how the reward is generated.

Reward type
created_at
string

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

Example:

2022-08-11T14:49:22.586Z

updated_at
string, null

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

Example:

2022-08-11T16:01:34.885Z

object

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

Available values: reward

Reward type

One of:

Digital, Pay with Points, Material

Digital

AttributesDescription
campaign
object

Objects stores information about the campaign related to the reward.

AttributesDescription
id
string

Unique campaign ID, assigned by Voucherify.

balance
integer

The number of points to be added to a loyalty card or the amount to be added to the current balance on the gift card.

For gift cards, the value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000.

type
string

Campaign type.

Available values: DISCOUNT_COUPONS, GIFT_VOUCHERS, LOYALTY_PROGRAM

Pay with Points

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

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.

Material

AttributesDescription
product
object

Contains information about the product given as a reward.

AttributesDescription
id
string

Unique product ID, assigned by Voucherify.

Example:

prod_0b7d7dfb05cbe5c616

sku_id
string, null

Unique SKU ID, assigned by Voucherify, of the SKU given as a reward.

Example:

sku_0b7d7dfb090be5c619