查看商品统计信息和问题
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
您可以使用 aggregateProductStatuses.list
方法大致了解 Merchant Center 账号中商品的状态。这有助于监控商品数据的整体健康状况,而无需提取每件单独的商品。此方法会提供您拥有的商品总数(按状态细分:已获批、待审核、未获批),还会列出影响您商品的任何问题。
特殊注意事项
使用 aggregateProductStatuses.list
方法时,需要特别注意一些事项。
- 数据可用性:从插入或更新商品到其状态反映在
aggregateProductStatuses
响应中,预计会有 30 分钟以上的延迟。
- 问题一致性:
aggregateProductStatuses.list
方法返回的问题标题和说明应与 Products API 返回的问题保持一致。不过,这些说明可能与 Merchant Center 界面中显示的问题说明不同。
概览所有商品状态
此示例展示了如何检索 AggregateProductStatus
资源的列表。
每个资源都表示商品在特定目标平台和国家/地区的组合中的状态。调用 aggregateProductStatuses.list
时不带任何参数,会返回您账号的所有可用状态。
GET https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/aggregateProductStatuses
以下是成功调用的示例响应:
{
"aggregateProductStatuses": [
{
"name": "accounts/12345/aggregateProductStatuses/SHOPPING_ADS~US",
"reportingContext": "SHOPPING_ADS",
"countryCode": "US",
"statistics": {
"approvedCount": "1500",
"pendingCount": "50",
"disapprovedCount": "25"
},
"issues": [
{
"issueType": "missing_image",
"severity": "ERROR",
"numProducts": "15",
"sampleProducts": [
"accounts/12345/products/online~en~US~SKU001",
"accounts/12345/products/online~en~US~SKU002"
]
},
{
"issueType": "invalid_price",
"severity": "CRITICAL",
"numProducts": "10",
"sampleProducts": [
"accounts/12345/products/online~en~US~SKU003"
]
}
]
},
{
"name": "accounts/12345/aggregateProductStatuses/FREE_LISTINGS~US",
"reportingContext": "FREE_LISTINGS",
"countryCode": "US",
"statistics": {
"approvedCount": "1510",
"pendingCount": "50",
"disapprovedCount": "15"
},
"issues": [
{
"issueType": "missing_image",
"severity": "ERROR",
"numProducts": "15",
"sampleProducts": [
"accounts/12345/products/online~en~US~SKU001",
"accounts/12345/products/online~en~US~SKU002"
]
}
]
}
]
}
获取特定国家/地区和目标平台的商品状态
您可以使用 aggregateProductStatuses.list
方法搭配 filter
查询参数来过滤结果,以查看特定国家/地区和目的地的状态。例如:country = "US" AND reportingContext = "SHOPPING_ADS"
。
如需了解详情,请参阅过滤条件语法。
GET https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/aggregateProductStatuses?filter=countryCode%3D"US"%20AND%20reportingContext%3D"SHOPPING_ADS"
以下是成功调用的示例响应:
{
"aggregateProductStatuses": [
{
"name": "accounts/12345/aggregateProductStatuses/SHOPPING_ADS~US",
"reportingContext": "SHOPPING_ADS",
"countryCode": "US",
"statistics": {
"approvedCount": "1500",
"pendingCount": "50",
"disapprovedCount": "25"
},
"issues": [
{
"issueType": "missing_image",
"severity": "ERROR",
"numProducts": "15",
"sampleProducts": [
"accounts/12345/products/online~en~US~SKU001",
"accounts/12345/products/online~en~US~SKU002"
]
},
{
"issueType": "invalid_price",
"severity": "CRITICAL",
"numProducts": "10",
"sampleProducts": [
"accounts/12345/products/online~en~US~SKU003"
]
}
]
}
]
}
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-08。
[null,null,["最后更新时间 (UTC):2025-08-08。"],[],[],null,["# View product statistics and issues\n\nYou can use the `aggregateProductStatuses.list` method to get a high-level\noverview of the status of products in your Merchant Center account. This is\nuseful for monitoring the overall health of your product data without needing to\nfetch every individual product. This method provides the total number of\nproducts you have, broken down by status (approved, pending, disapproved), and\nalso lists any issues that are affecting your products.\n\nSpecial considerations\n----------------------\n\nThere are special considerations when using the `aggregateProductStatuses.list`\nmethod.\n\n- **Data availability** : Expect a delay of more than 30 minutes between when a product is inserted or updated and when its status is reflected in the `aggregateProductStatuses` response.\n- **Issue consistency** : The issue titles and descriptions returned by the `aggregateProductStatuses.list` method are intended to be consistent with the issues returned by the Products API. However, they might differ from the issue descriptions shown in the Merchant Center user interface.\n\nGet an overview of all product statuses\n---------------------------------------\n\nThis example shows how to retrieve a list of `AggregateProductStatus` resources.\nEach resource represents the status of products for a specific combination of\ndestination and country. Calling\n[`aggregateProductStatuses.list`](/merchant/api/reference/rest/accounts_v1/accounts.aggregateproductstatuses/list)\nwithout any parameters returns all available statuses for your account. \n\n GET https://merchantapi.googleapis.com/accounts/v1/accounts/\u003cvar translate=\"no\"\u003e{ACCOUNT_ID}\u003c/var\u003e/aggregateProductStatuses\n\nHere's a sample response from a successful call: \n\n {\n \"aggregateProductStatuses\": [\n {\n \"name\": \"accounts/12345/aggregateProductStatuses/SHOPPING_ADS~US\",\n \"reportingContext\": \"SHOPPING_ADS\",\n \"countryCode\": \"US\",\n \"statistics\": {\n \"approvedCount\": \"1500\",\n \"pendingCount\": \"50\",\n \"disapprovedCount\": \"25\"\n },\n \"issues\": [\n {\n \"issueType\": \"missing_image\",\n \"severity\": \"ERROR\",\n \"numProducts\": \"15\",\n \"sampleProducts\": [\n \"accounts/12345/products/online~en~US~SKU001\",\n \"accounts/12345/products/online~en~US~SKU002\"\n ]\n },\n {\n \"issueType\": \"invalid_price\",\n \"severity\": \"CRITICAL\",\n \"numProducts\": \"10\",\n \"sampleProducts\": [\n \"accounts/12345/products/online~en~US~SKU003\"\n ]\n }\n ]\n },\n {\n \"name\": \"accounts/12345/aggregateProductStatuses/FREE_LISTINGS~US\",\n \"reportingContext\": \"FREE_LISTINGS\",\n \"countryCode\": \"US\",\n \"statistics\": {\n \"approvedCount\": \"1510\",\n \"pendingCount\": \"50\",\n \"disapprovedCount\": \"15\"\n },\n \"issues\": [\n {\n \"issueType\": \"missing_image\",\n \"severity\": \"ERROR\",\n \"numProducts\": \"15\",\n \"sampleProducts\": [\n \"accounts/12345/products/online~en~US~SKU001\",\n \"accounts/12345/products/online~en~US~SKU002\"\n ]\n }\n ]\n }\n ]\n }\n\nGet product statuses for a specific country and destination\n-----------------------------------------------------------\n\nYou can filter the results to see the status for a specific country and\ndestination by using the `filter` query parameter with the\n[`aggregateProductStatuses.list`](/merchant/api/reference/rest/accounts_v1/accounts.aggregateproductstatuses/list)\nmethod. For example: `country = \"US\" AND reportingContext = \"SHOPPING_ADS\"`.\nFor more information, see [Filter syntax](/merchant/api/guides/accounts/filter-syntax). \n\n GET https://merchantapi.googleapis.com/accounts/v1/accounts/\u003cvar translate=\"no\"\u003e{ACCOUNT_ID}\u003c/var\u003e/aggregateProductStatuses?filter=countryCode%3D\"US\"%20AND%20reportingContext%3D\"SHOPPING_ADS\"\n\nHere's a sample response from a successful call: \n\n {\n \"aggregateProductStatuses\": [\n {\n \"name\": \"accounts/12345/aggregateProductStatuses/SHOPPING_ADS~US\",\n \"reportingContext\": \"SHOPPING_ADS\",\n \"countryCode\": \"US\",\n \"statistics\": {\n \"approvedCount\": \"1500\",\n \"pendingCount\": \"50\",\n \"disapprovedCount\": \"25\"\n },\n \"issues\": [\n {\n \"issueType\": \"missing_image\",\n \"severity\": \"ERROR\",\n \"numProducts\": \"15\",\n \"sampleProducts\": [\n \"accounts/12345/products/online~en~US~SKU001\",\n \"accounts/12345/products/online~en~US~SKU002\"\n ]\n },\n {\n \"issueType\": \"invalid_price\",\n \"severity\": \"CRITICAL\",\n \"numProducts\": \"10\",\n \"sampleProducts\": [\n \"accounts/12345/products/online~en~US~SKU003\"\n ]\n }\n ]\n }\n ]\n }"]]