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>"
}Update benefit
⚠️ 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 a benefit. When the benefit is in DRAFT status all properties can be updated.
When the benefit is ACTIVE, only name and stock may be updated (400 invalid_payload
otherwise). Referenced resources (card definition, product/SKU, campaign) are validated
the same way as on create; a points-based benefit can only reference an ACTIVE card
definition (423 resource_locked otherwise). The benefit name must remain unique per
project (409 duplicate_found).
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>"
}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]+$Body
Request body for updating a benefit. All properties are optional; omitted properties keep
their current values. When the benefit is ACTIVE, only name and stock may be updated.
After the update, the type-specific configuration must stay consistent with the (possibly
updated) type.
Benefit name. Must be unique within the project.
1 - 200Benefit type. Determines which configuration object is required.
POINTS, POINTS_PROPORTIONAL, MATERIAL, DIGITAL Fixed points configuration (for type POINTS).
Show child attributes
Show child attributes
Proportional points configuration (for type POINTS_PROPORTIONAL).
Show child attributes
Show child attributes
Material (physical product/SKU) configuration (for type MATERIAL).
Show child attributes
Show child attributes
Digital (campaign-based) configuration (for type DIGITAL).
Show child attributes
Show child attributes
Stock configuration.
Show child attributes
Show child attributes
Response
The updated 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?

