A valid request URL is required to generate request examples{
"id": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"object": "<string>",
"stock": {
"limited": {
"quantity": 4503599627370495
}
},
"points": {
"value": 4503599627370495,
"card_definition_id": "<string>"
},
"points_proportional": {
"card_definition_id": "<string>",
"order": {
"amount": {
"every": 4503599627370496,
"value": 4503599627370495.5
},
"total_amount": {
"every": 4503599627370496,
"value": 4503599627370495.5
},
"metadata": {
"every": 4503599627370496,
"value": 4503599627370495.5,
"property": "<string>"
}
},
"customer": {
"metadata": {
"every": 4503599627370496,
"value": 4503599627370495.5,
"property": "<string>"
}
},
"custom_event": {
"metadata": {
"every": 4503599627370496,
"value": 4503599627370495.5,
"property": "<string>"
}
},
"order_items": {
"amount": {
"every": 4503599627370496,
"value": 4503599627370495.5,
"applicable_to": [
{
"product": {
"id": "<string>"
},
"sku": {
"id": "<string>"
},
"products_collection": {
"id": "<string>"
}
}
]
},
"subtotal_amount": {
"every": 4503599627370496,
"value": 4503599627370495.5,
"applicable_to": [
{
"product": {
"id": "<string>"
},
"sku": {
"id": "<string>"
},
"products_collection": {
"id": "<string>"
}
}
]
},
"quantity": {
"every": 4503599627370496,
"value": 4503599627370495.5,
"applicable_to": [
{
"product": {
"id": "<string>"
},
"sku": {
"id": "<string>"
},
"products_collection": {
"id": "<string>"
}
}
]
}
}
},
"material": {
"product": {
"id": "<string>"
},
"sku": {
"product_id": "<string>",
"id": "<string>"
}
},
"digital": {
"gift_vouchers": {
"campaign_id": "<string>",
"balance": 4503599627370495.5
},
"discount_coupons": {
"campaign_id": "<string>"
}
},
"updated_at": "2023-11-07T05:31:56Z"
}{
"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>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}Move benefit to draft
⚠️ 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.
Moves a benefit from ACTIVE back to DRAFT status. No request body. Only the
ACTIVE -> DRAFT transition is allowed; drafting from any other state returns
400 invalid_state_transition. A benefit assigned to an active earning rule cannot
be moved to draft (423 resource_locked, key connected_active_earning_rule).
curl --request POST \
--url {protocol}://{host}/v2/loyalties/benefits/{benefitId}/draft \
--header 'Authorization: Bearer <token>' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"id": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"object": "<string>",
"stock": {
"limited": {
"quantity": 4503599627370495
}
},
"points": {
"value": 4503599627370495,
"card_definition_id": "<string>"
},
"points_proportional": {
"card_definition_id": "<string>",
"order": {
"amount": {
"every": 4503599627370496,
"value": 4503599627370495.5
},
"total_amount": {
"every": 4503599627370496,
"value": 4503599627370495.5
},
"metadata": {
"every": 4503599627370496,
"value": 4503599627370495.5,
"property": "<string>"
}
},
"customer": {
"metadata": {
"every": 4503599627370496,
"value": 4503599627370495.5,
"property": "<string>"
}
},
"custom_event": {
"metadata": {
"every": 4503599627370496,
"value": 4503599627370495.5,
"property": "<string>"
}
},
"order_items": {
"amount": {
"every": 4503599627370496,
"value": 4503599627370495.5,
"applicable_to": [
{
"product": {
"id": "<string>"
},
"sku": {
"id": "<string>"
},
"products_collection": {
"id": "<string>"
}
}
]
},
"subtotal_amount": {
"every": 4503599627370496,
"value": 4503599627370495.5,
"applicable_to": [
{
"product": {
"id": "<string>"
},
"sku": {
"id": "<string>"
},
"products_collection": {
"id": "<string>"
}
}
]
},
"quantity": {
"every": 4503599627370496,
"value": 4503599627370495.5,
"applicable_to": [
{
"product": {
"id": "<string>"
},
"sku": {
"id": "<string>"
},
"products_collection": {
"id": "<string>"
}
}
]
}
}
},
"material": {
"product": {
"id": "<string>"
},
"sku": {
"product_id": "<string>",
"id": "<string>"
}
},
"digital": {
"gift_vouchers": {
"campaign_id": "<string>",
"balance": 4503599627370495.5
},
"discount_coupons": {
"campaign_id": "<string>"
}
},
"updated_at": "2023-11-07T05:31:56Z"
}{
"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>"
}{
"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 benefit ID, prefixed with lben_.
^lben_[a-f0-9]+$Response
The drafted benefit
A benefit object. Exactly one type-specific configuration object
(points, points_proportional, material, or digital) is present, matching the type;
the others are omitted.
Unique benefit ID, prefixed with lben_.
^lben_[a-f0-9]+$Benefit name, unique within the project.
Benefit type.
POINTS, POINTS_PROPORTIONAL, MATERIAL, DIGITAL Current benefit status. DELETED appears only in the response of the delete endpoint and in activity snapshots.
DRAFT, ACTIVE, DELETED Timestamp of when the benefit was created, in ISO 8601 format.
Type of the object. Always benefit.
"benefit"Stock configuration. Omitted when not set.
Show child attributes
Show child attributes
Fixed points configuration. Present only when type is POINTS.
Show child attributes
Show child attributes
Proportional points configuration. Present only when type is POINTS_PROPORTIONAL.
Show child attributes
Show child attributes
Material configuration. Present only when type is MATERIAL.
Show child attributes
Show child attributes
Digital configuration. Present only when type is DIGITAL.
Show child attributes
Show child attributes
Timestamp of the last update, in ISO 8601 format. Null when the benefit was never updated.
Was this page helpful?

