Skip to main content
PUT
/
v1
/
promotions
/
{campaignId}
/
stacks
/
{stackId}
Update Promotion Stack
curl --request PUT \
  --url https://{cluster}.voucherify.io/v1/promotions/{campaignId}/stacks/{stackId} \
  --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 Modified",
  "tiers": {
    "ids": [
      "promo_aaAF8mVAzA0PF1igia2OC63d",
      "promo_t9zdL6XMFk7B8fQ23zxELtdE"
    ],
    "hierarchy_mode": "MANUAL"
  }
}'
{
  "id": "stack_q2AmzFvOMCmg4Wdu5bDBlME6",
  "name": "Fifth Stack Modified",
  "created_at": "2022-09-23T07:44:53.888Z",
  "updated_at": "2022-09-23T07:59:44.172Z",
  "campaign_id": "camp_99HUWI53bVyLzPN1Fg5TBLWX",
  "object": "promotion_stack",
  "tiers": {
    "ids": [
      "promo_aaAF8mVAzA0PF1igia2OC63d",
      "promo_t9zdL6XMFk7B8fQ23zxELtdE"
    ],
    "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

ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty Campaign.

Example:

"camp_rRsfatlwN7unSeUIJDCYedal"

stackId
string
required

Promotion stack ID.

Example:

"stack_KOIde7AUf08at12lZ1r3OfFL"

Body

application/json

Specify the promotion stack parameters that you would like to update.

Request Body schema for PUT v1/promotions/{campaignId}/stacks/{stackId}.

name
string

Promotion stack name.

tiers
object

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

category_id
string

Promotion stack category ID.

Response

200 - application/json

Returns a promotion stack with updated parameters if the update was successful.

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

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.

updated_at
string<date-time>
required

Timestamp representing the date and time when the promotion stack was updated. 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