Skip to main content
GET
/
v1
/
loyalties
/
{campaignId}
/
rewards
List Reward Assignments
curl --request GET \
  --url https://{cluster}.voucherify.io/v1/loyalties/{campaignId}/rewards \
  --header 'Authorization: Bearer <token>' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
  "object": "list",
  "data_ref": "data",
  "data": [
    {
      "id": "rewa_6VSWcXjfm5PuZlfeuZxl5JZT",
      "reward_id": "rew_pjJKIZgjIopIPZyibEAt7oPk",
      "related_object_id": "camp_7s3uXI44aKfIk5IhmeOPr6ic",
      "related_object_type": "campaign",
      "created_at": "2022-08-30T08:24:32.171Z",
      "updated_at": null,
      "object": "reward_assignment"
    },
    {
      "id": "rewa_7gFZsNg8oiry63FtzML0N52R",
      "reward_id": "rew_BUfchmIo7pOR8GrZMw0vVL08",
      "related_object_id": "camp_7s3uXI44aKfIk5IhmeOPr6ic",
      "related_object_type": "campaign",
      "parameters": {
        "loyalty": {
          "points": 3000000
        }
      },
      "created_at": "2022-05-13T11:14:58.146Z",
      "updated_at": null,
      "object": "reward_assignment"
    },
    {
      "id": "rewa_eAGhQSY4FS4T3q4zMkiarHoN",
      "reward_id": "rew_nIy4gHpQHle2c3pNMwuj7G6j",
      "related_object_id": "camp_7s3uXI44aKfIk5IhmeOPr6ic",
      "related_object_type": "campaign",
      "parameters": {
        "loyalty": {
          "points": 100
        }
      },
      "created_at": "2022-02-28T11:56:55.241Z",
      "updated_at": null,
      "object": "reward_assignment"
    }
  ],
  "total": 3
}

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.

Path Parameters

campaignId
string
required

Unique campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.

Example:

"camp_rRsfatlwN7unSeUIJDCYedal"

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.

Example:

"rewa_m9hEAu10KsPcLhGXiHG85aY0"

Response

200 - application/json

Returns a dictionary with reward assignment objects.

Response body schema for GET v1/loyalties/{campaignId}/rewards.

object
enum<string>
default:list

The type of the object represented by JSON. This object stores information about loyalty reward assignments in a dictionary.

Available options:
list
data_ref
string
default:data

Identifies the name of the attribute that contains the array of reward assignment objects.

data
Reward Assignment · object[]

Contains array of reward assignment objects.

total
integer

Total number of reward assignment objects.

I