產品狀態

您可以使用 Product 資源查看 購物產品。

透過 Content API,您可以呼叫 ProductStatuses.get 方法。你可以透過 Merchant API 狀態,方法是擷取 Accounts.Products 資源。

您有責任遵守 廣告免費 產品資訊政策。購物廣告 有權強制執行這些政策,並在我們排除時採取適當措施 找出違反這些政策的內容或行為。

需求條件

如要查看產品狀態,您必須進行下列步驟:

  • 在目的地中註冊帳戶。
  • 請使用下列其中一種有效國家/地區代碼:
    • feedLabel 欄位。
    • shipping 欄位。
    • 動態饋給層級。
    • 您帳戶的運送設定。

取得產品狀態

擷取 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:指出問題在哪些國家/地區有影響 產品。