aggregateProductStatuses.list メソッドを使用すると、Merchant Center
アカウント内の商品のステータスの概要を取得できます。このメソッドは、個々の商品をすべて取得しなくても、商品データの全体的な健全性をモニタリングするのに役立ちます。このメソッドでは、商品の合計数がステータス(承認済み、保留中、不承認)別に表示され、商品に影響している問題も一覧表示されます。
特記事項
aggregateProductStatuses.list メソッドを使用する際は、次の点に注意してください。
- データの可用性: 商品が挿入または更新されてから、そのステータスが
レスポンスに反映されるまで、30 分以上かかることがあります。
aggregateProductStatuses - 問題の整合性:
aggregateProductStatuses.listメソッドから返される問題のタイトルと説明は、Products API から返される 問題と整合性があるように設計されています。ただし、Merchant Center の管理画面に表示される問題の説明とは異なる場合があります。
すべての商品ステータスの概要を取得する
この例では、AggregateProductStatus
リソースのリストを取得する方法を示します。
各リソースは、掲載先と国の特定の組み合わせにおける商品のステータスを表します。パラメータを指定せずに
aggregateProductStatuses.list
を呼び出すと、アカウントで利用可能なすべてのステータスが返されます。
GET https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/aggregateProductStatuses
以下は、呼び出しが成功した場合のレスポンスの例です。
{
"aggregateProductStatuses": [
{
"name": "accounts/{ACCOUNT_ID}/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/{ACCOUNT_ID}/products/online~en~US~SKU001",
"accounts/{ACCOUNT_ID}/products/online~en~US~SKU002"
]
},
{
"issueType": "invalid_price",
"severity": "CRITICAL",
"numProducts": "10",
"sampleProducts": [
"accounts/{ACCOUNT_ID}/products/online~en~US~SKU003"
]
}
]
},
{
"name": "accounts/{ACCOUNT_ID}/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/{ACCOUNT_ID}/products/online~en~US~SKU001",
"accounts/{ACCOUNT_ID}/products/online~en~US~SKU002"
]
}
]
}
]
}
特定の国と掲載先の商品ステータスを取得する
メソッドで filter クエリパラメータを使用すると、結果をフィルタして、特定の国と
掲載先のステータスを表示できます。aggregateProductStatuses.list例: 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/{ACCOUNT_ID}/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/{ACCOUNT_ID}/products/online~en~US~SKU001",
"accounts/{ACCOUNT_ID}/products/online~en~US~SKU002"
]
},
{
"issueType": "invalid_price",
"severity": "CRITICAL",
"numProducts": "10",
"sampleProducts": [
"accounts/{ACCOUNT_ID}/products/online~en~US~SKU003"
]
}
]
}
]
}