The reward object

This entity describes a reward.

AttributeDescriptionExample
id stringrew_vbb1afhXu5c1e2t2bwKqR9a6
object stringThe type of the object represented by JSON. The value is reward.
name string5$ discount
created_at string, ISO 8601 date format2016-11-16T14:14:31Z
type stringDefines the reward type:
- MATERIAL (products as rewards),
- CAMPAIGN (digital rewards like coupons, gift credits),
- COIN (pay-with-points reward)
parameters objectAn object that defines how the reward is generated.If reward type is campaign:
"parameters": { "campaign": { "id": "camp_XowjJAe1wakCYZHWBbr4dKbw" } }

If reward type is coin:
"parameters": { "coin": { "exchange_ratio": 0.01, "points_ratio": 1 } }

If reward type is material:
"parameters": { "product": { "id": "prod_ZrP5jovC31FU8a" } }
stock stringConfigurable for material rewards. Defines the total number of the product that you want to share as reward in your loyalty campaigns. "stock": "70"
redeemed stringDefines number of already invoked (successful) reward redemptions. "redeemed": "2"
attributes objectConfigurable for material rewards. Defines the reward attributes:
- description
- image_url
"attributes": { "image_url": "", "description": "Free Headphones, series 265-ER352" }

Example List Rewards responses for the different reward types:

{
  "id": "rew_736aO2cI1cgUpItFA4lSV8b9",
  "name": "Headphones - Reward",
  "type": "MATERIAL",
  "parameters": {
    "product": {
      "id": "prod_3ttSkdxGuAfcv3"
    }
  },
  "stock": "70",
  "redeemed": "2",
  "attributes": {
    "image_url": "",
    "description": "Free Headphones, series 265-ER352"
  },
  "created_at": "2021-02-09T13:58:20.194Z",
  "updated_at": "2021-02-24T13:09:17.148Z",
  "object": "reward"
}
{
  "id": "rew_ApxE9MMnKi1g6FhD7pHRZpwh",
  "name": "Pay with points - $50",
  "type": "COIN",
  "parameters": {
    "coin": {
      "exchange_ratio": 50,
      "points_ratio": 2000
    }
  },
  "stock": null,
  "redeemed": null,
  "attributes": {},
  "created_at": "2021-02-15T13:28:50.936Z",
  "updated_at": null,
  "object": "reward"
}
{
  "id": "rew_mnwXcVMuyRwmzxQH0o78cBWt",
  "name": "40 USD",
  "type": "CAMPAIGN",
  "parameters": {
    "campaign": {
      "id": "camp_S4ckmZjNvFHHHVqyzNVslnVG",
      "type": "DISCOUNT_COUPONS"
    }
  },
  "stock": null,
  "redeemed": null,
  "attributes": {},
  "created_at": "2020-10-28T18:04:07.982Z",
  "updated_at": null,
  "object": "reward"
}