Get Membership Tiers
Function
To get membership tiers with open API
獲取會員分級資料
URL
GET <<api_domain>>/v1/membership_tiers
Request Parameters
Field | Type | Description | Example |
---|---|---|---|
include_fields[] | Array | 包含 fields, 預設為 membership_tier_rules & promotions enum: - membership_tier_rules - member_point_rules - user_credit_rules - promotions | include_fields[]=membership_tier_rules&include_fields[]=promotions |
Response fields
Field | Type | Description | Example |
---|---|---|---|
id | String | Membership tier's ID 會員等級ID | 5de6192b9a8b7900365abb5b |
level | Integer | Level of Current Membership Tier 等級高低 - *Having higher level with larger number. 等級數越高,數字越大 | 2 |
name_translations | Hash | Name Translations 會員等級名稱 | { "en": "Grade 1", "zh-hant": "等級1" } |
membership_tier_rules | Array | Rules of the member tier Please refer to the membership_tier entity below 會員分級的規則 詳情可參閱下面的membership_tier entity | [ { "id": "6200bf237b5a39003b5c571d", "level": 1, "name_translations": { "en": "Grade 1", "zh-hant": "等級1" }, "membership_tier_rules": [ { "_id": "6209c4347b5a3900385c5734", "condition_interval": { "type": "within_interval", "time_value": "6", "time_unit": "month" }, "created_at": null, "effect_interval": { "type": "unlimited", "time_value": "24", "time_unit": "month" }, "effect_type": "upgrade", "total_spending": { "cents": 5000000, "currency_symbol": "HK$", "currency_iso": "HKD", "label": "HK$50,000.00", "dollars": 50000.0 }, "updated_at": null, "id": "6209c4347b5a3900385c5734" } ], "promotion_ids": [ "6200bf247b5a39003b5c571f" ] } ] |
promotions | Array | The promotion linked with this membership tier with status equal hidden 跟這個會員分級有關聯的promotion,且status是hidden | [ { "id": "6209c3ad7b5a39003e5c572e", "discount_percentage": 20.0, "discount_amount": null, "discountable_quantity": null, "discounted_point": null, "discounted_price": null, "discountable_product_ids": [], "conditions": [], "created_at": "2022-02-14T02:51:25.513+00:00", "updated_at": "2022-02-14T02:51:25.513+00:00", "title_translations": {}, "discount_on": "order", "discountable_category_ids": [], "discount_type": "percentage", "is_accumulated": false, "codes": null, "show_coupon": false, "membership_tier_id": "6209c3ad7b5a3900385c5733", "requires_membership": false, "whitelisted_membership_tier_ids": [ "6209c3ad7b5a3900385c5733" ], "whitelisted_tag_contents": [], "user_max_use_count": 0, "max_use_count": 0, "use_count": 0, "sum_use_count": 0, "whitelisted_delivery_option_ids": [], "whitelisted_payment_ids": [], "start_at": null, "end_at": null, "status": "hidden", "usable": true, "for_affiliate_campaign": false, "is_contain_campaign": false, "seo_keywords": null, "seo_description_translations": {}, "seo_title_translations": {}, "link": null, "extended_promotion_id": null, "extend_promotions": [] } ] |
member_point_rules | Array | Rules of the member point Please refer to the member_point_rules entity below 會員點數的規則 詳情可參閱 Member Point Rule | [ { "id": "6271126eeb588d0043925de1", "status": "active", "unit_price": 10000, "points_per_unit": 1, "points_expire_day": null, "points_expire_month": null, "pending_days": 1, "rule_type": "earn_from_order", "remarks_translations": {}, "membership_tier_id": "6271126deb588d0049925ddf", "unit_point": null, "price_per_unit": null, "point_value": null, "apply_threshold": null, "available_platforms": [ "ec", "retail" ] } |
user_credit_rules | Array | Rules of the user credit Please refer to the membership_tier entity below 會員購物金的規則 詳情可參閱 User Credit Rule | [ { "id": "6271126eeb588d0040925de0", "status": "active", "rule_type": "birthday_credit", "credit_value": 5, "credit_threshold": null, "is_accumulated": false, "accumulated_type": "credit", "membership_tier_id": "6271126deb588d0049925ddf", "apply_threshold": null, "created_at": "2022-05-03T11:30:54.311+00:00", "updated_at": "2022-05-03T11:30:54.311+00:00" } ] |
membership_tier_rules Entity
Field | Type | Description | Example |
---|---|---|---|
id | String | Membership tier rule's ID 會員等級規則ID | "62033eb07b5a39003e5c5723" |
effect_type | String | Type of the membership_tier_rule 會員級別規則的類別 Available types: ["upgrade", "extend"] | "upgrade" |
condition_interval.type | String | Membership Upgrade Condition Type 會員升級條件類別 Available types: ["within_interval", "single_purchase"] | "single_purchase" |
condition_interval.time_unit | String | Membership Upgrade Condition Time Unit 會員升級條件 Available types: ["month"] | "month" |
condition_interval.time_value | Integer | Valid Period of the conditional interval if the type is "within_interval" 如類別是"within_interval",升級條件時間的值 | 12 |
effect_interval.type | String | Membership Valid Period 會員有效期限 Available types: ["within_interval", "unlimited"] | "within_interval" |
effect_interval.time_unit | String | Unit of Valid Period 有效期限單位 Available types: ["month"] | "month" |
effect_interval.time_value | Integer | Valid Period of the effect interval if the type is "within_interval" 如類別是"within_interval",有效期間的值 | 12 |
total_spending.cents | Integer | Total Spending Requirement represent in cents 以仙為單位表示總消費要求 *Note: Price 欄位 Cents 的最大值為 99999999900 | 100 |
total_spending.currency_symbol | String | Total Spending Requirement represent in currency_symbol 以currency_symbol表示總消費要求 | "HK$" |
total_spending.currency_iso | String | Total Spending Requirement represent in currency_iso 以currency_iso表示總消費要求 | "HKD" |
total_spending.label | String | Total Spending Requirement represent in label 以標籤表示總消費要求 | "HK$1.00" |
total_spending.dollars | Float | Total Spending Requirement represent in dollars 以元為單位表示總消費要求 | 1 |
Response Example
[
{
"id": "61543f22eb6b37004978ce4d",
"level": 1,
"name_translations": {
"en": "vip1"
},
"membership_tier_rules": [
{
"_id": "61543f22eb6b37004978ce4e",
"condition_interval": {
"type": "single_purchase",
"time_unit": "month"
},
"created_at": null,
"effect_interval": {
"type": "unlimited",
"time_unit": "month"
},
"effect_type": "upgrade",
"total_spending": {
"cents": 100,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$100",
"dollars": 100
},
"updated_at": null
}
],
"promotions": [
{
"_id": "6271126eeb588d0046925ddf",
"addon_product_id": null,
"available_platforms": [
"ec"
],
"banner_media_ids": [],
"codes": null,
"created_at": "2022-05-03T11:30:54.129Z",
"description_translations": {},
"discount_amount": null,
"discount_on": "order",
"discount_percentage": 90,
"discount_type": "percentage",
"discountable_category_ids": [],
"discountable_product_ids": [],
"discountable_quantity": null,
"discounted_point": null,
"discounted_price": null,
"end_at": null,
"extended_promotion_id": null,
"first_purchase_only": false,
"for_affiliate_campaign": false,
"is_accumulated": false,
"max_use_count": 0,
"membership_tier_id": "6271126deb588d0049925ddf",
"merchant_id": "611cd8ade0f510001e130048",
"min_price_type": "subtotal",
"multiple_code": false,
"requires_membership": false,
"seo_description_translations": {},
"seo_keywords": null,
"seo_title_translations": {},
"show_coupon": false,
"start_at": null,
"status": "hidden",
"term_translations": {},
"title_translations": {},
"updated_at": "2022-05-03T11:30:54.129Z",
"use_count": 0,
"user_max_use_count": 0,
"whitelisted_delivery_option_ids": [],
"whitelisted_membership_tier_ids": [
"6271126deb588d0049925ddf"
],
"whitelisted_payment_ids": [],
"whitelisted_tag_contents": []
}
],
"member_point_rules":[
{
"_id": "6271126deb588d0049925de0",
"condition_interval": {
"type": "single_purchase",
"time_unit": "month"
},
"created_at": null,
"effect_interval": {
"type": "unlimited",
"time_unit": "month"
},
"effect_type": "upgrade",
"total_spending": {
"cents": 1000000,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$1,000,000",
"dollars": 1000000
},
"updated_at": null
}
],
"user_credit_rules": [
{
"id": "6271126eeb588d0040925de0",
"status": "active",
"rule_type": "birthday_credit",
"credit_value": 5,
"credit_threshold": null,
"is_accumulated": false,
"accumulated_type": "credit",
"membership_tier_id": "6271126deb588d0049925ddf",
"apply_threshold": null,
"created_at": "2022-05-03T11:30:54.311+00:00",
"updated_at": "2022-05-03T11:30:54.311+00:00"
}
]
}
]
Updated 11 months ago