Skip to main content
GET
/
v1
/
loyalties
/
{campaignId}
/
tiers
List Loyalty Tiers
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
}

Authorizations

X-App-Id
string
header
required
X-App-Token
string
header
required
Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

campaignId
string
required

Unique loyalty campaign ID or name.

Example:

"camp_rRsfatlwN7unSeUIJDCYedal"

Query Parameters

limit
integer

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.

Required range: 1 <= x <= 100
order
enum<string>

Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.

Available options:
created_at,
-created_at,
updated_at,
-updated_at

Response

200 - application/json

Returns a list of loyalty tier objects.

Response body schema for GET v1/loyalties/{campaignId}/tiers.

object
enum<string>
default:list
required

The type of the object represented by JSON. This object stores information about loyalty tiers in a dictionary.

Available options:
list
data_ref
enum<string>
default:data
required

Identifies the name of the attribute that contains the array of loyalty tier objects.

Available options:
data
data
Loyalty Tier · object[]
required

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.

total
integer
required

Total number of loyalty tier objects.

I