Creates a campaign out of a campaign template.
To create a campaign, you need to provide the name in the request, while other fields are optional. If no other fields are sent, the configuration from the template will be used.
You can send new values of the fields listed below to replace the settings saved in the template. However, you cannot assign an existing validation rule or create a new one in the request. If the template has a validation rule, a new validation rule is always created for the campaign. When the campaign has been created, then you can:
๐ Promotion Tiers and Campaign Templates
You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the
DISCOUNT_COUPONtype. You can use this template to create:
๐ Campaign Templates โ Documentation
Read the Campaign Templates documentation to learn more about this feature.
The access token received from the authorization server in the OAuth 2.0 flow.
Pass the campaign template ID that was assigned by Voucherify.
"camp_tpl_zLtn2H9fgcG3NwO7t4PAfHcq"
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.
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) vouchers.
AUTO_UPDATE: the campaign is dynamic, i.e. vouchers will generate based on set criteriaSTATIC: vouchers need to be manually publishedAUTO_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 Saturday0, 1, 2, 3, 4, 5, 6 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.
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.
The type of the object represented by JSON. This object stores information about the campaign created out of the campaign template.
campaign_setup