帳戶狀態

您可以透過 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

如要取得獨立帳戶的帳戶狀態資訊,請為 merchantIdaccountId 使用相同的帳戶 ID 呼叫 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、不重複的 batchIdmethod 設為 get 的識別碼。

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

測試「帳戶狀態」資源

在以下範例中,我們會取得 Merchant Center 帳戶、列出和 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. 您應該會收到成功的 HTTP 200 狀態碼,以及提交的 merchantId 以 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 格式的帳戶狀態清單。