← 返回目录
📁 API Reference › Catalog Diagnostics

同步获取商品库商品诊断信息

您可以使用本接口同步获取您的商品库商品的诊断信息。 - 若商品库中发现问题,则当前能够显示的最新诊断信息为前一天的诊断信息,因为商品库诊断数据按UTC+0 时间存在一天的延迟。 - 若商品库中未发现问题,则返回的商品库诊断信息为空。

若想创建商品库商品诊断信息的异步下载任务,需使用/diagnostic/catalog/product/task/create/。需注意与异步下载任务提供的诊断信息相比,本接口同步获取的诊断信息更为详细。异步下载任务仅返回每个检测到的问题的 Product ID(商品ID,对应 product_id ),SKU ID( 自定义的商品唯一ID,对应sku_id / hotel_id / flight_id / destination_id ) ,Item title(商品标题,对应 title ),Issue title(问题标题,对应 issue_title ),Severity(问题级别,对应 issue_level )和 Source(更新源名称)。

请求

地址 https://business-api.tiktok.com/open_api/v1.3/diagnostic/catalog/

方法 GET

Header

|字段{30%}|类型{15%}|描述{55%}|
|---|---|---|
|Access-Token {必填}|string|授权访问令牌。可以通过[获取访问令牌](https://ads.tiktok.com/marketing_api/docs?id=1738373164380162)接口获取。|

参数

|字段{30%}|类型{15%}|描述{55%}|
|---|---|---|
| catalog_id {必填} | string | 商品库ID。您需有访问该商品库的权限。 |
| bc_id {必填} | string | 商务中心ID。该商务中心需为所指定商品库的所属商务中心,或所指定商品库已作为资产分享给该商务中心。 |
| feed_id | string | 更新源 ID。<br>若未传入本字段,则使用商品库的默认更新源的ID。 <br>若想获取商品库所有更新源的诊断信息,需将本字段设置为 `ALL` 。 <br>若想获取某个商品库的所有更新源的ID,可使用 [/catalog/feed/get/](https://ads.tiktok.com/marketing_api/docs?id=1740665183073281)。 |
| filtering | object | 筛选条件。 |
#| issue_level | string | 用于筛选结果的问题级别。<br>枚举值: <ul><li>`CRITICAL` :筛选需要立刻关注的严重问题。 </li><li>`WARNING` :筛选警告型问题。这些问题有对应的建议,可用于优化商品设置。</li></ul>|
#| issue_category | string | 用于筛选结果的问题类型。 <br>枚举值:<ul><li> `PRODUCT_ATTRIBUTES` :商品属性问题。</li><li>`PRODUCT_REVIEW` :商品审核问题。</li><li>`CATALOG` :商品库问题。 </li><li>`PIXEL_OR_EVENT` :Pixel 或事件问题。</li><li>`FILE_UPLOAD_OR_FEED` :文件上传或更新源问题。</li></ul>|
| lang | string | 想要为返回的 `issue_title` 和 `reason_and_suggestion` 字段设置的语言。<br> 默认值 `en `。 <br>支持的枚举值请查看下文的<a href="#item-link-lang枚举值">`lang`枚举值</a>小节。 |
| page | integer | 当前页数。 <br> 默认值:1。 <br>取值范围:≥1。 |
| page_size | integer | 分页大小。<br>默认值:10。<br>取值范围:[1, 20]。 |

lang枚举值

| 值 {30%}| 描述{70%} |
|---|---|
| `ar` | 阿拉伯语 |
| `cs-CZ` | 捷克语 |
| `de` | 德语 |
| `en` | 英语 |
| `es` | 西班牙语 |
| `fil` | 菲律宾语 |
| `fr` | 法语 |
| `id` | 印度尼西亚语 |
| `it` | 意大利语 |
| `ja` | 日语 |
| `ko` | 韩语 |
| `ms` | 马来语 |
| `pl-PL` | 波兰语 |
| `pt` | 葡萄牙语(巴西) |
| `ru` | 俄语 |
| `sv-SE` | 瑞典语 |
| `th` | 泰语 |
| `tr` | 土耳其语 |
| `vi` | 越南语 |
| `zh` | 中文 |

示例

(code curl http)
curl --location --request GET 'https://business-api.tiktok.com/open_api/v1.3/diagnostic/catalog/?catalog_id={{catalog_id}}&bc_id={{bc_id}}&filtering={"issue_level":"CRITICAL"}&lang=en&page=1&page_size=20' \
--header 'Access-Token: {{Access-Token}}' \
--header 'Content-Type: application/json'
(/code)

返回

|字段{30%}|类型{15%}|描述{55%}|
|---|---|---|
|code |number| 返回码。完整返回码列表及描述,参见 [附录 - 返回码](https://ads.tiktok.com/marketing_api/docs?id=1737172488964097)。|
|message |string| 返回信息。更多信息参见 [附录 - 返回码](https://ads.tiktok.com/marketing_api/docs?id=1737172488964097)。 |
|request_id |string| 请求的日志ID,唯一标识一个请求。 |
|data |object| 返回数据。 |
#| diagnostic_date | string | 诊断信息生成的日期(UTC+0 时间),格式为 `"YYYY-MM-DD"` 。 <br>示例: `"2023-06-15"`。|
#| issues | object[] | 有关商品库中发现的问题的诊断信息。 |
##| issue_id | string | 问题ID。 <br>部分问题ID可传入[/diagnostic/catalog/product/task/create/](https://ads.tiktok.com/marketing_api/docs?id=1771117279175682)接口,用于创建对应问题诊断信息的异步下载任务。 |
##| issue_title | string | 问题标题,即对问题的简要概括。 |
##| reason_and_suggestion | string | 原因和建议。<br>本字段由问题的描述和如何解决该问题的建议组成。 |
##| issue_level | string | 问题级别。 <br>枚举值:<ul><li>`CRITICAL` :该问题为需要立刻关注的严重问题。</li><li>`WARNING`:该问题为警告型问题,有对应的可用于优化商品设置的建议。</li></ul>|
##| issue_category| string | 问题类型。 <br> 枚举值: <ul><li>`PRODUCT_ATTRIBUTES` :商品属性问题。</li><li>`PRODUCT_REVIEW` :商品审核问题。</li><li> `CATALOG` :商品库问题。</li><li>`PIXEL_OR_EVENT`:Pixel 或事件问题。</li><li>`FILE_UPLOAD_OR_FEED` :文件上传或更新源问题。</li></ul>|
##| issue_product_field | string | 发现问题的商品字段。 |
##| affected_product_count | integer | 发现问题的商品库商品数量。 |
##| affected_product_percentage | number | 发现问题的商品库商品所占百分比。<br>取值范围:[0,100]。 |
##| example_affected_products | object[] | 仅当 `affected_product_count` 的值大于0时返回。 <br><br>最多包含10个有问题的商品示例的对象数组。您可以使用本对象数组中的字段详细分析发现的问题。 <br><br>本对象数组的结构与[/catalog/product/get/](https://ads.tiktok.com/marketing_api/docs?id=1740564136678402#item-link-返回)返回中的`list`参数相同。需注意每个商品返回的具体字段根据商品类型变化。例如,仅酒店商品库的商品会返回 `hotel_id` 。 |
#| page_info | object | 分页信息。 |
##| page | number | 当前页数。 |
##| page_size | number | 分页大小。 |
##| total_number | number | 总结果数。 |
##| total_page | number | 总页数。 |

示例

(code Success-Response http)
HTTPS/1.1 200 OK
{
    "code": 0,
    "message": "OK",
    "request_id": "{{request_id}}",
    "data": {
        "issues": [
            {
                "affected_product_percentage": 0.06253552657278164,
                "example_affected_products": [],
                "issue_id": "2002",
                "issue_level": "CRITICAL",
                "affected_product_count": 714,
                "issue_product_field": "",
                "issue_category": "PRODUCT_ATTRIBUTES",
                "reason_and_suggestion": "Check and update the link to an image that is at least 500x500 pixels",
                "issue_title": "Image is less than 500x500 pixels"
            },
            {
                "affected_product_percentage": 0.21221790040035,
                "example_affected_products": [],
                "issue_id": "3001",
                "issue_level": "CRITICAL",
                "affected_product_count": 2423,
                "issue_product_field": "",
                "issue_category": "PRODUCT_REVIEW",
                "reason_and_suggestion": "Update product info and appeal to continue. For approval, make sure newly updated products follow our Ad Policy.",
                "issue_title": "Product was disapproved due to prohibited content"
            },
            {
                "affected_product_percentage": 0.026363016104211864,
                "example_affected_products": [],
                "issue_id": "2004",
                "issue_level": "CRITICAL",
                "affected_product_count": 301,
                "issue_product_field": "",
                "issue_category": "PRODUCT_ATTRIBUTES",
                "reason_and_suggestion": "Check and update the image link. It must end with .jpeg or .png.",
                "issue_title": "Image link is invalid and can't be downloaded"
            },
            {
                "affected_product_percentage": 0.0053426710377306435,
                "example_affected_products": [],
                "issue_id": "2003",
                "issue_level": "CRITICAL",
                "affected_product_count": 61,
                "issue_product_field": "",
                "issue_category": "PRODUCT_ATTRIBUTES",
                "reason_and_suggestion": "Check the feed link and upload a file that is in CSV, XML, TSV, or GZIP format.",
                "issue_title": "Incorrect feed file or link format"
            },
            {
                "affected_product_percentage": 0.002539958362199814,
                "example_affected_products": [],
                "issue_id": "2001",
                "issue_level": "CRITICAL",
                "affected_product_count": 29,
                "issue_product_field": "",
                "issue_category": "PRODUCT_ATTRIBUTES",
                "reason_and_suggestion": "Check that the image hosting site doesn't block TikTok's server from fetching information.",
                "issue_title": "TikTok doesn't have permissions to access the image information hosted on your server"
            },
            {
                "affected_product_percentage": 6.694191640734276,
                "example_affected_products": [
                    {
                        "brand": "{{brand}}",
                        "product_version": "{{product_version}}",
                        "product_id": "{{product_id}}",
                        "item_group_id": "{{item_group_id}}",
                        "description": "{{description}}",
                        "title": "{{title}}",
                        "image_status": "SUCCESS",
                        "availability": "IN_STOCK",
                        "sku_id": "{{sku_id}}",
                        "profession": {
                            "condition": "NEW"
                        },
                        "image": [
                            {
                                "url": "{{url}}"
                            }
                        ],
                        "google_product_category": "",
                        "price": {
                            "sale_price": 0,
                            "price": 104.18,
                            "sale_price_effective_date": []
                        },
                        "audit": {
                            "audit_status": "approved"
                        },
                        "active_status": "ACTIVATED",
                        "image_url": "{{image_url}}",
                        "additional_image_urls": [],
                        "video_url": "",
                        "global_trade_item_number": "",
                        "manufacturer_part_number": "",
                        "landing_page": {
                            "android_url": "",
                            "ios_app_store_id": "",
                            "android_app_name": "",
                            "ios_app_name": "",
                            "iphone_app_name": "",
                            "ipad_app_store_id": "",
                            "ipad_app_name": "",
                            "android_package": "",
                            "ios_url": "",
                            "url": "{{url}}",
                            "iphone_app_store_id": "",
                            "landing_page_url": "{{landing_page_url}}"
                        },
                        "extra_info": {
                            "custom_label_4": "{{custom_label_4}}",
                            "custom_label_1": null,
                            "custom_label_3": null,
                            "custom_label_0": null,
                            "custom_label_2": null
                        }
                    },
                    {
                        "brand": "{{brand}}",
                        "product_version": "{{product_version}}",
                        "product_id": "{{product_id}}",
                        "item_group_id": "{{item_group_id}}",
                        "description": "{{description}}",
                        "title": "{{title}}",
                        "image_status": "SUCCESS",
                        "availability": "IN_STOCK",
                        "sku_id": "{{sku_id}}",
                        "profession": {
                            "condition": "NEW"
                        },
                        "image": [
                            {
                                "url": "{{url}}"
                            }
                        ],
                        "google_product_category": "",
                        "price": {
                            "sale_price": 0,
                            "price": 103.46,
                            "sale_price_effective_date": []
                        },
                        "audit": {
                            "audit_status": "approved"
                        },
                        "active_status": "ACTIVATED",
                        "image_url": "{{image_url}}",
                        "additional_image_urls": [],
                        "video_url": "",
                        "global_trade_item_number": "",
                        "manufacturer_part_number": "",
                        "landing_page": {
                            "android_url": "",
                            "ios_app_store_id": "",
                            "android_app_name": "",
                            "ios_app_name": "",
                            "iphone_app_name": "",
                            "ipad_app_store_id": "",
                            "ipad_app_name": "",
                            "android_package": "",
                            "ios_url": "",
                            "url": "{{url}}",
                            "iphone_app_store_id": "",
                            "landing_page_url": "{{landing_page_url}}"
                        },
                        "extra_info": {
                            "custom_label_4": "{{custom_label_4}}",
                            "custom_label_1": null,
                            "custom_label_3": null,
                            "custom_label_0": null,
                            "custom_label_2": null
                        }
                    }   
                ],
                "issue_id": "4003",
                "issue_level": "CRITICAL",
                "affected_product_count": 76431,
                "issue_product_field": "",
                "issue_category": "PRODUCT_ATTRIBUTES",
                "reason_and_suggestion": "Update the product price.",
                "issue_title": "Prices on the product and landing page don't match."
            }
        ],
        "page_info": {
            "total_page": 1,
            "page_size": 20,
            "page": 1,
            "total_number": 6
        },
        "diagnostic_date": "2023-07-05"
    }
}
(/code)

内容来源:TikTok API for Business 官方文档 · 本地归档

在接这个接口时卡住了?
Stuck wiring this API into production? We build ad-delivery tooling on these platforms — campaign automation, reporting pipelines, error-handling and migration between API versions.
联系我们 · Talk to us 每日平台更新简报 →