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 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 tài khoản nhiều khách hàng.

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à có biện pháp xử lý thích hợp nếu phát hiện nội dung hoặc hành vi vi phạm các chính sách này.

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

accountstatuses.get

Bạn có thể sử dụng accountstatuses.get để xem thông tin về 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 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 các trạng thái cho destination: Shopping.

Sau đâ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

Để lấy 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à cấp mặt hàng. Bạn có thể sử dụng tài nguyên Quảng cáo Mua sắmTrang thông tin miễn phí để khắc phục accountLevelIssues được trả về trong phản hồi từ accountstatuses.get.

Sau đây là một phản hồi mẫu cho 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 về trạng thái tài khoản của tất cả tài khoản phụ trong tài khoản người bán đa năng.

Bạn có thể sử dụng bộ lọc với accountstatuses.list để lọ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 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ả tài khoản phụ trong MCA merchantId:

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

Sau đâ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 là tài khoản nhiều khách hàng (ví dụ: một tài khoản Merchant Center độc lập) sẽ trả về lỗi 403.

Sau đây là phản hồi mẫu cho việc 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 có 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à một 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 thử tài nguyên Trạng thái tài khoản

Trong ví dụ sau, chúng ta sẽ nhận được, liệt kê và custombatch.get trạng thái tài khoản cho các tài khoản MCA:

  1. Lấy trạng thái tài khoản phụ cho một 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 tài khoản nhiều khách hàng bằng cách sử dụng accountstatuses.list.

    1. Thực hiện một yêu cầu GET đến điểm cuối 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 khi 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 Tài khoản nhiều khách hàng ở chế độ hàng loạt bằng cách sử dụ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 một yêu cầu POST đến điểm cuối 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.