您可以使用 accountstatuses
資源查看 Merchant Center 帳戶狀態,或 MCA (多重客戶帳戶) 及所有相關聯的子帳戶狀態。
如果商家有多個網路商店或品牌在不同的網站上販售,則可選擇將子帳戶隸屬於 MCA。
商家必須遵守購物廣告和免費產品資訊政策。Google 購物有權強制執行這些政策,並在發現違反這些政策的內容或行為時採取適當回應。
如需常見帳戶問題的詳細資料,請參閱「帳戶問題」參考資料。
accountstatuses.get
您可以使用 accountstatuses.get
查看單一商家帳戶的帳戶狀態資訊。
您可以使用 destination
參數來控制要傳回哪些產品問題。如未指定目的地,預設回應會包含 destination: Shopping
的狀態。
以下要求範例,其中 merchantId
是 MCA 帳戶 ID,accountId
則是該 MCA 的子帳戶:
GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/accountstatuses/accountId
如要取得獨立帳戶的狀態資訊,請使用相同的帳戶 ID accountstatuses.get
呼叫 merchantId
和 accountId
。
這個方法會傳回帳戶和商品層級問題。您可以使用購物廣告和免費產品資訊資源來修正 accountstatuses.get
回應中傳回的 accountLevelIssues
。
以下回應範例針對子帳戶因違反「到達網頁無效」而遭停權,
{
"kind": "content#accountStatus",
"accountId": "123456789",
"websiteClaimed": true,
"accountLevelIssues": [
{
"id": "editorial_and_professional_standards_destination_url_down_policy",
"title": "Account suspended due to policy violation: landing page not working",
"country": "US",
"severity": "critical",
"documentation": "https://support.google.com/merchants/answer/6150244#wycd-usefulness"
},
{
"id": "missing_ad_words_link",
"title": "No Google Ads account linked",
"severity": "error",
"documentation": "https://support.google.com/merchants/answer/6159060"
}
],
"products": [
{
"channel": "online",
"destination": "Shopping",
"country": "US",
"statistics": {
"active": "0",
"pending": "0",
"disapproved": "5",
"expiring": "0"
},
"itemLevelIssues": [
{
"code": "image_link_broken",
"servability": "disapproved",
"resolution": "merchant_action",
"attributeName": "image link",
"description": "Invalid image [image link]",
"detail": "Ensure the image is accessible and uses an accepted image format (JPEG, PNG, GIF)",
"documentation": "https://support.google.com/merchants/answer/6098289",
"numItems": "2"
},
{
"code": "landing_page_error",
"servability": "disapproved",
"resolution": "merchant_action",
"attributeName": "link",
"description": "Unavailable desktop landing page",
"detail": "Update your website or landing page URL to enable access from desktop devices",
"documentation": "https://support.google.com/merchants/answer/6098155",
"numItems": "5"
},
{
"code": "missing_condition_microdata",
"servability": "unaffected",
"resolution": "merchant_action",
"description": "Missing or invalid data [condition]",
"detail": "Add valid structured data markup to your landing page",
"documentation": "https://support.google.com/merchants/answer/6183460",
"numItems": "5"
},
{
"code": "mobile_landing_page_error",
"servability": "disapproved",
"resolution": "merchant_action",
"attributeName": "link",
"description": "Unavailable mobile landing page",
"detail": "Update your website or landing page URL to enable access from mobile devices",
"documentation": "https://support.google.com/merchants/answer/6098296",
"numItems": "3"
}
]
}
]
}
accountstatuses.list
您可以使用 accountstatuses.list
查看 MCA 所有子帳戶的帳戶狀態資訊。
您可以搭配 accountstatuses.list
使用篩選器,按目的地篩選產品問題。如未指定目的地,回應會包含 destination: Shopping
的狀態。
以下要求範例可讓您取得 MCA merchantId
下所有子帳戶的狀態資訊:
GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/accountstatuses
回應範例如下:
{
"kind": "content#accountstatusesListResponse",
"resources": [
{
"kind": "content#accountStatus",
"accountId": "1234567",
"websiteClaimed": true,
"accountLevelIssues": [
{
"id": "editorial_and_professional_standards_destination_url_down_policy",
"title": "Account suspended due to policy violation: landing page not working",
"country": "US",
"severity": "critical",
"documentation": "https://support.google.com/merchants/answer/6150244#wycd-usefulness"
},
{
"id": "missing_ad_words_link",
"title": "No Google Ads account linked",
"severity": "error",
"documentation": "https://support.google.com/merchants/answer/6159060"
}
],
"products": [
{
"channel": "online",
"destination": "Shopping",
"country": "US",
"statistics": {
"active": "0",
"pending": "0",
"disapproved": "0",
"expiring": "0"
}
}
]
},
{
"kind": "content#accountStatus",
"accountId": "123456789",
"websiteClaimed": true,
"accountLevelIssues": [
{
"id": "home_page_issue",
"title": "Website URL not provided",
"severity": "critical",
"documentation": "https://support.google.com/merchants/answer/176793"
},
{
"id": "missing_ad_words_link",
"title": "No Google Ads account linked",
"severity": "error",
"documentation": "https://support.google.com/merchants/answer/6159060"
}
],
"products": [
{
"channel": "online",
"destination": "Shopping",
"country": "US",
"statistics": {
"active": "0",
"pending": "0",
"disapproved": "0",
"expiring": "0"
}
}
]
}
]
}
針對非 MCA 帳戶 (例如獨立 Merchant Center 帳戶) 呼叫 accountstatuses.list
時,系統會傳回 403
錯誤。
以下是針對獨立帳戶呼叫 accountstatuses.list
的回應範例:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "forbidden",
"message": "111111111 is not a multi-client account (MCA). The only account
service operations allowed on non-MCAs are 'get', 'update',
'authinfo' and 'claimwebsite'."
}
],
"code": 403,
"message": "111111111 is not a multi-client account (MCA). The only account
service operations allowed on non-MCAs are 'get', 'update',
'authinfo' and 'claimwebsite'."
}
}
批次模式
具有 GET
方法的 accountstatuses.custombatch
會傳回多重客戶帳戶中多個子帳戶的帳戶狀態資訊。
要求 JSON 包含 MCA 帳號的 merchantId
、子帳戶的 accountId
、不重複的 batchId
,以及設為 get
的 method
。
POST https://shoppingcontent.googleapis.com/content/v2.1/accountstatuses/batch
以下是要求 JSON 主體的範例:
{
"entries": [
{
"accountId": 1212121212,
"merchantId": 4444444444,
"method": "get",
"batchId": 9
},
{
"accountId": 1313131313,
"merchantId": 4444444444,
"method": "get",
"batchId": 99
}
]
}
以下是 JSON 回應主體的範例:
{
"kind": "content#accountstatusesCustomBatchResponse",
"entries": [
{
"batchId": 9,
"accountStatus": {
"kind": "content#accountStatus",
"accountId": "1212121212",
"websiteClaimed": true,
"accountLevelIssues": [
{
"id": "home_page_issue",
"title": "Website URL not provided",
"severity": "critical",
"documentation": "https://support.google.com/merchants/answer/176793"
},
{
"id": "missing_ad_words_link",
"title": "No Google Ads account linked",
"severity": "error",
"documentation": "https://support.google.com/merchants/answer/6159060"
}
],
"products": [
{
"channel": "online",
"destination": "Shopping",
"country": "US",
"statistics": {
"active": "0",
"pending": "0",
"disapproved": "0",
"expiring": "0"
}
}
]
}
},
{
"batchId": 99,
"accountStatus": {
"kind": "content#accountStatus",
"accountId": "1313131313",
"websiteClaimed": true,
"accountLevelIssues": [
{
"id": "editorial_and_professional_standards_destination_url_down_policy",
"title": "Account suspended due to policy violation: landing page not working",
"country": "US",
"severity": "critical",
"documentation": "https://support.google.com/merchants/answer/6150244#wycd-usefulness"
},
{
"id": "missing_ad_words_link",
"title": "No Google Ads account linked",
"severity": "error",
"documentation": "https://support.google.com/merchants/answer/6159060"
}
],
"products": [
{
"channel": "online",
"destination": "Shopping",
"country": "US",
"statistics": {
"active": "0",
"pending": "0",
"disapproved": "0",
"expiring": "0"
}
}
]
}
}
]
}
測試「帳戶狀態」資源
在以下範例中,我們會取得、列出及 custombatch.get
帳戶狀態 MCA 帳戶:
使用
accountstatuses.get
取得 MCA 的子帳戶狀態。對 API 端點執行
GET
,取得merchantId
和accountId
:GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/accountstatuses/accountId
您應該會收到成功的
HTTP 200
狀態碼和 JSON 格式的帳戶狀態清單。
使用
accountstatuses.list
查看 MCA 的所有子帳戶狀態。使用
merchantId
執行 GET 至 API 端點:GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/accountstatuses
您應該會收到成功的
HTTP 200
狀態碼,以及所提交merchantId
的帳戶狀態清單 JSON 清單。
使用
accountstatuses.custombatch
以批次模式查看 MCA 的多個子帳戶。使用
accountID
、merchant ID
和get
方法建構有效的 JSON。對 API 端點執行 POST:
POST https://shoppingcontent.googleapis.com/content/v2.1/accountstatuses/batch
您應該會收到成功的
HTTP 200
狀態碼和 JSON 格式的帳戶狀態清單。