您可以使用 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
:指出問題會影響產品的國家/地區。