Skip to main content
GET
/
v1
/
promotions
/
stacks
List Promotion Stacks
curl --request GET \
  --url https://{cluster}.voucherify.io/v1/promotions/stacks \
  --header 'Authorization: Bearer <token>' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
  "object": "list",
  "data_ref": "data",
  "data": [
    {
      "id": "stack_SLuhQrAt3mXwHg776lYkzZO8",
      "name": "Stack 2",
      "created_at": "2022-11-03T10:18:58.356Z",
      "campaign_id": "camp_h8RyP6FV94F3Ev2odP24j5p1",
      "object": "promotion_stack",
      "tiers": {
        "ids": [
          "promo_Mfww2TuoeU23enqSmnz0f3rh",
          "promo_vU5IHaLKS7mmZ3ylABET6ikb",
          "promo_TeHA11JlfN29mUftDcpqIWWq",
          "promo_bhKBsIX3tO7yqmpTLCLLuaud"
        ],
        "hierarchy_mode": "MANUAL"
      }
    },
    {
      "id": "stack_twQWp1TyaxX5RlSqn061xGVy",
      "name": "First stack",
      "created_at": "2021-12-27T11:59:21.838Z",
      "updated_at": "2022-12-16T08:22:51.970Z",
      "campaign_id": "camp_HXsR22VUMC4hN4DR7eAhCalp",
      "object": "promotion_stack",
      "tiers": {
        "ids": [
          "promo_Vet0vCNyyo5pOddHfu2X3FCB",
          "promo_PoIyRVFA5c0Jk514xCpzKHga",
          "promo_Mwy9XpA0TLctSGriM5kum0qp"
        ],
        "hierarchy_mode": "MANUAL"
      }
    },
    {
      "id": "stack_vhCqN5PY7rmPw8yACRvHRZaz",
      "name": "Second stack",
      "created_at": "2021-12-27T11:55:47.431Z",
      "updated_at": "2022-12-16T08:22:52.221Z",
      "campaign_id": "camp_HXsR22VUMC4hN4DR7eAhCalp",
      "object": "promotion_stack",
      "tiers": {
        "ids": [
          "promo_Vet0vCNyyo5pOddHfu2X3FCB",
          "promo_PoIyRVFA5c0Jk514xCpzKHga",
          "promo_Mwy9XpA0TLctSGriM5kum0qp"
        ],
        "hierarchy_mode": "MANUAL"
      }
    },
    {
      "id": "stack_zwChew7GY1AnDZJQ6GVP2sdT",
      "name": "Third stack",
      "created_at": "2021-12-27T11:54:26.283Z",
      "updated_at": "2022-12-16T08:22:52.483Z",
      "campaign_id": "camp_HXsR22VUMC4hN4DR7eAhCalp",
      "object": "promotion_stack",
      "tiers": {
        "ids": [
          "promo_Vet0vCNyyo5pOddHfu2X3FCB",
          "promo_Mwy9XpA0TLctSGriM5kum0qp",
          "promo_PoIyRVFA5c0Jk514xCpzKHga"
        ],
        "hierarchy_mode": "MANUAL"
      }
    },
    {
      "id": "stack_NS5hEUznL9XPa89rbrOZYMey",
      "name": "Fourth stack",
      "created_at": "2021-12-27T11:48:43.982Z",
      "campaign_id": "camp_HXsR22VUMC4hN4DR7eAhCalp",
      "object": "promotion_stack",
      "tiers": {
        "ids": [
          "promo_Vet0vCNyyo5pOddHfu2X3FCB",
          "promo_Mwy9XpA0TLctSGriM5kum0qp",
          "promo_PoIyRVFA5c0Jk514xCpzKHga"
        ],
        "hierarchy_mode": "MANUAL"
      }
    },
    {
      "id": "stack_Rz0NvFtCZOObS3J5R68KET17",
      "name": "Third stack",
      "created_at": "2021-12-27T11:40:57.426Z",
      "campaign_id": "camp_HXsR22VUMC4hN4DR7eAhCalp",
      "object": "promotion_stack",
      "tiers": {
        "ids": [
          "promo_Vet0vCNyyo5pOddHfu2X3FCB",
          "promo_PoIyRVFA5c0Jk514xCpzKHga"
        ],
        "hierarchy_mode": "MANUAL"
      }
    },
    {
      "id": "stack_e8pH0nIuANmYRPE0x8hwDrpm",
      "name": "Second stack",
      "created_at": "2021-12-27T08:43:13.875Z",
      "campaign_id": "camp_HXsR22VUMC4hN4DR7eAhCalp",
      "object": "promotion_stack",
      "tiers": {
        "ids": [
          "promo_Mwy9XpA0TLctSGriM5kum0qp",
          "promo_PoIyRVFA5c0Jk514xCpzKHga"
        ],
        "hierarchy_mode": "MANUAL"
      }
    },
    {
      "id": "stack_3Q4EJpZqg3DI5IRwgBYfsb37",
      "name": "First stack",
      "created_at": "2021-12-27T08:43:13.498Z",
      "campaign_id": "camp_HXsR22VUMC4hN4DR7eAhCalp",
      "object": "promotion_stack",
      "tiers": {
        "ids": [
          "promo_Vet0vCNyyo5pOddHfu2X3FCB",
          "promo_PoIyRVFA5c0Jk514xCpzKHga"
        ],
        "hierarchy_mode": "MANUAL"
      }
    },
    {
      "id": "stack_KxSD0GahLUg9ULB6TseGfUHJ",
      "name": "Stack 1",
      "created_at": "2021-12-23T12:28:38.881Z",
      "campaign_id": "camp_h8RyP6FV94F3Ev2odP24j5p1",
      "object": "promotion_stack",
      "tiers": {
        "ids": [
          "promo_NMex647s5UushvbBUJmYT2Fc",
          "promo_4TqHr24boFISDrcOHSlfAxwm"
        ],
        "hierarchy_mode": "MANUAL"
      }
    }
  ],
  "total": 9
}

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.

Query Parameters

limit
integer

Limits the number of objects to be returned. The limit can range between 1 and 100 items.

Required range: 1 <= x <= 100
page
integer

Which page of results to return. The lowest value is 1.

Required range: 1 <= x <= 100
order
enum<string>

Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.

Available options:
created_at,
-created_at,
updated_at,
-updated_at,
name,
-name
created_at
object

A filter on the list based on the object created_at field. The value is a dictionary with the following options: before, after. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [created_at][before]=2017-09-08T13:52:18.227Z

updated_at
object

A filter on the list based on the object updated_at field. The value is a dictionary with the following options: before, after. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [updated_at][before]=2017-09-08T13:52:18.227Z

Response

200 - application/json

Returns a dictionary with a data property that contains an array of promotion stacks across all your campaigns.

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

object
enum<string>
default:list
required

The type of the object represented by JSON. This object stores information about promotion stacks in a dictionary.

Available options:
list
data_ref
enum<string>
default:data
required

Identifies the name of the attribute that contains the array of promotion stack objects.

Available options:
data
data
object[]
required

Contains array of promotion stack objects.

total
integer
required

Total number of promotion stacks.

Required range: x >= 0
I