Skip to content

Commit 8358b10

Browse files
docs: [merchantapi] A comment for field name in message .google.shopping.merchant.products.v1.LocalInventory is changed (#8013)
* docs: A comment for field `name` in message `.google.shopping.merchant.products.v1.LocalInventory` is changed docs: A comment for field `name` in message `.google.shopping.merchant.products.v1.RegionalInventory` is changed feat: a new field `base64_encoded_name` is added to the `LocalInventory` message feat: new field `base64_encoded_name` is added to the `RegionalInventory` message PiperOrigin-RevId: 897575741 Source-Link: googleapis/googleapis@6db5d2e Source-Link: googleapis/googleapis-gen@6203224 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWludmVudG9yaWVzLy5Pd2xCb3QueWFtbCIsImgiOiI2MjAzMjI0MDMwM2ExOTcwN2I0Y2UwYWRlNjAyOGI1OGVmOWY3NGNjIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 18a3b05 commit 8358b10

17 files changed

Lines changed: 1681 additions & 12 deletions
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"extends": "./node_modules/gts"
2+
"extends": "./node_modules/gts",
3+
"root": true
34
}

packages/google-shopping-merchant-inventories/protos/google/shopping/merchant/inventories/v1/inventories_common.proto

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -145,6 +145,60 @@ message LocalInventoryAttributes {
145145
// bytes.
146146
optional string instore_product_location = 8
147147
[(google.api.field_behavior) = OPTIONAL];
148+
149+
// Optional. An optional list of loyalty programs containing applicable
150+
// loyalty member prices for this product at this store.
151+
//
152+
// This field is used to show store-specific member prices on Local
153+
// Inventory Ads (LIA).
154+
//
155+
// To use this, the loyalty program must be configured in Google Merchant
156+
// Center. The benefits provided must match the merchant's website and be
157+
// clear to members. This is only applicable for merchants in supported
158+
// countries.
159+
//
160+
// See [Loyalty program](https://support.google.com/merchants/answer/12922446)
161+
// for details on supported countries and loyalty program configuration.
162+
// For local inventory specific details, see the [Local inventory data
163+
// specification](https://support.google.com/merchants/answer/3061342).
164+
repeated InventoryLoyaltyProgram loyalty_programs = 10
165+
[(google.api.field_behavior) = OPTIONAL];
166+
}
167+
168+
// A message that represents loyalty program.
169+
message InventoryLoyaltyProgram {
170+
// The label of the loyalty program. This is an internal label that uniquely
171+
// identifies the relationship between a business entity and a loyalty
172+
// program entity. The label must be provided if there are multiple loyalty
173+
// programs available for the merchant, so that the system can associate
174+
// the assets below (for example, price and points) with the correct business.
175+
// The corresponding program must be linked to the Merchant Center account.
176+
optional string program_label = 1;
177+
178+
// The label of the tier within the loyalty program.
179+
// Must match one of the labels within the program.
180+
optional string tier_label = 2;
181+
182+
// The price for members of the given tier, that is, the instant discount
183+
// price. Must be smaller or equal to the regular price.
184+
optional google.shopping.type.Price price = 3;
185+
186+
// The cashback that can be used for future purchases.
187+
optional google.shopping.type.Price cashback_for_future_use = 4;
188+
189+
// The amount of loyalty points earned on a purchase.
190+
optional int64 loyalty_points = 5;
191+
192+
// A date range during which the item is eligible for member price. If not
193+
// specified, the member price is always applicable. The date range is
194+
// represented by a pair of ISO 8601 dates separated by a space,
195+
// comma, or slash.
196+
optional google.type.Interval member_price_effective_interval = 6;
197+
198+
// The label of the shipping benefit. If the field has value, this offer has
199+
// loyalty shipping benefit. If the field value isn't provided, the item is
200+
// not eligible for loyalty shipping for the given loyalty tier.
201+
optional string shipping_label = 7;
148202
}
149203

150204
// Regional inventory attributes.
@@ -181,4 +235,26 @@ message RegionalInventoryAttributes {
181235
// product in this region.
182236
optional Availability availability = 4
183237
[(google.api.field_behavior) = OPTIONAL];
238+
239+
// Optional. An optional list of loyalty programs containing applicable
240+
// loyalty member prices for this product in this region.
241+
//
242+
// This field is used to show region-specific member prices on Product
243+
// Listing Ads (PLA).
244+
//
245+
// To use this, the loyalty program must be configured in Google Merchant
246+
// Center, and the merchant must be using the Regional Availability and
247+
// Pricing (RAAP) feature. The benefits provided must match the merchant's
248+
// website and be clear to members. This is only applicable for merchants in
249+
// supported countries.
250+
//
251+
// See [Loyalty program](https://support.google.com/merchants/answer/12922446)
252+
// for details on supported countries and loyalty program configuration.
253+
// Also see [Regional availability and
254+
// pricing](https://support.google.com/merchants/answer/14644124) and [How to
255+
// set up regional member
256+
// pricing](https://support.google.com/merchants/answer/16388178) for more
257+
// information.
258+
repeated InventoryLoyaltyProgram loyalty_programs = 5
259+
[(google.api.field_behavior) = OPTIONAL];
184260
}

