Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Pass the campaign template ID that was assigned by Voucherify.
"camp_tpl_zLtn2H9fgcG3NwO7t4PAfHcq"
Body
Only name
is required. The rest of the fields will overwrite the template configuration.
Request body schema for POST /v1/templates/campaigns/{campaignTemplateId}/campaign-setup
.
Base body schema for creating a campaign
Campaign name.
An optional field to keep any extra textual information about the campaign such as a campaign description and details.
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 published
AUTO_UPDATE
, STATIC
If this value is set to true
, customers will be able to join the campaign only once. For loyalty campaigns, it's forced to true
, even if join_once: false
is passed in the request.
Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.
Total number of unique vouchers in campaign (size of 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"
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.
Unique category ID that this campaign belongs to. Either pass this parameter OR the category
.
"cat_0b688929a2476386a7"
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.
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.
Response
Returns the details about the created campaign and about the resources that have been created out of the template and added to the project.
Response body schema for POST /v1/templates/campaigns/{campaignTemplateId}/campaign-setup
.
Contains a list of resources that have been added to the project when the campaign has been created out of the template.
Details of the created campaign. This is an object representing a campaign.
The type of the object represented by JSON. This object stores information about the campaign created out of the campaign template.
campaign_setup