Skip to main content
GET
/
v1
/
rewards
List 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
}

Authorizations

X-App-Id
string
header
required
X-App-Token
string
header
required
Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Query Parameters

limit
integer

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.

Required range: 1 <= x <= 100
page
integer

Which page of results to return. The lowest value is 1.

Required range: 1 <= x <= 100
assignment_id
string

A unique reward assignment ID. Use this parameter to get the reward details in the context of an assignment ID.

Example:

"rewa_m9hEAu10KsPcLhGXiHG85aY0"

Response

200 - application/json

Returns a dictionary of reward objects.

Response body schema for GET v1/rewards.

object
string
default:list
required

The type of the object represented by JSON.

data_ref
string
default:data
required

Identifies the name of the attribute that contains the array of transaction objects.

data
Reward · object[]
required

A dictionary that contains an array of rewards. Each entry in the array is a separate transaction object.

total
integer
required

Returns how many rewards in the project meet the limits defined by the query parameter definitions.

Example:

20

I