Movatterモバイル変換


[0]ホーム

URL:


merchantapi

package
v0.257.0Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2025 License:BSD-3-ClauseImports:18Imported by:0

Details

Repository

github.com/googleapis/google-api-go-client

Links

Documentation

Overview

Package merchantapi provides access to the Merchant API.

For product documentation, see:https://developers.google.com/merchant/api

Library status

These client libraries are officially supported by Google. However, thislibrary is considered complete and is in maintenance mode. This meansthat we will address critical bugs and security issues but will not addany new features.

When possible, we recommend using our newer[Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)that are still actively being worked and iterated on.

Creating a client

Usage example:

import "google.golang.org/api/merchantapi/reports_v1beta"...ctx := context.Background()merchantapiService, err := merchantapi.NewService(ctx)

In this example, Google Application Default Credentials are used forauthentication. For information on how to create and obtain ApplicationDefault Credentials, seehttps://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

To use an API key for authentication (note: some APIs do not support APIkeys), usegoogle.golang.org/api/option.WithAPIKey:

merchantapiService, err := merchantapi.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuthflow, usegoogle.golang.org/api/option.WithTokenSource:

config := &oauth2.Config{...}// ...token, err := config.Exchange(ctx, ...)merchantapiService, err := merchantapi.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

Seegoogle.golang.org/api/option.ClientOption for details on options.

Index

Constants

