商品状态

您可以使用 Product 资源来查看 购物产品。

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

您有责任遵守购物广告 广告免费 商品详情政策。购物广告 保留实施这些政策的权利,并在发生以下情况时做出适当回应的权利: 查找违反这些政策的内容或行为。

要求

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

  • 在目标平台中注册您的账号。
  • 提供以下任一格式的有效国家/地区代码: <ph type="x-smartling-placeholder">
      </ph>
    • 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:指明在哪些国家/地区该问题影响到 产品。