Reward
Attributes | Description |
---|---|
idstring | Unique reward ID, assigned by Voucherify.Example:rew_nIy4gHpQHle2c3pNMwuj7G6j |
namestring | Reward name. |
stockinteger , null | Configurable for material rewards. The number of units of the product that you want to share as a reward. Use this parameter to code a stock-taking logic. |
redeemedinteger , null | Defines the number of already invoked (successful) reward redemptions. |
attributesobject | These properties are configurable for material rewards.Attributes Descriptionimage_urlstring The HTTPS URL pointing to the .png or .jpg file. descriptionstring An arbitrary string that you can attach to a material reward. |
metadataobject | 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. |
typestring | Reward type.Available values: CAMPAIGN , COIN , MATERIAL |
parameters | Defines how the reward is generated.Reward type |
created_atstring | 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_atstring , 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, MaterialDigital
Attributes | Description |
---|---|
campaignobject | Objects stores information about the campaign related to the reward.Attributes Descriptionidstring Unique campaign ID, assigned by Voucherify. balanceinteger 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. typestring Campaign type. Available values: DISCOUNT_COUPONS, GIFT_VOUCHERS, LOYALTY_PROGRAM |
Pay with Points
Attributes | Description |
---|---|
coinobject | Defines the ratio by mapping the number of loyalty points in points_ratio to a predefined cash amount in exchange_ratio.Attributes Descriptionexchange_rationumber The cash equivalent of the points defined in the points_ratio property. points_ratiointeger The number of loyalty points that will map to the predefined cash amount defined by the exchange_ratio property. |
Material
Attributes | Description |
---|---|
productobject | Contains information about the product given as a reward.Attributes Descriptionidstring Unique product ID, assigned by Voucherify. Example: prod_0b7d7dfb05cbe5c616 sku_idstring, null Unique SKU ID, assigned by Voucherify, of the SKU given as a reward. Example: sku_0b7d7dfb090be5c619 |