curl --request GET \
--url https://{cluster}.voucherify.io/v1/campaigns \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"object": "list",
"data_ref": "campaigns",
"campaigns": [
{
"id": "camp_SibPsDRKQvg3SUtptgPZCNZb",
"name": "Voucher Metadata",
"campaign_type": "DISCOUNT_COUPONS",
"type": "AUTO_UPDATE",
"voucher": {
"type": "DISCOUNT_VOUCHER",
"discount": {
"type": "PERCENT",
"amount_limit": 4400,
"percent_off": 30,
"effect": "APPLY_TO_ORDER"
},
"redemption": {
"quantity": null
},
"code_config": {
"length": 9,
"charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
"pattern": "#########",
"prefix": "Discount-",
"postfix": "YY"
},
"is_referral_code": false,
"start_date": "2022-09-20T00:00:00.000Z",
"expiration_date": "2022-09-30T00:00:00.000Z",
"validity_timeframe": {
"interval": "P3D",
"duration": "P1D"
}
},
"auto_join": false,
"join_once": false,
"use_voucher_metadata_schema": false,
"start_date": "2022-09-20T00:00:00.000Z",
"expiration_date": "2022-09-30T00:00:00.000Z",
"validity_timeframe": {
"interval": "P3D",
"duration": "P1D"
},
"validity_day_of_week": [
1,
2,
3,
4
],
"activity_duration_after_publishing": "P24D",
"vouchers_count": 1,
"active": true,
"metadata": {
"region": "AMER"
},
"created_at": "2022-09-20T09:32:29.530Z",
"creation_status": "DONE",
"vouchers_generation_status": "DONE",
"protected": false,
"category_id": null,
"object": "campaign"
},
{
"id": "camp_HgsbCKauXmEoPnnh8aas0ISe",
"name": "Static Campaign",
"campaign_type": "DISCOUNT_COUPONS",
"type": "STATIC",
"voucher": {
"type": "DISCOUNT_VOUCHER",
"discount": {
"type": "AMOUNT",
"amount_off": 3000,
"effect": "APPLY_TO_ORDER"
},
"redemption": {
"quantity": 1
},
"code_config": {
"length": 8,
"charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
"pattern": "########"
},
"is_referral_code": false
},
"auto_join": false,
"join_once": true,
"use_voucher_metadata_schema": true,
"vouchers_count": 1,
"active": true,
"metadata": {},
"created_at": "2022-09-20T07:52:34.499Z",
"updated_at": "2022-09-20T11:38:13.501Z",
"creation_status": "DONE",
"vouchers_generation_status": "DONE",
"protected": false,
"category_id": null,
"object": "campaign"
},
{
"id": "camp_f7fBbQxUuTN7dI7tGOo5XMDA",
"name": "Loyalty Program Fall 2022",
"campaign_type": "LOYALTY_PROGRAM",
"type": "AUTO_UPDATE",
"voucher": {
"type": "LOYALTY_CARD",
"loyalty_card": {
"points": 0,
"expiration_rules": {
"period_type": "MONTH",
"period_value": 7,
"rounding_type": "END_OF_YEAR"
}
},
"redemption": {
"quantity": null
},
"code_config": {
"length": 8,
"charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
"pattern": "########",
"prefix": "LOYALTY-CARD-"
},
"is_referral_code": false
},
"auto_join": true,
"join_once": true,
"use_voucher_metadata_schema": true,
"vouchers_count": 1,
"active": true,
"metadata": {},
"created_at": "2022-09-19T07:56:22.103Z",
"creation_status": "DONE",
"vouchers_generation_status": "DONE",
"protected": false,
"category_id": "cat_0bb343dee3cdb5ec0c",
"object": "campaign"
},
{
"id": "camp_4tHsQEDUOER6PeW8SoMdnHH6",
"name": "Dynamic Discounts",
"campaign_type": "DISCOUNT_COUPONS",
"type": "AUTO_UPDATE",
"voucher": {
"type": "DISCOUNT_VOUCHER",
"discount": {
"type": "PERCENT",
"percent_off": 5,
"percent_off_formula": "IF(ORDER_AMOUNT > 300;15;5)",
"effect": "APPLY_TO_ORDER"
},
"redemption": {
"quantity": null
},
"code_config": {
"length": 8,
"charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
"pattern": "########",
"prefix": "DYNAMIC-"
},
"is_referral_code": false
},
"auto_join": false,
"join_once": false,
"use_voucher_metadata_schema": true,
"vouchers_count": 1,
"active": true,
"metadata": {
"marketing_text": "Purchases above $300 are eligible for a 15% discount."
},
"created_at": "2022-07-12T15:12:02.575Z",
"updated_at": "2022-07-20T10:48:05.617Z",
"category": "test",
"creation_status": "DONE",
"vouchers_generation_status": "DONE",
"protected": false,
"category_id": "cat_0b688929a2476386a8",
"object": "campaign"
},
{
"id": "camp_JlsseNSDO7l4neFtev6p6945",
"name": "$20 OFF Entire Order",
"campaign_type": "DISCOUNT_COUPONS",
"type": "AUTO_UPDATE",
"voucher": {
"type": "DISCOUNT_VOUCHER",
"discount": {
"type": "AMOUNT",
"amount_off": 2000,
"effect": "APPLY_TO_ORDER"
},
"redemption": {
"quantity": null
},
"code_config": {
"length": 8,
"charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
"pattern": "########",
"prefix": "$20OFFORDER-"
},
"is_referral_code": false
},
"auto_join": false,
"join_once": false,
"use_voucher_metadata_schema": true,
"vouchers_count": 1,
"active": true,
"metadata": {},
"created_at": "2022-07-11T09:43:36.057Z",
"creation_status": "DONE",
"vouchers_generation_status": "DONE",
"protected": false,
"category_id": null,
"object": "campaign"
},
{
"id": "camp_Uj3cNbWSgt7Zl4AyHM7Sa5Qk",
"name": "3% OFF Entire Order",
"campaign_type": "DISCOUNT_COUPONS",
"type": "AUTO_UPDATE",
"voucher": {
"type": "DISCOUNT_VOUCHER",
"discount": {
"type": "PERCENT",
"percent_off": 3,
"effect": "APPLY_TO_ORDER"
},
"redemption": {
"quantity": null
},
"code_config": {
"length": 8,
"charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
"pattern": "########",
"prefix": "3%OFFORDER-"
},
"is_referral_code": false
},
"auto_join": false,
"join_once": false,
"use_voucher_metadata_schema": true,
"vouchers_count": 1,
"active": true,
"metadata": {},
"created_at": "2022-07-11T09:41:12.087Z",
"creation_status": "DONE",
"vouchers_generation_status": "DONE",
"protected": false,
"category_id": null,
"object": "campaign"
}
],
"total": 6
}List Campaigns
Retrieve a list of campaigns in a project.
The campaigns are returned sorted by creation date, with the most recent campaigns appearing first.
When you get a list of campaigns, you can optionally specify query parameters to customize the amount of campaigns returned per call using limit, which page of campaigns to return using page, sort the campaigns using the order query parameter and filter the results by the campaign_type.
This method will return an error when trying to return a limit of more than 100 campaigns.
curl --request GET \
--url https://{cluster}.voucherify.io/v1/campaigns \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"object": "list",
"data_ref": "campaigns",
"campaigns": [
{
"id": "camp_SibPsDRKQvg3SUtptgPZCNZb",
"name": "Voucher Metadata",
"campaign_type": "DISCOUNT_COUPONS",
"type": "AUTO_UPDATE",
"voucher": {
"type": "DISCOUNT_VOUCHER",
"discount": {
"type": "PERCENT",
"amount_limit": 4400,
"percent_off": 30,
"effect": "APPLY_TO_ORDER"
},
"redemption": {
"quantity": null
},
"code_config": {
"length": 9,
"charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
"pattern": "#########",
"prefix": "Discount-",
"postfix": "YY"
},
"is_referral_code": false,
"start_date": "2022-09-20T00:00:00.000Z",
"expiration_date": "2022-09-30T00:00:00.000Z",
"validity_timeframe": {
"interval": "P3D",
"duration": "P1D"
}
},
"auto_join": false,
"join_once": false,
"use_voucher_metadata_schema": false,
"start_date": "2022-09-20T00:00:00.000Z",
"expiration_date": "2022-09-30T00:00:00.000Z",
"validity_timeframe": {
"interval": "P3D",
"duration": "P1D"
},
"validity_day_of_week": [
1,
2,
3,
4
],
"activity_duration_after_publishing": "P24D",
"vouchers_count": 1,
"active": true,
"metadata": {
"region": "AMER"
},
"created_at": "2022-09-20T09:32:29.530Z",
"creation_status": "DONE",
"vouchers_generation_status": "DONE",
"protected": false,
"category_id": null,
"object": "campaign"
},
{
"id": "camp_HgsbCKauXmEoPnnh8aas0ISe",
"name": "Static Campaign",
"campaign_type": "DISCOUNT_COUPONS",
"type": "STATIC",
"voucher": {
"type": "DISCOUNT_VOUCHER",
"discount": {
"type": "AMOUNT",
"amount_off": 3000,
"effect": "APPLY_TO_ORDER"
},
"redemption": {
"quantity": 1
},
"code_config": {
"length": 8,
"charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
"pattern": "########"
},
"is_referral_code": false
},
"auto_join": false,
"join_once": true,
"use_voucher_metadata_schema": true,
"vouchers_count": 1,
"active": true,
"metadata": {},
"created_at": "2022-09-20T07:52:34.499Z",
"updated_at": "2022-09-20T11:38:13.501Z",
"creation_status": "DONE",
"vouchers_generation_status": "DONE",
"protected": false,
"category_id": null,
"object": "campaign"
},
{
"id": "camp_f7fBbQxUuTN7dI7tGOo5XMDA",
"name": "Loyalty Program Fall 2022",
"campaign_type": "LOYALTY_PROGRAM",
"type": "AUTO_UPDATE",
"voucher": {
"type": "LOYALTY_CARD",
"loyalty_card": {
"points": 0,
"expiration_rules": {
"period_type": "MONTH",
"period_value": 7,
"rounding_type": "END_OF_YEAR"
}
},
"redemption": {
"quantity": null
},
"code_config": {
"length": 8,
"charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
"pattern": "########",
"prefix": "LOYALTY-CARD-"
},
"is_referral_code": false
},
"auto_join": true,
"join_once": true,
"use_voucher_metadata_schema": true,
"vouchers_count": 1,
"active": true,
"metadata": {},
"created_at": "2022-09-19T07:56:22.103Z",
"creation_status": "DONE",
"vouchers_generation_status": "DONE",
"protected": false,
"category_id": "cat_0bb343dee3cdb5ec0c",
"object": "campaign"
},
{
"id": "camp_4tHsQEDUOER6PeW8SoMdnHH6",
"name": "Dynamic Discounts",
"campaign_type": "DISCOUNT_COUPONS",
"type": "AUTO_UPDATE",
"voucher": {
"type": "DISCOUNT_VOUCHER",
"discount": {
"type": "PERCENT",
"percent_off": 5,
"percent_off_formula": "IF(ORDER_AMOUNT > 300;15;5)",
"effect": "APPLY_TO_ORDER"
},
"redemption": {
"quantity": null
},
"code_config": {
"length": 8,
"charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
"pattern": "########",
"prefix": "DYNAMIC-"
},
"is_referral_code": false
},
"auto_join": false,
"join_once": false,
"use_voucher_metadata_schema": true,
"vouchers_count": 1,
"active": true,
"metadata": {
"marketing_text": "Purchases above $300 are eligible for a 15% discount."
},
"created_at": "2022-07-12T15:12:02.575Z",
"updated_at": "2022-07-20T10:48:05.617Z",
"category": "test",
"creation_status": "DONE",
"vouchers_generation_status": "DONE",
"protected": false,
"category_id": "cat_0b688929a2476386a8",
"object": "campaign"
},
{
"id": "camp_JlsseNSDO7l4neFtev6p6945",
"name": "$20 OFF Entire Order",
"campaign_type": "DISCOUNT_COUPONS",
"type": "AUTO_UPDATE",
"voucher": {
"type": "DISCOUNT_VOUCHER",
"discount": {
"type": "AMOUNT",
"amount_off": 2000,
"effect": "APPLY_TO_ORDER"
},
"redemption": {
"quantity": null
},
"code_config": {
"length": 8,
"charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
"pattern": "########",
"prefix": "$20OFFORDER-"
},
"is_referral_code": false
},
"auto_join": false,
"join_once": false,
"use_voucher_metadata_schema": true,
"vouchers_count": 1,
"active": true,
"metadata": {},
"created_at": "2022-07-11T09:43:36.057Z",
"creation_status": "DONE",
"vouchers_generation_status": "DONE",
"protected": false,
"category_id": null,
"object": "campaign"
},
{
"id": "camp_Uj3cNbWSgt7Zl4AyHM7Sa5Qk",
"name": "3% OFF Entire Order",
"campaign_type": "DISCOUNT_COUPONS",
"type": "AUTO_UPDATE",
"voucher": {
"type": "DISCOUNT_VOUCHER",
"discount": {
"type": "PERCENT",
"percent_off": 3,
"effect": "APPLY_TO_ORDER"
},
"redemption": {
"quantity": null
},
"code_config": {
"length": 8,
"charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
"pattern": "########",
"prefix": "3%OFFORDER-"
},
"is_referral_code": false
},
"auto_join": false,
"join_once": false,
"use_voucher_metadata_schema": true,
"vouchers_count": 1,
"active": true,
"metadata": {},
"created_at": "2022-07-11T09:41:12.087Z",
"creation_status": "DONE",
"vouchers_generation_status": "DONE",
"protected": false,
"category_id": null,
"object": "campaign"
}
],
"total": 6
}Authorizations
Scopes
Query Parameters
Includes 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 Response
Returns a dictionary with a campaign property that contains an array of campaigns. The maximum number of campaigns returned is determined by the limit query parameter. Each entry in the array is a separate campaign object. If no more campaigns are available, the resulting array on a given page will be empty.
Schema model for GET v1/campaigns.

