Migracja raportów z Content API for Shopping

Dzięki interfejsowi Merchant Reports API możesz dowiedzieć się więcej o swoich produktach, ich skuteczności i otoczeniu konkurencyjnym w Google na podstawie oferowanego przez niego widoku danych.

Dzięki interfejsowi Merchant Reports API możesz:

Oto jak możesz zintegrować Merchant Reports API z dotychczasową implementacją Content API for Shopping.

Żądania

W przypadku Merchant Reports API użyj tego formatu adresu URL żądania:

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

Oto przykładowe porównanie Content API for Shopping z Merchant Reports API w przypadku żądań search:

Content API Merchant API
URL https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/reports/search https://merchantapi.googleapis.com/reports/v1/{PARENT}/reports:search
Identyfikatory {MERCHANT_ID} {PARENT}

Metody

Możesz wysyłać zapytania do Merchant Reports API, wywołując ReportService.Search metodę.

Wyświetlenia

W Merchant API nazwy tabel są zmieniane z CamelCase na snake_case.

MerchantPerformanceView to teraz product_performance_view.

Oto mapowanie nazw tabel w Content API for Shopping i 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

W Merchant API nie trzeba już określać prefiksu pola, np. segments.offer_id. Zamiast tego użyj tylko nazwy pola, czyli offer_id.

Oto przykładowe porównanie zapytań w Content API for Shopping i 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
   

Przykładowa odpowiedź:

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

Nazwa tabeli może być używana jako prefiks pola. Na przykład w zapytaniu Merchant API akceptowane są zarówno offer_id, jak i product_performance_view.offer_id.

Skuteczność

Oto zmiany w widoku skuteczności w Merchant Reports API:

Content API Merchant API Opis
segments.program: string marketing_method: string Segment program został zastąpiony nowym polem marketing_method. Więcej informacji znajdziesz w sekcji Nowe wartości.marketing method
metrics.ctr: double clickThroughRate: double Metryka ctr została zmieniona na clickThroughRate.
metrics.conversionValueMicros: integer
segments.currencyCode: string
conversionValue: {
object (Price)
}
Pola amount micros i currency są scalane w jedno pole typu Price.
metrics.orders,
metrics.orderedItems,
Nieobsługiwane Merchant Reports API nie obsługuje metryk Kup przez Google.

Nowe wartości metody marketingowej

Oto mapowanie wartości segments.program i marketing_method:

Content API Merchant API
SHOPPING_ADS ADS
FREE_PRODUCT_LISTING ORGANIC
FREE_LOCAL_PRODUCT_LISTING ORGANIC
BUY_ON_GOOGLE_LISTING Nieobsługiwane

Produkt

Oto zmiany w widoku produktu w Merchant Reports API:

Content API Merchant API Opis
productView.id: string id: string Format pola zmienia się z channel:language:targetCountry:offerId na
channel~language~feedLabel~offerId.
productView.priceMicros: integer
productView.currencyCode: string
price: {
object (Price)
}
Pola amount micros i currency są scalane w jedno pole typu Price.
productView.aggregated_destination_status: string aggregated_reporting_context_status: string Pole aggregated_destination_status zostało zmienione na aggregated_reporting_context_status, ale wartości nie uległy zmianie.
productView.item_issues: [
{
object (ItemIssue)
}
]
item_issues: [
{
object (ItemIssue)
}
]
Zmieniono definicję ItemIssue.
Nieobsługiwane feedLabel: string Wprowadzono pole feedLabel.

Statystyki dotyczące cen

Oto zmiany w widoku statystyk dotyczących cen w Merchant Reports API:

Content API Merchant API Opis
productView.id: string id: string Format pola zmienia się z channel:language:targetCountry:offerId na channel~language~feedLabel~offerId.
productView.priceMicros: integer
productView.currencyCode: string
price: {
object (Price)
}
Pola amount micros i currency są scalane w jedno pole typu Price.
priceInsights.suggestedPriceMicros: integer
priceInsights.suggestedPriceCurrencyCode: string
suggestedPrice: {
object (Price)
}
Pola amount micros i currency są scalane w jedno pole typu Price.
priceInsights.predictedGrossProfitChangeFraction: double
priceInsights.predictedMonthlyGrossProfitChangeMicros: integer
priceInsights.predictedMonthlyGrossProfitChangeCurrencyCode: string
Nieobsługiwane Pola związane ze zmianą zysku brutto nie są obsługiwane w interfejsie Merchant Reports API.

Konkurencyjność cenowa

Oto zmiany w widoku konkurencyjności cenowej w Merchant Reports API:

Content API Merchant API Opis
productView.id: string id: string Format pola zmienia się z channel:language:targetCountry:offerId na channel~language~feedLabel~offerId.
productView.priceMicros: integer
productView.currencyCode: string
price: {
object (Price)
}
Pola amount micros i currency są scalane w jedno pole typu Price.
priceCompetitiveness.countryCode: string reportCountryCode: string Pole countryCode zostało zmienione na reportCountryCode.
priceCompetitiveness.benchmarkPriceMicros: integer
priceCompetitiveness.benchmarkPriceCurrencyCode: string
benchmarkPrice: {
object (Price)
}
Pola amount micros i currency są scalane w jedno pole typu Price.

Bestsellery

Oto zmiany w widokach bestsellerów w Merchant Reports API:

Content API Merchant API Opis
bestSellers.countryCode: string reportCountryCode: string Pole countryCode zostało zmienione na reportCountryCode.
bestSellers.categoryId: int reportCategoryId: int Pole categoryId zostało zmienione na reportCategoryId.

Widoczność na tle konkurencji

Oto zmiany w widokach widoczności na tle konkurencji w Merchant Reports API:

Content API Merchant API Opis
competitiveVisibility.countryCode: string reportCountryCode: string Pole countryCode zostało zmienione na reportCountryCode.
competitiveVisibility.categoryId: integer reportCategoryId: integer Pole categoryId zostało zmienione na reportCategoryId.