Skip to main content
GET
/
v1
/
loyalties
List Loyalty Campaigns
curl --request GET \
  --url https://{cluster}.voucherify.io/v1/loyalties \
  --header 'Authorization: Bearer <token>' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
  "object": "list",
  "data_ref": "campaigns",
  "campaigns": [
    {
      "id": "camp_eTIsUtuzkRXQT6rsUQqrS5Gw",
      "name": "Loyalty Campaign 1",
      "campaign_type": "LOYALTY_PROGRAM",
      "type": "AUTO_UPDATE",
      "voucher": {
        "type": "LOYALTY_CARD",
        "loyalty_card": {
          "points": 0
        },
        "redemption": {
          "quantity": null
        },
        "code_config": {
          "length": 8,
          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
          "pattern": "########"
        },
        "is_referral_code": false
      },
      "auto_join": false,
      "join_once": false,
      "use_voucher_metadata_schema": true,
      "description": "This is a campaign description.",
      "vouchers_count": 6,
      "active": true,
      "metadata": {
        "Season": "Fall"
      },
      "created_at": "2022-11-21T13:57:03.712Z",
      "updated_at": "2022-11-23T09:59:49.581Z",
      "creation_status": "DONE",
      "vouchers_generation_status": "DONE",
      "protected": false,
      "category_id": "cat_0b6152ce12414820dc",
      "categories": [],
      "object": "campaign"
    },
    {
      "id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
      "name": "Loyalty Campaign - Tiers",
      "campaign_type": "LOYALTY_PROGRAM",
      "type": "AUTO_UPDATE",
      "voucher": {
        "type": "LOYALTY_CARD",
        "loyalty_card": {
          "points": 0
        },
        "redemption": {
          "quantity": null
        },
        "code_config": {
          "length": 8,
          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
          "pattern": "########",
          "prefix": "LT1-",
          "initial_count": 1
        },
        "is_referral_code": false,
        "start_date": "2022-11-01T00:00:00.000Z"
      },
      "auto_join": false,
      "join_once": false,
      "use_voucher_metadata_schema": true,
      "start_date": "2022-11-01T00:00:00.000Z",
      "validity_day_of_week": [
        1,
        2,
        3,
        4,
        5,
        6
      ],
      "vouchers_count": 3,
      "active": true,
      "metadata": {},
      "created_at": "2022-11-09T06:26:52.985Z",
      "updated_at": "2022-11-10T08:54:46.136Z",
      "creation_status": "DONE",
      "vouchers_generation_status": "DONE",
      "protected": false,
      "category_id": "cat_0b8b5a427a0283c854",
      "categories": [],
      "loyalty_tiers_expiration": {
        "qualification_type": "BALANCE",
        "start_date": {
          "type": "IMMEDIATE"
        },
        "expiration_date": {
          "type": "CUSTOM",
          "extend": "P3M",
          "rounding": {
            "type": "MONTH",
            "strategy": "END"
          }
        }
      },
      "object": "campaign"
    },
    {
      "id": "camp_NwO6D0Z0mpZ1CDc380DnPgrW",
      "name": "Loyalty Campaign Example",
      "campaign_type": "LOYALTY_PROGRAM",
      "type": "STATIC",
      "voucher": {
        "type": "LOYALTY_CARD",
        "loyalty_card": {
          "points": 0
        },
        "redemption": {
          "quantity": null
        },
        "code_config": {
          "length": 8,
          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
          "pattern": "########",
          "initial_count": 1
        },
        "is_referral_code": false,
        "start_date": "2021-12-15T00:00:00.000Z",
        "expiration_date": "2021-12-31T00:00:00.000Z",
        "validity_timeframe": {
          "interval": "P1D",
          "duration": "PT1H"
        }
      },
      "auto_join": true,
      "join_once": true,
      "use_voucher_metadata_schema": true,
      "start_date": "2021-12-15T00:00:00.000Z",
      "expiration_date": "2021-12-31T00:00:00.000Z",
      "validity_timeframe": {
        "interval": "P1D",
        "duration": "PT1H"
      },
      "validity_day_of_week": [
        3,
        4,
        5,
        6
      ],
      "activity_duration_after_publishing": "P24D",
      "vouchers_count": 0,
      "active": false,
      "metadata": {},
      "created_at": "2021-12-15T08:02:52.298Z",
      "updated_at": "2021-12-15T08:11:43.808Z",
      "creation_status": "DRAFT",
      "vouchers_generation_status": "DRAFT",
      "protected": false,
      "category_id": null,
      "categories": [],
      "object": "campaign"
    }
  ],
  "total": 3
}

Authorizations

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

Query Parameters

limit
integer
Required range: 1 <= x <= 100
page
integer
Required range: 1 <= x <= 100
expand
enum<string>
Available options:
category,
access_settings_assignments
order
enum<string>
Available options:
created_at,
-created_at,
updated_at,
-updated_at

Response

200 - application/json
object
string
default:list
data_ref
enum<string>
default:campaigns
Available options:
campaigns
campaigns
Loyalty Campaign · object[]
total
integer