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

Get Attributes

TikTok Shop 官方资料 · TikTok Shop Partner Center 开发者文档 · 适合开发者

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

来自 TikTok Shop 官方资料快照 ·

打开官方原文 ↗
  1. 当前资料结构化阅读页
  2. 固定快照已留存,可追溯
  3. 官方原文可核对
查看技术与溯源信息
平台 / profile
TikTok Shop / profile.tiktok.docs_api
语言
en-US
发布版本
cn-20260909-2
标签
zhuge/sourceplatform/tiktok_shopaudience/developercategory/api_doctopic/compliancetopic/developer

资料正文

§1 Path: /product/202309/categories/{category_id}/attributes

#

§2 Method: [GET]

#

§3 Function Description

Retrieve the standard built-in product and sales attributes for listing a product in a particular category based on your shop's location. Products on TikTok Shop are grouped into categories predefined by TikTok Shop, and each category is associated with a standard set of product attributes and sales attributes.

  • Sales attributes (e.g. size, color, length) define product variants and are optional if your product is straightforward and has no variants.
  • Product attributes (e.g. manufacturer, country of origin, materials used) describe the product as a whole, regardless of variant. Some product attributes are mandatory based on listing policies. Use this API to determine the mandatory and optional attributes before listing a product. Note: It must be a leaf category that corresponds to the category tree type specified in the category_version property.

#

§4 Common Parameters

For common parameters, refer to How to call TikTok Shop APIs - Common Parameters

Properties Location Type Require Sample Properties description
shop_cipherquerystringYGCP_XF90igAAAABh00qsWgtvOiGFNqyubMt3Use this property to pass shop information in requesting the API. Failure in passing the correct value when requesting the API for cross-border shops will return incorrect response.
Get by API Get Authorization Shop
content-typeheaderstringYapplication/jsonAllowed type: application/json
#

§5 Request Path Parameters

Properties Type Require Sample Properties description
category_idstringY600001The ID of the category of this product. It must be a leaf category.
#

§6 Request Query Parameters

Properties Type Require Sample Properties description
app_keystringY38abcdEvery single app will have a unique key. Please use the specific key assigned to your app.
signstringY5361235029d141222525e303d742f9e38aea052d10896d3197ab9d6233730b8cSignature generated by gen algorithm. When you send API requests to TTS, you must sign them so that TTS can identify the senders.
timestampintY1623812664Unix timestamp GMT (UTC+00:00). This timestamp is used across all API requests. Developers can use this convert to local time.
localestringNen-USThe BCP-47 locale codes for displaying category information.
Default: The default locale of your shop.
Possible values:
  • cs-CZ
  • de-AT
  • de-BE
  • de-DE
  • el-GR
  • en-GB
  • en-IE
  • en-US
  • es-ES
  • es-MX
  • fr-FR
  • fr-BE
  • hu-HU
  • id-ID
  • it-IT
  • ja-JP
  • ms-MY
  • nl-NL
  • nl-BE
  • pl-PL
  • pt-BR
  • pt-PT
  • th-TH
  • vi-VN
  • zh-CN | category_version |string |N |v1 |Filter categories by the category tree version.Possible values based on region:
  • US, EU and SEA: v2, represents the 7-level category tree. Important: For US, EU and SEA shops, you must pass v2 when using this API.
  • Other regions: v1, represents the 3-level category tree.Default: v1 |
#

§7 Request Sample

Query

https://open-api.tiktokglobalshop.com/product/202309/categories/600001/attributes?app_key=123abc&sign=5361235029d141222525e303d742f9e38aea052d10896d3197ab9d6233730b8c&timestamp=1625484268&shop_cipher=ROW_RHkDDABBAAB8tKAVoAqsMTjsQZFLyNfY&locale=en-US&category_version=v1
#

§8 Response Parameters

Properties Type Sample Properties description
codeint0The success or failure status code returned in API response.
messagestringSuccessThe success or failure messages returned in API response. Reasons of failure will be described in the message.
request_idstring202203070749000101890810281E8C70B7Request log
dataobjectSpecific return information
^attributes[]objectThe list of standard built-in product and sales attributes that are bound to the specified category, based on your shop's location.
^^idstring100392The ID of the built-in attribute.
^^namestringOccasionThe name of the built-in attribute.
^^typestringPRODUCT_PROPERTYThe attribute type.
Possible values:
  • SALES_PROPERTY: Indicates sales attributes that define product variants.
  • PRODUCT_PROPERTY: Indicates product attributes that describe the product as a whole. | ^^is_requried |bool |false |A flag to indicate if the product attribute is always required when creating or editing a product.
  • true: The attribute is always required.
  • false: The attribute is not required, or required only if certain conditions are met. Refer to requirement_conditions for the specific requirements.

