Skip to main content
POST
Create Reward Assignment

Authorizations

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

Scopes

api

Gives access to whole server-side API.

rewards

Gives access to all endpoints and methods starting with /v1/rewards.

Path Parameters

rewardId
string
required

A unique reward ID.

Example:

"rew_2erjvECLs92GYzKbak3QkyTV"

Body

application/json

For digital, material, and pay-with-points rewards, provide the campaign ID and, when required, the loyalty points cost. For a LOYALTY_POINTS reward, provide related_object_type referral_tier and the referral tier ID.

Request body schema for POST v1/rewards/{rewardID}/assignments.

campaign
string
required

The campaign ID of the campaign to which the reward is to be assigned.

parameters
object
required

Defines the cost of the reward.

Response

Returns a reward assignment object.

Response body schema for POST v1/rewards/{rewardId}/assignments/.

id
string
required

Unique reward assignment ID, assigned by Voucherify.

Example:

"rewa_PbIRoMXpwe5QhobW4JKu0VjH"

reward_id
string
required

Associated reward ID.

Example:

"rew_C7wS9eHFDN4CIbXI5PpLSkGY"

created_at
string<date-time>
required

Timestamp representing the date and time when the reward assignment 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 assignment was updated. The value is shown in the ISO 8601 format.

Example:

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

object
enum<string>
default:reward_assignment
required

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

Available options:
reward_assignment

Related object ID to which the reward was assigned. For related_object_type campaign, this is the campaign ID. For referral_tier, this is the referral tier ID.

Example:

"camp_wciTvaOfYmAa3EmIIW3QpXXZ"

Related object type to which the reward was assigned. Use campaign for legacy loyalty campaign rewards. Use referral_tier for LOYALTY_POINTS rewards that credit a v2/loyalties (loyalty hub) card from a referral tier. A LOYALTY_POINTS reward can only be assigned to a referral tier.

Available options:
campaign,
referral_tier
parameters
object

Defines the cost of the reward.