Skip to main content
POST
/
v1
/
promotions
/
{campaignId}
/
stacks
Create Promotion Stack
curl --request POST \
  --url https://{cluster}.voucherify.io/v1/promotions/{campaignId}/stacks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>' \
  --data '{
  "name": "Fifth Stack",
  "tiers": {
    "ids": [
      "promo_aaAF8mVAzA0PF1igia2OC63d",
      "promo_t9zdL6XMFk7B8fQ23zxELtdE",
      "promo_dJNhAEeV5sR5oPQq1UrUdnMC"
    ],
    "hierarchy_mode": "MANUAL"
  }
}'
{
"id": "stack_q2AmzFvOMCmg4Wdu5bDBlME6",
"name": "Fifth Stack",
"created_at": "2022-09-23T07:44:53.888Z",
"campaign_id": "camp_99HUWI53bVyLzPN1Fg5TBLWX",
"object": "promotion_stack",
"tiers": {
"ids": [
"promo_aaAF8mVAzA0PF1igia2OC63d",
"promo_t9zdL6XMFk7B8fQ23zxELtdE",
"promo_dJNhAEeV5sR5oPQq1UrUdnMC"
],
"hierarchy_mode": "MANUAL"
}
}

Authorizations

X-App-Id
string
header
required
X-App-Token
string
header
required
Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

campaignId
string
required

Unique campaign ID.

Example:

"camp_rRsfatlwN7unSeUIJDCYedal"

Body

application/json

Specify the order of promotion tiers for the promotion stack.

Request body schema for POST v1/promotions/{campaignId}/stacks.

name
string
required

Promotion stack name.

tiers
object
required

Contains the tier configuration. A promotion stack can include up to 30 tiers.

category_id
string

Promotion stack category ID.

Response

Returns a new stack object if a valid promotion campaign identifier was provided in the path and available promotion IDs in the payload.

Response body schema for POST v1/promotions/{campaignId}/stacks.

name
string
required

Promotion stack name.

tiers
object
required

Contains the tier configuration. A promotion stack can include up to 30 tiers.

id
string
required

Unique promotion stack ID.

created_at
string<date-time>
required

Timestamp representing the date and time when the promotion stack was created. The value is shown in the ISO 8601 format.

campaign_id
string
required

Promotion stack's parent campaign's unique ID.

object
enum<string>
default:promotion_stack
required

The type of the object represented by JSON.

Available options:
promotion_stack
category_id
string | null
required

Promotion stack category ID.

categories
Promotion Stack Base · object[]
required

Details about the category assigned to the promotion stack.

I