A valid request URL is required to generate request examples{
"reward_id": "<string>",
"stock": {
"limited": {
"quantity": 4503599627370495
}
},
"redeemed": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}Update program reward assignment
⚠️ BETA endpoint
This is a work-in-progress documentation of a BETA endpoint. The parameters, fields, request and response bodies, and other data may subject to change. If you want to share feedback or improvements, contact Voucherify support or your Technical Account Manager.
Updates the stock configuration of a reward assigned to a program. Returns the updated reward assignment.
curl --request PUT \
--url {protocol}://{host}/v2/loyalties/programs/{programId}/rewards/{rewardId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"stock": {
"limited": {
"quantity": 4503599627370495
}
}
}
'{
"reward_id": "<string>",
"stock": {
"limited": {
"quantity": 4503599627370495
}
},
"redeemed": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique program identifier.
^lprg_[a-f0-9]+$Unique reward identifier.
^lrew_[a-f0-9]+$Body
Payload for updating the stock configuration of a reward assigned to a program.
Reward stock configuration. When type is UNLIMITED, limited must not be provided.
When type is LIMITED, limited is required.
Show child attributes
Show child attributes
Response
The updated reward assignment.
A reward assigned to a program, with stock configuration and redemption counter.
Unique reward identifier.
^lrew_[a-f0-9]+$Stock configuration of the assignment.
Show child attributes
Show child attributes
Number of times the reward has been redeemed within the program. Defaults to 0.
Assignment creation timestamp (ISO 8601).
Last update timestamp (ISO 8601), or null when never updated.
Object type marker.
"program_reward"Was this page helpful?

