curl --request POST \
--url https://{cluster}.voucherify.io/v1/rewards/{rewardId}/assignments \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"campaign": "camp_OTuGGP90PivbvROsRvfM65El",
"parameters": {
"loyalty": {
"points": 39
}
}
}
'Create Reward Assignment
Assigns a reward to a specified legacy loyalty campaign. Campaign-linked rewards also apply to referral campaigns. For Loyalty hub rewards, use /v2/loyalties reward endpoints.
curl --request POST \
--url https://{cluster}.voucherify.io/v1/rewards/{rewardId}/assignments \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"campaign": "camp_OTuGGP90PivbvROsRvfM65El",
"parameters": {
"loyalty": {
"points": 39
}
}
}
'Authorizations
Scopes
Gives access to whole server-side API.
Gives access to all endpoints and methods starting with /v1/rewards.
Path Parameters
A unique reward ID.
"rew_2erjvECLs92GYzKbak3QkyTV"
Body
Provide the campaign ID of the legacy loyalty or referral campaign to which the reward is to be assigned and define the cost of the reward in terms of loyalty points.
Response
Returns a reward assignment object.
Response body schema for POST v1/rewards/{rewardId}/assignments/.
Unique reward assignment ID, assigned by Voucherify.
"rewa_PbIRoMXpwe5QhobW4JKu0VjH"
Associated reward ID.
"rew_C7wS9eHFDN4CIbXI5PpLSkGY"
Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format.
"2022-08-11T14:49:22.586Z"
Timestamp representing the date and time when the reward assignment was updated. The value is shown in the ISO 8601 format.
"2022-08-11T16:01:34.885Z"
The type of the object represented by the JSON. This object stores information about the reward assignment.
reward_assignment Related object ID to which the reward was assigned.
"camp_wciTvaOfYmAa3EmIIW3QpXXZ"
Related object type to which the reward was assigned.
campaign Defines the cost of the reward.
Show child attributes
Show child attributes

