v2.product.get_attribute_tree
GET /api/v2/product/get_attribute_tree
Get the attribute tree for categories
Endpoint URL
URL: https://partner.shopeemobile.com/api/v2/product/get_attribute_tree
Common Request Parameters
| Name | Type | Sample | Description |
|---|---|---|---|
| partner_id | int | 1 | Partner ID is assigned upon registration is successful. Required for all requests. |
| timestamp | timestamp | 1610000000 | This is to indicate the timestamp of the request. Required for all requests. Expires in 5 minutes. |
| access_token | string | c09222e3fc40ffb25fc947f738b1abf1 | The token for API access, using to identify your permission to the api. Valid for multiple use and expires in 4 hours. |
| shop_id | int | 600000 | Shopee's unique identifier for a shop. Required param for most APIs. |
| sign | string | e318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2 | Signature generated by partner_id, api path, timestamp, access_token, shop_id and partner_key via HMAC-SHA256 hashing algorithm. More details: https://open.shopee.com/documents?module=87&type=2&id=58&version=2 |
Request Parameters
| Name | Type | Required | Sample | Description |
|---|---|---|---|---|
| category_id_list | int[] | True | max count is 20 | |
| language | string | False | "en" | Language Support Lanuage: "SG": [ "en", "zh-Hans", "ms" ], "MY": [ "en", "zh-Hans", "ms" ], "PH": [ "en", "zh-Hans" ], "VN": [ "vn", "en" ], "ID": [ "id", "en" ], "TH": [ "th", "en" ], "BR": [ "pt-BR", "en" ], "MX": [ "es-MX", "en" ], "CO": [ "es-CO", "en" ], "CL": [ "es-CL", "en" ], "TW": [ "zh-Hant", "zh-Hans", "en" ], "IN": [ "en", "hi" ] |
Response Parameters
| Name | Type | Sample | Description |
|---|---|---|---|
| error | string | Error | |
| message | string | Message | |
| warning | string | Warning | |
| request_id | string | Request ID | |
| response | object | Resopnse | |
| list | object[] | Each result corresponds to one category in category_ids | |
| attribute_tree | object[] | One category's attribute trees | |
| attribute_id | int | Attribute ID | |
| mandatory | boolean | true | Is mandatory or not |
| name | string | Attribute Name | |
| attribute_value_list | object[] | All available values for this attribute | |
| value_id | int | Value ID | |
| name | string | Value name | |
| value_unit | string | Value unit | |
| child_attribute_list | object[] | Child attributes for the value of parent attribute The structure content is the same as attribute_tree | |
| multi_lang | object[] | Translate results for display | |
| language | string | Language | |
| value | string | Translate result | |
| attribute_info | object | Attribute extra info | |
| input_type | int | SINGLE_DROP_DOWN = 1 SINGLE_COMBO_BOX = 2 FREE_TEXT_FILED = 3 MULTI_DROP_DOWN = 4 MULTI_COMBO_BOX = 5 | |
| input_validation_type | int | VALIDATOR_NO_VALIDATE_TYPE = 0 VALIDATOR_INT_TYPE = 1 VALIDATOR_STRING_TYPE = 2 VALIDATOR_FLOAT_TYPE = 3 VALIDATOR_DATE_TYPE = 4 | |
| format_type | int | FORMAT_NORMAL = 1 FORMAT_QUANTITATIVE_WITH_UNIT = 2 | |
| date_format_type | int | YEAR_MONTH_DATE = 0 (DD/MM/YYYY) YEAR_MONTH = 1 (MM/YYYY) | |
| attribute_unit_list | string[] | Attribute's available units list | |
| max_value_count | int | Max selected value count | |
| introduction | string | Introduction for special Attribute | |
| is_oem | boolean | ||
| support_search_value | boolean | Indicates whether this attribute has searchable values. If yes, please call v2.product.search_attribute_value_list to get the default values | |
| multi_lang | object[] | Attribute translate info | |
| language | string | Language | |
| value | string | Translate result | |
| category_id | int | Category ID | |
| warning | string | Warning msg |