Chuyển tới nội dung chính

v2.product.get_attribute_tree

GET /api/v2/product/get_attribute_tree

Get the attribute tree for categories

Đường dẫn Endpoint

URL: https://partner.shopeemobile.com/api/v2/product/get_attribute_tree

Tham số chung

TênKiểuMẫuMô tả
partner_idint1Partner ID được gán khi đăng ký thành công. Bắt buộc cho tất cả các yêu cầu.
timestamptimestamp1610000000Dùng để chỉ định thời gian của yêu cầu. Bắt buộc cho tất cả các yêu cầu. Hết hạn sau 5 phút.
access_tokenstringc09222e3fc40ffb25fc947f738b1abf1Token truy cập API, dùng để xác định quyền của bạn đối với API. Có thể sử dụng nhiều lần và hết hạn sau 4 giờ.
shop_idint600000Mã định danh duy nhất của Shopee cho một cửa hàng. Tham số bắt buộc cho hầu hết các API.
signstringe318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2Signature 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

Tham số Request

TênKiểuBắt buộcMẫuMô tả
category_id_listint[]Truemax count is 20
languagestringFalse"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" ]

Tham số Response

TênKiểuMẫuMô tả
errorstringError
messagestringMessage
warningstringWarning
request_idstringRequest ID
responseobjectResopnse
listobject[]Each result corresponds to one category in category_ids
attribute_treeobject[]One category's attribute trees
attribute_idintID thuộc tính
mandatorybooleantrueIs mandatory or not
namestringAttribute Name
attribute_value_listobject[]All available values for this attribute
value_idintValue ID
namestringValue name
value_unitstringValue unit
child_attribute_listobject[]Child attributes for the value of parent attribute The structure content is the same as attribute_tree
multi_langobject[]Translate results for display
languagestringLanguage
valuestringTranslate result
attribute_infoobjectAttribute extra info
input_typeintSINGLE_DROP_DOWN = 1 SINGLE_COMBO_BOX = 2 FREE_TEXT_FILED        = 3 MULTI_DROP_DOWN   = 4 MULTI_COMBO_BOX   = 5
input_validation_typeintVALIDATOR_NO_VALIDATE_TYPE =  0 VALIDATOR_INT_TYPE = 1 VALIDATOR_STRING_TYPE = 2 VALIDATOR_FLOAT_TYPE = 3 VALIDATOR_DATE_TYPE = 4
format_typeintFORMAT_NORMAL = 1 FORMAT_QUANTITATIVE_WITH_UNIT = 2
date_format_typeintYEAR_MONTH_DATE = 0 (DD/MM/YYYY) YEAR_MONTH = 1 (MM/YYYY)
attribute_unit_liststring[]Attribute's available units list
max_value_countintMax selected value count
introductionstringIntroduction for special Attribute
is_oemboolean
support_search_valuebooleanIndicates whether this attribute has searchable values. If yes, please call v2.product.search_attribute_value_list to get the default values
multi_langobject[]Attribute translate info
languagestringLanguage
valuestringTranslate result
category_idintID danh mục
warningstringWarning msg

Unirest.setTimeouts(0, 0); HttpResponse<String> response = Unirest.get("https://open.admin.uat.shopee.io/api/v2/product/get\_attribute\_tree?access\_token=access\_token&category\_ids=1234,5678&language=en&partner\_id=partner\_id&shop\_id=shop\_id&sign=sign&timestamp=timestamp") .asString();<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://open.admin.uat.shopee.io/api/v2/product/get\_attribute\_tree?access\_token=access\_token&category\_ids=1234,5678&language=en&partner\_id=partner\_id&shop\_id=shop\_id&sign=sign&timestamp=timestamp', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), )); $response = curl_exec($curl); curl_close($curl); echo $response; curl --location --request GET 'https://open.admin.uat.shopee.io/api/v2/product/get\_attribute\_tree?access\_token=access\_token&category\_ids=1234,5678&language=en&partner\_id=partner\_id&shop\_id=shop\_id&sign=sign&timestamp=timestamp' import requests url = "https://open.admin.uat.shopee.io/api/v2/product/get\_attribute\_tree?access\_token=access\_token&category\_ids=1234,5678&language=en&partner\_id=partner\_id&shop\_id=shop\_id&sign=sign&timestamp=timestamp" payload={} headers = { } response = requests.request("GET",url,headers=headers, data=payload, allow_redirects=False) print(response.text)

], "multi_lang": [ { "language": "-", "value": "-" } ] } ], "attribute_info": { "input_type": 0, "input_validation_type": 0, "format_type": 0, "date_format_type": 0, "attribute_unit_list": [ "-" ], "max_value_count": 0 }, "multi_lang": [ { "language": "-", "value": "-" } ] } ], "category_id": 0 } ] } }