Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name
of the campaign as the path parameter value, e.g., Loyalty%20Campaign
.
"camp_rRsfatlwN7unSeUIJDCYedal"
Response
Returns a loyalty campaign object for a given loyalty campaign ID.
Response body schema for GET /loyalties/{campaignId}
.
Unique campaign ID, assigned by Voucherify.
"camp_f7fBbQxUuTN7dI7tGOo5XMDA"
Campaign name.
Type of campaign.
LOYALTY_PROGRAM
Defines whether the campaign can be updated with new vouchers after campaign creation.
AUTO_UPDATE
: the campaign is dynamic, i.e. vouchers will generate based on set criteriaSTATIC
: vouchers need to be manually published
AUTO_UPDATE
, STATIC
Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
Always set to true
for loyalty campaigns, meaning customers can join the campaign only once. It can't be changed to false
.
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 category.
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 campaign will be active in ISO 8601 format after publishing. For example, a campaign with a duration
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.
Defines the Loyalty Tiers Expiration.
List of Validation Rules Assignments
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.