Create a reward
Changed on<Badge color="gray">Documentation in progress</Badge>
This documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact Voucherify support or your Technical Account Manager.
</Info>Creates a new reward. name, type and costs are required. When type is MATERIAL the material object is required and digital must be null; when type is DIGITAL the digital object is required and material must be null. The reward can be created directly in DRAFT (default) or ACTIVE status. When validity_hours is not provided it defaults to { "type": "ANY_TIME" }.
Request
- Base URLhttps://api.voucherify.io
- URLhttps://api.voucherify.io/v2/loyalties/rewards
- Auth
- API key in header X-App-Id and API key in header X-App-Token
- or HTTP bearer
Request body
Example request
{
"validity_hours": {
"daily": [
{
"start_time": "09:00",
"end_time": "17:00"
}
]
}
}Response
The created reward.
Example response
{
"validity_hours": {
"daily": [
{
"start_time": "09:00",
"end_time": "17:00"
}
]
}
}Changes
- breaking
added to the
//////////////////////request propertyallOflist - breaking
the
//////////////////////request property type changed fromobjectto no type - warning
removed the request property
///////////////////////
- breaking
- breaking
added the new required request property
/////////////////////// - breaking
the
//////////////////////request property type changed from no type toobject - warning
removed from the
//////////////////////request propertyallOflist
- breaking