Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
"camp_rRsfatlwN7unSeUIJDCYedal"
Response
Returns a campaign object if a valid identifier was provided.
Response body schema for GET v1/campaigns/{campaignId}
.
This is an object representing a campaign.
Unique campaign ID, assigned by Voucherify.
"camp_f7fBbQxUuTN7dI7tGOo5XMDA"
Campaign name.
Type of campaign.
LOYALTY_PROGRAM
, GIFT_VOUCHERS
, DISCOUNT_COUPONS
, PROMOTION
, REFERRAL_PROGRAM
Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of generic (standalone) voucherss.
AUTO_UPDATE
: the campaign is dynamic, i.e. vouchers will generate based on set criteriaSTATIC
: vouchers need to be manually publishedSTANDALONE
: campaign for single vouchers
AUTO_UPDATE
, STATIC
, STANDALONE
Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
If this value is set to true
, customers will be able to join the campaign only once. It is always false
for generic (standalone) vouchers campaigns and it cannot be changed in them. It is always true
for loyalty campaigns and it cannot be changed in them.
Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.
Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format.
"2021-12-01T08:00:50.038Z"
Indicates the status of the campaign creation.
DONE
, IN_PROGRESS
, FAILED
, DRAFT
, MODIFYING
Indicates the status of the campaign's voucher generation.
DONE
, IN_PROGRESS
, FAILED
, DRAFT
, MODIFYING
Indicates whether the resource can be deleted.
Unique category ID that this campaign belongs to.
"cat_0b688929a2476386a7"
Contains details about the campaign category. For the GET List campaigns endpoint, this is returned only if the expand=category
query parameter is passed in the request. Otherwise, it is returned as an empty array. For GET Campaign summary endpoint, it is always returned as an empty array.
The type of the object represented by JSON. This object stores information about the campaign.
An optional field to keep any extra textual information about the campaign such as a campaign description and details.
Schema model for a campaign voucher.
Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.start_date
required when including the validity_timeframe
.
Integer array corresponding to the particular days of the week in which the voucher is valid.
0
Sunday1
Monday2
Tuesday3
Wednesday4
Thursday5
Friday6
Saturday
Determines the hours of validity, e.g. to create a happy hours scenario.
Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.
Total number of unique vouchers in campaign.
Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive before this date.
"2022-09-20T00:00:00.000Z"
Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is inactive after this date.
"2022-09-30T00:00:00.000Z"
A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the start_date
and expiration_date
.
true
indicates an active campaignfalse
indicates an inactive campaign
The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.
Timestamp representing the date and time when the campaign was last updated in ISO 8601 format.
"2022-09-20T09:18:19.623Z"
Unique category name.
Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles. It is also not returned for restricted users who use the GET Campaign summary endpoint.
Defines the referee reward and the way a referral is triggered. Context: REFERRAL_PROGRAM
.
Defines the Loyalty Tiers Expiration.
Lists all assignments of the campaign to areas and stores. For GET List Campaigns, this is returned if the expand=access_settings_assignments
query parameter is passed in the request. This object is not returned for the GET Campaign summary endpoint.
NOTE: This object is returned only if the Areas and Stores enterprise feature is enabled. Contact Voucherify Sales to learn more.
Promotion Tiers
List of Validation Rules Assignments