Bạn có thể sử dụng tài nguyên
accountstatuses
để xem trạng thái của tài khoản Merchant
Center hoặc tài khoản nhiều khách hàng (MCA) và tất cả tài khoản phụ được liên kết
với tài khoản đó.
Những người bán có nhiều cửa hàng trực tuyến hoặc thương hiệu được bán trên các trang web riêng biệt có thể chọn sử dụng tài khoản phụ trong một MCA.
Người bán có trách nhiệm tuân thủ các chính sách của quảng cáo Mua sắm và trang thông tin miễn phí. Google Mua sắm có quyền thực thi các chính sách này và phản hồi một cách thích hợp nếu chúng tôi phát hiện thấy nội dung hoặc hành vi vi phạm các chính sách này.

Hãy xem bài viết Tham khảo về các vấn đề thường gặp về tài khoản để biết thông tin chi tiết.
accountstatuses.get
Bạn có thể sử dụng accountstatuses.get để xem thông tin về trạng thái tài khoản cho một tài khoản người bán.
Bạn có thể sử dụng tham số destination để kiểm soát những vấn đề về sản phẩm được trả về. Khi bạn không chỉ định đích đến, phản hồi mặc định sẽ bao gồm trạng thái cho destination: Shopping.
Dưới đây là một yêu cầu mẫu, trong đó merchantId là mã tài khoản MCA và accountId là tài khoản phụ của MCA đó:
GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/accountstatuses/accountId
Để nhận thông tin về trạng thái tài khoản cho một tài khoản độc lập, hãy gọi accountstatuses.get bằng cùng một mã tài khoản cho merchantId và accountId.
Phương thức này trả về các vấn đề ở cấp tài khoản và mặt hàng. Bạn có thể sử dụng các tài nguyên của quảng cáo Mua sắm và trang thông tin miễn phí để khắc phục
accountLevelIssues được trả về trong phản hồi từ accountstatuses.get.
Dưới đây là một phản hồi mẫu cho một tài khoản phụ bị tạm ngưng do vi phạm chính sách "trang đích không hoạt động".
{
"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
Bạn có thể sử dụng accountstatuses.list để xem thông tin về trạng thái tài khoản trên tất cả tài khoản phụ của MCA.
Bạn có thể sử dụng bộ lọc với accountstatuses.list để lọc các vấn đề về sản phẩm theo đích đến. Khi bạn không chỉ định đích đến, phản hồi sẽ bao gồm trạng thái cho destination: Shopping.
Dưới đây là một yêu cầu mẫu để nhận thông tin về trạng thái tài khoản cho tất cả tài khoản phụ trong MCA merchantId:
GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/accountstatuses
Dưới đây là một phản hồi mẫu:
{
"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"
}
}
]
}
]
}
Lệnh gọi đến accountstatuses.list cho một tài khoản không phải MCA (ví dụ: tài khoản Merchant Center độc lập) sẽ trả về lỗi 403.
Dưới đây là một phản hồi mẫu cho lệnh gọi accountstatuses.list đối với một tài khoản độc lập:
{
"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'."
}
}
Chế độ hàng loạt
accountstatuses.custombatch với phương thức GET sẽ trả về thông tin về trạng thái tài khoản cho nhiều tài khoản phụ trong một tài khoản nhiều khách hàng.
JSON yêu cầu bao gồm merchantId của số tài khoản MCA, accountId của tài khoản phụ, một batchId duy nhất và method được đặt thành get.
POST https://shoppingcontent.googleapis.com/content/v2.1/accountstatuses/batch
Sau đây là nội dung JSON yêu cầu mẫu:
{
"entries": [
{
"accountId": 1212121212,
"merchantId": 4444444444,
"method": "get",
"batchId": 9
},
{
"accountId": 1313131313,
"merchantId": 4444444444,
"method": "get",
"batchId": 99
}
]
}
Sau đây là nội dung JSON phản hồi mẫu:
{
"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"
}
}
]
}
}
]
}
Kiểm thử tài nguyên Trạng thái tài khoản
Trong ví dụ sau, chúng ta sẽ nhận, liệt kê và custombatch.get trạng thái tài khoản cho các tài khoản MCA:
Nhận trạng thái tài khoản phụ cho một MCA bằng cách sử dụng
accountstatuses.get.Nhận
merchantIdvàaccountIdbằng cách thực hiệnGETđến điểm cuối của API:GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/accountstatuses/accountIdBạn sẽ nhận được mã trạng thái
HTTP 200để biết rằng yêu cầu đã thành công và danh sách trạng thái tài khoản ở định dạng JSON.
Xem tất cả trạng thái tài khoản phụ cho một MCA bằng cách sử dụng
accountstatuses.list.Thực hiện một yêu cầu GET đến điểm cuối của API bằng
merchantIdcủa bạn:GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/accountstatusesBạn sẽ nhận được mã trạng thái
HTTP 200để biết rằng yêu cầu đã thành công và danh sách trạng thái tài khoản ở định dạng JSON chomerchantIdđã gửi.
Xem nhiều tài khoản phụ cho MCA ở chế độ hàng loạt bằng cách sử dụng
accountstatuses.custombatch.Tạo JSON hợp lệ bằng cách sử dụng
accountID,merchant IDvà phương thứcget.Thực hiện một yêu cầu POST đến điểm cuối của API:
POST https://shoppingcontent.googleapis.com/content/v2.1/accountstatuses/batchBạn sẽ nhận được mã trạng thái
HTTP 200để biết rằng yêu cầu đã thành công và danh sách trạng thái tài khoản ở định dạng JSON.