Skip to main content
PUT
/
v1
/
promotions
/
tiers
/
{promotionTierId}
Update Promotion Tier
curl --request PUT \
  --url https://{cluster}.voucherify.io/v1/promotions/tiers/{promotionTierId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>' \
  --data '{
  "name": "Order more than $100 USD",
  "banner": "Order more than $100 USD",
  "action": {
    "discount": {
      "type": "PERCENT",
      "percent_off": 25,
      "effect": "APPLY_TO_ORDER"
    }
  },
  "metadata": {
    "level": "A-21"
  },
  "hierarchy": 1,
  "start_date": "2022-09-22T00:00:00.000Z",
  "expiration_date": "2022-09-29T00:00:00.000Z",
  "validity_timeframe": {
    "interval": "P3D",
    "duration": "P2D"
  },
  "validity_day_of_week": [
    1,
    2,
    3
  ]
}'
{
  "id": "promo_hINAfBAVhmFuSAzi3vptfyxW",
  "created_at": "2022-09-22T12:40:23.286Z",
  "updated_at": "2022-09-22T12:40:58.626Z",
  "name": "Order more than $100 USD",
  "banner": "Order more than $100 USD",
  "action": {
    "discount": {
      "type": "PERCENT",
      "percent_off": 25,
      "effect": "APPLY_TO_ORDER"
    }
  },
  "metadata": {
    "level": "A-21"
  },
  "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": false,
  "start_date": "2022-09-22T00:00:00.000Z",
  "expiration_date": "2022-09-29T00:00:00.000Z",
  "validity_timeframe": {
    "interval": "P3D",
    "duration": "P2D"
  },
  "validity_day_of_week": [
    1,
    2,
    3
  ],
  "summary": {
    "redemptions": {
      "total_redeemed": 0
    },
    "orders": {
      "total_amount": 0,
      "total_discount_amount": 0
    }
  },
  "object": "promotion_tier",
  "validation_rule_assignments": {
    "object": "list",
    "data_ref": "data",
    "data": [
      {
        "id": "asgm_8e3e53ZgDNcoRGAI",
        "rule_id": "val_q8qUBMOh5qIQ",
        "related_object_id": "promo_hINAfBAVhmFuSAzi3vptfyxW",
        "related_object_type": "promotion_tier",
        "created_at": "2022-09-22T12:40:23.286Z",
        "object": "validation_rules_assignment"
      }
    ],
    "total": 1
  }
}

Authorizations

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

Path Parameters

promotionTierId
string
required
Example:

Body

application/json
name
string
banner
string
action
object
metadata
object
hierarchy
integer
start_date
string<date-time>
Example:
expiration_date
string<date-time>
Example:
validity_timeframe
object
validity_day_of_week
enum<integer>[]
validity_hours
object
validation_rule_assignments
object
category
string
Example:
category_id
string
Example:

Response

200 - application/json
id
string
Example:
created_at
string<date-time>
Example:
updated_at
string<date-time>
Example:
name
string
banner
string
action
object
metadata
object
hierarchy
integer
promotion_id
string
campaign
object
campaign_id
string
active
boolean
start_date
string<date-time>
Example:
expiration_date
string<date-time>
Example:
validity_timeframe
object
validity_day_of_week
enum<integer>[]
validity_hours
object
summary
object
object
string
default:promotion_tier
validation_rule_assignments
object
category_id
string
Example:
categories
Category · object[]