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

Recommend Category

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/recommend

#

§2 Method: [POST]

#

§3 Function Description

Retrieve the recommended category for a candidate product based on its title, description, and images. If you are syncing product catalogs from an external system to TikTok Shop, use this API to facilitate product categorization. Note: The language used in text fields such as descriptions and titles must align with the target market's language (e.g. don't use Chinese).


#

§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 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.
#

§6 Request Body Parameters

Properties Type Require Sample Properties description
category_versionstringNv1Filter 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 | description |string |N | Please check the measurements before purchase.
  • M-Size
  • XL-Size

Image |The product description in HTML format. Note:

  • The content must conform to the HTML syntax. All HTML tags are accepted but to optimize display on the TikTok Shop product detail page, the system will automatically convert certain tags into alternative formats, such as rendering <table> tags as images.
  • Max length: 10,000 characters.
  • Image guidelines: You must use TikTok Shop image URLs. Max 30 <img> tags, each under 4000px with src, width, and height attributes.

Recommendations:

  • If you are syncing a pre-existing description from another platform, include the full HTML source description here.
  • Provide a detailed description, ideally over 300 characters.
  • Include 3-5 key selling points, each under 250 characters, with supporting images.
  • Use 1600x1600 px for the image dimensions. | images |[]object |N | |Product images, including gallery images, images that appear in the description, product variant images. | ^uri |string |N |tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe |The URI of the image. Retrieve the URI from the Upload Product Image API. | include_prohibited_categories |bool |N |false |A flag to indicate whether to include matching categories that are prohibited on TikTok Shop. Set this to true to identify if the product falls under a category that you can't list on TikTok Shop in any circumstances. Note:
  • Applicable only for BR and MX markets.
  • Default: false | listing_platform |string |N |TIKTOK_SHOP |Recommend categories that belong to the specified platform. Possible values:
  • TIKTOK_SHOP
  • TOKOPEDIA Default: TIKTOK_SHOP

Applicable only for sellers that migrated from Tokopedia. | locale |string |N |en |The 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 | origin_platform_product_type |string |N |Handbags |The product type defined on the source platform. | origin_platform_vendor |string |N |Chanel |The product vendor or brand name on the source platform. | origin_platform_tags |[]string |N |["blastcornhole","Shopify Collective"] |Tags associated with the product on the source platform. | origin_platform_category |object |N | |Category information assigned to the product on the source platform. | ^id |string |N |gid://shopify/TaxonomyCategory/na |The category ID on the source platform. | ^name |string |N |Uncategorized |The category name on the source platform. | ^full_name |string |N |Uncategorized |The full category path or full category name on the source platform. | ^is_leaf |bool |N |true |Whether the category is a leaf category. | ^is_root |bool |N |true |Whether the category is a root category. | origin_platform_product_meta_data |object |N | |Additional product metadata provided by the source platform. | ^attribute_value_list |[]object |N | |A list of product metadata attributes and their values. | ^^name |string |N |mark_out_of_stock |The metadata attribute name. | ^^values |[]string |N |["true"] |The values associated with the metadata attribute. | product_title |string |Y |Men's Fashion Sports Low Cut Cotton Breathable Ankle Short |The product title. Title length:
  • DE, ES, FR, IE, IT, JP, UK, US: [1, 255]
  • BR, MX: [1, 300]
  • Other regions: [25, 255] |
#

§7 Request Sample

Query

https://open-api.tiktokglobalshop.com/product/202309/categories/recommend?app_key=123abc&sign=5361235029d141222525e303d742f9e38aea052d10896d3197ab9d6233730b8c&timestamp=1625484268&shop_cipher=ROW_RHkDDABBAAB8tKAVoAqsMTjsQZFLyNfY

Body

