younifyd
Menu

Get Reward

Get Reward

GET/v1/rewards/{rewardId}

Use it in a workflow

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

Request

Path parameters

rewardIdstringrequired

A unique reward ID.

Response

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

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.

attributesobject

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

image_urlstring

The HTTPS URL pointing to the .png or .jpg file.

descriptionstring

An arbitrary string that you can attach to a material reward.

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.

objectenum

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

One ofrewardDefault "reward"

json
{
  "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"
}

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