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"
Body
Specify the new values for the parameters that you would like to update for the given loyalty campaign.
Request body schema for PUT /loyalties/{campaignId}
.
Base body schema for updating a campaign which contains coupon codes using PUT v1/campaigns
.
Body schema for update a campaign of loyalty type using PUT v1/campaigns
.
Base body schema for creating a campaign using PUT v1/campaigns
.
Defines the Loyalty Tiers Expiration.
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"
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.
An optional field to keep any extra textual information about the campaign such as a campaign description and details.
The category assigned to the campaign. Either pass this parameter OR the category_id
.
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.
Determine which metadata should be removed from campaign.
Unique category ID that this campaign belongs to. Either pass this parameter OR the category
.
"cat_0b688929a2476386a7"
Assigns or unassigns an area or store to the campaign.
NOTE: this object can be sent if the Areas and Stores enterprise feature is enabled. Contact Voucherify Sales to learn more.
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.
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.
Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
Defines whether the campaign can be updated with new vouchers after campaign creation.
AUTO_UPDATE
: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method).STATIC
: vouchers need to be manually published.
If the type
of the campaign is STANDALONE
, the type cannot be changed. Also, the type
cannot be changed to STANDALONE
.
AUTO_UPDATE
, STATIC
Response
Returns the loyalty campaign object if the update succeeded.
Response body schema for PUT /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.