{"category_version":"v1","description":"\u003cp\u003ePlease check the measurements before purchase.\u003c/p\u003e\n\u003cul\u003e\n  \u003cli\u003eM-Size\u003c/li\u003e\n  \u003cli\u003eXL-Size\u003c/li\u003e\n\u003c/ul\u003e \n\u003cimg src=\"https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/181595ea7d26489284b5667488d708c1~tplv-o3syd03w52-origin-jpeg.jpeg?from=1432613627\" width='100' height='100' /\u003e","images":[{"uri":"tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe"}],"include_prohibited_categories":false,"listing_platform":"TIKTOK_SHOP","locale":"en","origin_platform_product_type":"Handbags","origin_platform_vendor":"Chanel","origin_platform_tags":["blastcornhole","Shopify Collective"],"origin_platform_category":{"id":"gid://shopify/TaxonomyCategory/na","name":"Uncategorized","full_name":"Uncategorized","is_leaf":true,"is_root":true},"origin_platform_product_meta_data":{"attribute_value_list":[{"name":"mark_out_of_stock","values":["true"]}]},"product_title":"Men\\'s Fashion Sports Low Cut Cotton Breathable Ankle Short"}
#

§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
^categories[]objectRecommended category information.
^^idstring605254The category ID.
^^is_leafbooltrueA flag to indicate if the category is a leaf category.
Note: You can only create or edit products that belong to a leaf category.
^^levelint1The category level.
^^namestringTeasThe category name.
^^permission_statuses[]string["INVITE_ONLY"]The shop's permission status for this category.

Possible values:

  • AVAILABLE: You have the permission to create products in this category.
  • INVITE_ONLY: This is a restricted category and you do not have permission to use it. Submit an application through the Qualification Center on TikTok Shop Seller Center to gain access. In Seller Center, INVITE_ONLY is also known as "restricted".
  • PROHIBITED: This category is prohibited on TikTok Shop. If your product falls under this category, do not attempt to list it, as it will be rejected during audit. Applicable only for BR and MX markets. | ^leaf_category_id |string |605254 |The recommended category ID. This is always a leaf category. |
#

§9 Response Sample

{"code":0,"data":{"categories":[{"id":"605254","is_leaf":true,"level":1,"name":"Teas","permission_statuses":["INVITE_ONLY"]}],"leaf_category_id":"605254"},"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
12019006product description is invalid
12019009product image list is invalid
12019064No matching categories. Provide the full name of your product, edit its product properties, and try again.
12052013The product description cannot exceed maximum characters
12052051The product name exceed max limit characters
12052056The num of image in description cannot exceed max limit
12052217All region shops must use V2 categories. Check the documentation for further details.
12052230Category version and categoryID are not matched.
12052261product name is empty
12052262Chinese characters are not supported in product name
12052266The product name contains non-English characters.
12052300product main image uri illegal
12052301Width and length of main image must be at least {{min_limit}}, check uri {{uri}}
12052305The main images aspect ratio cannot exceed max limit.
12052306main product images count exceed limit
12052340product description image uri illegal
12052341The description images size cannot exceed limit.
12052343Product description image format not support.
12052345The product description html tag not support.
12052346The product description has Chinese characters
12052348The product description html tag required attribute is miss.
12052349The product description html tag not support nest.
12052350The product description html tag contain illegal attribute.
12052351The product description contains non-English characters.
12052352The product description nest exceeding limit
12052700The seller is inactive.
12052704seller id not exist
12052722The image URI does not exist in TikTok Shop.
36009003Internal error. Please try again. If the issue persists after multiple attempts, please contact platform support.
12052912No matching category found within your account's main category. Check your main category in the seller profile on Seller Center and ensure your product falls within its scope.
12052931The title must follow these formatting rules: it cannot contain HTML escape characters (e.g., ), emojis, or ASCII control characters (e.g., \u007F). It also cannot consist solely of symbols (e.g., //// or !@#$
amp;), nor can it have more than 9 consecutive repeated characters (e.g., aaaaaaaaa or 111111111).
#