curl --request GET \
--url https://{cluster}.voucherify.io/client/v1/promotions/tiers \
--header 'Authorization: Bearer <token>' \
--header 'X-Client-Application-Id: <api-key>' \
--header 'X-Client-Token: <api-key>' \
--header 'origin: <origin>'{
"object": "list",
"data_ref": "tiers",
"tiers": [
{
"id": "promo_NzjTc3ZXTe7md5SziK3uYtei",
"created_at": "2022-09-21T11:38:34.962Z",
"name": "Order more than $100",
"banner": "Order more than $100",
"action": {
"discount": {
"type": "AMOUNT",
"amount_off": 3000,
"effect": "APPLY_TO_ORDER"
}
},
"metadata": {},
"hierarchy": 1,
"promotion_id": "camp_VEL7UX0jZjrvLx3hfNZBVzpq",
"campaign": {
"id": "camp_VEL7UX0jZjrvLx3hfNZBVzpq",
"start_date": "2022-09-21T00:00:00.000Z",
"expiration_date": "2022-09-30T00:00:00.000Z",
"validity_timeframe": {
"interval": "P3D",
"duration": "P2D"
},
"validity_day_of_week": [
1,
2,
3,
4,
5
],
"active": true,
"category_id": "cat_0bb81a481615a37b5e",
"object": "campaign"
},
"campaign_id": "camp_VEL7UX0jZjrvLx3hfNZBVzpq",
"active": true,
"start_date": "2022-09-21T00:00:00.000Z",
"expiration_date": "2022-09-30T00:00:00.000Z",
"validity_timeframe": {
"interval": "P3D",
"duration": "P2D"
},
"validity_day_of_week": [
1,
2
],
"summary": {
"redemptions": {
"total_redeemed": 0
},
"orders": {
"total_amount": 0,
"total_discount_amount": 0
}
},
"object": "promotion_tier",
"validation_rule_assignments": null
},
{
"id": "promo_RaYHtUBre5jU8frUXOvYBtlN",
"created_at": "2021-12-15T11:34:01.358Z",
"updated_at": "2022-02-09T09:20:08.619Z",
"name": "Hot Promotion - Tier 2",
"banner": "Get Tier 2 Discount $20 Off",
"action": {
"discount": {
"type": "AMOUNT",
"amount_off": 2000,
"effect": "APPLY_TO_ORDER"
}
},
"metadata": {},
"hierarchy": 2,
"promotion_id": "camp_5h0wc453_5",
"campaign": {
"id": "camp_5h0wc453_5",
"start_date": null,
"expiration_date": null,
"active": true,
"category_id": "cat_0b688929a2476386a6",
"object": "campaign"
},
"campaign_id": "camp_5h0wc453_5",
"active": true,
"summary": {
"redemptions": {
"total_redeemed": 33
},
"orders": {
"total_amount": 519200,
"total_discount_amount": 66000
}
},
"object": "promotion_tier",
"validation_rule_assignments": {
"object": "list",
"data_ref": "data",
"data": [
{
"id": "asgm_pEe1inoYSfmO12p7",
"rule_id": "val_5h0wc453_5",
"related_object_id": "promo_RaYHtUBre5jU8frUXOvYBtlN",
"related_object_type": "promotion_tier",
"created_at": "2021-12-15T11:34:01.358Z",
"object": "validation_rules_assignment"
}
],
"total": 1
}
},
{
"id": "promo_63fYCt81Aw0h7lzyRkrGZh9p",
"created_at": "2021-12-15T11:34:01.333Z",
"updated_at": "2022-02-09T09:20:05.603Z",
"name": "Hot Promotion - Tier 1",
"banner": "Get Tier 1 Discount 10zl",
"action": {
"discount": {
"type": "AMOUNT",
"amount_off": 1000,
"effect": "APPLY_TO_ORDER"
}
},
"metadata": {
"ProductionMetaData": "Hot Promotion - Tier 1"
},
"hierarchy": 1,
"promotion_id": "camp_5h0wc453_5",
"campaign": {
"id": "camp_5h0wc453_5",
"start_date": null,
"expiration_date": null,
"active": true,
"category_id": "cat_0b688929a2476386a6",
"object": "campaign"
},
"campaign_id": "camp_5h0wc453_5",
"active": true,
"summary": {
"redemptions": {
"total_redeemed": 11
},
"orders": {
"total_amount": 1414979,
"total_discount_amount": 11000
}
},
"object": "promotion_tier",
"validation_rule_assignments": {
"object": "list",
"data_ref": "data",
"data": [
{
"id": "asgm_QqYs7GGVy7cuh3L9",
"rule_id": "val_5h0wc453_4",
"related_object_id": "promo_63fYCt81Aw0h7lzyRkrGZh9p",
"related_object_type": "promotion_tier",
"created_at": "2021-12-15T11:34:01.333Z",
"object": "validation_rules_assignment"
}
],
"total": 1
}
}
],
"total": 3
}This method enables you to list promotion tiers.
curl --request GET \
--url https://{cluster}.voucherify.io/client/v1/promotions/tiers \
--header 'Authorization: Bearer <token>' \
--header 'X-Client-Application-Id: <api-key>' \
--header 'X-Client-Token: <api-key>' \
--header 'origin: <origin>'{
"object": "list",
"data_ref": "tiers",
"tiers": [
{
"id": "promo_NzjTc3ZXTe7md5SziK3uYtei",
"created_at": "2022-09-21T11:38:34.962Z",
"name": "Order more than $100",
"banner": "Order more than $100",
"action": {
"discount": {
"type": "AMOUNT",
"amount_off": 3000,
"effect": "APPLY_TO_ORDER"
}
},
"metadata": {},
"hierarchy": 1,
"promotion_id": "camp_VEL7UX0jZjrvLx3hfNZBVzpq",
"campaign": {
"id": "camp_VEL7UX0jZjrvLx3hfNZBVzpq",
"start_date": "2022-09-21T00:00:00.000Z",
"expiration_date": "2022-09-30T00:00:00.000Z",
"validity_timeframe": {
"interval": "P3D",
"duration": "P2D"
},
"validity_day_of_week": [
1,
2,
3,
4,
5
],
"active": true,
"category_id": "cat_0bb81a481615a37b5e",
"object": "campaign"
},
"campaign_id": "camp_VEL7UX0jZjrvLx3hfNZBVzpq",
"active": true,
"start_date": "2022-09-21T00:00:00.000Z",
"expiration_date": "2022-09-30T00:00:00.000Z",
"validity_timeframe": {
"interval": "P3D",
"duration": "P2D"
},
"validity_day_of_week": [
1,
2
],
"summary": {
"redemptions": {
"total_redeemed": 0
},
"orders": {
"total_amount": 0,
"total_discount_amount": 0
}
},
"object": "promotion_tier",
"validation_rule_assignments": null
},
{
"id": "promo_RaYHtUBre5jU8frUXOvYBtlN",
"created_at": "2021-12-15T11:34:01.358Z",
"updated_at": "2022-02-09T09:20:08.619Z",
"name": "Hot Promotion - Tier 2",
"banner": "Get Tier 2 Discount $20 Off",
"action": {
"discount": {
"type": "AMOUNT",
"amount_off": 2000,
"effect": "APPLY_TO_ORDER"
}
},
"metadata": {},
"hierarchy": 2,
"promotion_id": "camp_5h0wc453_5",
"campaign": {
"id": "camp_5h0wc453_5",
"start_date": null,
"expiration_date": null,
"active": true,
"category_id": "cat_0b688929a2476386a6",
"object": "campaign"
},
"campaign_id": "camp_5h0wc453_5",
"active": true,
"summary": {
"redemptions": {
"total_redeemed": 33
},
"orders": {
"total_amount": 519200,
"total_discount_amount": 66000
}
},
"object": "promotion_tier",
"validation_rule_assignments": {
"object": "list",
"data_ref": "data",
"data": [
{
"id": "asgm_pEe1inoYSfmO12p7",
"rule_id": "val_5h0wc453_5",
"related_object_id": "promo_RaYHtUBre5jU8frUXOvYBtlN",
"related_object_type": "promotion_tier",
"created_at": "2021-12-15T11:34:01.358Z",
"object": "validation_rules_assignment"
}
],
"total": 1
}
},
{
"id": "promo_63fYCt81Aw0h7lzyRkrGZh9p",
"created_at": "2021-12-15T11:34:01.333Z",
"updated_at": "2022-02-09T09:20:05.603Z",
"name": "Hot Promotion - Tier 1",
"banner": "Get Tier 1 Discount 10zl",
"action": {
"discount": {
"type": "AMOUNT",
"amount_off": 1000,
"effect": "APPLY_TO_ORDER"
}
},
"metadata": {
"ProductionMetaData": "Hot Promotion - Tier 1"
},
"hierarchy": 1,
"promotion_id": "camp_5h0wc453_5",
"campaign": {
"id": "camp_5h0wc453_5",
"start_date": null,
"expiration_date": null,
"active": true,
"category_id": "cat_0b688929a2476386a6",
"object": "campaign"
},
"campaign_id": "camp_5h0wc453_5",
"active": true,
"summary": {
"redemptions": {
"total_redeemed": 11
},
"orders": {
"total_amount": 1414979,
"total_discount_amount": 11000
}
},
"object": "promotion_tier",
"validation_rule_assignments": {
"object": "list",
"data_ref": "data",
"data": [
{
"id": "asgm_QqYs7GGVy7cuh3L9",
"rule_id": "val_5h0wc453_4",
"related_object_id": "promo_63fYCt81Aw0h7lzyRkrGZh9p",
"related_object_type": "promotion_tier",
"created_at": "2021-12-15T11:34:01.333Z",
"object": "validation_rules_assignment"
}
],
"total": 1
}
}
],
"total": 3
}The access token received from the authorization server in the OAuth 2.0 flow.
Indicates the origin (scheme, hostname, and port).
This parameter allows filtering promotions that are only available at the moment. When set to true, it selects only non-expired and active promotions.
Limits the number of objects to be returned. The limit can range between 1 and 100 items.
1 <= x <= 100Which page of results to return. The lowest value is 1.
Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
created_at, -created_at, updated_at, -updated_at Returns a dictionary with a tiers property that contains an array of promotion tiers.
Response body schema for GET v1/client/v1/promotions/tiers.
Promotion Tiers
The type of the object represented by JSON. This object stores information about promotion tiers in a dictionary.
Identifies the name of the attribute that contains the array of promotion tier objects.
Contains array of promotion tier objects.
Show child attributes
Unique promotion tier ID.
"promo_63fYCt81Aw0h7lzyRkrGZh9p"
Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format.
"2021-12-15T11:34:01.333Z"
Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format.
"2022-02-09T09:20:05.603Z"
Name of the promotion tier.
Text to be displayed to your customers on your website.
Contains details about the discount applied by the promotion tier.
Show child attributes
Contains information about discount.
Show child attributes
Defines the type of the voucher.
AMOUNT Amount taken off the subtotal of a price. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000.
Formula used to dynamically calculate the discount.
Maximum discount amount per order.
Defines how the discount is applied to the customer's order.
APPLY_TO_ORDER, APPLY_TO_ITEMS, APPLY_TO_ITEMS_PROPORTIONALLY, APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY, APPLY_TO_ITEMS_BY_QUANTITY Flag indicating whether the discount was calculated using a formula.
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.
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 unique ID.
Contains details about promotion tier's parent campaign.
Show child attributes
Unique campaign ID.
Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive before this date.
"2022-09-22T00:00:00.000Z"
Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is inactive after this date.
"2022-09-30T00:00:00.000Z"
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.
Show child attributes
Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a duration of PT1H will be valid for a duration of one hour.
"PT1H"
Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an interval of P2D will be valid every other day.
"P2D"
Integer array corresponding to the particular days of the week in which the voucher is valid.
0 Sunday1 Monday2 Tuesday3 Wednesday4 Thursday5 Friday6 Saturday0, 1, 2, 3, 4, 5, 6 Determines the hours of validity, e.g. to create a happy hours scenario.
Show child attributes
Defines the recurring period(s) when the resource is active. The periods should not overlap.
Show child attributes
Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time.
"12:00"
Integer array corresponding to the particular days of the week in which the resource is valid.
0 Sunday1 Monday2 Tuesday3 Wednesday4 Thursday5 Friday6 Saturday0, 1, 2, 3, 4, 5, 6 Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time.
"14:00"
A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the start_date and expiration_date using the Disable Campaign endpoint.
true indicates an active campaignfalse indicates an inactive campaignUnique category ID that this campaign belongs to.
"cat_0b688929a2476386a6"
The type of the object represented by the campaign object. This object stores information about the campaign.
Promotion tier's parent campaign's unique ID.
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 tierfalse indicates an inactive promotion tierActivation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is inactive before this date.
"2022-09-23T00:00:00.000Z"
Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is inactive after this date.
"2022-09-26T00:00:00.000Z"
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.
Show child attributes
Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a duration of PT1H will be valid for a duration of one hour.
"PT1H"
Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an interval of P2D will be valid every other day.
"P2D"
Integer array corresponding to the particular days of the week in which the voucher is valid.
0 Sunday1 Monday2 Tuesday3 Wednesday4 Thursday5 Friday6 Saturday0, 1, 2, 3, 4, 5, 6 Determines the hours of validity, e.g. to create a happy hours scenario.
Show child attributes
Defines the recurring period(s) when the resource is active. The periods should not overlap.
Show child attributes
Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time.
"12:00"
Integer array corresponding to the particular days of the week in which the resource is valid.
0 Sunday1 Monday2 Tuesday3 Wednesday4 Thursday5 Friday6 Saturday0, 1, 2, 3, 4, 5, 6 Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time.
"14:00"
Contains statistics about promotion tier redemptions and orders.
Show child attributes
The type of the object represented by JSON. This object stores information about the promotion tier.
Validation Rule Assignments List
Show child attributes
The type of the object represented by JSON. This object stores information about validation rule assignments.
Identifies the name of the JSON property that contains the array of validation rule assignments.
A dictionary that contains an array of validation rule assignments.
Show child attributes
Validation rule assignment ID.
"asgm_74F7QZoYbUoljwQO"
Validation rule ID.
"val_4j7DCRm2IS59"
The resource ID to which the validation rule was assigned.
"v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT"
The type of resource to which the validation rule was assigned.
voucher, campaign, earning_rule, reward_assignment, promotion_tier, distribution Timestamp representing the date and time when the validation rule assignment was created. The value is shown in the ISO 8601 format.
"2022-02-17T08:18:15.085Z"
The type of the object represented by the ID.
validation_rules_assignment Total number of validation rule assignments.
Promotion tier category ID.
"cat_0c9da30e7116ba6bba"
Show child attributes
Unique category ID assigned by Voucherify.
Category name.
Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
x >= 0The type of the object represented by the JSON. This object stores information about the category.
category Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.
"2022-07-14T10:45:13.156Z"
Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.
"2022-08-16T10:52:08.094Z"
Total number of promotion tiers.
As query results are always limited (by the limit parameter), the has_more flag indicates if there are more records for given filter parameters. This lets you know if you can run another request to get more records returned in the results.
Was this page helpful?