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"
Body
Specify the campaign parameters to be updated.
- Properties For Discount Coupons Campaign
- Properties For Referral Campaign
- Properties For Gift Campaign
- Properties For Loyalty Campaign
- Update Promotion Campaign
Request body schema for PUT v1/campaigns/{campaignId}
.
Base body schema for updating a campaign which contains coupon codes using PUT v1/campaigns
.
Body schema for update a campaign of discount coupons type using PUT v1/campaigns
.
Base body schema for creating a campaign using PUT v1/campaigns
.
Defines the voucher discount type and details. Contains information about discount.
- Amount
- Unit
- Unit Multiple
- Percent
- Fixed
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 campaign object if the update succeeded.
Response body schema for PUT 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