curl --request PUT \
--url https://api.voucherify.io/v2/loyalties/card-definitions/{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>",
"code_config": {
"length": 123,
"charset": "<string>",
"prefix": "<string>",
"postfix": "<string>",
"pattern": "<string>"
},
"points_expiration": {
"rolling_expiration": {
"period": {
"value": 2
},
"rounding": {
"value": 6
}
},
"calendar_expiration": {
"expiration_dates": [
{
"day": 16,
"month": 6
}
]
},
"sliding_expiration": {
"period": {
"value": 2
},
"earning_activity": true,
"spending_activity": true,
"custom_activity": true,
"custom_activity_types": [
"<string>"
]
}
},
"pending_points": {
"period_based": {
"period": {
"value": 2
}
},
"fixed_dates": {
"dates": [
{
"day": 16,
"month": 6
}
]
},
"event_based": {
"event_types": [
"<string>"
],
"cancel_period": {
"value": 2
}
}
},
"earning_limits": {
"global": {
"limits": [
{
"max": 2
}
]
},
"transactions": {
"limits": [
{
"max": 2,
"min_amount": 2
}
]
}
},
"spending_limits": {
"global": {
"limits": [
{
"max": 2
}
]
},
"transactions": {
"limits": [
{
"max": 2
}
]
}
},
"refunds": {
"spent_points": {
"methods": [
{}
]
},
"earned_points": {
"methods": [
{}
]
}
},
"balance_settings": {
"allow_negative": true
},
"metadata": {}
}
'{
"id": "<string>",
"name": "<string>",
"code_config": {
"pattern": "<string>",
"length": 123,
"charset": "<string>",
"prefix": "<string>",
"postfix": "<string>"
},
"points_expiration": {
"rolling_expiration": {
"period": {
"value": 2
},
"rounding": {
"value": 6
}
},
"calendar_expiration": {
"expiration_dates": [
{
"day": 16,
"month": 6
}
]
},
"sliding_expiration": {
"earning_activity": true,
"spending_activity": true,
"custom_activity": true,
"custom_activity_types": [
"<string>"
],
"period": {
"value": 2
}
}
},
"pending_points": {
"period_based": {
"period": {
"value": 2
}
},
"fixed_dates": {
"dates": [
{
"day": 16,
"month": 6
}
]
},
"event_based": {
"event_types": [
"<string>"
],
"cancel_period": {
"value": 2
}
}
},
"earning_limits": {
"global": {
"limits": [
{
"max": 2,
"period": {
"current_period": {}
},
"points": {
"max": 1073741824
}
}
]
},
"transactions": {
"limits": [
{
"max": 2,
"min_amount": 2
}
]
}
},
"spending_limits": {
"global": {
"limits": [
{
"max": 2,
"period": {
"current_period": {}
},
"points": {
"max": 1073741824
}
}
]
},
"transactions": {
"limits": [
{
"max": 2
}
]
}
},
"refunds": {
"spent_points": {
"methods": [
{}
]
},
"earned_points": {
"methods": [
{}
]
}
},
"balance_settings": {
"allow_negative": true
},
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"object": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}Update Card Definition
⚠️ 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 card definition. At least one property must be provided.
When the card definition is not in DRAFT status, only name and metadata properties can be updated.
In DRAFT status, all available properties can be updated.
curl --request PUT \
--url https://api.voucherify.io/v2/loyalties/card-definitions/{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>",
"code_config": {
"length": 123,
"charset": "<string>",
"prefix": "<string>",
"postfix": "<string>",
"pattern": "<string>"
},
"points_expiration": {
"rolling_expiration": {
"period": {
"value": 2
},
"rounding": {
"value": 6
}
},
"calendar_expiration": {
"expiration_dates": [
{
"day": 16,
"month": 6
}
]
},
"sliding_expiration": {
"period": {
"value": 2
},
"earning_activity": true,
"spending_activity": true,
"custom_activity": true,
"custom_activity_types": [
"<string>"
]
}
},
"pending_points": {
"period_based": {
"period": {
"value": 2
}
},
"fixed_dates": {
"dates": [
{
"day": 16,
"month": 6
}
]
},
"event_based": {
"event_types": [
"<string>"
],
"cancel_period": {
"value": 2
}
}
},
"earning_limits": {
"global": {
"limits": [
{
"max": 2
}
]
},
"transactions": {
"limits": [
{
"max": 2,
"min_amount": 2
}
]
}
},
"spending_limits": {
"global": {
"limits": [
{
"max": 2
}
]
},
"transactions": {
"limits": [
{
"max": 2
}
]
}
},
"refunds": {
"spent_points": {
"methods": [
{}
]
},
"earned_points": {
"methods": [
{}
]
}
},
"balance_settings": {
"allow_negative": true
},
"metadata": {}
}
'{
"id": "<string>",
"name": "<string>",
"code_config": {
"pattern": "<string>",
"length": 123,
"charset": "<string>",
"prefix": "<string>",
"postfix": "<string>"
},
"points_expiration": {
"rolling_expiration": {
"period": {
"value": 2
},
"rounding": {
"value": 6
}
},
"calendar_expiration": {
"expiration_dates": [
{
"day": 16,
"month": 6
}
]
},
"sliding_expiration": {
"earning_activity": true,
"spending_activity": true,
"custom_activity": true,
"custom_activity_types": [
"<string>"
],
"period": {
"value": 2
}
}
},
"pending_points": {
"period_based": {
"period": {
"value": 2
}
},
"fixed_dates": {
"dates": [
{
"day": 16,
"month": 6
}
]
},
"event_based": {
"event_types": [
"<string>"
],
"cancel_period": {
"value": 2
}
}
},
"earning_limits": {
"global": {
"limits": [
{
"max": 2,
"period": {
"current_period": {}
},
"points": {
"max": 1073741824
}
}
]
},
"transactions": {
"limits": [
{
"max": 2,
"min_amount": 2
}
]
}
},
"spending_limits": {
"global": {
"limits": [
{
"max": 2,
"period": {
"current_period": {}
},
"points": {
"max": 1073741824
}
}
]
},
"transactions": {
"limits": [
{
"max": 2
}
]
}
},
"refunds": {
"spent_points": {
"methods": [
{}
]
},
"earned_points": {
"methods": [
{}
]
}
},
"balance_settings": {
"allow_negative": true
},
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"object": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique card definition identifier.
Body
All properties are optional. At least one must be provided. When status is not DRAFT, only name and metadata can be updated.
1 - 200Code generation configuration. If not provided on create, defaults to a 10-character alphanumeric pattern.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Updated card definition
Full card definition DTO returned by all CRUD endpoints.
INDIVIDUAL DRAFT, ACTIVE, INACTIVE, DELETED Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
"card_definition"Was this page helpful?

