Create Campaign From Template
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:
- Update the validation rule,
- Unassign the validation rule,
- Assign an existing validation rule.
👍 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_COUPON type. You can use this template to create:
- Discount campaign
- Promotion tier
📘 Campaign Templates – Documentation
Read the Campaign Templates documentation to learn more about this feature.
Request body
Example request
{
"start_date": "2022-09-20T00:00:00.000Z",
"expiration_date": "2022-09-30T00:00:00.000Z",
"validity_timeframe": {
"duration": "PT1H",
"interval": "P2D"
},
"validity_hours": {
"daily": [
{
"start_time": "12:00",
"expiration_time": "14:00"
}
]
},
"category_id": "cat_0b688929a2476386a7"
}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.