curl --request GET \
--url https://{cluster}.voucherify.io/v1/loyalties/{campaignId}/tiers \
--header 'Authorization: Bearer <token>' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"object": "list",
"data_ref": "data",
"data": [
{
"id": "ltr_30KHciA0UG8B71Fo51GZqwgN",
"name": "Bottom",
"campaign_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
"metadata": {},
"created_at": "2022-11-10T12:20:52.755Z",
"updated_at": "2022-11-25T11:27:58.616Z",
"earning_rules": {
"ern_95aq3JaE5A8xzHjoJPYNRqXZ": {
"type": "MULTIPLY",
"multiplier": 1
},
"ern_raVUcdXruvXGuzm682ESrAzt": {
"type": "CUSTOM",
"points": 5
}
},
"rewards": {
"rewa_t88DnSdNnE0IzQX6gqH3jHGQ": {
"type": "MULTIPLY",
"multiplier": 4
}
},
"config": {
"points": {
"from": 1,
"to": 249
}
},
"points": {
"from": 1,
"to": 249
},
"object": "loyalty_tier"
},
{
"id": "ltr_pudTGWasuIqxdiDM0go31OV1",
"name": "Middle",
"campaign_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
"metadata": {},
"created_at": "2022-11-10T12:20:52.755Z",
"updated_at": "2022-11-25T11:27:58.579Z",
"earning_rules": {
"ern_95aq3JaE5A8xzHjoJPYNRqXZ": {
"type": "MULTIPLY",
"multiplier": 2
}
},
"rewards": {},
"config": {
"points": {
"from": 250,
"to": 499
}
},
"points": {
"from": 250,
"to": 499
},
"object": "loyalty_tier"
},
{
"id": "ltr_7rVIPlPzdSFwpnbCcUXgwzH2",
"name": "Tier 1 - Top",
"campaign_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
"metadata": {
"has_funds": true
},
"created_at": "2022-11-09T06:26:54.797Z",
"updated_at": "2022-11-25T11:27:58.578Z",
"earning_rules": {
"ern_95aq3JaE5A8xzHjoJPYNRqXZ": {
"type": "MULTIPLY",
"multiplier": 3
},
"ern_AdlWO2yt6b6llWsibIdiRXVE": {
"type": "MULTIPLY",
"multiplier": 5
},
"ern_HnRXyJHoj3E79r3KUWhgMgtD": {
"type": "MULTIPLY",
"multiplier": 3
},
"ern_raVUcdXruvXGuzm682ESrAzt": {
"type": "CUSTOM",
"points": 200
}
},
"rewards": {
"rewa_Or6gWZ5ASuGkBLjOf0IyiD4k": {
"type": "CUSTOM",
"points": 300
}
},
"config": {
"points": {
"from": 500,
"to": 1000
}
},
"points": {
"from": 500,
"to": 1000
},
"object": "loyalty_tier"
}
],
"total": 3
}Retrieve a list of loyalty tiers which were added to the loyalty program.
curl --request GET \
--url https://{cluster}.voucherify.io/v1/loyalties/{campaignId}/tiers \
--header 'Authorization: Bearer <token>' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"object": "list",
"data_ref": "data",
"data": [
{
"id": "ltr_30KHciA0UG8B71Fo51GZqwgN",
"name": "Bottom",
"campaign_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
"metadata": {},
"created_at": "2022-11-10T12:20:52.755Z",
"updated_at": "2022-11-25T11:27:58.616Z",
"earning_rules": {
"ern_95aq3JaE5A8xzHjoJPYNRqXZ": {
"type": "MULTIPLY",
"multiplier": 1
},
"ern_raVUcdXruvXGuzm682ESrAzt": {
"type": "CUSTOM",
"points": 5
}
},
"rewards": {
"rewa_t88DnSdNnE0IzQX6gqH3jHGQ": {
"type": "MULTIPLY",
"multiplier": 4
}
},
"config": {
"points": {
"from": 1,
"to": 249
}
},
"points": {
"from": 1,
"to": 249
},
"object": "loyalty_tier"
},
{
"id": "ltr_pudTGWasuIqxdiDM0go31OV1",
"name": "Middle",
"campaign_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
"metadata": {},
"created_at": "2022-11-10T12:20:52.755Z",
"updated_at": "2022-11-25T11:27:58.579Z",
"earning_rules": {
"ern_95aq3JaE5A8xzHjoJPYNRqXZ": {
"type": "MULTIPLY",
"multiplier": 2
}
},
"rewards": {},
"config": {
"points": {
"from": 250,
"to": 499
}
},
"points": {
"from": 250,
"to": 499
},
"object": "loyalty_tier"
},
{
"id": "ltr_7rVIPlPzdSFwpnbCcUXgwzH2",
"name": "Tier 1 - Top",
"campaign_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
"metadata": {
"has_funds": true
},
"created_at": "2022-11-09T06:26:54.797Z",
"updated_at": "2022-11-25T11:27:58.578Z",
"earning_rules": {
"ern_95aq3JaE5A8xzHjoJPYNRqXZ": {
"type": "MULTIPLY",
"multiplier": 3
},
"ern_AdlWO2yt6b6llWsibIdiRXVE": {
"type": "MULTIPLY",
"multiplier": 5
},
"ern_HnRXyJHoj3E79r3KUWhgMgtD": {
"type": "MULTIPLY",
"multiplier": 3
},
"ern_raVUcdXruvXGuzm682ESrAzt": {
"type": "CUSTOM",
"points": 200
}
},
"rewards": {
"rewa_Or6gWZ5ASuGkBLjOf0IyiD4k": {
"type": "CUSTOM",
"points": 300
}
},
"config": {
"points": {
"from": 500,
"to": 1000
}
},
"points": {
"from": 500,
"to": 1000
},
"object": "loyalty_tier"
}
],
"total": 3
}The access token received from the authorization server in the OAuth 2.0 flow.
Unique loyalty campaign ID or name.
"camp_rRsfatlwN7unSeUIJDCYedal"
Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
1 <= x <= 100Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
created_at, -created_at, updated_at, -updated_at Returns a list of loyalty tier objects.
Response body schema for GET v1/loyalties/{campaignId}/tiers.
The type of the object represented by JSON. This object stores information about loyalty tiers in a dictionary.
list Identifies the name of the attribute that contains the array of loyalty tier objects.
data This is an object representing a loyalty tier. Loyalty tiers are used to create a loyalty program with different levels of membership and varied earning rules and rewards based on customer's tiers.
Show child attributes
Loyalty Tier name.
Unique loyalty tier ID.
Unique parent campaign ID.
The metadata object stores all custom attributes assigned to the loyalty tier. A set of key/value pairs that you can attach to a loyalty tier object. It can be useful for storing additional information about the loyalty tier in a structured format.
Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format.
The type of the object represented by JSON. This object stores information about the loyalty.
loyalty_tier Contains a list of earning rule IDs and their points mapping for the given earning rule.
Show child attributes
Contains a list of reward IDs and their points mapping for the given reward.
Show child attributes
Timestamp representing the date and time when the loyalty tier was updated. The value is shown in the ISO 8601 format.
Defines loyalty tier expiration date.
Show child attributes
Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.
"cust_7iUa6ICKyU6gH40dBU25kQU1"
Unique campaign ID, assigned by Voucherify.
"camp_rRsfatlwN7unSeUIJDCYedal"
Unique tier ID, assigned by Voucherify.
Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format.
"2021-12-22T10:13:06.487Z"
Activation timestamp defines when the loyalty tier starts to be active in ISO 8601 format. Loyalty tier is inactive before this date.
Expiration timestamp defines when the loyalty tier expires in ISO 8601 format. Loyalty tier is inactive after this date.
Timestamp representing the date and time when the loyalty tier was updated. The value is shown in the ISO 8601 format.
"2021-12-22T10:13:06.487Z"
Total number of loyalty tier objects.
Was this page helpful?