查看商品统计信息和问题

您可以使用 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"
          ]
        }
      ]
    }
  ]
}