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
}Returns a list of your 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
}The access token received from the authorization server in the OAuth 2.0 flow.
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 <= 100Which page of results to return. The lowest value is 1.
1 <= x <= 100Includes an expanded categories object in the response. If the Areas and Stores Enterprise feature is enabled, add access_settings_assignments to return assigned areas and stores.
category, access_settings_assignments Sorts 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 dictionary with loyalty program objects. The loyalty campaigns are returned sorted by creation date, with the most recent campaigns appearing first.
Response body schema for Get /loyalties.
The type of the object represented by JSON. This object stores information about loyalty campaigns in a dictionary.
Identifies the name of the attribute that contains the array of loyalty campaign objects.
campaigns Contains an array of loyalty campaign objects.
Show child attributes
Total number of loyalty campaign objects.
Was this page helpful?