快工助手跨境电商知识与商机助手

What is the difference between the various types of product attributes?

Shopee 官方资料 · Shopee Open Platform 常见问题(FAQ) · 适合开发者

stable本次发布有变化全部展示

来自 Shopee 官方资料快照 ·

打开官方原文 ↗
  1. 当前资料结构化阅读页
  2. 固定快照已留存,可追溯
  3. 官方原文可核对
查看技术与溯源信息
平台 / profile
Shopee / profile.shopee.faq
语言
en
发布版本
cn-20260909-2
标签
zhuge/sourceplatform/shopeeaudience/developercategory/help_centertopic/apitopic/developertopic/faqtopic/feature-apistopic/product

资料正文

§1 What is the difference between the various types of product attributes?

The product attribute type is determined by the “input_type”, “input_validation_type” and “format_type” fields returned by the “v2.product.get_attribute_tree” API. It is important to note that these fields were previously returned as strings by the “v2.product.get_attributes” API, but they are now returned as int by the “v2.product.get_attribute_tree” API.

  1. “input_type": It indicates the input type of the Attribute Value; the available types are as follows.
input_typeTypeDefinitionDescriptionRemarks
1intSINGLE_DROP_DOWNSellers can select only one value from the attribute value list ("attribute_value_list") returned by the “v2.product.get_attribute_tree” API to upload.
2intSINGLE_COMBO_BOXSellers can select only one value from the attribute value list ("attribute_value_list") returned by the “v2.product.get_attribute_tree” API, or set a custom value to upload.
3intFREE_TEXT_FILEDSellers can set a custom value.
4intMULTI_DROP_DOWNSellers can select multiple values from the attribute value list ("attribute_value_list") returned by the “v2.product.get_attribute_tree” API to upload.A product can have up to 5 values selected.
5intMULTI_COMBO_BOXSellers can select multiple values from the attribute value list ("attribute_value_list") returned by the “v2.product.get_attribute_tree” API, or set custom values to upload..A product can have up to 5 values selected.
  1. "input_validation_type": It indicates the data type of the input attribute value. When the "input_type" is 1 or 4, this field will only return 0; when the "input_type" is 2, 3, or 5, the corresponding explanation of the return value of this field is as follows.
input_validation_typeTypeDescriptionRemarks
0intVALIDATOR_NO_VALIDATE_TYPE
1intVALIDATOR_INT_TYPE
2intVALIDATOR_STRING_TYPE
3intVALIDATOR_FLOAT_TYPE
4intVALIDATOR_DATE_TYPE, including two formats:DD/MM/YYYYY, e.g. 31/06/2021MM/YYYYY, e.g. 06/2021When adding or editing a product, for attributes with a date data type, please enter the timestamp in Unix timestamp format. However, when retrieving detailed product attribute values, the “original_value_name” will return the value in a readable date format.
  1. "format_type":It indicates whether the attribute has units.
format_typeTypeDescriptionRemarks
1intNon-unit attributes; Sellers are not required to enter a value in the unit field when adding/editing products.
2intAttributes with units; Sellers are required to upload the unit value listed in the “attribute_unit_list” field when adding/editing products.The API returns the “attribute_unit_list” field only if “format_type”: 2.
#