curl --request GET \
--url https://{cluster}.voucherify.io/v1/rewards \
--header 'Authorization: Bearer <token>' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"object": "list",
"data_ref": "data",
"data": [
{
"id": "rew_3e7IqghVtTR7L3xQMSCxjFu2",
"name": "Get $10",
"type": "CAMPAIGN",
"parameters": {
"campaign": {
"id": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
"balance": 1000,
"type": "GIFT_VOUCHERS"
}
},
"stock": null,
"redeemed": null,
"attributes": {},
"created_at": "2022-03-10T08:40:20.917Z",
"updated_at": "2022-08-17T07:52:56.965Z",
"metadata": null,
"object": "reward"
},
{
"id": "rew_nIy4gHpQHle2c3pNMwuj7G6j",
"name": "Get 100 Points",
"type": "CAMPAIGN",
"parameters": {
"campaign": {
"id": "camp_E87CubZLZ8eoQt3c4kAEZsx0",
"balance": 100,
"type": "LOYALTY_PROGRAM"
}
},
"stock": null,
"redeemed": null,
"attributes": {},
"created_at": "2022-02-28T11:56:13.764Z",
"updated_at": null,
"metadata": null,
"object": "reward"
},
{
"id": "rew_BNZ3van6AF2AiquWp8Lfw0xq",
"name": "30% discount",
"type": "CAMPAIGN",
"parameters": {
"campaign": {
"id": "camp_ZtHLATYVpItqmuSqmaz1rZ2Y",
"type": "DISCOUNT_COUPONS"
}
},
"stock": null,
"redeemed": null,
"attributes": {},
"created_at": "2022-08-11T09:48:50.609Z",
"updated_at": null,
"metadata": {},
"object": "reward"
},
{
"id": "rew_nlV8bgWU1jNO9YWQ7CdZmzq7",
"name": "1 point = $0.01",
"type": "COIN",
"parameters": {
"coin": {
"exchange_ratio": 0.01,
"points_ratio": 1
}
},
"stock": null,
"redeemed": null,
"attributes": {},
"created_at": "2022-08-11T16:45:21.582Z",
"updated_at": null,
"metadata": {
"Type": "0.01"
},
"object": "reward"
},
{
"id": "rew_x6FmF1KFdDs06hYPr9lK6ajf",
"name": "Material Reward",
"type": "MATERIAL",
"parameters": {
"product": {
"id": "prod_0b7d7dfb05cbe5c616",
"sku_id": "sku_0b7d7dfb090be5c619"
}
},
"stock": "4",
"redeemed": "1",
"attributes": {
"image_url": "https://voucherify-uploads.s3.amazonaws.com/org_2qt8DYlM/img_wJHdZUAVSpWtYM6ORq4up3I2.png",
"description": "Get a Comic Book in Archie's series."
},
"created_at": "2022-08-17T07:13:32.781Z",
"updated_at": null,
"metadata": {
"Type": "Personal"
},
"object": "reward"
}
],
"total": 5
}Retrieve rewards.
curl --request GET \
--url https://{cluster}.voucherify.io/v1/rewards \
--header 'Authorization: Bearer <token>' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"object": "list",
"data_ref": "data",
"data": [
{
"id": "rew_3e7IqghVtTR7L3xQMSCxjFu2",
"name": "Get $10",
"type": "CAMPAIGN",
"parameters": {
"campaign": {
"id": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
"balance": 1000,
"type": "GIFT_VOUCHERS"
}
},
"stock": null,
"redeemed": null,
"attributes": {},
"created_at": "2022-03-10T08:40:20.917Z",
"updated_at": "2022-08-17T07:52:56.965Z",
"metadata": null,
"object": "reward"
},
{
"id": "rew_nIy4gHpQHle2c3pNMwuj7G6j",
"name": "Get 100 Points",
"type": "CAMPAIGN",
"parameters": {
"campaign": {
"id": "camp_E87CubZLZ8eoQt3c4kAEZsx0",
"balance": 100,
"type": "LOYALTY_PROGRAM"
}
},
"stock": null,
"redeemed": null,
"attributes": {},
"created_at": "2022-02-28T11:56:13.764Z",
"updated_at": null,
"metadata": null,
"object": "reward"
},
{
"id": "rew_BNZ3van6AF2AiquWp8Lfw0xq",
"name": "30% discount",
"type": "CAMPAIGN",
"parameters": {
"campaign": {
"id": "camp_ZtHLATYVpItqmuSqmaz1rZ2Y",
"type": "DISCOUNT_COUPONS"
}
},
"stock": null,
"redeemed": null,
"attributes": {},
"created_at": "2022-08-11T09:48:50.609Z",
"updated_at": null,
"metadata": {},
"object": "reward"
},
{
"id": "rew_nlV8bgWU1jNO9YWQ7CdZmzq7",
"name": "1 point = $0.01",
"type": "COIN",
"parameters": {
"coin": {
"exchange_ratio": 0.01,
"points_ratio": 1
}
},
"stock": null,
"redeemed": null,
"attributes": {},
"created_at": "2022-08-11T16:45:21.582Z",
"updated_at": null,
"metadata": {
"Type": "0.01"
},
"object": "reward"
},
{
"id": "rew_x6FmF1KFdDs06hYPr9lK6ajf",
"name": "Material Reward",
"type": "MATERIAL",
"parameters": {
"product": {
"id": "prod_0b7d7dfb05cbe5c616",
"sku_id": "sku_0b7d7dfb090be5c619"
}
},
"stock": "4",
"redeemed": "1",
"attributes": {
"image_url": "https://voucherify-uploads.s3.amazonaws.com/org_2qt8DYlM/img_wJHdZUAVSpWtYM6ORq4up3I2.png",
"description": "Get a Comic Book in Archie's series."
},
"created_at": "2022-08-17T07:13:32.781Z",
"updated_at": null,
"metadata": {
"Type": "Personal"
},
"object": "reward"
}
],
"total": 5
}The access token received from the authorization server in the OAuth 2.0 flow.
Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
1 <= x <= 100Which page of results to return. The lowest value is 1.
1 <= x <= 100A unique reward assignment ID. Use this parameter to get the reward details in the context of an assignment ID.
"rewa_m9hEAu10KsPcLhGXiHG85aY0"
Returns a dictionary of reward objects.
Response body schema for GET v1/rewards.
The type of the object represented by JSON.
Identifies the name of the attribute that contains the array of transaction objects.
A dictionary that contains an array of rewards. Each entry in the array is a separate transaction object.
Show child attributes
Unique reward ID, assigned by Voucherify.
"rew_nIy4gHpQHle2c3pNMwuj7G6j"
Reward name.
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.
Defines the number of already invoked (successful) reward redemptions.
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.
Reward type.
CAMPAIGN, COIN, MATERIAL Timestamp representing the date and time when the reward was created. The value is shown in the ISO 8601 format.
"2022-08-11T14:49:22.586Z"
Timestamp representing the date and time when the reward was updated. The value is shown in the ISO 8601 format.
"2022-08-11T16:01:34.885Z"
The type of the object represented by the JSON. This object stores information about the reward.
reward Defines how the reward is generated.
Show child attributes
Objects stores information about the campaign related to the reward.
Show child attributes
Unique campaign ID, assigned by Voucherify.
Campaign type.
DISCOUNT_COUPONS, GIFT_VOUCHERS, LOYALTY_PROGRAM 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.
Returns how many rewards in the project meet the limits defined by the query parameter definitions.
20
Was this page helpful?