Account Statuses API

The Account Statuses API allows you to see the status of your Merchant Center Account or an MCA (multi-client account) and all sub-accounts associated with it.

Merchants who have multiple online stores or brands which are sold on separate websites may choose to have sub-accounts under an MCA.

get

The accountstatuses.get API call allows an MCA account to get account status information for a single sub-account, or a standalone account to get its own account status information.

Use the following API call in order to get the account status information where the merchantId is the MCA account number and accountId is its sub-account.

If the Merchant Center account is not a multi-client account, accountstatuses.get can still return account status information; in this case use the same Merchant Center account number for both parameters in the API call below.

Control which product issues are returned by the accountstatuses.get method by using the destination parameter. When the destination is not specified, the default return response only includes statuses for destination: Shopping.

GET https://www.googleapis.com/content/v2/merchantId/accountstatuses/accountId

The following is a sample JSON response for a sub-account that was suspended for a "landing page not working policy" violation.

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

list

The accountstatuses.list API call returns information on all sub-accounts. Use the following API call in order to get the account status information where the merchantId is the account number for a multi-client account.

The accountstatuses.list method also provides the ability to filter product issues by destination. When the destination is not specified, the default return response only includes statuses for destination: Shopping.

GET https://www.googleapis.com/content/v2/merchantId/accountstatuses

The following is a sample JSON response:

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

A call to the accountstatuses.list for a non-MCA account (for example, a standalone Merchant Center account) returns a 403 error, with a JSON body similar to this:

{
 "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'."
 }
}

Batch mode

An accountstatuses.custombatch with a GET method returns account status information for multiple sub-accounts in a multi-client account.

The request JSON includes the merchantId of the MCA account number, the accountId of the sub-account, a unique batchId and the method set to get.

POST https://www.googleapis.com/content/v2/accountstatuses/batch

The following is a sample request JSON body:

{
  "entries": [
    {
      "accountId": 1212121212,
      "merchantId": 4444444444,
      "method": "get",
      "batchId": 9
    },
    {
      "accountId": 1313131313,
      "merchantId": 4444444444,
      "method": "get",
      "batchId": 99
    }
  ]
}

The following is a sample JSON response body:

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

Changes from v2 to v2.1

In the AccountStatus resource, dataQualityIssues has been superseded by itemLevelIssues. Refer to the Content API Migrating from v2 to v2.1 for more details on these changes.

Testing the accountstatuses API

These test examples use base_url to refer to https://www.googleapis.com. In addition, all examples use /content/v2 in the URL in a production environment. To test API v2.1, you would instead use /content/v2.1.

In the following example we get, list, and custombatch.get account status for MCA accounts:

  1. Get sub-account status for an MCA using accountstatuses.get.

    1. Get the merchantId and accountId by performing a GET to the API endpoint:

      GET https://www.googleapis.com/content/v2/merchantId/accountstatuses/accountId
      
    2. You should receive an HTTP 200 status code for success and the account status list in JSON.

  2. View all sub-account status for an MCA using accountstatuses.list.

    1. Perform a GET to the API endpoint with your merchantId:

      GET https://www.googleapis.com/content/v2/merchantId/accountstatuses
      
    2. You should receive an HTTP 200 status code for success and the account status list in JSON for the merchantId submitted.

  3. View multiple sub-accounts for MCA in batch mode using accountstatuses.custombatch.

    1. Construct valid JSON using your accountID, merchant ID, and a get method.

    2. Perform a POST to the API endpoint:

      POST https://www.googleapis.com/content/v2/accountstatuses/batch
      
    3. You should receive an HTTP 200 status code for success and the account status list in JSON.

Typ zpětné vazby...

Content API for Shopping