账号状态

您可以使用 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 为 merchantIdaccountId 调用 accountstatuses.get

此方法会返回账号级和商品级问题。您可以使用购物广告非付费商品详情资源来修复 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 以及设置为 getmethod

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"
      }
     }
    ]
   }
  }
 ]
}

测试 Account Statuses 资源

在以下示例中,我们可获取、列出和 custombatch.get 多客户帐号的帐号状态:

  1. 使用 accountstatuses.get 获取 MCA 的子帐号状态。

    1. 对 API 端点执行 GET,以获取 merchantIdaccountId

      GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/accountstatuses/accountId
      
    2. 您应该会收到 HTTP 200 状态代码(如果成功)和帐号状态列表(采用 JSON 格式)。

  2. 使用 accountstatuses.list 查看 MCA 的所有子账号状态。

    1. 使用您的 merchantId 对 API 端点执行 GET 操作:

      GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/accountstatuses
      
    2. 对于已提交的 merchantId,您应该会收到 HTTP 200 状态代码(如果成功)和 JSON 格式的帐号状态列表。

  3. 使用 accountstatuses.custombatch 以批量模式查看 MCA 的多个子帐号。

    1. 使用 accountIDmerchant IDget 方法构建有效的 JSON。

    2. 对 API 端点执行 POST:

      POST https://shoppingcontent.googleapis.com/content/v2.1/accountstatuses/batch
      
    3. 您应该会收到 HTTP 200 状态代码(如果成功)和帐号状态列表(采用 JSON 格式)。