Applicable only if type=PRODUCT_PROPERTY. | ^^values |[]object | |A list of selectable values for the attribute. | ^^^id |string |1001533 |The ID of the built-in attribute value. | ^^^name |string |Birthday |The name of the built-in attribute value. | ^^^icon_url |string |https://p16-oec-sg.ibyteimg.com/tos-alisg-i-aphluv4xwc-sg/37a9d5d39c27480d9870f73a2ad7cc95~tplv-aphluv4xwc-origin-jpeg.jpeg?dr=11254&from=3455097676&height=956&idc=no1a&ps=933b5bde&shcp=9b759fb9&shp=cdf09b4c&t=555f072d&width=1000 |The icon url value of the built-in attribute value. | ^^value_data_format |string |POSITIVE_INT_OR_DECIMAL |The supported data type and structure of the attribute value for free-form entries, such as strings, integers, or positive decimals. Applicable only for conditional (cascading) attributes, not for standard attributes. Possible values:

  • POSITIVE_INT_OR_DECIMAL: Positive integers or decimal numbers. | ^^is_customizable |bool |true |A flag to indicate if the product attribute value can be customized by sellers when creating or editing a product.

Applicable only if type=PRODUCT_PROPERTY. | ^^requirement_conditions |[]object | |A list of conditions that determine if the product attribute is required based on the seller's inputs for other attributes. If any of the conditions is met, the attribute is required; otherwise, it is optional. For example, there's a condition that states that the "Battery type" attribute is required if the seller selects the value "Batteries" for the attribute "Contains Batteries or Cells?". For more scenario-based guidance on using this parameter, refer to the Solution Guide - CAT-PRE-HAZMAT. Applicable only if type=PRODUCT_PROPERTY and is_requried=false. | ^^^condition_type |string |VALUE_ID_MATCH |The type of condition, such as matching values, or range comparisons. Possible values:

  • VALUE_ID_MATCH: The condition is true when the seller selects a value whose ID matches the one specified in this condition. | ^^^attribute_id |string |101610 |The ID of the product attribute that is being evaluated by the condition. | ^^^attribute_value_id |string |1024358 |The ID of the product attribute value that must match the seller's input for the condition to be true. | ^^is_multiple_selection |bool |true |A flag to indicate if multiple values can be provided for a product attribute when creating or editing a product.

Applicable only if type=PRODUCT_PROPERTY. |

#

§9 Response Sample

{"code":0,"data":{"attributes":[{"id":"100392","name":"Occasion","type":"PRODUCT_PROPERTY","is_requried":false,"values":[{"id":"1001533","name":"Birthday","icon_url":"https://p16-oec-sg.ibyteimg.com/tos-alisg-i-aphluv4xwc-sg/37a9d5d39c27480d9870f73a2ad7cc95~tplv-aphluv4xwc-origin-jpeg.jpeg?dr=11254\u0026from=3455097676\u0026height=956\u0026idc=no1a\u0026ps=933b5bde\u0026shcp=9b759fb9\u0026shp=cdf09b4c\u0026t=555f072d\u0026width=1000"}],"value_data_format":"POSITIVE_INT_OR_DECIMAL","is_customizable":true,"requirement_conditions":[{"condition_type":"VALUE_ID_MATCH","attribute_id":"101610","attribute_value_id":"1024358"}],"is_multiple_selection":true}]},"message":"Success","request_id":"202203070749000101890810281E8C70B7"}
#

§10 Error Code

For common error codes, refer to How to call TikTok Shop APIs - Common Error Code

Code Message
12052023Category does not exist
12052024Category is not final category
12052025The category is invalid
12052217All region shops must use V2 categories. Check the documentation for further details.
12052230Category version and categoryID are not matched.
12052704seller id not exist
36009003Internal error. Please try again. If the issue persists after multiple attempts, please contact platform support.
#