Vincent is here! Just say the word, and Vincent will build the campaigns for you! Get early access.
curl --request PUT \
--url https://api.voucherify.io/v2/loyalties/rewards/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"name": "<string>",
"type": "MATERIAL",
"material": {
"type": "PRODUCT",
"product": {
"id": "<string>"
},
"sku": {
"product_id": "<string>",
"id": "<string>"
}
},
"digital": {
"type": "DISCOUNT_COUPONS",
"discount_coupons": {
"campaign_id": "<string>"
},
"gift_vouchers": {
"campaign_id": "<string>",
"balance": 1
}
},
"metadata": {}
}
'{
"id": "<string>",
"name": "<string>",
"type": "MATERIAL",
"status": "ACTIVE",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "<string>",
"material": {
"type": "PRODUCT",
"product": {
"id": "<string>"
},
"sku": {
"product_id": "<string>",
"id": "<string>"
}
},
"digital": {
"type": "DISCOUNT_COUPONS",
"discount_coupons": {
"campaign_id": "<string>"
},
"gift_vouchers": {
"campaign_id": "<string>",
"balance": 1
}
}
}⚠️ 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 an existing reward. All properties are optional.
In DRAFT status all properties can be updated.
In ACTIVE or INACTIVE status only name and metadata are allowed.
When changing type, the matching sub-configuration must be supplied
and the previous one is reset to null.
curl --request PUT \
--url https://api.voucherify.io/v2/loyalties/rewards/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"name": "<string>",
"type": "MATERIAL",
"material": {
"type": "PRODUCT",
"product": {
"id": "<string>"
},
"sku": {
"product_id": "<string>",
"id": "<string>"
}
},
"digital": {
"type": "DISCOUNT_COUPONS",
"discount_coupons": {
"campaign_id": "<string>"
},
"gift_vouchers": {
"campaign_id": "<string>",
"balance": 1
}
},
"metadata": {}
}
'{
"id": "<string>",
"name": "<string>",
"type": "MATERIAL",
"status": "ACTIVE",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "<string>",
"material": {
"type": "PRODUCT",
"product": {
"id": "<string>"
},
"sku": {
"product_id": "<string>",
"id": "<string>"
}
},
"digital": {
"type": "DISCOUNT_COUPONS",
"discount_coupons": {
"campaign_id": "<string>"
},
"gift_vouchers": {
"campaign_id": "<string>",
"balance": 1
}
}
}Documentation Index
Fetch the complete documentation index at: https://docs.voucherify.io/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Unique reward identifier.
Payload for updating a reward. All fields are optional.
In ACTIVE/INACTIVE status only name and metadata may be updated.
Supplying type resets the non-matching sub-configuration to null.
Reward display name.
1 - 200Reward type.
MATERIAL, DIGITAL Required when type is MATERIAL.
Show child attributes
Required when type is DIGITAL.
Show child attributes
Key-value metadata. Merged with existing metadata on update.
Updated reward.
Reward resource representation.
Unique reward identifier.
Reward display name.
Reward type.
MATERIAL, DIGITAL Current lifecycle status.
ACTIVE, DRAFT, INACTIVE, DELETED Key-value metadata.
ISO 8601 creation timestamp.
ISO 8601 last-update timestamp. Null if never updated.
"reward"Material configuration. Present only when type is MATERIAL.
Show child attributes
Digital configuration. Present only when type is DIGITAL.
Show child attributes
Was this page helpful?