Get Membership Tiers
Function
To get membership tiers with open API
獲取會員分級資料
URL
GET <<api_domain>>/v1/membership_tiers
Request Parameters
statuses |
Array(String) |
active , removed e.g. `?statuses[]=active&statuses[]=removed` |
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": [] } ] |
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 以仙為單位表示總消費要求 | 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": "6200bf237b5a39003b5c571d",
"level": 1,
"name_translations": {
"en": "Grade 1",
"zh-hant": "等級1"
},
"membership_tier_rules": [
{
"_id": "620a304a7b5a39003b5c573d",
"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": "620a304a7b5a39003b5c573d"
}
],
"promotions": [
{
"_id": "620a304a7b5a39003b5c573e",
"addon_product_id": null,
"available_platforms": [
"ec"
],
"banner_media_ids": [],
"codes": null,
"created_at": "2022-02-14T10:34:50.319+00:00",
"description_translations": {},
"discount_amount": null,
"discount_on": "order",
"discount_percentage": 2.0,
"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": "6200bf237b5a39003b5c571d",
"merchant_id": "61ad96bd065f7e001c93da3f",
"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-02-14T10:34:50.319+00:00",
"use_count": 0,
"user_max_use_count": 0,
"whitelisted_delivery_option_ids": [],
"whitelisted_membership_tier_ids": [
"6200bf237b5a39003b5c571d"
],
"whitelisted_payment_ids": [],
"whitelisted_tag_contents": [],
"id": "620a304a7b5a39003b5c573e"
}
]
},
{
"id": "6200f1b27b5a39003e5c571e",
"level": 2,
"name_translations": {
"en": "Grade 2",
"zh-hant": "等級2"
},
"membership_tier_rules": [
{
"_id": "6209e0867b5a39003e5c5730",
"condition_interval": {
"type": "single_purchase",
"time_unit": "month"
},
"created_at": null,
"effect_interval": {
"type": "within_interval",
"time_value": "12",
"time_unit": "month"
},
"effect_type": "upgrade",
"total_spending": {
"cents": 400000,
"currency_symbol": "HK$",
"currency_iso": "HKD",
"label": "HK$4,000.00",
"dollars": 4000.0
},
"updated_at": null,
"id": "6209e0867b5a39003e5c5730"
},
{
"_id": "6209e0867b5a39003e5c5731",
"condition_interval": {
"type": "single_purchase"
},
"created_at": null,
"effect_interval": {
"type": "within_interval",
"time_value": "12",
"time_unit": "month"
},
"effect_type": "extend",
"total_spending": {
"cents": 500000,
"currency_symbol": "HK$",
"currency_iso": "HKD",
"label": "HK$5,000.00",
"dollars": 5000.0
},
"updated_at": null,
"id": "6209e0867b5a39003e5c5731"
}
],
"promotions": [
{
"_id": "6200f1b27b5a3900355c571b",
"addon_product_id": null,
"available_platforms": [
"ec"
],
"banner_media_ids": [],
"codes": [],
"created_at": "2022-02-07T10:17:22.320+00:00",
"description_translations": {},
"discount_amount": null,
"discount_on": "order",
"discount_percentage": 10.0,
"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": "6200f1b27b5a39003e5c571e",
"merchant_id": "61ad96bd065f7e001c93da3f",
"min_price_type": "subtotal",
"multiple_code": false,
"requires_membership": false,
"seo_description_translations": {},
"seo_keywords": "",
"seo_title_translations": {},
"show_coupon": false,
"start_at": null,
"status": "hidden",
"term_translations": {},
"title_translations": {},
"updated_at": "2022-02-14T02:50:27.145+00:00",
"use_count": 0,
"user_max_use_count": 0,
"whitelisted_delivery_option_ids": [],
"whitelisted_membership_tier_ids": [
"6200f1b27b5a39003e5c571e"
],
"whitelisted_payment_ids": [],
"whitelisted_tag_contents": [],
"id": "6200f1b27b5a3900355c571b"
}
]
},
{
"id": "6209c3ad7b5a3900385c5733",
"level": 3,
"name_translations": {
"en": "Grade 3",
"zh-hant": "等級3"
},
"membership_tier_rules": [
{
"_id": "6209c3ad7b5a3900385c5731",
"condition_interval": {
"type": "within_interval",
"time_value": "20",
"time_unit": "month"
},
"created_at": null,
"effect_interval": {
"type": "within_interval",
"time_value": "12",
"time_unit": "month"
},
"effect_type": "upgrade",
"total_spending": {
"cents": 1000000,
"currency_symbol": "HK$",
"currency_iso": "HKD",
"label": "HK$10,000.00",
"dollars": 10000.0
},
"updated_at": null,
"id": "6209c3ad7b5a3900385c5731"
},
{
"_id": "6209c3ad7b5a3900385c5732",
"condition_interval": {
"type": "within_interval",
"time_value": "12",
"time_unit": "month"
},
"created_at": null,
"effect_interval": {
"type": "within_interval",
"time_value": "12",
"time_unit": "month"
},
"effect_type": "extend",
"total_spending": {
"cents": 1000000,
"currency_symbol": "HK$",
"currency_iso": "HKD",
"label": "HK$10,000.00",
"dollars": 10000.0
},
"updated_at": null,
"id": "6209c3ad7b5a3900385c5732"
}
],
"promotions": [
{
"_id": "6209c3ad7b5a39003e5c572e",
"addon_product_id": null,
"available_platforms": [
"ec"
],
"banner_media_ids": [],
"codes": null,
"created_at": "2022-02-14T02:51:25.513+00:00",
"description_translations": {},
"discount_amount": null,
"discount_on": "order",
"discount_percentage": 20.0,
"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": "6209c3ad7b5a3900385c5733",
"merchant_id": "61ad96bd065f7e001c93da3f",
"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-02-14T02:51:25.513+00:00",
"use_count": 0,
"user_max_use_count": 0,
"whitelisted_delivery_option_ids": [],
"whitelisted_membership_tier_ids": [
"6209c3ad7b5a3900385c5733"
],
"whitelisted_payment_ids": [],
"whitelisted_tag_contents": [],
"id": "6209c3ad7b5a39003e5c572e"
}
]
},
{
"id": "6209c3c77b5a3900355c572f",
"level": 4,
"name_translations": {
"en": "Grade 4",
"zh-hant": "等級4"
},
"membership_tier_rules": [
{
"_id": "6209c3c77b5a3900355c5730",
"condition_interval": {
"type": "single_purchase",
"time_unit": "month"
},
"created_at": null,
"effect_interval": {
"type": "unlimited",
"time_unit": "month"
},
"effect_type": "upgrade",
"total_spending": {
"cents": 2000000,
"currency_symbol": "HK$",
"currency_iso": "HKD",
"label": "HK$20,000.00",
"dollars": 20000.0
},
"updated_at": null,
"id": "6209c3c77b5a3900355c5730"
}
],
"promotions": [
{
"_id": "6209c3c87b5a3900355c5731",
"addon_product_id": null,
"available_platforms": [
"ec"
],
"banner_media_ids": [],
"codes": null,
"created_at": "2022-02-14T02:51:52.029+00:00",
"description_translations": {},
"discount_amount": null,
"discount_on": "order",
"discount_percentage": 50.0,
"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": "6209c3c77b5a3900355c572f",
"merchant_id": "61ad96bd065f7e001c93da3f",
"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-02-14T02:51:52.029+00:00",
"use_count": 0,
"user_max_use_count": 0,
"whitelisted_delivery_option_ids": [],
"whitelisted_membership_tier_ids": [
"6209c3c77b5a3900355c572f"
],
"whitelisted_payment_ids": [],
"whitelisted_tag_contents": [],
"id": "6209c3c87b5a3900355c5731"
}
]
}
]
Updated almost 3 years ago