Vincent is here! Just say the word, and Vincent will build the campaigns for you! Get early access.
curl --request POST \
--url https://api.voucherify.io/v2/loyalties/tier-structures \
--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": {},
"status": "DRAFT"
}
'{
"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.
Creates a new tier structure. The card_definition_id must reference an existing card definition.
When type is POINT_EARNED, the point_earned object is required.
When type is POINT_BALANCE, the point_earned field must be null or omitted.
Defaults: expiration defaults to NO_EXPIRATION, downgrade defaults to NO_DOWNGRADE,
status defaults to DRAFT.
curl --request POST \
--url https://api.voucherify.io/v2/loyalties/tier-structures \
--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": {},
"status": "DRAFT"
}
'{
"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.
Display name.
1 - 200Tiering model type.
POINT_BALANCE, POINT_EARNED ID of an existing card definition to link.
Required when type is POINT_EARNED. Must be null when type is POINT_BALANCE.
Show child attributes
Expiration settings. Defaults to NO_EXPIRATION.
Show child attributes
Downgrade settings. Defaults to NO_DOWNGRADE.
Show child attributes
Custom key-value metadata.
Initial status. Default: DRAFT.
DRAFT, ACTIVE Created 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?