商品状态

您可以使用 Product 资源查看购物产品的详细状态。

使用 Content API,您可以通过调用 ProductStatuses.get 方法来检索商品状态。借助 Merchant API,您可以通过检索 Accounts.Products 资源来检索商品状态。

您有责任遵守购物广告非付费商品详情政策。购物广告保留执行这些政策的权利,并且在我们发现违反这些政策的内容或行为时采取适当的应对措施。

要求

如需查看商品状态,您必须执行以下操作:

  • 在目标位置注册您的帐号。
  • 采用以下任一方式提供有效的国家/地区代码:
    • feedLabel 字段。
    • shipping 字段。
    • 在 Feed 级别。
    • 您账号的运费设置。

获取商品的状态

检索 Accounts.Products 资源以查看商品的状态。

下面是一个 GET 请求示例:

GET https://merchantapi.googleapis.com/products/v1beta/{name=accounts/*/products/*}

来自 products.get 的所有响应都包含以下字段:

  • creationDate:产品的创建日期。
  • lastUpdateDate:上次更新商品的时间。
  • googleExpirationDate:商品的失效日期。
  • destinationStatuses:商品的预期目标平台。
  • itemLevelIssues:与商品相关的所有问题的列表。

只有在收到您的请求时,商品存在商品级问题,您才会在响应中看到 itemLevelIssues 字段。

下面是一个 JSON 响应示例:

{
"name": "accounts/123/products/online~en~US~1",
"channel": "ONLINE",
"offerId": "1",
"contentLanguage": "en",
"feedLabel": "US",
"dataSource": "accounts/123/dataSources/456",
"attributes": {
  "title": "Color Headphones",
  "description": "A light and elegant design and super sound quality make these over-ear headphones a constant companion. Foldable to save space, and printed with the white Google logo on one earpiece.",
  "imageLink": "http://tmp53317.purecake.com/images/headphones.jpg",
  "availability": "in stock",
  "brand": "Google",
  "condition": "new",
  "googleProductCategory": "Electronics \u003e Audio \u003e Audio Components \u003e Headphones",
  "gtin": "00050644632143",
  "mpn": "90000007101",
  "price": {
    "amountMicros": "288000",
    "currencyCode": "USD"
  }
},
"productStatus": {
  "destinationStatuses": [
    {
      "reportingContext": "FREE_LISTINGS",
      "disapprovedCountries": [
        "US"
      ]
    }
  ],
  "itemLevelIssues": [
    {
      "code": "pending_phone_verification",
      "severity": "NOT_IMPACTED",
      "resolution": "merchant_action",
      "reportingContext": "FREE_LISTINGS",
      "description": "Unverified phone number",
      "detail": "Go to the Business information page to verify your business phone number",
      "documentation": "https://support.google.com/merchants/answer/10139041",
      "applicableCountries": [
        "US"
      ]
    },
    {
      "code": "pending_initial_policy_review_free_listings",
      "severity": "DISAPPROVED",
      "resolution": "pending_processing",
      "reportingContext": "FREE_LISTINGS",
      "description": "Pending initial review",
      "detail": "Please wait up to 3 business days for the review to be completed",
      "documentation": "https://support.google.com/merchants/answer/2948694",
      "applicableCountries": [
        "US"
      ]
    },
    {
      "code": "url_does_not_match_homepage",
      "severity": "DISAPPROVED",
      "resolution": "merchant_action",
      "attribute": "link",
      "reportingContext": "FREE_LISTINGS",
      "description": "Mismatched domains [link]",
      "detail": "Use the same domain for product landing page URLs as in your Merchant Center website setting",
      "documentation": "https://support.google.com/merchants/answer/160050",
      "applicableCountries": [
        "US"
      ]
    }
  ],
  "creationDate": "2024-05-27T16:15:31.791730Z",
  "lastUpdateDate": "2024-05-27T16:15:31.791730Z",
  "googleExpirationDate": "2024-06-26T16:15:31.791730Z"
}

列出所有商品状态

使用 products.list 查看您的所有商品及其状态。

您可以使用以下参数优化查询:

  • pageToken:用于获取后续结果页面。每个页面都有一个 nextPageToken,可用于获取序列中的下一页。
  • maxResults:每页的结果数上限。

下面是一个包含可选查询参数的示例 list 请求:

GET https://merchantapi.googleapis.com/products/v1beta/{parent}/products?maxResults=1&pageToken=5108b52782905aa9

下面是一个 JSON 响应示例:

{
"nextPageToken": "632fd090c95712c6",
"products": [
 {
  "name": "accounts/123/products/online~en~US~1",
  "channel": "ONLINE",
  "offerId": "1",
  "contentLanguage": "en",
  "feedLabel": "US",
  "dataSource": "accounts/123/dataSources/10355371287",
  "attributes": {
    "title": "Color Headphones",
    "description": "A light and elegant design and super sound quality make these over-ear headphones a constant companion. Foldable to save space, and printed with the white Google logo on one earpiece.",
    "imageLink": "http://tmp53317.purecake.com/images/headphones.jpg",
    "availability": "in stock",
    "brand": "Google",
    "condition": "new",
    "googleProductCategory": "Electronics \u003e Audio \u003e Audio Components \u003e Headphones",
    "gtin": "00050644632143",
    "mpn": "90000007101",
    "price": {
      "amountMicros": "28800000",
      "currencyCode": "USD"
    }
  },
  "productStatus": {
    "destinationStatuses": [
      {
        "reportingContext": "FREE_LISTINGS",
        "disapprovedCountries": [
          "US"
        ]
      }
    ],
    "itemLevelIssues": [
      {
        "code": "pending_phone_verification",
        "severity": "NOT_IMPACTED",
        "resolution": "merchant_action",
        "reportingContext": "FREE_LISTINGS",
        "description": "Unverified phone number",
        "detail": "Go to the Business information page to verify your business phone number",
        "documentation": "https://support.google.com/merchants/answer/10139041",
        "applicableCountries": [
          "US"
        ]
      },
      {
        "code": "pending_initial_policy_review_free_listings",
        "severity": "DISAPPROVED",
        "resolution": "pending_processing",
        "reportingContext": "FREE_LISTINGS",
        "description": "Pending initial review",
        "detail": "Please wait up to 3 business days for the review to be completed",
        "documentation": "https://support.google.com/merchants/answer/2948694",
        "applicableCountries": [
          "US"
        ]
      },
      {
        "code": "url_does_not_match_homepage",
        "severity": "DISAPPROVED",
        "resolution": "merchant_action",
        "attribute": "link",
        "reportingContext": "FREE_LISTINGS",
        "description": "Mismatched domains [link]",
        "detail": "Use the same domain for product landing page URLs as in your Merchant Center website setting",
        "documentation": "https://support.google.com/merchants/answer/160050",
        "applicableCountries": [
          "US"
        ]
      }
    ],
    "creationDate": "2024-05-27T16:15:31.791730Z",
    "lastUpdateDate": "2024-05-27T16:15:31.791730Z",
    "googleExpirationDate": "2024-06-26T16:15:31.791730Z"
  }
]
}

productstatuses.list 调用可以在生产环境中安全地进行测试,因为它不会对您的数据进行任何更改。

商品级问题

每个商品级问题都包含以下字段:

  • code:问题的错误代码。
  • severity:问题的严重程度。
  • resolution:通知商家是否可以解决问题。
  • attribute:受影响的属性名称。
  • reportingContext:问题适用的报告上下文。
  • description:问题说明。
  • detail:提供有关该问题的更多信息。
  • documentation:问题文档的网址。
  • applicableCountries:指明问题在哪些国家/地区影响了商品。