Skip to main content
GET
/
v1
/
rewards
/
{rewardId}
Get Reward
curl --request GET \
  --url https://{cluster}.voucherify.io/v1/rewards/{rewardId} \
  --header 'Authorization: Bearer <token>' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
  "id": "rew_nIy4gHpQHle2c3pNMwuj7G6j",
  "name": "<string>",
  "stock": 123,
  "redeemed": 123,
  "attributes": {
    "image_url": "<string>",
    "description": "<string>"
  },
  "metadata": {},
  "type": "CAMPAIGN",
  "parameters": {
    "campaign": {
      "id": "<string>",
      "balance": 123,
      "type": "DISCOUNT_COUPONS"
    }
  },
  "created_at": "2022-08-11T14:49:22.586Z",
  "updated_at": "2022-08-11T16:01:34.885Z",
  "object": "reward"
}

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

rewardId
string
required

A unique reward ID.

Example:

"rew_2erjvECLs92GYzKbak3QkyTV"

Response

Returns a reward object if a valid identifier was provided.

id
string
required

Unique reward ID, assigned by Voucherify.

Example:

"rew_nIy4gHpQHle2c3pNMwuj7G6j"

name
string
required

Reward name.

stock
integer | null
required

Configurable for material rewards. The number of units of the product that you want to share as reward.

redeemed
integer | null
required

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

metadata
object
required

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.

type
enum<string>
required

Reward type.

Available options:
CAMPAIGN,
COIN,
MATERIAL
created_at
string<date-time>
required

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

Example:

"2022-08-11T14:49:22.586Z"

updated_at
string<date-time> | null
required

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

Example:

"2022-08-11T16:01:34.885Z"

object
enum<string>
default:reward
required

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

Available options:
reward
attributes
object

These properties are configurable for material rewards.

parameters
object

Defines how the reward is generated.

  • Digital
  • Pay with Points
  • Material
I