View Source
const (// Manage your product listings and accounts for Google ShoppingContentScope = "https://www.googleapis.com/auth/content")

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

typeAccountsReportsSearchCall

type AccountsReportsSearchCall struct {// contains filtered or unexported fields}

func (*AccountsReportsSearchCall)Context

Context sets the context to be used in this call's Do method.

func (*AccountsReportsSearchCall)Do

Do executes the "merchantapi.accounts.reports.search" call.Any non-2xx status code is an error. Response headers are in either*SearchResponse.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*AccountsReportsSearchCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*AccountsReportsSearchCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*AccountsReportsSearchCall)Pages

Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.

typeAccountsReportsService

type AccountsReportsService struct {// contains filtered or unexported fields}

funcNewAccountsReportsService

func NewAccountsReportsService(s *Service) *AccountsReportsService

func (*AccountsReportsService)Search

func (r *AccountsReportsService) Search(parentstring, searchrequest *SearchRequest) *AccountsReportsSearchCall

Search: Retrieves a report defined by a search query. The response mightcontain fewer rows than specified by `page_size`. Rely on `next_page_token`to determine if there are more rows to be requested.

  • parent: Id of the account making the call. Must be a standalone account oran MCA subaccount. Format: accounts/{account}.

typeAccountsService

type AccountsService struct {Reports *AccountsReportsService// contains filtered or unexported fields}

funcNewAccountsService

func NewAccountsService(s *Service) *AccountsService

typeBestSellersBrandView

type BestSellersBrandView struct {// Brand: Name of the brand.Brandstring `json:"brand,omitempty"`// PreviousRank: Popularity rank in the previous week or month.PreviousRankint64 `json:"previousRank,omitempty,string"`// PreviousRelativeDemand: Estimated demand in relation to the brand with the// highest popularity rank in the same category and country in the previous// week or month.//// Possible values://   "RELATIVE_DEMAND_ENUM_UNSPECIFIED" - Not specified.//   "VERY_LOW" - Demand is 0-5% of the demand of the highest ranked product// cluster or brand.//   "LOW" - Demand is 6-10% of the demand of the highest ranked product// cluster or brand.//   "MEDIUM" - Demand is 11-20% of the demand of the highest ranked product// cluster or brand.//   "HIGH" - Demand is 21-50% of the demand of the highest ranked product// cluster or brand.//   "VERY_HIGH" - Demand is 51-100% of the demand of the highest ranked// product cluster or brand.PreviousRelativeDemandstring `json:"previousRelativeDemand,omitempty"`// Rank: Popularity of the brand on Ads and organic surfaces, in the selected// category and country, based on the estimated number of units sold.Rankint64 `json:"rank,omitempty,string"`// RelativeDemand: Estimated demand in relation to the brand with the highest// popularity rank in the same category and country.//// Possible values://   "RELATIVE_DEMAND_ENUM_UNSPECIFIED" - Not specified.//   "VERY_LOW" - Demand is 0-5% of the demand of the highest ranked product// cluster or brand.//   "LOW" - Demand is 6-10% of the demand of the highest ranked product// cluster or brand.//   "MEDIUM" - Demand is 11-20% of the demand of the highest ranked product// cluster or brand.//   "HIGH" - Demand is 21-50% of the demand of the highest ranked product// cluster or brand.//   "VERY_HIGH" - Demand is 51-100% of the demand of the highest ranked// product cluster or brand.RelativeDemandstring `json:"relativeDemand,omitempty"`// RelativeDemandChange: Change in the estimated demand. Whether it rose, sank// or remained flat.//// Possible values://   "RELATIVE_DEMAND_CHANGE_TYPE_ENUM_UNSPECIFIED" - Not specified.//   "SINKER" - Relative demand is lower than the previous time period.//   "FLAT" - Relative demand is equal to the previous time period.//   "RISER" - Relative demand is higher than the previous time period.RelativeDemandChangestring `json:"relativeDemandChange,omitempty"`// ReportCategoryId: Google product category ID to calculate the ranking for,// represented in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436). Required in the// `SELECT` clause. If a `WHERE` condition on `report_category_id` is not// specified in the query, rankings for all top-level categories are returned.ReportCategoryIdint64 `json:"reportCategoryId,omitempty,string"`// ReportCountryCode: Country where the ranking is calculated. Represented in// the ISO 3166 format. Required in the `SELECT` clause. Condition on// `report_country_code` is required in the `WHERE` clause.ReportCountryCodestring `json:"reportCountryCode,omitempty"`// ReportDate: Report date. The value of this field can only be one of the// following: * The first day of the week (Monday) for weekly reports, * The// first day of the month for monthly reports. Required in the `SELECT` clause.// If a `WHERE` condition on `report_date` is not specified in the query, the// latest available weekly or monthly report is returned.ReportDate *Date `json:"reportDate,omitempty"`// ReportGranularity: Granularity of the report. The ranking can be done over a// week or a month timeframe. Required in the `SELECT` clause. Condition on// `report_granularity` is required in the `WHERE` clause.//// Possible values://   "REPORT_GRANULARITY_ENUM_UNSPECIFIED" - Not specified.//   "WEEKLY" - Report is computed over a week timeframe.//   "MONTHLY" - Report is computed over a month timeframe.ReportGranularitystring `json:"reportGranularity,omitempty"`// ForceSendFields is a list of field names (e.g. "Brand") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Brand") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

BestSellersBrandView: Fields available for query in`best_sellers_brand_view` table. Best sellers(https://support.google.com/merchants/answer/9488679) report with topbrands. Values are only set for fields requested explicitly in the request'ssearch query.

func (BestSellersBrandView)MarshalJSON

func (sBestSellersBrandView) MarshalJSON() ([]byte,error)

typeBestSellersProductClusterView

type BestSellersProductClusterView struct {// Brand: Brand of the product cluster.Brandstring `json:"brand,omitempty"`// BrandInventoryStatus: Whether there is at least one product of the brand// currently `IN_STOCK` in your product data source in at least one of the// countries, all products are `OUT_OF_STOCK` in your product data source in// all countries, or `NOT_IN_INVENTORY`. The field doesn't take the Best// sellers report country filter into account.//// Possible values://   "INVENTORY_STATUS_UNSPECIFIED" - Not specified.//   "IN_STOCK" - You have a product for this product cluster or brand in// stock.//   "OUT_OF_STOCK" - You have a product for this product cluster or brand in// inventory but it is currently out of stock.//   "NOT_IN_INVENTORY" - You do not have a product for this product cluster or// brand in inventory.BrandInventoryStatusstring `json:"brandInventoryStatus,omitempty"`// CategoryL1: Product category (1st level) of the product cluster, represented// in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436).CategoryL1string `json:"categoryL1,omitempty"`// CategoryL2: Product category (2nd level) of the product cluster, represented// in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436).CategoryL2string `json:"categoryL2,omitempty"`// CategoryL3: Product category (3rd level) of the product cluster, represented// in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436).CategoryL3string `json:"categoryL3,omitempty"`// CategoryL4: Product category (4th level) of the product cluster, represented// in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436).CategoryL4string `json:"categoryL4,omitempty"`// CategoryL5: Product category (5th level) of the product cluster, represented// in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436).CategoryL5string `json:"categoryL5,omitempty"`// InventoryStatus: Whether the product cluster is `IN_STOCK` in your product// data source in at least one of the countries, `OUT_OF_STOCK` in your product// data source in all countries, or `NOT_IN_INVENTORY` at all. The field// doesn't take the Best sellers report country filter into account.//// Possible values://   "INVENTORY_STATUS_UNSPECIFIED" - Not specified.//   "IN_STOCK" - You have a product for this product cluster or brand in// stock.//   "OUT_OF_STOCK" - You have a product for this product cluster or brand in// inventory but it is currently out of stock.//   "NOT_IN_INVENTORY" - You do not have a product for this product cluster or// brand in inventory.InventoryStatusstring `json:"inventoryStatus,omitempty"`// PreviousRank: Popularity rank in the previous week or month.PreviousRankint64 `json:"previousRank,omitempty,string"`// PreviousRelativeDemand: Estimated demand in relation to the product cluster// with the highest popularity rank in the same category and country in the// previous week or month.//// Possible values://   "RELATIVE_DEMAND_ENUM_UNSPECIFIED" - Not specified.//   "VERY_LOW" - Demand is 0-5% of the demand of the highest ranked product// cluster or brand.//   "LOW" - Demand is 6-10% of the demand of the highest ranked product// cluster or brand.//   "MEDIUM" - Demand is 11-20% of the demand of the highest ranked product// cluster or brand.//   "HIGH" - Demand is 21-50% of the demand of the highest ranked product// cluster or brand.//   "VERY_HIGH" - Demand is 51-100% of the demand of the highest ranked// product cluster or brand.PreviousRelativeDemandstring `json:"previousRelativeDemand,omitempty"`// Rank: Popularity of the product cluster on Ads and organic surfaces, in the// selected category and country, based on the estimated number of units sold.Rankint64 `json:"rank,omitempty,string"`// RelativeDemand: Estimated demand in relation to the product cluster with the// highest popularity rank in the same category and country.//// Possible values://   "RELATIVE_DEMAND_ENUM_UNSPECIFIED" - Not specified.//   "VERY_LOW" - Demand is 0-5% of the demand of the highest ranked product// cluster or brand.//   "LOW" - Demand is 6-10% of the demand of the highest ranked product// cluster or brand.//   "MEDIUM" - Demand is 11-20% of the demand of the highest ranked product// cluster or brand.//   "HIGH" - Demand is 21-50% of the demand of the highest ranked product// cluster or brand.//   "VERY_HIGH" - Demand is 51-100% of the demand of the highest ranked// product cluster or brand.RelativeDemandstring `json:"relativeDemand,omitempty"`// RelativeDemandChange: Change in the estimated demand. Whether it rose, sank// or remained flat.//// Possible values://   "RELATIVE_DEMAND_CHANGE_TYPE_ENUM_UNSPECIFIED" - Not specified.//   "SINKER" - Relative demand is lower than the previous time period.//   "FLAT" - Relative demand is equal to the previous time period.//   "RISER" - Relative demand is higher than the previous time period.RelativeDemandChangestring `json:"relativeDemandChange,omitempty"`// ReportCategoryId: Google product category ID to calculate the ranking for,// represented in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436). Required in the// `SELECT` clause. If a `WHERE` condition on `report_category_id` is not// specified in the query, rankings for all top-level categories are returned.ReportCategoryIdint64 `json:"reportCategoryId,omitempty,string"`// ReportCountryCode: Country where the ranking is calculated. Represented in// the ISO 3166 format. Required in the `SELECT` clause. Condition on// `report_country_code` is required in the `WHERE` clause.ReportCountryCodestring `json:"reportCountryCode,omitempty"`// ReportDate: Report date. The value of this field can only be one of the// following: * The first day of the week (Monday) for weekly reports, * The// first day of the month for monthly reports. Required in the `SELECT` clause.// If a `WHERE` condition on `report_date` is not specified in the query, the// latest available weekly or monthly report is returned.ReportDate *Date `json:"reportDate,omitempty"`// ReportGranularity: Granularity of the report. The ranking can be done over a// week or a month timeframe. Required in the `SELECT` clause. Condition on// `report_granularity` is required in the `WHERE` clause.//// Possible values://   "REPORT_GRANULARITY_ENUM_UNSPECIFIED" - Not specified.//   "WEEKLY" - Report is computed over a week timeframe.//   "MONTHLY" - Report is computed over a month timeframe.ReportGranularitystring `json:"reportGranularity,omitempty"`// Title: Title of the product cluster.Titlestring `json:"title,omitempty"`// VariantGtins: GTINs of example variants of the product cluster.VariantGtins []string `json:"variantGtins,omitempty"`// ForceSendFields is a list of field names (e.g. "Brand") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Brand") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

BestSellersProductClusterView: Fields available for query in`best_sellers_product_cluster_view` table. Best sellers(https://support.google.com/merchants/answer/9488679) report with topproduct clusters. A product cluster is a grouping for different offers andvariants that represent the same product, for example, Google Pixel 7.Values are only set for fields requested explicitly in the request's searchquery.

func (BestSellersProductClusterView)MarshalJSON

func (sBestSellersProductClusterView) MarshalJSON() ([]byte,error)

typeCompetitiveVisibilityBenchmarkView

type CompetitiveVisibilityBenchmarkView struct {// CategoryBenchmarkVisibilityTrend: Change in visibility based on impressions// with respect to the start of the selected time range (or first day with// non-zero impressions) for a combined set of merchants with highest// visibility approximating the market. Cannot be filtered on in the 'WHERE'// clause.CategoryBenchmarkVisibilityTrendfloat64 `json:"categoryBenchmarkVisibilityTrend,omitempty"`// Date: Date of this row. Required in the `SELECT` clause. A condition on// `date` is required in the `WHERE` clause.Date *Date `json:"date,omitempty"`// ReportCategoryId: Google product category ID to calculate the report for,// represented in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436). Required in the// `SELECT` clause. A condition on `report_category_id` is required in the// `WHERE` clause.ReportCategoryIdint64 `json:"reportCategoryId,omitempty,string"`// ReportCountryCode: Country where impressions appeared. Required in the// `SELECT` clause. A condition on `report_country_code` is required in the// `WHERE` clause.ReportCountryCodestring `json:"reportCountryCode,omitempty"`// TrafficSource: Traffic source of impressions. Required in the `SELECT`// clause.//// Possible values://   "TRAFFIC_SOURCE_ENUM_UNSPECIFIED" - Not specified.//   "ORGANIC" - Organic traffic.//   "ADS" - Traffic from ads.//   "ALL" - Organic and ads traffic.TrafficSourcestring `json:"trafficSource,omitempty"`// YourDomainVisibilityTrend: Change in visibility based on impressions for// your domain with respect to the start of the selected time range (or first// day with non-zero impressions). Cannot be filtered on in the 'WHERE' clause.YourDomainVisibilityTrendfloat64 `json:"yourDomainVisibilityTrend,omitempty"`// ForceSendFields is a list of field names (e.g.// "CategoryBenchmarkVisibilityTrend") to unconditionally include in API// requests. By default, fields with empty or default values are omitted from// API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g.// "CategoryBenchmarkVisibilityTrend") to include in API requests with the JSON// null value. By default, fields with empty values are omitted from API// requests. Seehttps://pkg.go.dev/google.golang.org/api#hdr-NullFields for// more details.NullFields []string `json:"-"`}

CompetitiveVisibilityBenchmarkView: Fields available for query in`competitive_visibility_benchmark_view` table. Competitive visibility(https://support.google.com/merchants/answer/11366442) report with thecategory benchmark. Values are only set for fields requested explicitly inthe request's search query.

func (CompetitiveVisibilityBenchmarkView)MarshalJSON

func (*CompetitiveVisibilityBenchmarkView)UnmarshalJSON

func (s *CompetitiveVisibilityBenchmarkView) UnmarshalJSON(data []byte)error

typeCompetitiveVisibilityCompetitorView

type CompetitiveVisibilityCompetitorView struct {// AdsOrganicRatio: [Ads / organic ratio]// (https://support.google.com/merchants/answer/11366442#zippy=%2Cads-free-ratio)// shows how often the domain receives impressions from Shopping ads compared// to organic traffic. The number is rounded and bucketed. Cannot be filtered// on in the 'WHERE' clause.AdsOrganicRatiofloat64 `json:"adsOrganicRatio,omitempty"`// Date: Date of this row. A condition on `date` is required in the `WHERE`// clause.Date *Date `json:"date,omitempty"`// Domain: Domain of your competitor or your domain, if 'is_your_domain' is// true. Required in the `SELECT` clause. Cannot be filtered on in the 'WHERE'// clause.Domainstring `json:"domain,omitempty"`// HigherPositionRate: [Higher position rate]// (https://support.google.com/merchants/answer/11366442#zippy=%2Chigher-position-rate)// shows how often a competitor’s offer got placed in a higher position on// the page than your offer. Cannot be filtered on in the 'WHERE' clause.HigherPositionRatefloat64 `json:"higherPositionRate,omitempty"`// IsYourDomain: True if this row contains data for your domain. Cannot be// filtered on in the 'WHERE' clause.IsYourDomainbool `json:"isYourDomain,omitempty"`// PageOverlapRate: [Page overlap rate]// (https://support.google.com/merchants/answer/11366442#zippy=%2Cpage-overlap-rate)// shows how frequently competing retailers’ offers are shown together with// your offers on the same page. Cannot be filtered on in the 'WHERE' clause.PageOverlapRatefloat64 `json:"pageOverlapRate,omitempty"`// Rank: Position of the domain in the similar businesses ranking for the// selected keys (`date`, `report_category_id`, `report_country_code`,// `traffic_source`) based on impressions. 1 is the highest. Cannot be filtered// on in the 'WHERE' clause.Rankint64 `json:"rank,omitempty,string"`// RelativeVisibility: [Relative visibility]// (https://support.google.com/merchants/answer/11366442#zippy=%2Crelative-visibility)// shows how often your competitors’ offers are shown compared to your// offers. In other words, this is the number of displayed impressions of a// competitor retailer divided by the number of your displayed impressions// during a selected time range for a selected product category and country.// Cannot be filtered on in the 'WHERE' clause.RelativeVisibilityfloat64 `json:"relativeVisibility,omitempty"`// ReportCategoryId: Google product category ID to calculate the report for,// represented in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436). Required in the// `SELECT` clause. A condition on `report_category_id` is required in the// `WHERE` clause.ReportCategoryIdint64 `json:"reportCategoryId,omitempty,string"`// ReportCountryCode: Country where impressions appeared. Required in the// `SELECT` clause. A condition on `report_country_code` is required in the// `WHERE` clause.ReportCountryCodestring `json:"reportCountryCode,omitempty"`// TrafficSource: Traffic source of impressions. Required in the `SELECT`// clause.//// Possible values://   "TRAFFIC_SOURCE_ENUM_UNSPECIFIED" - Not specified.//   "ORGANIC" - Organic traffic.//   "ADS" - Traffic from ads.//   "ALL" - Organic and ads traffic.TrafficSourcestring `json:"trafficSource,omitempty"`// ForceSendFields is a list of field names (e.g. "AdsOrganicRatio") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AdsOrganicRatio") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

CompetitiveVisibilityCompetitorView: Fields available for query in`competitive_visibility_competitor_view` table. Competitive visibility(https://support.google.com/merchants/answer/11366442) report withbusinesses with similar visibility. Values are only set for fields requestedexplicitly in the request's search query.

func (CompetitiveVisibilityCompetitorView)MarshalJSON

func (*CompetitiveVisibilityCompetitorView)UnmarshalJSON

func (s *CompetitiveVisibilityCompetitorView) UnmarshalJSON(data []byte)error

typeCompetitiveVisibilityTopMerchantView

type CompetitiveVisibilityTopMerchantView struct {// AdsOrganicRatio: [Ads / organic ratio]// (https://support.google.com/merchants/answer/11366442#zippy=%2Cads-free-ratio)// shows how often the domain receives impressions from Shopping ads compared// to organic traffic. The number is rounded and bucketed. Cannot be filtered// on in the 'WHERE' clause.AdsOrganicRatiofloat64 `json:"adsOrganicRatio,omitempty"`// Date: Date of this row. Cannot be selected in the `SELECT` clause. A// condition on `date` is required in the `WHERE` clause.Date *Date `json:"date,omitempty"`// Domain: Domain of your competitor or your domain, if 'is_your_domain' is// true. Required in the `SELECT` clause. Cannot be filtered on in the 'WHERE'// clause.Domainstring `json:"domain,omitempty"`// HigherPositionRate: [Higher position rate]// (https://support.google.com/merchants/answer/11366442#zippy=%2Chigher-position-rate)// shows how often a competitor’s offer got placed in a higher position on// the page than your offer. Cannot be filtered on in the 'WHERE' clause.HigherPositionRatefloat64 `json:"higherPositionRate,omitempty"`// IsYourDomain: True if this row contains data for your domain. Cannot be// filtered on in the 'WHERE' clause.IsYourDomainbool `json:"isYourDomain,omitempty"`// PageOverlapRate: [Page overlap rate]// (https://support.google.com/merchants/answer/11366442#zippy=%2Cpage-overlap-rate)// shows how frequently competing retailers’ offers are shown together with// your offers on the same page. Cannot be filtered on in the 'WHERE' clause.PageOverlapRatefloat64 `json:"pageOverlapRate,omitempty"`// Rank: Position of the domain in the top merchants ranking for the selected// keys (`date`, `report_category_id`, `report_country_code`, `traffic_source`)// based on impressions. 1 is the highest. Cannot be filtered on in the 'WHERE'// clause.Rankint64 `json:"rank,omitempty,string"`// ReportCategoryId: Google product category ID to calculate the report for,// represented in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436). Required in the// `SELECT` clause. A condition on `report_category_id` is required in the// `WHERE` clause.ReportCategoryIdint64 `json:"reportCategoryId,omitempty,string"`// ReportCountryCode: Country where impressions appeared. Required in the// `SELECT` clause. A condition on `report_country_code` is required in the// `WHERE` clause.ReportCountryCodestring `json:"reportCountryCode,omitempty"`// TrafficSource: Traffic source of impressions. Required in the `SELECT`// clause.//// Possible values://   "TRAFFIC_SOURCE_ENUM_UNSPECIFIED" - Not specified.//   "ORGANIC" - Organic traffic.//   "ADS" - Traffic from ads.//   "ALL" - Organic and ads traffic.TrafficSourcestring `json:"trafficSource,omitempty"`// ForceSendFields is a list of field names (e.g. "AdsOrganicRatio") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AdsOrganicRatio") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

CompetitiveVisibilityTopMerchantView: Fields available for query in`competitive_visibility_top_merchant_view` table. Competitive visibility(https://support.google.com/merchants/answer/11366442) report with businesswith highest visibility. Values are only set for fields requested explicitlyin the request's search query.

func (CompetitiveVisibilityTopMerchantView)MarshalJSON

func (*CompetitiveVisibilityTopMerchantView)UnmarshalJSON

func (s *CompetitiveVisibilityTopMerchantView) UnmarshalJSON(data []byte)error

typeDate

type Date struct {// Day: Day of a month. Must be from 1 to 31 and valid for the year and month,// or 0 to specify a year by itself or a year and month where the day isn't// significant.Dayint64 `json:"day,omitempty"`// Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without// a month and day.Monthint64 `json:"month,omitempty"`// Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date// without a year.Yearint64 `json:"year,omitempty"`// ForceSendFields is a list of field names (e.g. "Day") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Day") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Date: Represents a whole or partial calendar date, such as a birthday. Thetime of day and time zone are either specified elsewhere or areinsignificant. The date is relative to the Gregorian Calendar. This canrepresent one of the following: * A full date, with non-zero year, month,and day values. * A month and day, with a zero year (for example, ananniversary). * A year on its own, with a zero month and a zero day. * Ayear and month, with a zero day (for example, a credit card expirationdate). Related types: * google.type.TimeOfDay * google.type.DateTime *google.protobuf.Timestamp

func (Date)MarshalJSON

func (sDate) MarshalJSON() ([]byte,error)

typeIssueSeverityPerReportingContext

type IssueSeverityPerReportingContext struct {// DemotedCountries: List of demoted countries in the reporting context,// represented in ISO 3166 format.DemotedCountries []string `json:"demotedCountries,omitempty"`// DisapprovedCountries: List of disapproved countries in the reporting// context, represented in ISO 3166 format.DisapprovedCountries []string `json:"disapprovedCountries,omitempty"`// ReportingContext: Reporting context the issue applies to.//// Possible values://   "REPORTING_CONTEXT_ENUM_UNSPECIFIED" - Not specified.//   "SHOPPING_ADS" - [Shopping// ads](https://support.google.com/merchants/answer/6149970).//   "DISCOVERY_ADS" - Deprecated: Use `DEMAND_GEN_ADS` instead. [Discovery and// Demand Gen ads](https://support.google.com/merchants/answer/13389785).//   "DEMAND_GEN_ADS" - [Demand Gen// ads](https://support.google.com/merchants/answer/13389785).//   "DEMAND_GEN_ADS_DISCOVER_SURFACE" - [Demand Gen ads on Discover// surface](https://support.google.com/merchants/answer/13389785).//   "VIDEO_ADS" - [Video// ads](https://support.google.com/google-ads/answer/6340491).//   "DISPLAY_ADS" - [Display// ads](https://support.google.com/merchants/answer/6069387).//   "LOCAL_INVENTORY_ADS" - [Local inventory// ads](https://support.google.com/merchants/answer/3271956).//   "VEHICLE_INVENTORY_ADS" - [Vehicle inventory// ads](https://support.google.com/merchants/answer/11544533).//   "FREE_LISTINGS" - [Free product// listings](https://support.google.com/merchants/answer/9199328).//   "FREE_LOCAL_LISTINGS" - [Free local product// listings](https://support.google.com/merchants/answer/9825611).//   "FREE_LOCAL_VEHICLE_LISTINGS" - [Free local vehicle// listings](https://support.google.com/merchants/answer/11544533).//   "YOUTUBE_AFFILIATE" - [Youtube// Affiliate](https://support.google.com/youtube/answer/13376398).//   "YOUTUBE_SHOPPING" - [YouTube// Shopping](https://support.google.com/merchants/answer/13478370).//   "CLOUD_RETAIL" - [Cloud// retail](https://cloud.google.com/solutions/retail).//   "LOCAL_CLOUD_RETAIL" - [Local cloud// retail](https://cloud.google.com/solutions/retail).//   "PRODUCT_REVIEWS" - [Product// Reviews](https://support.google.com/merchants/answer/14620732).//   "MERCHANT_REVIEWS" - [Merchant// Reviews](https://developers.google.com/merchant-review-feeds).//   "YOUTUBE_CHECKOUT" - YouTube Checkout .ReportingContextstring `json:"reportingContext,omitempty"`// ForceSendFields is a list of field names (e.g. "DemotedCountries") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "DemotedCountries") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

IssueSeverityPerReportingContext: Issue severity per reporting context.

func (IssueSeverityPerReportingContext)MarshalJSON

func (sIssueSeverityPerReportingContext) MarshalJSON() ([]byte,error)

typeItemIssue

type ItemIssue struct {// Resolution: Item issue resolution.//// Possible values://   "ITEM_ISSUE_RESOLUTION_UNSPECIFIED" - Not specified.//   "MERCHANT_ACTION" - The merchant has to fix the issue.//   "PENDING_PROCESSING" - The issue will be resolved automatically (for// example, image crawl) or through a Google review. No merchant action is// required now. Resolution might lead to another issue (for example, if crawl// fails).Resolutionstring `json:"resolution,omitempty"`// Severity: Item issue severity.Severity *ItemIssueSeverity `json:"severity,omitempty"`// Type: Item issue type.Type *ItemIssueType `json:"type,omitempty"`// ForceSendFields is a list of field names (e.g. "Resolution") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Resolution") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ItemIssue: Item issue associated with the product.

func (ItemIssue)MarshalJSON

func (sItemIssue) MarshalJSON() ([]byte,error)

typeItemIssueSeverity

type ItemIssueSeverity struct {// AggregatedSeverity: Aggregated severity of the issue for all reporting// contexts it affects. **This field can be used for filtering the results.**//// Possible values://   "AGGREGATED_ISSUE_SEVERITY_UNSPECIFIED" - Not specified.//   "DISAPPROVED" - Issue disapproves the product in at least one reporting// context.//   "DEMOTED" - Issue demotes the product in all reporting contexts it// affects.//   "PENDING" - Issue resolution is `PENDING_PROCESSING`.AggregatedSeveritystring `json:"aggregatedSeverity,omitempty"`// SeverityPerReportingContext: Issue severity per reporting context.SeverityPerReportingContext []*IssueSeverityPerReportingContext `json:"severityPerReportingContext,omitempty"`// ForceSendFields is a list of field names (e.g. "AggregatedSeverity") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AggregatedSeverity") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ItemIssueSeverity: How the issue affects the serving of the product.

func (ItemIssueSeverity)MarshalJSON

func (sItemIssueSeverity) MarshalJSON() ([]byte,error)

typeItemIssueType

type ItemIssueType struct {// CanonicalAttribute: Canonical attribute name for attribute-specific issues.CanonicalAttributestring `json:"canonicalAttribute,omitempty"`// Code: Error code of the issue, equivalent to the `code` of Product issues// (https://developers.google.com/shopping-content/guides/product-issues).Codestring `json:"code,omitempty"`// ForceSendFields is a list of field names (e.g. "CanonicalAttribute") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CanonicalAttribute") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ItemIssueType: Issue type.

func (ItemIssueType)MarshalJSON

func (sItemIssueType) MarshalJSON() ([]byte,error)

typeNonProductPerformanceView

type NonProductPerformanceView struct {// ClickThroughRate: Click-through rate - the number of clicks (`clicks`)// divided by the number of impressions (`impressions`) of images and online// store links leading to your non-product pages. Metric.ClickThroughRatefloat64 `json:"clickThroughRate,omitempty"`// Clicks: Number of clicks on images and online store links leading to your// non-product pages. Metric.Clicksint64 `json:"clicks,omitempty,string"`// Date: Date in the merchant timezone to which metrics apply. Segment.// Condition on `date` is required in the `WHERE` clause.Date *Date `json:"date,omitempty"`// Impressions: Number of times images and online store links leading to your// non-product pages were shown. Metric.Impressionsint64 `json:"impressions,omitempty,string"`// Week: First day of the week (Monday) of the metrics date in the merchant// timezone. Segment.Week *Date `json:"week,omitempty"`// ForceSendFields is a list of field names (e.g. "ClickThroughRate") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ClickThroughRate") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

NonProductPerformanceView: Fields available for query in`non_product_performance_view` table. Performance data on images and onlinestore links leading to your non-product pages. This includes performancemetrics (for example, `clicks`) and dimensions according to whichperformance metrics are segmented (for example, `date`). Segment fieldscannot be selected in queries without also selecting at least one metricfield. Values are only set for fields requested explicitly in the request'ssearch query.

func (NonProductPerformanceView)MarshalJSON

func (sNonProductPerformanceView) MarshalJSON() ([]byte,error)

func (*NonProductPerformanceView)UnmarshalJSON

func (s *NonProductPerformanceView) UnmarshalJSON(data []byte)error

typePrice

type Price struct {// AmountMicros: The price represented as a number in micros (1 million micros// is an equivalent to one's currency standard unit, for example, 1 USD =// 1000000 micros).AmountMicrosint64 `json:"amountMicros,omitempty,string"`// CurrencyCode: The currency of the price using three-letter acronyms// according to ISO 4217 (http://en.wikipedia.org/wiki/ISO_4217).CurrencyCodestring `json:"currencyCode,omitempty"`// ForceSendFields is a list of field names (e.g. "AmountMicros") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AmountMicros") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Price: The price represented as a number and currency.

func (Price)MarshalJSON

func (sPrice) MarshalJSON() ([]byte,error)

typePriceCompetitivenessProductView

type PriceCompetitivenessProductView struct {// BenchmarkPrice: Latest available price benchmark for the product's catalog// in the benchmark country.BenchmarkPrice *Price `json:"benchmarkPrice,omitempty"`// Brand: Brand of the product.Brandstring `json:"brand,omitempty"`// CategoryL1: Product category (1st level) in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436).CategoryL1string `json:"categoryL1,omitempty"`// CategoryL2: Product category (2nd level) in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436).CategoryL2string `json:"categoryL2,omitempty"`// CategoryL3: Product category (3rd level) in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436).CategoryL3string `json:"categoryL3,omitempty"`// CategoryL4: Product category (4th level) in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436).CategoryL4string `json:"categoryL4,omitempty"`// CategoryL5: Product category (5th level) in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436).CategoryL5string `json:"categoryL5,omitempty"`// Id: REST ID of the product, in the form of// `channel~languageCode~feedLabel~offerId`. Can be used to join data with the// `product_view` table. Required in the `SELECT` clause.Idstring `json:"id,omitempty"`// OfferId: Merchant-provided id of the product.OfferIdstring `json:"offerId,omitempty"`// Price: Current price of the product.Price *Price `json:"price,omitempty"`// ProductTypeL1: Product type (1st level) in merchant's own product taxonomy// (https://support.google.com/merchants/answer/6324406).ProductTypeL1string `json:"productTypeL1,omitempty"`// ProductTypeL2: Product type (2nd level) in merchant's own product taxonomy// (https://support.google.com/merchants/answer/6324406).ProductTypeL2string `json:"productTypeL2,omitempty"`// ProductTypeL3: Product type (3rd level) in merchant's own product taxonomy// (https://support.google.com/merchants/answer/6324406).ProductTypeL3string `json:"productTypeL3,omitempty"`// ProductTypeL4: Product type (4th level) in merchant's own product taxonomy// (https://support.google.com/merchants/answer/6324406).ProductTypeL4string `json:"productTypeL4,omitempty"`// ProductTypeL5: Product type (5th level) in merchant's own product taxonomy// (https://support.google.com/merchants/answer/6324406).ProductTypeL5string `json:"productTypeL5,omitempty"`// ReportCountryCode: Country of the price benchmark. Represented in the ISO// 3166 format. Required in the `SELECT` clause.ReportCountryCodestring `json:"reportCountryCode,omitempty"`// Title: Title of the product.Titlestring `json:"title,omitempty"`// ForceSendFields is a list of field names (e.g. "BenchmarkPrice") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "BenchmarkPrice") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

PriceCompetitivenessProductView: Fields available for query in`price_competitiveness_product_view` table. Price competitiveness(https://support.google.com/merchants/answer/9626903) report. Values areonly set for fields requested explicitly in the request's search query.

func (PriceCompetitivenessProductView)MarshalJSON

func (sPriceCompetitivenessProductView) MarshalJSON() ([]byte,error)

typePriceInsightsProductView

type PriceInsightsProductView struct {// Brand: Brand of the product.Brandstring `json:"brand,omitempty"`// CategoryL1: Product category (1st level) in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436).CategoryL1string `json:"categoryL1,omitempty"`// CategoryL2: Product category (2nd level) in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436).CategoryL2string `json:"categoryL2,omitempty"`// CategoryL3: Product category (3rd level) in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436).CategoryL3string `json:"categoryL3,omitempty"`// CategoryL4: Product category (4th level) in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436).CategoryL4string `json:"categoryL4,omitempty"`// CategoryL5: Product category (5th level) in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436).CategoryL5string `json:"categoryL5,omitempty"`// Effectiveness: The predicted effectiveness of applying the price suggestion,// bucketed.//// Possible values://   "EFFECTIVENESS_UNSPECIFIED" - Effectiveness is unknown.//   "LOW" - Effectiveness is low.//   "MEDIUM" - Effectiveness is medium.//   "HIGH" - Effectiveness is high.Effectivenessstring `json:"effectiveness,omitempty"`// Id: REST ID of the product, in the form of// `channel~languageCode~feedLabel~offerId`. Can be used to join data with the// `product_view` table. Required in the `SELECT` clause.Idstring `json:"id,omitempty"`// OfferId: Merchant-provided id of the product.OfferIdstring `json:"offerId,omitempty"`// PredictedClicksChangeFraction: Predicted change in clicks as a fraction// after introducing the suggested price compared to current active price. For// example, 0.05 is a 5% predicted increase in clicks.PredictedClicksChangeFractionfloat64 `json:"predictedClicksChangeFraction,omitempty"`// PredictedConversionsChangeFraction: Predicted change in conversions as a// fraction after introducing the suggested price compared to current active// price. For example, 0.05 is a 5% predicted increase in conversions).PredictedConversionsChangeFractionfloat64 `json:"predictedConversionsChangeFraction,omitempty"`// PredictedImpressionsChangeFraction: Predicted change in impressions as a// fraction after introducing the suggested price compared to current active// price. For example, 0.05 is a 5% predicted increase in impressions.PredictedImpressionsChangeFractionfloat64 `json:"predictedImpressionsChangeFraction,omitempty"`// Price: Current price of the product.Price *Price `json:"price,omitempty"`// ProductTypeL1: Product type (1st level) in merchant's own product taxonomy// (https://support.google.com/merchants/answer/6324406).ProductTypeL1string `json:"productTypeL1,omitempty"`// ProductTypeL2: Product type (2nd level) in merchant's own product taxonomy// (https://support.google.com/merchants/answer/6324406).ProductTypeL2string `json:"productTypeL2,omitempty"`// ProductTypeL3: Product type (3rd level) in merchant's own product taxonomy// (https://support.google.com/merchants/answer/6324406).ProductTypeL3string `json:"productTypeL3,omitempty"`// ProductTypeL4: Product type (4th level) in merchant's own product taxonomy// (https://support.google.com/merchants/answer/6324406).ProductTypeL4string `json:"productTypeL4,omitempty"`// ProductTypeL5: Product type (5th level) in merchant's own product taxonomy// (https://support.google.com/merchants/answer/6324406).ProductTypeL5string `json:"productTypeL5,omitempty"`// SuggestedPrice: Latest suggested price for the product.SuggestedPrice *Price `json:"suggestedPrice,omitempty"`// Title: Title of the product.Titlestring `json:"title,omitempty"`// ForceSendFields is a list of field names (e.g. "Brand") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Brand") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

PriceInsightsProductView: Fields available for query in`price_insights_product_view` table. Price insights(https://support.google.com/merchants/answer/11916926) report. Values areonly set for fields requested explicitly in the request's search query.

func (PriceInsightsProductView)MarshalJSON

func (sPriceInsightsProductView) MarshalJSON() ([]byte,error)

func (*PriceInsightsProductView)UnmarshalJSON

func (s *PriceInsightsProductView) UnmarshalJSON(data []byte)error

typeProductChange

type ProductChange struct {// NewValue: The new value of the changed resource or attribute. If empty, it// means that the product was deleted. Will have one of these values :// (`approved`, `pending`, `disapproved`, “)NewValuestring `json:"newValue,omitempty"`// OldValue: The old value of the changed resource or attribute. If empty, it// means that the product was created. Will have one of these values :// (`approved`, `pending`, `disapproved`, “)OldValuestring `json:"oldValue,omitempty"`// RegionCode: Countries that have the change (if applicable). Represented in// the ISO 3166 format.RegionCodestring `json:"regionCode,omitempty"`// ReportingContext: Reporting contexts that have the change (if applicable).// Currently this field supports only (`SHOPPING_ADS`, `LOCAL_INVENTORY_ADS`,// `YOUTUBE_SHOPPING`, `YOUTUBE_CHECKOUT`, `YOUTUBE_AFFILIATE`) from the enum// value ReportingContextEnum// (/merchant/api/reference/rest/Shared.Types/ReportingContextEnum)//// Possible values://   "REPORTING_CONTEXT_ENUM_UNSPECIFIED" - Not specified.//   "SHOPPING_ADS" - [Shopping// ads](https://support.google.com/merchants/answer/6149970).//   "DISCOVERY_ADS" - Deprecated: Use `DEMAND_GEN_ADS` instead. [Discovery and// Demand Gen ads](https://support.google.com/merchants/answer/13389785).//   "DEMAND_GEN_ADS" - [Demand Gen// ads](https://support.google.com/merchants/answer/13389785).//   "DEMAND_GEN_ADS_DISCOVER_SURFACE" - [Demand Gen ads on Discover// surface](https://support.google.com/merchants/answer/13389785).//   "VIDEO_ADS" - [Video// ads](https://support.google.com/google-ads/answer/6340491).//   "DISPLAY_ADS" - [Display// ads](https://support.google.com/merchants/answer/6069387).//   "LOCAL_INVENTORY_ADS" - [Local inventory// ads](https://support.google.com/merchants/answer/3271956).//   "VEHICLE_INVENTORY_ADS" - [Vehicle inventory// ads](https://support.google.com/merchants/answer/11544533).//   "FREE_LISTINGS" - [Free product// listings](https://support.google.com/merchants/answer/9199328).//   "FREE_LOCAL_LISTINGS" - [Free local product// listings](https://support.google.com/merchants/answer/9825611).//   "FREE_LOCAL_VEHICLE_LISTINGS" - [Free local vehicle// listings](https://support.google.com/merchants/answer/11544533).//   "YOUTUBE_AFFILIATE" - [Youtube// Affiliate](https://support.google.com/youtube/answer/13376398).//   "YOUTUBE_SHOPPING" - [YouTube// Shopping](https://support.google.com/merchants/answer/13478370).//   "CLOUD_RETAIL" - [Cloud// retail](https://cloud.google.com/solutions/retail).//   "LOCAL_CLOUD_RETAIL" - [Local cloud// retail](https://cloud.google.com/solutions/retail).//   "PRODUCT_REVIEWS" - [Product// Reviews](https://support.google.com/merchants/answer/14620732).//   "MERCHANT_REVIEWS" - [Merchant// Reviews](https://developers.google.com/merchant-review-feeds).//   "YOUTUBE_CHECKOUT" - YouTube Checkout .ReportingContextstring `json:"reportingContext,omitempty"`// ForceSendFields is a list of field names (e.g. "NewValue") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "NewValue") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ProductChange: The change that happened to the product including old value,new value, country code as the region code and reporting context.

func (ProductChange)MarshalJSON

func (sProductChange) MarshalJSON() ([]byte,error)

typeProductPerformanceView

type ProductPerformanceView struct {// Brand: Brand of the product. Segment.Brandstring `json:"brand,omitempty"`// CategoryL1: Product category (1st level)// (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)// in Google's product taxonomy. Segment.CategoryL1string `json:"categoryL1,omitempty"`// CategoryL2: Product category (2nd level)// (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)// in Google's product taxonomy. Segment.CategoryL2string `json:"categoryL2,omitempty"`// CategoryL3: Product category (3rd level)// (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)// in Google's product taxonomy. Segment.CategoryL3string `json:"categoryL3,omitempty"`// CategoryL4: Product category (4th level)// (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)// in Google's product taxonomy. Segment.CategoryL4string `json:"categoryL4,omitempty"`// CategoryL5: Product category (5th level)// (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)// in Google's product taxonomy. Segment.CategoryL5string `json:"categoryL5,omitempty"`// ClickThroughRate: Click-through rate - the number of clicks merchant's// products receive (clicks) divided by the number of times the products are// shown (impressions). Metric.ClickThroughRatefloat64 `json:"clickThroughRate,omitempty"`// Clicks: Number of clicks. Metric.Clicksint64 `json:"clicks,omitempty,string"`// ConversionRate: Number of conversions divided by the number of clicks,// reported on the impression date. Metric. Available only for the `FREE`// traffic source.ConversionRatefloat64 `json:"conversionRate,omitempty"`// ConversionValue: Value of conversions attributed to the product, reported on// the conversion date. Metric. Available only for the `FREE` traffic source.ConversionValue *Price `json:"conversionValue,omitempty"`// Conversions: Number of conversions attributed to the product, reported on// the conversion date. Depending on the attribution model, a conversion might// be distributed across multiple clicks, where each click gets its own credit// assigned. This metric is a sum of all such credits. Metric. Available only// for the `FREE` traffic source.Conversionsfloat64 `json:"conversions,omitempty"`// CustomLabel0: Custom label 0 for custom grouping of products. Segment.CustomLabel0string `json:"customLabel0,omitempty"`// CustomLabel1: Custom label 1 for custom grouping of products. Segment.CustomLabel1string `json:"customLabel1,omitempty"`// CustomLabel2: Custom label 2 for custom grouping of products. Segment.CustomLabel2string `json:"customLabel2,omitempty"`// CustomLabel3: Custom label 3 for custom grouping of products. Segment.CustomLabel3string `json:"customLabel3,omitempty"`// CustomLabel4: Custom label 4 for custom grouping of products. Segment.CustomLabel4string `json:"customLabel4,omitempty"`// CustomerCountryCode: Code of the country where the customer is located at// the time of the event. Represented in the ISO 3166 format. Segment. If the// customer country cannot be determined, a special 'ZZ' code is returned.CustomerCountryCodestring `json:"customerCountryCode,omitempty"`// Date: Date in the merchant timezone to which metrics apply. Segment.// Condition on `date` is required in the `WHERE` clause.Date *Date `json:"date,omitempty"`// Impressions: Number of times merchant's products are shown. Metric.Impressionsint64 `json:"impressions,omitempty,string"`// MarketingMethod: Marketing method to which metrics apply. Segment.//// Possible values://   "MARKETING_METHOD_ENUM_UNSPECIFIED" - Not specified.//   "ORGANIC" - Organic marketing.//   "ADS" - Ads-based marketing.MarketingMethodstring `json:"marketingMethod,omitempty"`// OfferId: Merchant-provided id of the product. Segment.OfferIdstring `json:"offerId,omitempty"`// ProductTypeL1: Product type (1st level)// (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)// in merchant's own product taxonomy. Segment.ProductTypeL1string `json:"productTypeL1,omitempty"`// ProductTypeL2: Product type (2nd level)// (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)// in merchant's own product taxonomy. Segment.ProductTypeL2string `json:"productTypeL2,omitempty"`// ProductTypeL3: Product type (3rd level)// (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)// in merchant's own product taxonomy. Segment.ProductTypeL3string `json:"productTypeL3,omitempty"`// ProductTypeL4: Product type (4th level)// (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)// in merchant's own product taxonomy. Segment.ProductTypeL4string `json:"productTypeL4,omitempty"`// ProductTypeL5: Product type (5th level)// (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)// in merchant's own product taxonomy. Segment.ProductTypeL5string `json:"productTypeL5,omitempty"`// Title: Title of the product. Segment.Titlestring `json:"title,omitempty"`// Week: First day of the week (Monday) of the metrics date in the merchant// timezone. Segment.Week *Date `json:"week,omitempty"`// ForceSendFields is a list of field names (e.g. "Brand") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Brand") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ProductPerformanceView: Fields available for query in`product_performance_view` table. Product performance data for your account,including performance metrics (for example, `clicks`) and dimensionsaccording to which performance metrics are segmented (for example,`offer_id`). Values of product dimensions, such as `offer_id`, reflect thestate of a product at the time of the impression. Segment fields cannot beselected in queries without also selecting at least one metric field. Valuesare only set for fields requested explicitly in the request's search query.

func (ProductPerformanceView)MarshalJSON

func (sProductPerformanceView) MarshalJSON() ([]byte,error)

func (*ProductPerformanceView)UnmarshalJSON

func (s *ProductPerformanceView) UnmarshalJSON(data []byte)error

typeProductStatusChangeMessage

type ProductStatusChangeMessage struct {// Account: The target account that owns the entity that changed. Format :// `accounts/{merchant_id}`Accountstring `json:"account,omitempty"`// Attribute: The attribute in the resource that changed, in this case it will// be always `Status`.//// Possible values://   "ATTRIBUTE_UNSPECIFIED" - Unspecified attribute//   "STATUS" - Status of the changed entityAttributestring `json:"attribute,omitempty"`// Changes: A message to describe the change that happened to the productChanges []*ProductChange `json:"changes,omitempty"`// EventTime: The time at which the event was generated. If you want to order// the notification messages you receive you should rely on this field not on// the order of receiving the notifications.EventTimestring `json:"eventTime,omitempty"`// ExpirationTime: Optional. The product expiration time. This field will not// be set if the notification is sent for a product deletion event.ExpirationTimestring `json:"expirationTime,omitempty"`// ManagingAccount: The account that manages the merchant's account. can be the// same as merchant id if it is standalone account. Format :// `accounts/{service_provider_id}`ManagingAccountstring `json:"managingAccount,omitempty"`// Resource: The product name. Format: `accounts/{account}/products/{product}`Resourcestring `json:"resource,omitempty"`// ResourceId: The product id.ResourceIdstring `json:"resourceId,omitempty"`// ResourceType: The resource that changed, in this case it will always be// `Product`.//// Possible values://   "RESOURCE_UNSPECIFIED" - Unspecified resource//   "PRODUCT" - Resource type : productResourceTypestring `json:"resourceType,omitempty"`// ForceSendFields is a list of field names (e.g. "Account") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Account") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ProductStatusChangeMessage: The message that the merchant will receive tonotify about product status change event

func (ProductStatusChangeMessage)MarshalJSON

func (sProductStatusChangeMessage) MarshalJSON() ([]byte,error)

typeProductView

type ProductView struct {// AggregatedReportingContextStatus: Aggregated status.//// Possible values://   "AGGREGATED_REPORTING_CONTEXT_STATUS_UNSPECIFIED" - Not specified.//   "NOT_ELIGIBLE_OR_DISAPPROVED" - Product is not eligible or is disapproved// for all reporting contexts.//   "PENDING" - Product's status is pending in all reporting contexts.//   "ELIGIBLE_LIMITED" - Product is eligible for some (but not all) reporting// contexts.//   "ELIGIBLE" - Product is eligible for all reporting contexts.AggregatedReportingContextStatusstring `json:"aggregatedReportingContextStatus,omitempty"`// Availability: Availability// (https://support.google.com/merchants/answer/6324448) of the product.Availabilitystring `json:"availability,omitempty"`// Brand: Brand of the product.Brandstring `json:"brand,omitempty"`// CategoryL1: Product category (1st level) in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436).CategoryL1string `json:"categoryL1,omitempty"`// CategoryL2: Product category (2nd level) in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436).CategoryL2string `json:"categoryL2,omitempty"`// CategoryL3: Product category (3rd level) in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436).CategoryL3string `json:"categoryL3,omitempty"`// CategoryL4: Product category (4th level) in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436).CategoryL4string `json:"categoryL4,omitempty"`// CategoryL5: Product category (5th level) in Google's product taxonomy// (https://support.google.com/merchants/answer/6324436).CategoryL5string `json:"categoryL5,omitempty"`// Channel: Channel of the product. Can be `ONLINE` or `LOCAL`.//// Possible values://   "CHANNEL_ENUM_UNSPECIFIED" - Not specified.//   "ONLINE" - Online product.//   "LOCAL" - Local product.Channelstring `json:"channel,omitempty"`// ClickPotential: Estimated performance potential compared to highest// performing products of the merchant.//// Possible values://   "CLICK_POTENTIAL_UNSPECIFIED" - Unknown predicted clicks impact.//   "LOW" - Potential to receive a low number of clicks compared to the// highest performing products of the merchant.//   "MEDIUM" - Potential to receive a moderate number of clicks compared to// the highest performing products of the merchant.//   "HIGH" - Potential to receive a similar number of clicks as the highest// performing products of the merchant.ClickPotentialstring `json:"clickPotential,omitempty"`// ClickPotentialRank: Rank of the product based on its click potential. A// product with `click_potential_rank` 1 has the highest click potential among// the merchant's products that fulfill the search query conditions.ClickPotentialRankint64 `json:"clickPotentialRank,omitempty,string"`// Condition: Condition (https://support.google.com/merchants/answer/6324469)// of the product.Conditionstring `json:"condition,omitempty"`// CreationTime: The time the merchant created the product in timestamp// seconds.CreationTimestring `json:"creationTime,omitempty"`// ExpirationDate: Expiration date for the product, specified on insertion.ExpirationDate *Date `json:"expirationDate,omitempty"`// FeedLabel: Feed label of the product.FeedLabelstring `json:"feedLabel,omitempty"`// Gtin: List of Global Trade Item Numbers (GTINs) of the product.Gtin []string `json:"gtin,omitempty"`// Id: REST ID of the product, in the form of// `channel~languageCode~feedLabel~offerId`. Merchant API methods that operate// on products take this as their `name` parameter. Required in the `SELECT`// clause.Idstring `json:"id,omitempty"`// ItemGroupId: Item group id provided by the merchant for grouping variants// together.ItemGroupIdstring `json:"itemGroupId,omitempty"`// ItemIssues: List of item issues for the product. **This field cannot be used// for sorting the results.** **Only selected attributes of this field (for// example, `item_issues.severity.aggregated_severity`) can be used for// filtering the results.**ItemIssues []*ItemIssue `json:"itemIssues,omitempty"`// LanguageCode: Language code of the product in BCP 47 format.LanguageCodestring `json:"languageCode,omitempty"`// OfferId: Merchant-provided id of the product.OfferIdstring `json:"offerId,omitempty"`// Price: Product price. Absent if the information about the price of the// product is not available.Price *Price `json:"price,omitempty"`// ProductTypeL1: Product type (1st level) in merchant's own product taxonomy// (https://support.google.com/merchants/answer/6324406).ProductTypeL1string `json:"productTypeL1,omitempty"`// ProductTypeL2: Product type (2nd level) in merchant's own product taxonomy// (https://support.google.com/merchants/answer/6324406).ProductTypeL2string `json:"productTypeL2,omitempty"`// ProductTypeL3: Product type (3rd level) in merchant's own product taxonomy// (https://support.google.com/merchants/answer/6324406).ProductTypeL3string `json:"productTypeL3,omitempty"`// ProductTypeL4: Product type (4th level) in merchant's own product taxonomy// (https://support.google.com/merchants/answer/6324406).ProductTypeL4string `json:"productTypeL4,omitempty"`// ProductTypeL5: Product type (5th level) in merchant's own product taxonomy// (https://support.google.com/merchants/answer/6324406).ProductTypeL5string `json:"productTypeL5,omitempty"`// ShippingLabel: Normalized shipping label// (https://support.google.com/merchants/answer/6324504) specified in the data// source.ShippingLabelstring `json:"shippingLabel,omitempty"`// ThumbnailLink: Link to the processed image of the product, hosted on the// Google infrastructure.ThumbnailLinkstring `json:"thumbnailLink,omitempty"`// Title: Title of the product.Titlestring `json:"title,omitempty"`// ForceSendFields is a list of field names (e.g.// "AggregatedReportingContextStatus") to unconditionally include in API// requests. By default, fields with empty or default values are omitted from// API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g.// "AggregatedReportingContextStatus") to include in API requests with the JSON// null value. By default, fields with empty values are omitted from API// requests. Seehttps://pkg.go.dev/google.golang.org/api#hdr-NullFields for// more details.NullFields []string `json:"-"`}

ProductView: Fields available for query in `product_view` table. Products inthe current inventory. Products in this table are the same as in Productssub-API but not all product attributes from Products sub-API are availablefor query in this table. In contrast to Products sub-API, this table allowsto filter the returned list of products by product attributes. To retrieve asingle product by `id` or list all products, Products sub-API should beused. Values are only set for fields requested explicitly in the request'ssearch query.

func (ProductView)MarshalJSON

func (sProductView) MarshalJSON() ([]byte,error)

typeReportRow

type ReportRow struct {// BestSellersBrandView: Fields available for query in// `best_sellers_brand_view` table.BestSellersBrandView *BestSellersBrandView `json:"bestSellersBrandView,omitempty"`// BestSellersProductClusterView: Fields available for query in// `best_sellers_product_cluster_view` table.BestSellersProductClusterView *BestSellersProductClusterView `json:"bestSellersProductClusterView,omitempty"`// CompetitiveVisibilityBenchmarkView: Fields available for query in// `competitive_visibility_benchmark_view` table.CompetitiveVisibilityBenchmarkView *CompetitiveVisibilityBenchmarkView `json:"competitiveVisibilityBenchmarkView,omitempty"`// CompetitiveVisibilityCompetitorView: Fields available for query in// `competitive_visibility_competitor_view` table.CompetitiveVisibilityCompetitorView *CompetitiveVisibilityCompetitorView `json:"competitiveVisibilityCompetitorView,omitempty"`// CompetitiveVisibilityTopMerchantView: Fields available for query in// `competitive_visibility_top_merchant_view` table.CompetitiveVisibilityTopMerchantView *CompetitiveVisibilityTopMerchantView `json:"competitiveVisibilityTopMerchantView,omitempty"`// NonProductPerformanceView: Fields available for query in// `non_product_performance_view` table.NonProductPerformanceView *NonProductPerformanceView `json:"nonProductPerformanceView,omitempty"`// PriceCompetitivenessProductView: Fields available for query in// `price_competitiveness_product_view` table.PriceCompetitivenessProductView *PriceCompetitivenessProductView `json:"priceCompetitivenessProductView,omitempty"`// PriceInsightsProductView: Fields available for query in// `price_insights_product_view` table.PriceInsightsProductView *PriceInsightsProductView `json:"priceInsightsProductView,omitempty"`// ProductPerformanceView: Fields available for query in// `product_performance_view` table.ProductPerformanceView *ProductPerformanceView `json:"productPerformanceView,omitempty"`// ProductView: Fields available for query in `product_view` table.ProductView *ProductView `json:"productView,omitempty"`// ForceSendFields is a list of field names (e.g. "BestSellersBrandView") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "BestSellersBrandView") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ReportRow: Result row returned from the search query. Only the messagecorresponding to the queried table is populated in the response. Within thepopulated message, only the fields requested explicitly in the query arepopulated.

func (ReportRow)MarshalJSON

func (sReportRow) MarshalJSON() ([]byte,error)

typeSearchRequest

type SearchRequest struct {// PageSize: Optional. Number of `ReportRows` to retrieve in a single page.// Defaults to 1000. Values above 5000 are coerced to 5000.PageSizeint64 `json:"pageSize,omitempty"`// PageToken: Optional. Token of the page to retrieve. If not specified, the// first page of results is returned. In order to request the next page of// results, the value obtained from `next_page_token` in the previous response// should be used.PageTokenstring `json:"pageToken,omitempty"`// Query: Required. Query that defines a report to be retrieved. For details on// how to construct your query, see the Query Language guide// (/merchant/api/guides/reports/query-language). For the full list of// available tables and fields, see the Available fields// (/merchant/api/reference/rest/reports_{api_version}/accounts.reports).Querystring `json:"query,omitempty"`// ForceSendFields is a list of field names (e.g. "PageSize") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "PageSize") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

SearchRequest: Request message for the `ReportService.Search` method.

func (SearchRequest)MarshalJSON

func (sSearchRequest) MarshalJSON() ([]byte,error)

typeSearchResponse

type SearchResponse struct {// NextPageToken: Token which can be sent as `page_token` to retrieve the next// page. If omitted, there are no subsequent pages.NextPageTokenstring `json:"nextPageToken,omitempty"`// Results: Rows that matched the search query.Results []*ReportRow `json:"results,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "NextPageToken") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "NextPageToken") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

SearchResponse: Response message for the `ReportService.Search` method.

func (SearchResponse)MarshalJSON

func (sSearchResponse) MarshalJSON() ([]byte,error)

typeService

type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentAccounts *AccountsService// contains filtered or unexported fields}

funcNewdeprecated

func New(client *http.Client) (*Service,error)

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead.To provide a custom HTTP client, use option.WithHTTPClient.If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

funcNewService

func NewService(ctxcontext.Context, opts ...option.ClientOption) (*Service,error)

NewService creates a new Service.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp