curl --request POST \
--url https://{cluster}.voucherify.io/v2/loyalties/tier-structures/{tierStructureId}/draft \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"name": "<string>",
"type": "POINT_BALANCE",
"expiration": {
"type": "NO_RETENTION",
"fixed_duration": {
"period": {
"value": 123,
"unit": "DAY"
}
},
"calendar_expiration": {
"calendar_dates": [
{
"day": 16,
"month": 6
}
]
},
"sliding_expiration": {
"earning_activity": true,
"spending_activity": true,
"custom_activity": true,
"custom_activity_types": [
"<string>"
],
"period": {
"value": 123,
"unit": "DAY"
}
}
},
"downgrade": {
"type": "MULTI_LEVEL",
"grace_period": {
"value": 123,
"unit": "DAY",
"round_up": true
}
},
"status": "DRAFT",
"object": "tier_structure",
"point_balance": {
"card_definition_id": "<string>"
},
"point_earned": {
"card_definition_id": "<string>",
"period": {
"value": 123,
"unit": "DAY"
},
"type": "IMMEDIATELY"
}
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>",
"resource_id": "<string>",
"resource_type": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>",
"resource_id": "<string>",
"resource_type": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>",
"resource_id": "<string>",
"resource_type": "<string>"
}{
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}Move tier structure to draft
This documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact Voucherify support or your Technical Account Manager.
Moves the tier structure from ACTIVE to DRAFT. No request body. Any other status returns 400 (invalid_state_transition). Returns 423 when a non-draft program (connected_non_draft_program) or an active reward (connected_active_reward) still uses the tier structure.
curl --request POST \
--url https://{cluster}.voucherify.io/v2/loyalties/tier-structures/{tierStructureId}/draft \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"name": "<string>",
"type": "POINT_BALANCE",
"expiration": {
"type": "NO_RETENTION",
"fixed_duration": {
"period": {
"value": 123,
"unit": "DAY"
}
},
"calendar_expiration": {
"calendar_dates": [
{
"day": 16,
"month": 6
}
]
},
"sliding_expiration": {
"earning_activity": true,
"spending_activity": true,
"custom_activity": true,
"custom_activity_types": [
"<string>"
],
"period": {
"value": 123,
"unit": "DAY"
}
}
},
"downgrade": {
"type": "MULTI_LEVEL",
"grace_period": {
"value": 123,
"unit": "DAY",
"round_up": true
}
},
"status": "DRAFT",
"object": "tier_structure",
"point_balance": {
"card_definition_id": "<string>"
},
"point_earned": {
"card_definition_id": "<string>",
"period": {
"value": 123,
"unit": "DAY"
},
"type": "IMMEDIATELY"
}
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>",
"resource_id": "<string>",
"resource_type": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>",
"resource_id": "<string>",
"resource_type": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>",
"resource_id": "<string>",
"resource_type": "<string>"
}{
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}Authorizations
Path Parameters
Identifies the tier structure. Format lts_[a-f0-9]+.
^lts_[a-f0-9]+$Response
The drafted tier structure.
Response body schema for POST /v2/loyalties/tier-structures/{tierStructureId}/draft.
Free-form key/value object holding custom attributes. Defaults to {}.
Creation timestamp (ISO 8601).
Last update timestamp (ISO 8601), or null if never updated.
Unique tier structure identifier.
^lts_[a-f0-9]+$Display name of the tier structure.
Tier qualification tracking model.
POINT_BALANCE, POINT_EARNED Tier membership expiration settings.
Show child attributes
Show child attributes
Downgrade behavior applied when tier membership expires.
Show child attributes
Show child attributes
Current lifecycle status of the tier structure.
DRAFT, ACTIVE, INACTIVE, DELETED Object type discriminator. Always tier_structure.
"tier_structure"Point balance tracking settings. Present only when type is POINT_BALANCE;
omitted otherwise.
Show child attributes
Show child attributes
Points earned tracking settings. Present only when type is POINT_EARNED;
omitted otherwise.
Show child attributes
Show child attributes