packages/google-shopping-merchant-inventories/protos/google/shopping/merchant/inventories/v1/localinventory.proto

Lines changed: 135 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -99,8 +99,51 @@ message LocalInventory {
9999
// Output only. The name of the `LocalInventory` resource.
100100
// Format:
101101
// `accounts/{account}/products/{product}/localInventories/{store_code}`
102+
//
103+
// The `{product}` segment is a unique identifier for the product.
104+
// This identifier must be unique within a merchant account and generally
105+
// follows the structure: `content_language~feed_label~offer_id`. Example:
106+
// `en~US~sku123` For legacy local products, the structure is:
107+
// `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123`
108+
//
109+
// The format of the `{product}` segment in the URL is automatically detected
110+
// by the server, supporting two options:
111+
//
112+
// 1. **Encoded Format**: The `{product}` segment is an unpadded base64url
113+
// encoded string (RFC 4648 Section 5). The decoded string must result
114+
// in the `content_language~feed_label~offer_id` structure. This encoding
115+
// MUST be used if any part of the product identifier (like `offer_id`)
116+
// contains characters such as `/`, `%`, or `~`.
117+
// * Example: To represent the product ID `en~US~sku/123` for
118+
// `store_code` "store123", the `{product}` segment must be the
119+
// base64url encoding of this string, which is `ZW5-VVN-c2t1LzEyMw`.
120+
// The full resource name for the local inventory would be
121+
// `accounts/123/products/ZW5-VVN-c2t1LzEyMw/localInventories/store123`.
122+
//
123+
// 2. **Plain Format**: The `{product}` segment is the tilde-separated string
124+
// `content_language~feed_label~offer_id`. This format is suitable only
125+
// when `content_language`, `feed_label`, and `offer_id` do not contain
126+
// URL-problematic characters like `/`, `%`, or `~`.
127+
//
128+
// We recommend using the **Encoded Format** for all product IDs to ensure
129+
// correct parsing, especially those containing special characters. The
130+
// presence of tilde (`~`) characters in the `{product}` segment is used to
131+
// differentiate between the two formats.
102132
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
103133

134+
// Output only. The unpadded base64url encoded name of the `LocalInventory`
135+
// resource. Format:
136+
// `accounts/{account}/products/{product}/localInventories/{store_code}`
137+
// where the `{product}` segment is the unpadded base64url encoded value of
138+
// the identifier of the form `content_language~feed_label~offer_id`. Example:
139+
// `accounts/123/products/ZW5-VVN-c2t1LzEyMw/localInventories/store123` for
140+
// the decoded product ID `en~US~sku/123` and `store_code` "store123".
141+
// Can be used directly as input to the API methods that require the local
142+
// product identifier within the local inventory name to be encoded if it
143+
// contains special characters, for example
144+
// [`GetLocalInventory`](https://developers.google.com/merchant/api/reference/rest/inventories_v1/accounts.products.localInventories/get).
145+
string base64_encoded_name = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
146+
104147
// Output only. The account that owns the product. This field will be ignored
105148
// if set by the client.
106149
int64 account = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
@@ -125,6 +168,36 @@ message ListLocalInventoriesRequest {
125168
// Required. The `name` of the parent product to list local inventories for.
126169
// Format:
127170
// `accounts/{account}/products/{product}`
171+
//
172+
// The `{product}` segment is a unique identifier for the product.
173+
// This identifier must be unique within a merchant account and generally
174+
// follows the structure: `content_language~feed_label~offer_id`. Example:
175+
// `en~US~sku123` For legacy local products, the structure is:
176+
// `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123`
177+
//
178+
// The format of the `{product}` segment in the URL is automatically detected
179+
// by the server, supporting two options:
180+
//
181+
// 1. **Encoded Format**: The `{product}` segment is an unpadded base64url
182+
// encoded string (RFC 4648 Section 5). The decoded string must result
183+
// in the `content_language~feed_label~offer_id` structure. This encoding
184+
// MUST be used if any part of the product identifier (like `offer_id`)
185+
// contains characters such as `/`, `%`, or `~`.
186+
// * Example: To represent the product ID `en~US~sku/123`, the
187+
// `{product}` segment must be the unpadded base64url encoding of this
188+
// string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name
189+
// for the product would be
190+
// `accounts/123/products/ZW5-VVN-c2t1LzEyMw`.
191+
//
192+
// 2. **Plain Format**: The `{product}` segment is the tilde-separated string
193+
// `content_language~feed_label~offer_id`. This format is suitable only
194+
// when `content_language`, `feed_label`, and `offer_id` do not contain
195+
// URL-problematic characters like `/`, `%`, or `~`.
196+
//
197+
// We recommend using the **Encoded Format** for all product IDs to ensure
198+
// correct parsing, especially those containing special characters. The
199+
// presence of tilde (`~`) characters in the `{product}` segment is used to
200+
// differentiate between the two formats.
128201
string parent = 1 [
129202
(google.api.field_behavior) = REQUIRED,
130203
(google.api.resource_reference) = {
@@ -164,6 +237,36 @@ message ListLocalInventoriesResponse {
164237
message InsertLocalInventoryRequest {
165238
// Required. The account and product where this inventory will be inserted.
166239
// Format: `accounts/{account}/products/{product}`
240+
//
241+
// The `{product}` segment is a unique identifier for the product.
242+
// This identifier must be unique within a merchant account and generally
243+
// follows the structure: `content_language~feed_label~offer_id`. Example:
244+
// `en~US~sku123` For legacy local products, the structure is:
245+
// `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123`
246+
//
247+
// The format of the `{product}` segment in the URL is automatically detected
248+
// by the server, supporting two options:
249+
//
250+
// 1. **Encoded Format**: The `{product}` segment is an unpadded base64url
251+
// encoded string (RFC 4648 Section 5). The decoded string must result
252+
// in the `content_language~feed_label~offer_id` structure. This encoding
253+
// MUST be used if any part of the product identifier (like `offer_id`)
254+
// contains characters such as `/`, `%`, or `~`.
255+
// * Example: To represent the product ID `en~US~sku/123`, the
256+
// `{product}` segment must be the unpadded base64url encoding of this
257+
// string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name
258+
// for the product would be
259+
// `accounts/123/products/ZW5-VVN-c2t1LzEyMw`.
260+
//
261+
// 2. **Plain Format**: The `{product}` segment is the tilde-separated string
262+
// `content_language~feed_label~offer_id`. This format is suitable only
263+
// when `content_language`, `feed_label`, and `offer_id` do not contain
264+
// URL-problematic characters like `/`, `%`, or `~`.
265+
//
266+
// We recommend using the **Encoded Format** for all product IDs to ensure
267+
// correct parsing, especially those containing special characters. The
268+
// presence of tilde (`~`) characters in the `{product}` segment is used to
269+
// differentiate between the two formats.
167270
string parent = 1 [
168271
(google.api.field_behavior) = REQUIRED,
169272
(google.api.resource_reference) = {
@@ -182,6 +285,37 @@ message DeleteLocalInventoryRequest {
182285
// Required. The name of the local inventory for the given product to delete.
183286
// Format:
184287
// `accounts/{account}/products/{product}/localInventories/{store_code}`
288+
//
289+
// The `{product}` segment is a unique identifier for the product.
290+
// This identifier must be unique within a merchant account and generally
291+
// follows the structure: `content_language~feed_label~offer_id`. Example:
292+
// `en~US~sku123` For legacy local products, the structure is:
293+
// `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123`
294+
//
295+
// The format of the `{product}` segment in the URL is automatically detected
296+
// by the server, supporting two options:
297+
//
298+
// 1. **Encoded Format**: The `{product}` segment is an unpadded base64url
299+
// encoded string (RFC 4648 Section 5). The decoded string must result
300+
// in the `content_language~feed_label~offer_id` structure. This encoding
301+
// MUST be used if any part of the product identifier (like `offer_id`)
302+
// contains characters such as `/`, `%`, or `~`.
303+
// * Example: To represent the product ID `en~US~sku/123` for
304+
// `store_code` "store123", the `{product}` segment must be the
305+
// unpadded base64url encoding of this string, which is
306+
// `ZW5-VVN-c2t1LzEyMw`. The full resource name for the local
307+
// inventory would be
308+
// `accounts/123/products/ZW5-VVN-c2t1LzEyMw/localInventories/store123`.
309+
//
310+
// 2. **Plain Format**: The `{product}` segment is the tilde-separated string
311+
// `content_language~feed_label~offer_id`. This format is suitable only
312+
// when `content_language`, `feed_label`, and `offer_id` do not contain
313+
// URL-problematic characters like `/`, `%`, or `~`.
314+
//
315+
// We recommend using the **Encoded Format** for all product IDs to ensure
316+
// correct parsing, especially those containing special characters. The
317+
// presence of tilde (`~`) characters in the `{product}` segment is used to
318+
// differentiate between the two formats.
185319
string name = 1 [
186320
(google.api.field_behavior) = REQUIRED,
187321
(google.api.resource_reference) = {

0 commit comments

Comments
 (0)