帳戶狀態

你可以使用 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 查看多重客戶帳戶所有子帳戶的帳戶狀態資訊。

你可以使用篩選器,依目的地篩選產品問題。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"
     }
    }
   ]
  }
 ]
}

如果呼叫 accountstatuses.list 的對象不是 MCA 帳戶 (例如獨立的 Merchant Center 帳戶),系統會傳回 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'."
 }
}

批次模式

accountstatuses.custombatchGET 方法會傳回多重客戶帳戶中多個子帳戶的帳戶狀態資訊。

要求 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 MCA 帳戶的帳戶狀態:

  1. 使用 accountstatuses.get 取得 MCA 的子帳戶狀態。

    1. 執行 GET 至 API 端點,即可取得 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 狀態碼,以及以 JSON 格式列出所提交 merchantId 的帳戶狀態。

  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 格式的帳戶狀態清單。