---
title: "Add Promotion Tier From Template"
method: POST
path: "/v1/templates/campaigns/{campaignTemplateId}/tier-setup"
tags: ["Templates"]
---

# Add Promotion Tier From Template

`POST /v1/templates/campaigns/{campaignTemplateId}/tier-setup`

Creates a promotion tier out of a discount campaign template and adds it to an existing promotion campaign.

To add a promotion tier to a campaign, you need to provide the name in the request and the campaign ID. 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 action or 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 promotion tier. When the promotion tier has been created, then you can:
- [Update the validation rule](/api-reference/validation-rules/update-validation-rule),
- [Unassign the validation rule](/api-reference/validation-rules/delete-validation-rule-assignment),
- [Assign an existing validation rule](/api-reference/validation-rules/create-validation-rule-assignment).

> 👍 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](/api-reference/templates/create-campaign-from-template)
>- [Promotion tier](/api-reference/templates/add-promotion-tier-from-template)

> 📘 Campaign Templates – Documentation
>
>Read the [Campaign Templates documentation](/build/campaign-templates) to learn more about this feature.

## Request body

- TemplatesCampaignsTierSetupCreateRequestBody — Request body schema for **POST** `/v1/templates/campaigns/{campaignTemplateId}/tier-setup`.
  - `campaign_id` string, required — Unique campaign identifier, assigned by Voucherify. Defines the promotion campaign to which the promotion tier will be added.
  - `name` string, required — Name of the promotion tier.
  - `banner` string — Text to be displayed to your customers on your website.
  - `metadata` object — The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format.
  - `hierarchy` integer — The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy.
  - `active` boolean — A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier
  - `start_date` string, date-time — Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date.
  - `expiration_date` string, date-time — Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date.
  - `validity_timeframe` ValidityTimeframe — 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`.
    - `duration` string — Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a `duration` of `PT1H` will be valid for a duration of one hour.
    - `interval` string — Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an `interval` of `P2D` will be valid every other day.
  - `validity_day_of_week` integer[] — Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday
  - `validity_hours` ValidityHours — Determines the hours of validity, e.g. to create a happy hours scenario.
    - `daily` object[] — Defines the recurring period(s) when the resource is active. The periods should not overlap.
      - `start_time` string, time — Defines the starting hour of validity in the HH:mm format. The resource is *inactive before* this time.
      - `days_of_week` integer[] — Integer array corresponding to the particular days of the week in which the resource is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday
      - `expiration_time` string, time — Defines the ending hour of validity in the HH:mm format. The resource is *inactive after* this time.
  - `category` string — Assign a new or update the promotion tier's category using name.
  - `category_id` string — Assign a new or update the promotion tier's category using id

## Response `200`

Returns the details about the added promotion tier and about the resources that have been created out of the template and added to the project.

- TemplatesCampaignsTierSetupCreateResponseBody — Response body schema for **POST** `/v1/templates/campaigns/{campaignTemplateId}/tier-setup`.
  - `created_resources` object[], required — Contains a list of resources that have been added to the project when the promotion tier has been created out of the template.
    - `id` string — Unique identifier assigned to the created resource. It is assigned by Voucherify.
    - `object` 'validation_rules' | 'product' | 'sku' | 'products_collection' | 'segments' | 'location' — The type of the created resource.
  - `promotion_tier` PromotionTier — This is an object representing a promotion tier. Promotion tiers are always assigned to a campaign and cannot be used standalone.
    - `id` string — Unique promotion tier ID.
    - `created_at` string, date-time — Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format.
    - `updated_at` string, date-time — Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format.
    - `name` string — Name of the promotion tier.
    - `banner` string — Text to be displayed to your customers on your website.
    - `action` object — Contains details about the discount applied by the promotion tier.
      - `discount` union — Contains information about discount.
        - object
          - `type` 'AMOUNT', required — Defines the type of the voucher.
          - `amount_off` number, required — Amount taken off the subtotal of a price. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000.
          - `amount_off_formula` string — Formula used to dynamically calculate the discount.
          - `aggregated_amount_limit` integer — Maximum discount amount per order.
          - `effect` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS' | 'APPLY_TO_ITEMS_PROPORTIONALLY' | 'APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY' | 'APPLY_TO_ITEMS_BY_QUANTITY'
          - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
        - object
          - `type` 'UNIT', required — Discount type.
          - `unit_off` integer — Number of units to be granted a full value discount.
          - `unit_off_formula` string — Formula used to dynamically calculate the number of units.
          - `effect` 'ADD_MISSING_ITEMS' | 'ADD_NEW_ITEMS' | 'ADD_MANY_ITEMS' | 'ADD_SAME_ITEMS'
          - `unit_type` string, required — The product deemed as free, chosen from product inventory (e.g. time, items).
          - `product` SimpleProductDiscountUnit
            - `id` string, required — Unique product ID, assigned by Voucherify.
            - `source_id` string — Product's source ID.
            - `name` string, required — Product name.
          - `sku` SimpleSkuDiscountUnit
            - `id` string, required — Unique SKU ID, assigned by Voucherify.
            - `source_id` string — Product variant's source ID.
            - `name` string, required — Sku name
          - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
        - object
          - `type` 'UNIT', required — Discount type.
          - `effect` 'ADD_MANY_ITEMS' — Defines how the discount is applied to the customer's order.
          - `units` DiscountUnitMultipleOneUnit[], required
            - `unit_off` number — Number of units to be granted a full value discount.
            - `unit_off_formula` string — Formula used to dynamically calculate the number of units.
            - `effect` 'ADD_NEW_ITEMS' | 'ADD_MISSING_ITEMS', required — Defines how the unit is added to the customer's order.
            - `unit_type` string, required — The product deemed as free, chosen from product inventory (e.g. time, items).
            - `product` SimpleProductDiscountUnit
              - …
            - `sku` SimpleSkuDiscountUnit
              - …
        - object
          - `type` 'PERCENT', required — Defines the type of the voucher.
          - `percent_off` number, required — The percent discount that the customer will receive.
          - `percent_off_formula` string — Formula used to dynamically calculate the discount.
          - `amount_limit` number — Upper limit allowed to be applied as a discount. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600.
          - `aggregated_amount_limit` integer — Maximum discount amount per order.
          - `effect` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS'
          - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
        - object
          - `type` 'FIXED', required — Defines the type of the voucher.
          - `fixed_amount` number, required — Sets a fixed value for an order total or the item price. The value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000. If the fixed amount is calculated by the formula, i.e. the `fixed_amount_formula` parameter is present in the fixed amount definition, this value becomes the **fallback value**. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value.
          - `fixed_amount_formula` string — Formula used to dynamically calculate the discount.
          - `effect` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS'
          - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
    - `metadata` object — The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format.
    - `hierarchy` integer — The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy.
    - `promotion_id` string — Promotion unique ID.
    - `campaign` object — Contains details about promotion tier's parent campaign.
      - `id` string — Unique campaign ID.
      - `start_date` string, date-time — Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date.
      - `expiration_date` string, date-time — Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.
      - `validity_timeframe` ValidityTimeframe — 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`.
        - `duration` string — Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a `duration` of `PT1H` will be valid for a duration of one hour.
        - `interval` string — Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an `interval` of `P2D` will be valid every other day.
      - `validity_day_of_week` integer[] — Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday
      - `validity_hours` ValidityHours — Determines the hours of validity, e.g. to create a happy hours scenario.
        - `daily` object[] — Defines the recurring period(s) when the resource is active. The periods should not overlap.
          - `start_time` string, time — Defines the starting hour of validity in the HH:mm format. The resource is *inactive before* this time.
          - `days_of_week` integer[] — Integer array corresponding to the particular days of the week in which the resource is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday
          - `expiration_time` string, time — Defines the ending hour of validity in the HH:mm format. The resource is *inactive after* this time.
      - `active` boolean — A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the `start_date` and `expiration_date` using the [Disable Campaign](/api-reference/disable-campaign) endpoint. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign
      - `category_id` string — Unique category ID that this campaign belongs to.
      - `object` string — The type of the object represented by the campaign object. This object stores information about the campaign.
    - `campaign_id` string — Promotion tier's parent campaign's unique ID.
    - `active` boolean — A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier
    - `start_date` string, date-time — Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date.
    - `expiration_date` string, date-time — Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date.
    - `validity_timeframe` ValidityTimeframe — 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`.
      - `duration` string — Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a `duration` of `PT1H` will be valid for a duration of one hour.
      - `interval` string — Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an `interval` of `P2D` will be valid every other day.
    - `validity_day_of_week` integer[] — Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday
    - `validity_hours` ValidityHours — Determines the hours of validity, e.g. to create a happy hours scenario.
      - `daily` object[] — Defines the recurring period(s) when the resource is active. The periods should not overlap.
        - `start_time` string, time — Defines the starting hour of validity in the HH:mm format. The resource is *inactive before* this time.
        - `days_of_week` integer[] — Integer array corresponding to the particular days of the week in which the resource is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday
        - `expiration_time` string, time — Defines the ending hour of validity in the HH:mm format. The resource is *inactive after* this time.
    - `summary` object — Contains statistics about promotion tier redemptions and orders.
      - `redemptions` object — Contains statistics about promotion tier redemptions.
        - `total_redeemed` integer — Number of times the promotion tier was redeemed.
      - `orders` object — Contains statistics about orders related to the promotion tier.
        - `total_amount` integer — Sum of order totals.
        - `total_discount_amount` integer — Sum of total discount applied using the promotion tier.
    - `object` string — The type of the object represented by JSON. This object stores information about the promotion tier.
    - `validation_rule_assignments` ValidationRuleAssignmentsList — Validation Rule Assignments List
      - `object` string, required — The type of the object represented by JSON. This object stores information about validation rule assignments.
      - `data_ref` string, required — Identifies the name of the JSON property that contains the array of validation rule assignments.
      - `data` ValidationRuleAssignment[], required — A dictionary that contains an array of validation rule assignments.
        - `id` string, required — Validation rule assignment ID.
        - `rule_id` string, required — Validation rule ID.
        - `related_object_id` string, required — The resource ID to which the validation rule was assigned.
        - `related_object_type` 'voucher' | 'campaign' | 'earning_rule' | 'reward_assignment' | 'promotion_tier' | 'distribution', required — The type of resource to which the validation rule was assigned.
        - `created_at` string, date-time, required — Timestamp representing the date and time when the validation rule assignment was created. The value is shown in the ISO 8601 format.
        - `object` 'validation_rules_assignment', required — The type of the object represented by the ID.
      - `total` integer, required — Total number of validation rule assignments.
    - `category_id` string — Promotion tier category ID.
    - `categories` Category[]
      - `id` string, required — Unique category ID assigned by Voucherify.
      - `name` string, required — Category name.
      - `hierarchy` integer, required — Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
      - `object` 'category', required — The type of the object represented by the JSON. This object stores information about the category.
      - `created_at` string, date-time, required — Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.
      - `updated_at` string, date-time — Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.
  - `object` 'promotion_tier_setup', required — The type of the object represented by JSON. This object stores information about the campaign created out of the campaign template.

## Other responses

- `404` — Returns an error if a resource is not found.

---

[API](https://skmtc.net/voucherifyio/apis/voucherify-api-async-actions.md) · [All operations](https://skmtc.net/voucherifyio/apis/voucherify-api-async-actions/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/voucherifyio/voucherify-api-async-actions/revisions/4982266e0494/schema)
