Account issues affect your product visibility and your ability to participate in various Merchant Center programs. The Accounts sub-API lets you retrieve a list of issues impacting your merchant account . This helps you identify and address problems proactively.
You are responsible for complying with the Shopping ads and free listings policies. Google Shopping reserves the right to enforce these policies and respond appropriately if we find content or behavior that violates these policies.
Each AccountIssue
provides details such as:
-
title
: A summary of the issue. -
severity
: The severity of the issue. Examples include:-
CRITICAL
: An issue that causes offers to not serve. -
ERROR
: An issue that might affect offers or indicate a problem. -
SUGGESTION
: A recommendation for improvement.
-
-
impactedDestinations
: The programs (such as Shopping ads or free listings) and regions affected by the issue, along with the severity in those contexts. -
detail
: A message with more context about the issue. -
documentationUri
: A link to the Help Center article on how to resolve the issue.
Special considerations
- Internationalization (i18n): When listing account issues, you can
specify a
language_code
(for example, "en-US", "fr-FR") and atime_zone
(such as, "America/Los_Angeles", "Europe/Paris") in your request. This verify that human-readable strings in the response, such as the issuedetail
, are localized appropriately. If these fields are not provided, the API defaults to English ("en-US") and the "America/Los_Angeles" (Pacific Time) time zone. - Pagination: The API supports pagination through
page_size
andpage_token
parameters in theListAccountIssuesRequest
. This lets you retrieve issues in manageable chunks. The maximumpage_size
is 1000, and the default is 50. - Ordering: Issues returned by the API are generally ordered by severity and an internal priority, similar to the way that they are displayed in Merchant Center. Note that the API does not support custom sorting.
- Data source: The Accounts sub-API retrieves data from the same backend used by the diagnostics page in Merchant Center.
Retrieve issues for your account
To list account issues, send a GET
request to the accounts.issues.list
method:
GET https://merchantapi.googleapis.com/accounts/v1/accounts/ {ACCOUNT_ID}
/issues?language_code=en-GB&time_zone.id=Europe/London&page_size=10
Here's a sample response for a sub-account that was suspended for a "landing page not working" violation.
{
"accountIssues"
:
[
{
"name"
:
"accounts/ ACCOUNT_ID
/issues/home-page-issue"
,
"title"
:
"Online store not confirmed"
,
"severity"
:
"CRITICAL"
,
"impactedDestinations"
:
[
{
"reportingContext"
:
"SHOPPING_ADS"
,
"impacts"
:
[
{
"regionCode"
:
"001"
,
"severity"
:
"CRITICAL"
}
]
}
],
"detail"
:
"The ownership of the online store must be verified through Merchant Center"
,
"documentationUri"
:
"https://support.google.com/merchants/answer/176793?hl=en-US"
},
{
"name"
:
"accounts/ ACCOUNT_ID
/issues/editorial-and-professional-standards-destination-url-down-policy"
,
"title"
:
"Landing page not working"
,
"severity"
:
"CRITICAL"
,
"impactedDestinations"
:
[
{
"reportingContext"
:
"SHOPPING_ADS"
,
"impacts"
:
[
{
"regionCode"
:
"ES"
,
"severity"
:
"CRITICAL"
}
]
},
{
"reportingContext"
:
"DEMAND_GEN_ADS"
,
"impacts"
:
[
{
"regionCode"
:
"ES"
,
"severity"
:
"CRITICAL"
}
]
},
{
"reportingContext"
:
"VIDEO_ADS"
,
"impacts"
:
[
{
"regionCode"
:
"ES"
,
"severity"
:
"CRITICAL"
}
]
}
],
"detail"
:
"Broken landing pages or broken links in your online store are not allowed"
,
"documentationUri"
:
"https://support.google.com/merchants/answer/12079604?hl=en-US"
},
{
"name"
:
"accounts/ ACCOUNT_ID
/issues/pending-phone-verification"
,
"title"
:
"Your phone number needs to be verified"
,
"severity"
:
"CRITICAL"
,
"detail"
:
"Verify your phone number to confirm your identity"
,
"documentationUri"
:
"https://support.google.com/merchants/answer/12471579?hl=en-US"
},
{
"name"
:
"accounts/ ACCOUNT_ID
/issues/pending-address-and-phone"
,
"title"
:
"Missing business address"
,
"severity"
:
"CRITICAL"
,
"detail"
:
"Provide a valid business address in Merchant Center"
,
"documentationUri"
:
"https://support.google.com/merchants/answer/12471579?hl=en-US"
}
]
}
List account issues for a specific account
This use case shows how to retrieve all account-level issues for a given Merchant Center account. The information returned can help you identify and resolve problems affecting your account's performance and eligibility for various programs.
AppsScript
/**
* Lists all issues for a given Merchant Center account.
*/
function
listAccountIssues
()
{
// IMPORTANT:
// Enable the Merchant API Accounts sub-API Advanced Service and call it
// "MerchantApiAccounts"
// Replace this with your Merchant Center ID.
const
accountId
=
"<MERCHANT_CENTER_ID>"
;
// Construct the parent name
const
parent
=
'accounts/'
+
accountId
;
try
{
console
.
log
(
'Sending list Account Issues request'
);
// Set pageSize to the maximum value (default: 50)
let
pageSize
=
100
;
let
pageToken
;
let
count
=
0
;
// Call the Account.Issues.list API method. Use the pageToken to iterate
// through all pages of results.
do
{
response
=
MerchantApiAccounts
.
Accounts
.
Issues
.
list
(
parent
,
{
pageSize
,
pageToken
});
for
(
const
issue
of
response
.
accountIssues
)
{
console
.
log
(
issue
);
count
++
;
}
pageToken
=
response
.
nextPageToken
;
}
while
(
pageToken
);
// Exits when there is no next page token.
console
.
log
(
'The following count of Account Issues were returned: '
,
count
);
}
catch
(
e
)
{
console
.
log
(
'ERROR!'
);
console
.
log
(
e
);
}
}
Java
import
com.google.api.gax.core.FixedCredentialsProvider
;
import
com.google.auth.oauth2.GoogleCredentials
;
import
com.google.shopping.merchant.accounts.v1.AccountIssue
;
import
com.google.shopping.merchant.accounts.v1.AccountIssueServiceClient
;
import
com.google.shopping.merchant.accounts.v1.AccountIssueServiceClient.ListAccountIssuesPagedResponse
;
import
com.google.shopping.merchant.accounts.v1.AccountIssueServiceSettings
;
import
com.google.shopping.merchant.accounts.v1.AccountName
;
import
com.google.shopping.merchant.accounts.v1.ListAccountIssuesRequest
;
import
shopping.merchant.samples.utils.Authenticator
;
import
shopping.merchant.samples.utils.Config
;
/**
* This class demonstrates how to list all the account issues of an account.
*
* <p>If you want to query the account issues of all the sub-accounts of an advanced account, see
* ListAdvancedAccountIssuesSampleAsync.
*/
public
class
ListAccountIssuesSample
{
public
static
void
listAccountIssues
(
Config
config
)
throws
Exception
{
// Obtains OAuth token based on the user's configuration.
GoogleCredentials
credential
=
new
Authenticator
().
authenticate
();
// Creates service settings using the credentials retrieved above.
AccountIssueServiceSettings
accountIssueServiceSettings
=
AccountIssueServiceSettings
.
newBuilder
()
.
setCredentialsProvider
(
FixedCredentialsProvider
.
create
(
credential
))
.
build
();
// Calls the API and catches and prints any network failures/errors.
try
(
AccountIssueServiceClient
accountIssueServiceClient
=
AccountIssueServiceClient
.
create
(
accountIssueServiceSettings
))
{
// Gets the account ID from the config file.
String
accountId
=
config
.
getAccountId
().
toString
();
// Creates account name to identify account.
String
name
=
AccountName
.
newBuilder
().
setAccount
(
accountId
).
build
().
toString
();
ListAccountIssuesRequest
request
=
ListAccountIssuesRequest
.
newBuilder
().
setParent
(
name
).
build
();
System
.
out
.
println
(
"Sending list account issues request:"
);
ListAccountIssuesPagedResponse
response
=
accountIssueServiceClient
.
listAccountIssues
(
request
);
int
count
=
0
;
// Iterates over all rows in all pages and prints the issue in each row.
// Automatically uses the `nextPageToken` if returned to fetch all pages of data.
for
(
AccountIssue
accountIssue
:
response
.
iterateAll
())
{
System
.
out
.
println
(
accountIssue
);
count
++
;
}
System
.
out
.
print
(
"The following count of account issues were returned: "
);
System
.
out
.
println
(
count
);
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
"An error has occured: "
);
System
.
out
.
println
(
e
);
}
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
Config
config
=
Config
.
load
();
listAccountIssues
(
config
);
}
}
PHP
use Google\ApiCore\ApiException;
use Google\Shopping\Merchant\Accounts\V1\Client\AccountIssueServiceClient;
use Google\Shopping\Merchant\Accounts\V1\ListAccountIssuesRequest;
/**
* Lists all the account issues of an account.
*/
class ListAccountIssues
{
/**
* A helper function to create the parent string.
*
* @param array $accountId
* The account.
*
* @return string The parent has the format: `accounts/{account_id}`
*/
private static function getParent($accountId)
{
return sprintf("accounts/%s", $accountId);
}
/**
* Lists all the account issues for a given Merchant Center account.
*
* @param array $config
* The configuration data used for authentication and getting the acccount ID.
* @return void
*/
public static function listAccountIssuesSample($config): void
{
// Gets the OAuth credentials.
$credentials = Authentication::useServiceAccountOrTokenFile();
// Creates options config.
$options = ['credentials' => $credentials];
// Creates a client.
$accountIssueServiceClient = new AccountIssueServiceClient($options);
// Creates parent.
$parent = self::getParent($config['accountId']);
// Creates the request.
$request = new ListAccountIssuesRequest(['parent' => $parent]);
// Calls the API and catches and prints any network failures/errors.
try {
print "Sending list account issues request:\n";
$response = $accountIssueServiceClient->listAccountIssues($request);
$count = 0;
// Iterates over all elements and prints the issue in each row.
foreach ($response->iterateAllElements() as $accountIssue) {
print_r($accountIssue);
$count++;
}
print "The following count of account issues were returned: ";
print $count . "\n";
} catch (ApiException $e) {
print "An error has occured: \n";
print $e->getMessage() . "\n";
}
}
/**
* Helper to execute the sample.
*
* @return void
*/
public function callSample(): void
{
$config = Config::generateConfig();
// Lists the account issues.
self::listAccountIssuesSample($config);
}
}
// Run the script
$sample = new ListAccountIssues();
$sample->callSample();