A valid request URL is required to generate request examples{
"id": "<string>",
"name": "<string>",
"validity_hours": {
"daily": [
{
"days_of_week": [
3
],
"start_time": "09:00",
"end_time": "17:00"
}
]
},
"refunds": {},
"costs": [
{
"id": "<string>",
"rules": {
"logic": "<string>"
},
"spending": [
{
"id": "<string>",
"points": 123,
"card_definition_id": "<string>",
"name": "<string>"
}
]
}
],
"purchase_limits": {
"cooldown": {
"fixed_cooldown": {
"period": {
"value": 2
}
}
},
"frequency": {
"limits": [
{
"type": "<string>",
"period": {
"type": "CURRENT_PERIOD",
"current_period": {}
},
"triggers": {
"max": 2
}
}
]
}
},
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"object": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"material": {
"product": {
"id": "<string>"
},
"sku": {
"product_id": "<string>",
"id": "<string>"
}
},
"digital": {
"discount_coupons": {
"campaign_id": "<string>"
},
"gift_vouchers": {
"campaign_id": "<string>",
"balance": 123
},
"loyalty_card_points": {
"points": 123,
"card_definition_id": "<string>"
}
},
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>",
"resource_id": "<string>",
"resource_type": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>",
"resource_id": "<string>",
"resource_type": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>",
"resource_id": "<string>",
"resource_type": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>",
"resource_id": "<string>",
"resource_type": "<string>"
}Move reward back to draft
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.
Moves the reward back to the DRAFT status. Allowed only from ACTIVE status;
other transitions are rejected with a conflict error. The reward can’t be assigned to a loyalty program. This endpoint takes no
request body.
curl --request POST \
--url {protocol}://{host}/v2/loyalties/rewards/{rewardId}/draft \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"id": "<string>",
"name": "<string>",
"validity_hours": {
"daily": [
{
"days_of_week": [
3
],
"start_time": "09:00",
"end_time": "17:00"
}
]
},
"refunds": {},
"costs": [
{
"id": "<string>",
"rules": {
"logic": "<string>"
},
"spending": [
{
"id": "<string>",
"points": 123,
"card_definition_id": "<string>",
"name": "<string>"
}
]
}
],
"purchase_limits": {
"cooldown": {
"fixed_cooldown": {
"period": {
"value": 2
}
}
},
"frequency": {
"limits": [
{
"type": "<string>",
"period": {
"type": "CURRENT_PERIOD",
"current_period": {}
},
"triggers": {
"max": 2
}
}
]
}
},
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"object": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"material": {
"product": {
"id": "<string>"
},
"sku": {
"product_id": "<string>",
"id": "<string>"
}
},
"digital": {
"discount_coupons": {
"campaign_id": "<string>"
},
"gift_vouchers": {
"campaign_id": "<string>",
"balance": 123
},
"loyalty_card_points": {
"points": 123,
"card_definition_id": "<string>"
}
},
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>",
"resource_id": "<string>",
"resource_type": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>",
"resource_id": "<string>",
"resource_type": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>",
"resource_id": "<string>",
"resource_type": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>",
"resource_id": "<string>",
"resource_type": "<string>"
}Authorizations
Path Parameters
Unique reward identifier, prefixed with lrew_.
^lrew_[a-f0-9]+$Response
The drafted reward.
A reward, as returned by the API.
Unique reward identifier, prefixed with lrew_.
^lrew_[a-f0-9]+$Display name of the reward.
Reward type.
MATERIAL, DIGITAL Current lifecycle status of the reward.
ACTIVE, DRAFT, INACTIVE, DELETED Hours during which the reward can be purchased. Always present; defaults to { "type": "ANY_TIME" }.
Show child attributes
Show child attributes
Refund policy. Always present; defaults to { "type": "NONE" }.
Show child attributes
Show child attributes
Point costs of the reward. Empty array when no costs are defined.
Show child attributes
Show child attributes
Purchase limits. Always present; defaults to { "cooldown": { "type": "NO_COOLDOWN" }, "frequency": { "type": "NO_LIMIT", "limits": [] } }.
Show child attributes
Show child attributes
Arbitrary key-value metadata attached to the reward. Empty object when not set.
Timestamp when the reward was created (ISO-8601).
Object type marker; always reward.
"reward"Date from which the reward is available, or null when not set.
Date until which the reward is available, or null when not set.
Material reward definition. Present only when type is MATERIAL; omitted otherwise.
Show child attributes
Show child attributes
Digital reward definition. Present only when type is DIGITAL; omitted otherwise.
Show child attributes
Show child attributes
Timestamp when the reward was last updated (ISO-8601), or null when never updated.
Was this page helpful?

