Skip to main content
POST
/
v1
/
promotions
/
tiers
/
{promotionTierId}
/
enable
Enable Promotion Tier
curl --request POST \
  --url https://{cluster}.voucherify.io/v1/promotions/tiers/{promotionTierId}/enable \
  --header 'Authorization: Bearer <token>' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
  "id": "promo_NzjTc3ZXTe7md5SziK3uYtei",
  "created_at": "2022-09-21T11:38:34.962Z",
  "updated_at": "2022-09-22T10:32:07.712Z",
  "name": "Order more than $100",
  "banner": "Order more than $100",
  "action": {
    "discount": {
      "type": "AMOUNT",
      "amount_off": 3000,
      "effect": "APPLY_TO_ORDER"
    }
  },
  "metadata": {},
  "hierarchy": 1,
  "campaign": {
    "id": "camp_VEL7UX0jZjrvLx3hfNZBVzpq",
    "start_date": "2022-09-21T00:00:00.000Z",
    "expiration_date": "2022-09-30T00:00:00.000Z",
    "validity_day_of_week": [
      1,
      2,
      3,
      4,
      5
    ],
    "active": true,
    "object": "campaign"
  },
  "campaign_id": null,
  "active": true,
  "start_date": "2022-09-21T00:00:00.000Z",
  "expiration_date": "2022-09-30T00:00:00.000Z",
  "validity_day_of_week": [
    1,
    2,
    3,
    4,
    5
  ],
  "summary": {
    "redemptions": {
      "total_redeemed": 2
    },
    "orders": {
      "total_amount": 37650,
      "total_discount_amount": 6000
    }
  },
  "object": "promotion_tier",
  "validation_rule_assignments": null
}

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

promotionTierId
string
required

Unique promotion tier ID.

Example:

"promo_2EnAik6Jt7dKTOMkRTIgEjZH"

Response

Returns the promotion tier object with an updated active parameter.

Response body schema for POST v1/promotions/tiers/{promotionTierId}/enable. 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.

Example:

"promo_63fYCt81Aw0h7lzyRkrGZh9p"

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.

Example:

"2021-12-15T11:34:01.333Z"

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.

Example:

"2022-02-09T09:20:05.603Z"

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.

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.

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.

Example:

"2022-09-23T00:00:00.000Z"

expiration_date
string<date-time>

Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is inactive after this date.

Example:

"2022-09-26T00:00:00.000Z"

validity_timeframe
object

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.

validity_day_of_week
enum<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
object

Determines the hours of validity, e.g. to create a happy hours scenario.

summary
object

Contains statistics about promotion tier redemptions and orders.

object
string
default:promotion_tier

The type of the object represented by JSON. This object stores information about the promotion tier.

validation_rule_assignments
object

Validation Rule Assignments List

category_id
string

Promotion tier category ID.

Example:

"cat_0c9da30e7116ba6bba"

categories
Category · object[]
I