来自 TikTok Shop 官方资料快照 ·
- 当前资料结构化阅读页
- 固定快照已留存,可追溯
- 官方原文可核对
资料正文
§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_cipher | query | string | Y | GCP_XF90igAAAABh00qsWgtvOiGFNqyubMt3 | Use 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-type | header | string | Y | application/json | Allowed type: application/json |
§5 Request Query Parameters
| Properties | Type | Require | Sample | Properties description |
|---|---|---|---|---|
| app_key | string | Y | 38abcd | Every single app will have a unique key. Please use the specific key assigned to your app. |
| sign | string | Y | 5361235029d141222525e303d742f9e38aea052d10896d3197ab9d6233730b8c | Signature generated by gen algorithm. When you send API requests to TTS, you must sign them so that TTS can identify the senders. |
| timestamp | int | Y | 1623812664 | Unix 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_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 | 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 withsrc,width, andheightattributes.
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
trueto 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-CZde-ATde-BEde-DEel-GRen-GBen-IEen-USes-ESes-MXfr-FRfr-BEhu-HUid-IDit-ITja-JPms-MYnl-NLnl-BEpl-PLpt-BRpt-PTth-THvi-VNzh-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×tamp=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 |
|---|---|---|---|
| code | int | 0 | The success or failure status code returned in API response. |
| message | string | Success | The success or failure messages returned in API response. Reasons of failure will be described in the message. |
| request_id | string | 202203070749000101890810281E8C70B7 | Request log |
| data | object | Specific return information | |
| ^categories | []object | Recommended category information. | |
| ^^id | string | 605254 | The category ID. |
| ^^is_leaf | bool | true | A flag to indicate if the category is a leaf category. |
| Note: You can only create or edit products that belong to a leaf category. | |||
| ^^level | int | 1 | The category level. |
| ^^name | string | Teas | The 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_ONLYis 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 |
|---|---|
| 12019006 | product description is invalid |
| 12019009 | product image list is invalid |
| 12019064 | No matching categories. Provide the full name of your product, edit its product properties, and try again. |
| 12052013 | The product description cannot exceed maximum characters |
| 12052051 | The product name exceed max limit characters |
| 12052056 | The num of image in description cannot exceed max limit |
| 12052217 | All region shops must use V2 categories. Check the documentation for further details. |
| 12052230 | Category version and categoryID are not matched. |
| 12052261 | product name is empty |
| 12052262 | Chinese characters are not supported in product name |
| 12052266 | The product name contains non-English characters. |
| 12052300 | product main image uri illegal |
| 12052301 | Width and length of main image must be at least {{min_limit}}, check uri {{uri}} |
| 12052305 | The main images aspect ratio cannot exceed max limit. |
| 12052306 | main product images count exceed limit |
| 12052340 | product description image uri illegal |
| 12052341 | The description images size cannot exceed limit. |
| 12052343 | Product description image format not support. |
| 12052345 | The product description html tag not support. |
| 12052346 | The product description has Chinese characters |
| 12052348 | The product description html tag required attribute is miss. |
| 12052349 | The product description html tag not support nest. |
| 12052350 | The product description html tag contain illegal attribute. |
| 12052351 | The product description contains non-English characters. |
| 12052352 | The product description nest exceeding limit |
| 12052700 | The seller is inactive. |
| 12052704 | seller id not exist |
| 12052722 | The image URI does not exist in TikTok Shop. |
| 36009003 | Internal error. Please try again. If the issue persists after multiple attempts, please contact platform support. |
| 12052912 | No 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. |
| 12052931 | The 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). |
