aggregateProductStatuses.list メソッドを使用すると、Merchant Center アカウント内の商品のステータスの概要を取得できます。これは、個々の商品をすべて取得することなく、商品データの全体的な健全性をモニタリングする場合に便利です。このメソッドは、商品の合計数をステータス(承認済み、保留中、不承認)別に取得し、商品に影響している問題も一覧表示します。
特記事項
aggregateProductStatuses.list メソッドを使用する際には、特別な考慮事項があります。
- データの可用性: 商品の挿入または更新から、そのステータスが
aggregateProductStatusesレスポンスに反映されるまでに 30 分以上の遅延が発生することがあります。 - 問題の一貫性:
aggregateProductStatuses.listメソッドから返される問題のタイトルと説明は、Products API から返される問題と一貫性があるように設計されています。ただし、Merchant Center のユーザー インターフェースに表示される問題の説明とは異なる場合があります。
すべての商品ステータスの概要を確認する
この例では、AggregateProductStatus リソースのリストを取得する方法を示します。各リソースは、配信先と国の特定の組み合わせに対する商品のステータスを表します。パラメータを指定せずに aggregateProductStatuses.list を呼び出すと、アカウントで使用可能なすべてのステータスが返されます。
GET https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/aggregateProductStatuses
呼び出しが成功した場合のレスポンスの例を次に示します。
{
"aggregateProductStatuses": [
{
"name": "accounts/12345/aggregateProductStatuses/SHOPPING_ADS~US",
"reportingContext": "SHOPPING_ADS",
"countryCode": "US",
"statistics": {
"approvedCount": "1500",
"pendingCount": "50",
"disapprovedCount": "25"
},
"issues": [
{
"issueType": "missing_image",
"severity": "ERROR",
"numProducts": "15",
"sampleProducts": [
"accounts/12345/products/online~en~US~SKU001",
"accounts/12345/products/online~en~US~SKU002"
]
},
{
"issueType": "invalid_price",
"severity": "CRITICAL",
"numProducts": "10",
"sampleProducts": [
"accounts/12345/products/online~en~US~SKU003"
]
}
]
},
{
"name": "accounts/12345/aggregateProductStatuses/FREE_LISTINGS~US",
"reportingContext": "FREE_LISTINGS",
"countryCode": "US",
"statistics": {
"approvedCount": "1510",
"pendingCount": "50",
"disapprovedCount": "15"
},
"issues": [
{
"issueType": "missing_image",
"severity": "ERROR",
"numProducts": "15",
"sampleProducts": [
"accounts/12345/products/online~en~US~SKU001",
"accounts/12345/products/online~en~US~SKU002"
]
}
]
}
]
}
特定の国と掲載先の商品のステータスを取得する
aggregateProductStatuses.list メソッドで filter クエリ パラメータを使用すると、結果をフィルタして、特定の国と宛先のステータスを確認できます。例: country = "US" AND reportingContext = "SHOPPING_ADS"。詳細については、フィルタ構文をご覧ください。
GET https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/aggregateProductStatuses?filter=countryCode%3D"US"%20AND%20reportingContext%3D"SHOPPING_ADS"
呼び出しが成功した場合のレスポンスの例を次に示します。
{
"aggregateProductStatuses": [
{
"name": "accounts/12345/aggregateProductStatuses/SHOPPING_ADS~US",
"reportingContext": "SHOPPING_ADS",
"countryCode": "US",
"statistics": {
"approvedCount": "1500",
"pendingCount": "50",
"disapprovedCount": "25"
},
"issues": [
{
"issueType": "missing_image",
"severity": "ERROR",
"numProducts": "15",
"sampleProducts": [
"accounts/12345/products/online~en~US~SKU001",
"accounts/12345/products/online~en~US~SKU002"
]
},
{
"issueType": "invalid_price",
"severity": "CRITICAL",
"numProducts": "10",
"sampleProducts": [
"accounts/12345/products/online~en~US~SKU003"
]
}
]
}
]
}