Vincent is here! Just say the word, and Vincent will build the campaigns for you! Get early access.
curl --request PUT \
--url https://api.voucherify.io/v2/loyalties/tier-structures/{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>",
"type": "POINT_BALANCE",
"card_definition_id": "<string>",
"point_earned": {
"period": {
"value": 2,
"unit": "HOUR"
},
"type": "IMMEDIATELY"
},
"expiration": {
"type": "NO_EXPIRATION",
"rolling_expiration": {
"period": {
"value": 2,
"unit": "DAY"
}
},
"calendar_expiration": {
"calendar_dates": [
{
"day": 16,
"month": 6
}
]
},
"sliding_expiration": {
"period": {
"value": 2,
"unit": "DAY"
},
"earning_activity": true,
"spending_activity": true,
"custom_activity": true,
"custom_activity_types": [
"<string>"
]
}
},
"downgrade": {
"type": "MULTI_LEVEL",
"grace_period": {
"value": 2,
"unit": "DAY",
"round_up": true
}
},
"metadata": {}
}
'{
"id": "<string>",
"name": "<string>",
"type": "POINT_BALANCE",
"card_definition_id": "<string>",
"metadata": {},
"status": "DRAFT",
"created_at": "2023-11-07T05:31:56Z",
"object": "tier_structure",
"point_earned": {
"period": {
"value": 2,
"unit": "HOUR"
},
"type": "IMMEDIATELY"
},
"expiration": {
"type": "NO_EXPIRATION",
"rolling_expiration": {
"period": {
"value": 2,
"unit": "DAY"
}
},
"calendar_expiration": {
"calendar_dates": [
{
"day": 16,
"month": 6
}
]
},
"sliding_expiration": {
"earning_activity": true,
"spending_activity": true,
"custom_activity": true,
"period": {
"value": 2,
"unit": "DAY"
},
"custom_activity_types": [
"<string>"
]
}
},
"downgrade": {
"type": "MULTI_LEVEL",
"grace_period": {
"value": 2,
"unit": "DAY",
"round_up": true
}
},
"updated_at": "2023-11-07T05:31:56Z"
}⚠️ 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 tier structure. All fields are optional; omitted fields retain their current values.
When the tier structure is not in DRAFT status, only name and metadata may be updated.
If type changes to POINT_EARNED, point_earned is required.
If type changes to POINT_BALANCE, point_earned must be null.
curl --request PUT \
--url https://api.voucherify.io/v2/loyalties/tier-structures/{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>",
"type": "POINT_BALANCE",
"card_definition_id": "<string>",
"point_earned": {
"period": {
"value": 2,
"unit": "HOUR"
},
"type": "IMMEDIATELY"
},
"expiration": {
"type": "NO_EXPIRATION",
"rolling_expiration": {
"period": {
"value": 2,
"unit": "DAY"
}
},
"calendar_expiration": {
"calendar_dates": [
{
"day": 16,
"month": 6
}
]
},
"sliding_expiration": {
"period": {
"value": 2,
"unit": "DAY"
},
"earning_activity": true,
"spending_activity": true,
"custom_activity": true,
"custom_activity_types": [
"<string>"
]
}
},
"downgrade": {
"type": "MULTI_LEVEL",
"grace_period": {
"value": 2,
"unit": "DAY",
"round_up": true
}
},
"metadata": {}
}
'{
"id": "<string>",
"name": "<string>",
"type": "POINT_BALANCE",
"card_definition_id": "<string>",
"metadata": {},
"status": "DRAFT",
"created_at": "2023-11-07T05:31:56Z",
"object": "tier_structure",
"point_earned": {
"period": {
"value": 2,
"unit": "HOUR"
},
"type": "IMMEDIATELY"
},
"expiration": {
"type": "NO_EXPIRATION",
"rolling_expiration": {
"period": {
"value": 2,
"unit": "DAY"
}
},
"calendar_expiration": {
"calendar_dates": [
{
"day": 16,
"month": 6
}
]
},
"sliding_expiration": {
"earning_activity": true,
"spending_activity": true,
"custom_activity": true,
"period": {
"value": 2,
"unit": "DAY"
},
"custom_activity_types": [
"<string>"
]
}
},
"downgrade": {
"type": "MULTI_LEVEL",
"grace_period": {
"value": 2,
"unit": "DAY",
"round_up": true
}
},
"updated_at": "2023-11-07T05:31:56Z"
}Documentation Index
Fetch the complete documentation index at: https://docs.voucherify.io/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Unique tier structure identifier.
All fields optional. When not in DRAFT status, only name and metadata may be updated.
Display name.
1 - 200Tiering model type.
POINT_BALANCE, POINT_EARNED ID of an existing card definition to link.
Required when type changes to POINT_EARNED. Must be null when type is POINT_BALANCE.
Show child attributes
Expiration settings.
Show child attributes
Downgrade settings.
Show child attributes
Custom key-value metadata.
Updated tier structure
A tier structure resource as returned by the API.
Unique tier structure identifier.
Display name.
200Tiering model type.
POINT_BALANCE, POINT_EARNED ID of the linked card definition.
Custom key-value metadata.
Current lifecycle status.
DRAFT, ACTIVE, INACTIVE, DELETED ISO 8601 creation timestamp.
Object type discriminator.
tier_structure Point-earned tracking configuration. Present when type is POINT_EARNED.
Show child attributes
Tier qualification expiration settings.
Show child attributes
Downgrade behaviour settings.
Show child attributes
ISO 8601 last-update timestamp.
Was this page helpful?