Content API for Shopping からレポートを移行する

Merchant Reports API を使用すると、提供されるデータビューを通じて、商品、パフォーマンス、Google での競争環境に関する情報を確認できます。

Merchant Reports API を使用すると、次のことができます。

Merchant Reports API を既存の Content API for Shopping 実装と統合する方法は次のとおりです。

リクエスト

Merchant Reports API のリクエスト URL の形式は次のとおりです。

POST https://merchantapi.googleapis.com/reports/v1beta/{PARENT}/reports:search

search リクエストの Content API for Shopping と Merchant Reports API の比較例を次に示します。

Content API Merchant API
URL https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/reports/search https://merchantapi.googleapis.com/reports/v1beta/{PARENT}/reports:search
識別子 {MERCHANT_ID} {PARENT}

メソッド

Merchant Reports API をクエリするには、ReportService.Search メソッドを呼び出します。

視聴回数

Merchant API では、テーブル名が CamelCase から snake_case に変更されました。

MerchantPerformanceViewproduct_performance_view に変更

Content API for Shopping と Merchant API のテーブル名のマッピングは次のとおりです。

Content API Merchant API
MerchantPerformanceView product_performance_view
ProductView product_view
PriceCompetitivenesProductView price_competitiveness_product_view
PriceInsightsProductView price_insights_product_view
BestSellersBrandView best_sellers_brand_view
BestSellersProductClusterView best_sellers_product_cluster_view
CompetitiveVisibilityCompetitorView competitive_visibility_competitor_view
CompetitiveVisibilityTopMerchantView competitive_visibility_top_merchant_view
CompetitiveVisibilityBenchmarkView competitive_visibility_benchmark_view

Merchant API では、segments.offer_id などのフィールド プレフィックスを指定する必要がなくなりました。代わりに、フィールド名 offer_id を使用してください。

Content API for Shopping と Merchant API のクエリの比較例を次に示します。

Content API Merchant API
   SELECT
     segments.offer_id,
     metrics.clicks
   FROM MerchantPerformanceView
   WHERE segments.date DURING LAST_7_DAYS
   
   SELECT
     offer_id,
     clicks
   FROM product_performance_view
   WHERE date DURING LAST_7_DAYS
   

レスポンスの例を次に示します。

Content API Merchant API
{
  "segments":{
    "offerId":"abc"
  },
  "metrics":{
    "clicks":"123"
  }
}
{
  "productPerformanceView" : {
    "offerId": "abc",
    "clicks": "123"
  }
}

テーブル名はフィールドの接頭辞として使用できます。たとえば、Merchant API クエリでは offer_idproduct_performance_view.offer_id の両方が使用できます。

パフォーマンス

Merchant Reports API のパフォーマンス ビューの変更点は次のとおりです。

Content API Merchant API 説明
segments.program: 文字列 marketing_method: 文字列 program セグメントは、新しい marketing_method フィールドに置き換えられます。詳しくは、新しい marketing methodをご覧ください。
metrics.ctr: 倍精度 clickThroughRate: 倍精度 ctr 指標の名前が clickThroughRate に変更されました
metrics.conversionValueMicros: 整数
segments.currencyCode: 文字列
conversionValue: {
object (Price)
}
金額のマイクロ秒フィールドと通貨フィールドが Price タイプの 1 つのフィールドに統合されました。
metrics.orders,
metrics.orderedItems,
サポート対象外 「Google で購入」の指標は、Merchant Reports API ではサポートされていません。

新しいマーケティング手法の値

segments.program 値と marketing_method 値のマッピングは次のとおりです。

Content API Merchant API
SHOPPING_ADS ADS
FREE_PRODUCT_LISTING ORGANIC
FREE_LOCAL_PRODUCT_LISTING ORGANIC
BUY_ON_GOOGLE_LISTING サポート対象外

プロダクト

Merchant Reports API の商品ビューの変更点は次のとおりです。

Content API Merchant API 説明
productView.id: 文字列 id: 文字列 フィールドの形式が channel:language:targetCountry:offerId から
に変更されます。channel~language~feedLabel~offerId
productView.priceMicros: 整数
productView.currencyCode: 文字列
price: {
object (Price)
}
金額のマイクロ秒フィールドと通貨フィールドが Price タイプの 1 つのフィールドに統合されました。
productView.aggregated_destination_status: 文字列 aggregated_reporting_context_status: 文字列 aggregated_destination_status フィールドの名前が aggregated_reporting_context_status に変更されましたが、値は変更されていません。
productView.item_issues: [
{
object (ItemIssue)
}
]
item_issues: [
{
object (ItemIssue)
}
]
ItemIssue の定義が変更されました
サポート対象外 feedLabel: 文字列 feedLabel フィールドが導入されました

料金の詳細

Merchant Reports API の価格分析情報ビューの変更点は次のとおりです。

Content API Merchant API 説明
productView.id: 文字列 id: 文字列 フィールドの形式が channel:language:targetCountry:offerId から channel~language~feedLabel~offerId に変更されます。
productView.priceMicros: 整数
productView.currencyCode: 文字列
price: {
object (Price)
}
金額のマイクロ秒フィールドと通貨フィールドが Price タイプの 1 つのフィールドに統合されました。
priceInsights.suggestedPriceMicros: 整数
priceInsights.suggestedPriceCurrencyCode: 文字列
suggestedPrice: {
object (Price)
}
金額のマイクロ秒フィールドと通貨フィールドが Price タイプの 1 つのフィールドに統合されました。
priceInsights.predictedGrossProfitChangeFraction: 倍精度浮動小数点数
priceInsights.predictedMonthlyGrossProfitChangeMicros: 整数
priceInsights.predictedMonthlyGrossProfitChangeCurrencyCode: 文字列
サポート対象外 粗利益の変化に関連するフィールドは、Merchant Reports API ではサポートされていません。

価格競争力

Merchant Reports API の価格競争力ビューの変更点は次のとおりです。

Content API Merchant API 説明
productView.id: 文字列 id: 文字列 フィールドの形式が channel:language:targetCountry:offerId から channel~language~feedLabel~offerId に変更されます。
productView.priceMicros: 整数
productView.currencyCode: 文字列
price: {
object (Price)
}
金額のマイクロ秒フィールドと通貨フィールドが Price タイプの 1 つのフィールドに統合されました。
priceCompetitiveness.countryCode: 文字列 reportCountryCode: 文字列 countryCode フィールドの名前が reportCountryCode に変更されました
priceCompetitiveness.benchmarkPriceMicros: 整数
priceCompetitiveness.benchmarkPriceCurrencyCode: 文字列
benchmarkPrice: {
object (Price)
}
金額のマイクロ秒フィールドと通貨フィールドが Price タイプの 1 つのフィールドに統合されました。

ベストセラー

Merchant Reports API のベストセラー ビューの変更点は次のとおりです。

Content API Merchant API 説明
bestSellers.countryCode: 文字列 reportCountryCode: 文字列 countryCode フィールドの名前が reportCountryCode に変更されました
bestSellers.categoryId: int reportCategoryId: int categoryId フィールドの名前が reportCategoryId に変更されました

競合視認性

Merchant Reports API の競合視認性ビューの変更点は次のとおりです。

Content API Merchant API 説明
competitiveVisibility.countryCode: 文字列 reportCountryCode: 文字列 countryCode フィールドの名前が reportCountryCode に変更されました
competitiveVisibility.categoryId: 整数 reportCategoryId: 整数 categoryId フィールドの名前が reportCategoryId に変更されました