feat: add store_type to product_performance_view

feat: add `status_per_reporting_context` to `product_view`
docs: update comments for `SearchRequest`, `ProductView`, and `AggregatedReportingContextStatus`

PiperOrigin-RevId: 905592672
This commit is contained in:
Google APIs 2026-04-25 10:12:52 -07:00 committed by Copybara-Service
parent df51712c79
commit 114cd0bbdc

View file

@ -1,4 +1,4 @@
// Copyright 2025 Google LLC
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -60,11 +60,11 @@ message SearchRequest {
// 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_v1/accounts.reports).
// fields][google.shopping.merchant.reports.v1.ReportRow].
string query = 2 [(google.api.field_behavior) = REQUIRED];
// Optional. Number of `ReportRows` to retrieve in a single page. Defaults to
// 1000. Values above 5000 are coerced to 5000.
// 1000. Values above 100,000 are coerced to 100,000.
int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. Token of the page to retrieve. If not specified, the first page
@ -158,6 +158,13 @@ message ProductPerformanceView {
// returned.
optional string customer_country_code = 4;
// Store type to which metrics apply. Can be `ONLINE_STORE` or
// `LOCAL_STORES`. Segment.
//
// For `LOCAL_STORES` store type, further segmentation by a specific store
// is not available.
optional StoreType.StoreTypeEnum store_type = 32;
// Merchant-provided id of the product. Segment.
optional string offer_id = 5;
@ -266,16 +273,16 @@ message ProductPerformanceView {
// Fields available for query in `product_view` table.
//
// Products in the current inventory. Products in this table are the same as in
// Products sub-API but not all product attributes from Products sub-API are
// available for query in this table. In contrast to Products sub-API, this
// table allows to filter the returned list of products by product attributes.
// To retrieve a single product by `id` or list all products, Products sub-API
// should be used.
// Products in the current inventory. Products in this table are the
// same as a [Product resource in Products
// sub-API](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.products)
// but not all product attributes from Products sub-API are available for query
// in this table. In contrast to Products sub-API, this table allows to filter
// the returned list of products by product attributes. To retrieve a single
// product by `id` or list all products, Products sub-API should be used.
//
// Values are only set for fields requested explicitly in the request's search
// query.
//
message ProductView {
// Item issue associated with the product.
message ItemIssue {
@ -322,11 +329,18 @@ message ProductView {
}
// Issue severity per reporting context.
//
// Reporting contexts included in this list can be restricted using a
// filter on the `reporting_context` field.
repeated IssueSeverityPerReportingContext severity_per_reporting_context =
1;
// Aggregated severity of the issue for all reporting contexts it affects.
//
// Reporting contexts included in the computation of the aggregated
// severity can be restricted using a filter on the `reporting_context`
// field.
//
// **This field can be used for filtering the results.**
optional AggregatedIssueSeverity aggregated_severity = 2;
}
@ -355,8 +369,37 @@ message ProductView {
optional ItemIssueResolution resolution = 3;
}
// Status of the product for a specific reporting context.
//
// Equivalent to
// [`DestinationStatus`][google.shopping.merchant.products.v1.ProductStatus.DestinationStatus]
// in Products API.
message StatusPerReportingContext {
// Reporting context the status applies to.
optional google.shopping.type.ReportingContext.ReportingContextEnum
reporting_context = 1;
// List of approved countries in the reporting context, represented in
// [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format, for
// example, `US`.
repeated string approved_countries = 2;
// List of disapproved countries in the reporting context, represented in
// [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format, for
// example, `US`.
repeated string disapproved_countries = 3;
// List of pending countries in the reporting context, represented in
// [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format, for
// example, `US`.
repeated string pending_countries = 4;
}
// Status of the product aggregated for all reporting contexts.
//
// Reporting contexts included in the computation of the aggregated status can
// be restricted using a filter on the `reporting_context` field.
//
// Here's an example of how the aggregated status is computed:
//
// Free listings | Shopping ads | Status
@ -372,16 +415,18 @@ message ProductView {
// Not specified.
AGGREGATED_REPORTING_CONTEXT_STATUS_UNSPECIFIED = 0;
// Product is not eligible or is disapproved for all reporting contexts.
// Product is not eligible or is disapproved for all reporting contexts and
// countries.
NOT_ELIGIBLE_OR_DISAPPROVED = 1;
// Product's status is pending in all reporting contexts.
// Product's status is pending in all reporting contexts and countries.
PENDING = 2;
// Product is eligible for some (but not all) reporting contexts.
// Product is eligible for some (but not all) reporting contexts and
// countries.
ELIGIBLE_LIMITED = 3;
// Product is eligible for all reporting contexts.
// Product is eligible for all reporting contexts and countries.
ELIGIBLE = 4;
}
@ -506,10 +551,36 @@ message ProductView {
// Expiration date for the product, specified on insertion.
google.type.Date expiration_date = 25;
// Aggregated status.
// Aggregated status across all reporting contexts.
//
// Reporting contexts included in the computation of the aggregated status can
// be restricted using a filter on the `reporting_context` field.
optional AggregatedReportingContextStatus
aggregated_reporting_context_status = 26;
// Detailed product status per reporting context.
//
// Reporting contexts included in this list can be restricted using a filter
// on the `reporting_context` field.
//
// Equivalent to
// [`ProductStatus.destination_statuses`][google.shopping.merchant.products.v1.ProductStatus]
// in Products API.
//
// **This field cannot be used for sorting or filtering the results.**
repeated StatusPerReportingContext status_per_reporting_context = 32;
// Reporting context to restrict the query to.
//
// Restricts the reporting contexts returned in `status_per_reporting_context`
// and `item_issues`, and used to compute
// `aggregated_reporting_context_status`.
//
// **This field can only be used in the `WHERE` clause and cannot be selected
// in the `SELECT` clause.**
optional google.shopping.type.ReportingContext.ReportingContextEnum
reporting_context = 33;
// List of item issues for the product.
//
// **This field cannot be used for sorting the results.**
@ -523,9 +594,8 @@ message ProductView {
// the merchant.
ClickPotential click_potential = 29;
// 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.
// Normalized click potential of the product. Values range from 1 to 1000,
// where 1 is the highest click potential and 1000 is the theoretical lowest.
optional int64 click_potential_rank = 30;
}
@ -1175,6 +1245,21 @@ message MarketingMethod {
}
}
// Store where the product is sold (online versus local stores).
message StoreType {
// Store types.
enum StoreTypeEnum {
// Not specified.
STORE_TYPE_ENUM_UNSPECIFIED = 0;
// Online store.
ONLINE_STORE = 1;
// Local (physical) stores.
LOCAL_STORES = 2;
}
}
// Granularity of the Best sellers report. Best sellers reports are computed
// over a week and a month timeframe.
message ReportGranularity {