curl --request PUT \
--url https://{cluster}.voucherify.io/v2/loyalties/benefits/{benefitId} \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"stock": {
"type": "LIMITED",
"limited": {
"quantity": 333
}
},
"points": {
"value": 1,
"card_definition_id": "lcdef_1331564fab0b1ce713"
}
}
'Update benefit
Updates the benefit fields in the body. The body must contain at least one of name, type, points, points_proportional, material, digital, or stock. This operation does not change status.
In DRAFT status, any of these fields may be sent. In ACTIVE status, the body may contain only name, stock, points, points_proportional, and digital. On an ACTIVE benefit, points.card_definition_id, points_proportional.calculation_type, points_proportional.card_definition_id, digital.type, and digital.gift_vouchers.campaign_id cannot change. digital cannot be sent for an ACTIVE DISCOUNT_COUPONS benefit.
A POINTS or POINTS_PROPORTIONAL benefit requires an ACTIVE card definition in DRAFT and ACTIVE status (423 non_active_card_definition). An ACTIVE digital benefit cannot use a DRAFT campaign (423 non_active_campaign).
A successful call records vl.benefit.updated.
curl --request PUT \
--url https://{cluster}.voucherify.io/v2/loyalties/benefits/{benefitId} \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"stock": {
"type": "LIMITED",
"limited": {
"quantity": 333
}
},
"points": {
"value": 1,
"card_definition_id": "lcdef_1331564fab0b1ce713"
}
}
'Authorizations
Path Parameters
Body
Request body schema for PUT /v2/loyalties/benefits/{benefitId}.
Response
The updated benefit
Response body schema for PUT /v2/loyalties/benefits/{benefitId}.

