younifyd
Menu

List Rewards

List Rewards

GET/v1/rewards

Use it in a workflow

  1. Add a step and choose the Voucherify connector.
  2. Pick the List Rewards action (under Rewards).
  3. Fill in the fields below, then reference the result from later steps as {{listRewards.response.data}}.

Request

Query parameters

limitinteger

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.

pageinteger

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

assignment_idstring

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

Response

Returns 200 with an object. Read it in later steps with {{listRewards.response.data.<field>}}.

objectstring

The type of the object represented by JSON.

Default "list"

data_refstring

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

Default "data"

dataarray<object>

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

idstring

Unique reward ID, assigned by Voucherify.

namestring

Reward name.

stockinteger

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

Defines the number of already invoked (successful) reward redemptions.

attributesobject2 fields

These properties are configurable for **material rewards**.

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.

One ofCAMPAIGNCOINMATERIAL

parametersany

Defines how the reward is generated.

created_atstring (date-time)

Timestamp representing the date and time when the reward was created. The value is shown in the ISO 8601 format.

updated_atstring (date-time)

Timestamp representing the date and time when the reward was updated. The value is shown in the ISO 8601 format.

objectenumrequired

The type of the object represented by the JSON. This object stores information about the reward.

One ofrewardDefault "reward"

totalinteger

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

json
{
  "object": "list",
  "data_ref": "data",
  "data": [
    {
      "object": "reward",
      "id": "rew_nIy4gHpQHle2c3pNMwuj7G6j",
      "name": "string",
      "stock": 0,
      "redeemed": 0,
      "attributes": {
        "image_url": "string",
        "description": "string"
      },
      "metadata": {},
      "type": "CAMPAIGN",
      "parameters": null,
      "created_at": "2022-08-11T14:49:22.586Z",
      "updated_at": "2022-08-11T16:01:34.885Z"
    }
  ],
  "total": 20
}

Need more? See the Voucherify guide for connection setup and behaviour shared by every action.