Trạng thái tài khoản

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 MCA (tài khoản nhiều khách hàng) và tất cả cá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 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ắmtrang thông tin miễn phí. Google Mua sắm giữ quyền thực thi các chính sách này và phản hồi thích hợp nếu phát hiện nội dung hoặc hành vi vi phạm những chính sách này.

Hãy xem tài liệu tham khảo Vấn đề về tài khoản để biết thông tin chi tiết về các vấn đề thường gặp liên quan đến tài khoản.

accountstatuses.get

Bạn có thể sử dụng accountstatuses.get để xem thông tin trạng thái tài khoản của một tài khoản người bán.

Bạn có thể sử dụng tham số destination để kiểm soát các vấn đề về sản phẩm được trả về. Khi một đích đến không được chỉ định, phản hồi mặc định sẽ bao gồm các trạng thái cho destination: Shopping.

Sau đây là 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 merchantIdaccountId.

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ắmTrang thông tin miễn phí để khắc phục vấn đề accountLevelIssues được trả về trong phản hồi từ accountstatuses.get.

Dưới đây là phản hồi mẫu cho một tài khoản phụ đã bị tạm ngưng do vi phạm "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 trạng thái tài khoản trên tất cả cá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 một đích đến không được chỉ định, phản hồi sẽ bao gồm các trạng thái cho destination: Shopping.

Dưới đây là yêu cầu mẫu để lấy thông tin trạng thái tài khoản cho tất cả các tài khoản phụ trong merchantId MCA:

GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/accountstatuses

Dưới đây là 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 tài khoản không phải tài khoản nhiều khách hàng (chẳng hạn như tài khoản Merchant Center độc lập) sẽ trả về lỗi 403.

Dưới đây là phản hồi mẫu về việc gọi accountstatuses.list cho 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ế độ lô

accountstatuses.custombatch có phương thức GET sẽ trả về thông tin 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ụ, 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 yêu cầu JSON 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 phản hồi JSON 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 tra tài nguyên Trạng thái tài khoản

Trong ví dụ sau, chúng tôi thu thập, liệt kê và trạng thái tài khoản custombatch.get cho tài khoản nhiều khách hàng (MCA):

  1. Lấy trạng thái tài khoản phụ cho MCA bằng cách sử dụng accountstatuses.get.

    1. Lấy merchantIdaccountId bằng cách thực hiện GET đến điểm cuối API:

      GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/accountstatuses/accountId
      
    2. Bạn sẽ nhận được mã trạng thái HTTP 200 khi thành công và danh sách trạng thái tài khoản ở định dạng JSON.

  2. Xem tất cả trạng thái tài khoản phụ của một MCA bằng cách sử dụng accountstatuses.list.

    1. Thực hiện phương thức GET đến điểm cuối của API bằng merchantId:

      GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/accountstatuses
      
    2. Bạn sẽ nhận được mã trạng thái HTTP 200 cho trạng thái thành công và danh sách trạng thái tài khoản ở định dạng JSON cho merchantId đã gửi.

  3. Xem nhiều tài khoản phụ của MCA ở chế độ hàng loạt bằng accountstatuses.custombatch.

    1. Tạo JSON hợp lệ bằng cách sử dụng accountID, merchant ID và phương thức get.

    2. Thực hiện POST tới điểm cuối của API:

      POST https://shoppingcontent.googleapis.com/content/v2.1/accountstatuses/batch
      
    3. Bạn sẽ nhận được mã trạng thái HTTP 200 khi thành công và danh sách trạng thái tài khoản ở định dạng JSON.