Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="retail_v2alpha.html">Retail API</a> . <a href="retail_v2alpha.projects.html">projects</a> . <a href="retail_v2alpha.projects.locations.html">locations</a> . <a href="retail_v2alpha.projects.locations.catalogs.html">catalogs</a> . <a href="retail_v2alpha.projects.locations.catalogs.branches.html">branches</a> . <a href="retail_v2alpha.projects.locations.catalogs.branches.products.html">products</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 78 | <code><a href="#addFulfillmentPlaces">addFulfillmentPlaces(product, body=None, x__xgafv=None)</a></code></p> |
yoshi-code-bot | b539cc4 | 2021-08-03 00:20:27 -0700 | [diff] [blame] | 79 | <p class="firstline">Incrementally adds place IDs to Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the added place IDs are not immediately manifested in the Product queried by GetProduct or ListProducts. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.</p> |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 80 | <p class="toc_element"> |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 81 | <code><a href="#close">close()</a></code></p> |
| 82 | <p class="firstline">Close httplib2 connections.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#create">create(parent, body=None, productId=None, x__xgafv=None)</a></code></p> |
| 85 | <p class="firstline">Creates a Product.</p> |
| 86 | <p class="toc_element"> |
| 87 | <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p> |
| 88 | <p class="firstline">Deletes a Product.</p> |
| 89 | <p class="toc_element"> |
| 90 | <code><a href="#get">get(name, x__xgafv=None)</a></code></p> |
| 91 | <p class="firstline">Gets a Product.</p> |
| 92 | <p class="toc_element"> |
| 93 | <code><a href="#import_">import_(parent, body=None, x__xgafv=None)</a></code></p> |
| 94 | <p class="firstline">Bulk import of multiple Products. Request processing may be synchronous. No partial updating is supported. Non-existing items are created. Note that it is possible for a subset of the Products to be successfully updated.</p> |
| 95 | <p class="toc_element"> |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 96 | <code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, readMask=None, requireTotalSize=None, x__xgafv=None)</a></code></p> |
| 97 | <p class="firstline">Gets a list of Products.</p> |
| 98 | <p class="toc_element"> |
| 99 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 100 | <p class="firstline">Retrieves the next page of results.</p> |
| 101 | <p class="toc_element"> |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 102 | <code><a href="#patch">patch(name, allowMissing=None, body=None, updateMask=None, x__xgafv=None)</a></code></p> |
| 103 | <p class="firstline">Updates a Product.</p> |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 104 | <p class="toc_element"> |
| 105 | <code><a href="#removeFulfillmentPlaces">removeFulfillmentPlaces(product, body=None, x__xgafv=None)</a></code></p> |
yoshi-code-bot | b539cc4 | 2021-08-03 00:20:27 -0700 | [diff] [blame] | 106 | <p class="firstline">Incrementally removes place IDs from a Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately manifested in the Product queried by GetProduct or ListProducts. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.</p> |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 107 | <p class="toc_element"> |
| 108 | <code><a href="#setInventory">setInventory(name, body=None, x__xgafv=None)</a></code></p> |
yoshi-code-bot | b539cc4 | 2021-08-03 00:20:27 -0700 | [diff] [blame] | 109 | <p class="firstline">Updates inventory information for a Product while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by GetProduct or ListProducts. When inventory is updated with CreateProduct and UpdateProduct, the specified inventory field value(s) will overwrite any existing value(s) while ignoring the last update time for this field. Furthermore, the last update time for the specified inventory fields will be overwritten to the time of the CreateProduct or UpdateProduct request. If no inventory fields are set in CreateProductRequest.product, then any pre-existing inventory information for this product will be used. If no inventory fields are set in UpdateProductRequest.set_mask, then any existing inventory information will be preserved. Pre-existing inventory information can only be updated with SetInventory, AddFulfillmentPlaces, and RemoveFulfillmentPlaces. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.</p> |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 110 | <h3>Method Details</h3> |
| 111 | <div class="method"> |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 112 | <code class="details" id="addFulfillmentPlaces">addFulfillmentPlaces(product, body=None, x__xgafv=None)</code> |
yoshi-code-bot | b539cc4 | 2021-08-03 00:20:27 -0700 | [diff] [blame] | 113 | <pre>Incrementally adds place IDs to Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the added place IDs are not immediately manifested in the Product queried by GetProduct or ListProducts. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 114 | |
| 115 | Args: |
| 116 | product: string, Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. (required) |
| 117 | body: object, The request body. |
| 118 | The object takes the form of: |
| 119 | |
| 120 | { # Request message for AddFulfillmentPlaces method. |
| 121 | "addTime": "A String", # The time when the fulfillment updates are issued, used to prevent out-of-order updates on fulfillment information. If not provided, the internal system time will be used. |
| 122 | "allowMissing": True or False, # If set to true, and the Product is not found, the fulfillment information will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, an INVALID_ARGUMENT error is returned if the Product is not found. |
| 123 | "placeIds": [ # Required. The IDs for this type, such as the store IDs for "pickup-in-store" or the region IDs for "same-day-delivery" to be added for this type. Duplicate IDs will be automatically ignored. At least 1 value is required, and a maximum of 2000 values are allowed. Each value must be a string with a length limit of 10 characters, matching the pattern [a-zA-Z0-9_-]+, such as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is returned. If the total number of place IDs exceeds 2000 for this type after adding, then the update will be rejected. |
| 124 | "A String", |
| 125 | ], |
| 126 | "type": "A String", # Required. The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Supported values: * "pickup-in-store" * "ship-to-store" * "same-day-delivery" * "next-day-delivery" * "custom-type-1" * "custom-type-2" * "custom-type-3" * "custom-type-4" * "custom-type-5" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. This field directly corresponds to Product.fulfillment_info.type. |
| 127 | } |
| 128 | |
| 129 | x__xgafv: string, V1 error format. |
| 130 | Allowed values |
| 131 | 1 - v1 error format |
| 132 | 2 - v2 error format |
| 133 | |
| 134 | Returns: |
| 135 | An object of the form: |
| 136 | |
| 137 | { # This resource represents a long-running operation that is the result of a network API call. |
| 138 | "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| 139 | "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. |
| 140 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 141 | "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 142 | { |
| 143 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 144 | }, |
| 145 | ], |
| 146 | "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. |
| 147 | }, |
| 148 | "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| 149 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 150 | }, |
| 151 | "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| 152 | "response": { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| 153 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 154 | }, |
| 155 | }</pre> |
| 156 | </div> |
| 157 | |
| 158 | <div class="method"> |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 159 | <code class="details" id="close">close()</code> |
| 160 | <pre>Close httplib2 connections.</pre> |
| 161 | </div> |
| 162 | |
| 163 | <div class="method"> |
| 164 | <code class="details" id="create">create(parent, body=None, productId=None, x__xgafv=None)</code> |
| 165 | <pre>Creates a Product. |
| 166 | |
| 167 | Args: |
| 168 | parent: string, Required. The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch`. (required) |
| 169 | body: object, The request body. |
| 170 | The object takes the form of: |
| 171 | |
| 172 | { # Product captures all metadata information of items to be recommended or searched. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 173 | "attributes": { # Highly encouraged. Extra product attributes to be included. For example, for products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the attributes here. Features that can take on one of a limited number of possible values. Two types of features can be set are: Textual features. some examples would be the brand/maker of a product, or country of a customer. Numerical features. Some examples would be the height/weight of a product, or age of a customer. For example: `{ "vendor": {"text": ["vendor123", "vendor456"]}, "lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]} }`. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries count: 200 by default; 100 for Type.VARIANT. * The key must be a UTF-8 encoded string with a length limit of 128 characters. * Max indexable entries count: 200 by default; 40 for Type.VARIANT. * Max searchable entries count: 30. * For indexable attribute, the key must match the pattern: a-zA-Z0-9*. For example, key0LikeThis or KEY_1_LIKE_THIS. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 174 | "a_key": { # A custom attribute that is not explicitly modeled in Product. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 175 | "indexable": True or False, # If true, custom attribute values are indexed, so that it can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 176 | "numbers": [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". At most 400 values are allowed.Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned. |
| 177 | 3.14, |
| 178 | ], |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 179 | "searchable": True or False, # If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 180 | "text": [ # The textual values of this custom attribute. For example, `["yellow", "green"]` when the key is "color". At most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned. |
| 181 | "A String", |
| 182 | ], |
| 183 | }, |
| 184 | }, |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 185 | "audience": { # An intended audience of the Product for whom it's sold. # The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product. |
| 186 | "ageGroups": [ # The age groups of the audience. Strongly encouraged to use the standard values: "newborn" (up to 3 months old), "infant" (3–12 months old), "toddler" (1–5 years old), "kids" (5–13 years old), "adult" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge). |
| 187 | "A String", |
| 188 | ], |
| 189 | "genders": [ # The genders of the audience. Strongly encouraged to use the standard values: "male", "female", "unisex". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender). |
| 190 | "A String", |
| 191 | ], |
| 192 | }, |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 193 | "availability": "A String", # The online availability of the Product. Default to Availability.IN_STOCK. Google Merchant Center Property [availability](https://support.google.com/merchants/answer/6324448). Schema.org Property [Offer.availability](https://schema.org/availability). |
| 194 | "availableQuantity": 42, # The available quantity of the item. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 195 | "availableTime": "A String", # The timestamp when this Product becomes available for SearchService.Search. |
| 196 | "brands": [ # The brands of the product. A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [brand](https://support.google.com/merchants/answer/6324351). Schema.org property [Product.brand](https://schema.org/brand). |
| 197 | "A String", |
| 198 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 199 | "categories": [ # Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, please replace it with other character(s). For example, if a shoes product belongs to both ["Shoes & Accessories" -> "Shoes"] and ["Sports & Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented as: "categories": [ "Shoes & Accessories > Shoes", "Sports & Fitness > Athletic Clothing > Shoes" ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property google_product_category. Schema.org property [Product.category] (https://schema.org/category). [mc_google_product_category]: https://support.google.com/merchants/answer/6324436 |
| 200 | "A String", |
| 201 | ], |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 202 | "collectionMemberIds": [ # The id of the collection members when type is Type.COLLECTION. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return. |
| 203 | "A String", |
| 204 | ], |
| 205 | "colorInfo": { # The color information of a Product. # The color of the product. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 206 | "colorFamilies": [ # The standard color families. Strongly recommended to use the following standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple", "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed". Normally it is expected to have only 1 color family. May consider using single "Mixed" instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 207 | "A String", |
| 208 | ], |
| 209 | "colors": [ # The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single "Mixed" instead of multiple values. A maximum of 5 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 210 | "A String", |
| 211 | ], |
| 212 | }, |
| 213 | "conditions": [ # The condition of the product. Strongly encouraged to use the standard values: "new", "refurbished", "used". A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [condition](https://support.google.com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://schema.org/itemCondition). |
| 214 | "A String", |
| 215 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 216 | "description": "A String", # Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [description](https://support.google.com/merchants/answer/6324468). schema.org property [Product.description](https://schema.org/description). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 217 | "expireTime": "A String", # The timestamp when this product becomes unavailable for SearchService.Search. If it is set, the Product is not available for SearchService.Search after expire_time. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499). |
| 218 | "fulfillmentInfo": [ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned. |
| 219 | { # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. |
| 220 | "placeIds": [ # The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 2000 values are allowed. Each value must be a string with a length limit of 10 characters, matching the pattern [a-zA-Z0-9_-]+, such as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is returned. |
| 221 | "A String", |
| 222 | ], |
| 223 | "type": "A String", # The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * "pickup-in-store" * "ship-to-store" * "same-day-delivery" * "next-day-delivery" * "custom-type-1" * "custom-type-2" * "custom-type-3" * "custom-type-4" * "custom-type-5" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. |
| 224 | }, |
| 225 | ], |
| 226 | "gtin": "A String", # The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gtin](https://support.google.com/merchants/answer/6324461). Schema.org property [Product.isbn](https://schema.org/isbn) or [Product.gtin8](https://schema.org/gtin8) or [Product.gtin12](https://schema.org/gtin12) or [Product.gtin13](https://schema.org/gtin13) or [Product.gtin14](https://schema.org/gtin14). If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 227 | "id": "A String", # Immutable. Product identifier, which is the final component of name. For example, this field is "id_1", if name is `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [id](https://support.google.com/merchants/answer/6324405). Schema.org Property [Product.sku](https://schema.org/sku). |
| 228 | "images": [ # Product images for the product.Highly recommended to put the main image to the first. A maximum of 300 images are allowed. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image). |
| 229 | { # Product thumbnail/detail image. |
| 230 | "height": 42, # Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 231 | "uri": "A String", # Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image). |
| 232 | "width": 42, # Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 233 | }, |
| 234 | ], |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 235 | "languageCode": "A String", # Language of the title/description and other string attributes. Use language tags defined by BCP 47. For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to "en-US" if unset. |
| 236 | "materials": [ # The material of the product. For example, "leather", "wooden". A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [material](https://support.google.com/merchants/answer/6324410). Schema.org property [Product.material](https://schema.org/material). |
| 237 | "A String", |
| 238 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 239 | "name": "A String", # Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`. The branch ID must be "default_branch". |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 240 | "patterns": [ # The pattern or graphic print of the product. For example, "striped", "polka dot", "paisley". A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [pattern](https://support.google.com/merchants/answer/6324483). Schema.org property [Product.pattern](https://schema.org/pattern). |
| 241 | "A String", |
| 242 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 243 | "priceInfo": { # The price information of a Product. # Product price and cost information. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). |
| 244 | "cost": 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 245 | "currencyCode": "A String", # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 246 | "originalPrice": 3.14, # Price of the product without any discount. If zero, by default set to be the price. |
| 247 | "price": 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.priceSpecification](https://schema.org/priceSpecification). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 248 | "priceEffectiveTime": "A String", # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search. |
| 249 | "priceExpireTime": "A String", # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search. |
| 250 | "priceRange": { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests. |
| 251 | "originalPrice": { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id. |
| 252 | "exclusiveMaximum": 3.14, # Exclusive upper bound. |
| 253 | "exclusiveMinimum": 3.14, # Exclusive lower bound. |
| 254 | "maximum": 3.14, # Inclusive upper bound. |
| 255 | "minimum": 3.14, # Inclusive lower bound. |
| 256 | }, |
| 257 | "price": { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id. |
| 258 | "exclusiveMaximum": 3.14, # Exclusive upper bound. |
| 259 | "exclusiveMinimum": 3.14, # Exclusive lower bound. |
| 260 | "maximum": 3.14, # Inclusive upper bound. |
| 261 | "minimum": 3.14, # Inclusive lower bound. |
| 262 | }, |
| 263 | }, |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 264 | }, |
| 265 | "primaryProductId": "A String", # Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center Property [item_group_id](https://support.google.com/merchants/answer/6324507). Schema.org Property [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID). This field must be enabled before it can be used. [Learn more](/recommendations-ai/docs/catalog#item-group-id). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 266 | "promotions": [ # The promotions applied to the product. A maximum of 10 values are allowed per Product. |
| 267 | { # Promotion information. |
| 268 | "promotionId": "A String", # ID of the promotion. For example, "free gift". The value value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: a-zA-Z*. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [promotion](https://support.google.com/merchants/answer/7050148). |
| 269 | }, |
| 270 | ], |
| 271 | "publishTime": "A String", # The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation. |
| 272 | "rating": { # The rating of a Product. # The rating of this product. |
| 273 | "averageRating": 3.14, # The average rating of the Product. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned. |
| 274 | "ratingCount": 42, # The total number of ratings. This value is independent of the value of rating_histogram. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 275 | "ratingHistogram": [ # List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2 star, and so on. |
| 276 | 42, |
| 277 | ], |
| 278 | }, |
yoshi-code-bot | b539cc4 | 2021-08-03 00:20:27 -0700 | [diff] [blame] | 279 | "retrievableFields": "A String", # Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form "attributes.key" where "key" is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse may increase response payload size and serving latency. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 280 | "sizes": [ # The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in "US:MENS:M", "US" represents size system; "MENS" represents size type; "M" represents size value. In "GIRLS:27", size system is empty; "GIRLS" represents size type; "27" represents size value. In "32 inches", both size system and size type are empty, while size value is "32 inches". A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [size](https://support.google.com/merchants/answer/6324492), [size_type](https://support.google.com/merchants/answer/6324497) and [size_system](https://support.google.com/merchants/answer/6324502). Schema.org property [Product.size](https://schema.org/size). |
| 281 | "A String", |
| 282 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 283 | "tags": [ # Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Google Merchant Center property [custom_label_0–4](https://support.google.com/merchants/answer/6324473). |
| 284 | "A String", |
| 285 | ], |
| 286 | "title": "A String", # Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [title](https://support.google.com/merchants/answer/6324415). Schema.org property [Product.name](https://schema.org/name). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 287 | "ttl": "A String", # Input only. The TTL (time to live) of the product. If it is set, expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. |
yoshi-code-bot | 108b819 | 2021-05-23 03:48:02 -0700 | [diff] [blame] | 288 | "type": "A String", # Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 289 | "uri": "A String", # Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [link](https://support.google.com/merchants/answer/6324416). Schema.org property [Offer.url](https://schema.org/url). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 290 | "variants": [ # Output only. Product variants grouped together on primary product which share similar product attributes. It's automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests. |
| 291 | # Object with schema name: GoogleCloudRetailV2alphaProduct |
| 292 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 293 | } |
| 294 | |
| 295 | productId: string, Required. The ID to use for the Product, which will become the final component of the Product.name. If the caller does not have permission to create the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all Products with the same parent. Otherwise, an ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. |
| 296 | x__xgafv: string, V1 error format. |
| 297 | Allowed values |
| 298 | 1 - v1 error format |
| 299 | 2 - v2 error format |
| 300 | |
| 301 | Returns: |
| 302 | An object of the form: |
| 303 | |
| 304 | { # Product captures all metadata information of items to be recommended or searched. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 305 | "attributes": { # Highly encouraged. Extra product attributes to be included. For example, for products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the attributes here. Features that can take on one of a limited number of possible values. Two types of features can be set are: Textual features. some examples would be the brand/maker of a product, or country of a customer. Numerical features. Some examples would be the height/weight of a product, or age of a customer. For example: `{ "vendor": {"text": ["vendor123", "vendor456"]}, "lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]} }`. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries count: 200 by default; 100 for Type.VARIANT. * The key must be a UTF-8 encoded string with a length limit of 128 characters. * Max indexable entries count: 200 by default; 40 for Type.VARIANT. * Max searchable entries count: 30. * For indexable attribute, the key must match the pattern: a-zA-Z0-9*. For example, key0LikeThis or KEY_1_LIKE_THIS. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 306 | "a_key": { # A custom attribute that is not explicitly modeled in Product. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 307 | "indexable": True or False, # If true, custom attribute values are indexed, so that it can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 308 | "numbers": [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". At most 400 values are allowed.Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned. |
| 309 | 3.14, |
| 310 | ], |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 311 | "searchable": True or False, # If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 312 | "text": [ # The textual values of this custom attribute. For example, `["yellow", "green"]` when the key is "color". At most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned. |
| 313 | "A String", |
| 314 | ], |
| 315 | }, |
| 316 | }, |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 317 | "audience": { # An intended audience of the Product for whom it's sold. # The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product. |
| 318 | "ageGroups": [ # The age groups of the audience. Strongly encouraged to use the standard values: "newborn" (up to 3 months old), "infant" (3–12 months old), "toddler" (1–5 years old), "kids" (5–13 years old), "adult" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge). |
| 319 | "A String", |
| 320 | ], |
| 321 | "genders": [ # The genders of the audience. Strongly encouraged to use the standard values: "male", "female", "unisex". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender). |
| 322 | "A String", |
| 323 | ], |
| 324 | }, |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 325 | "availability": "A String", # The online availability of the Product. Default to Availability.IN_STOCK. Google Merchant Center Property [availability](https://support.google.com/merchants/answer/6324448). Schema.org Property [Offer.availability](https://schema.org/availability). |
| 326 | "availableQuantity": 42, # The available quantity of the item. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 327 | "availableTime": "A String", # The timestamp when this Product becomes available for SearchService.Search. |
| 328 | "brands": [ # The brands of the product. A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [brand](https://support.google.com/merchants/answer/6324351). Schema.org property [Product.brand](https://schema.org/brand). |
| 329 | "A String", |
| 330 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 331 | "categories": [ # Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, please replace it with other character(s). For example, if a shoes product belongs to both ["Shoes & Accessories" -> "Shoes"] and ["Sports & Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented as: "categories": [ "Shoes & Accessories > Shoes", "Sports & Fitness > Athletic Clothing > Shoes" ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property google_product_category. Schema.org property [Product.category] (https://schema.org/category). [mc_google_product_category]: https://support.google.com/merchants/answer/6324436 |
| 332 | "A String", |
| 333 | ], |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 334 | "collectionMemberIds": [ # The id of the collection members when type is Type.COLLECTION. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return. |
| 335 | "A String", |
| 336 | ], |
| 337 | "colorInfo": { # The color information of a Product. # The color of the product. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 338 | "colorFamilies": [ # The standard color families. Strongly recommended to use the following standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple", "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed". Normally it is expected to have only 1 color family. May consider using single "Mixed" instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 339 | "A String", |
| 340 | ], |
| 341 | "colors": [ # The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single "Mixed" instead of multiple values. A maximum of 5 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 342 | "A String", |
| 343 | ], |
| 344 | }, |
| 345 | "conditions": [ # The condition of the product. Strongly encouraged to use the standard values: "new", "refurbished", "used". A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [condition](https://support.google.com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://schema.org/itemCondition). |
| 346 | "A String", |
| 347 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 348 | "description": "A String", # Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [description](https://support.google.com/merchants/answer/6324468). schema.org property [Product.description](https://schema.org/description). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 349 | "expireTime": "A String", # The timestamp when this product becomes unavailable for SearchService.Search. If it is set, the Product is not available for SearchService.Search after expire_time. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499). |
| 350 | "fulfillmentInfo": [ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned. |
| 351 | { # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. |
| 352 | "placeIds": [ # The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 2000 values are allowed. Each value must be a string with a length limit of 10 characters, matching the pattern [a-zA-Z0-9_-]+, such as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is returned. |
| 353 | "A String", |
| 354 | ], |
| 355 | "type": "A String", # The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * "pickup-in-store" * "ship-to-store" * "same-day-delivery" * "next-day-delivery" * "custom-type-1" * "custom-type-2" * "custom-type-3" * "custom-type-4" * "custom-type-5" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. |
| 356 | }, |
| 357 | ], |
| 358 | "gtin": "A String", # The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gtin](https://support.google.com/merchants/answer/6324461). Schema.org property [Product.isbn](https://schema.org/isbn) or [Product.gtin8](https://schema.org/gtin8) or [Product.gtin12](https://schema.org/gtin12) or [Product.gtin13](https://schema.org/gtin13) or [Product.gtin14](https://schema.org/gtin14). If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 359 | "id": "A String", # Immutable. Product identifier, which is the final component of name. For example, this field is "id_1", if name is `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [id](https://support.google.com/merchants/answer/6324405). Schema.org Property [Product.sku](https://schema.org/sku). |
| 360 | "images": [ # Product images for the product.Highly recommended to put the main image to the first. A maximum of 300 images are allowed. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image). |
| 361 | { # Product thumbnail/detail image. |
| 362 | "height": 42, # Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 363 | "uri": "A String", # Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image). |
| 364 | "width": 42, # Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 365 | }, |
| 366 | ], |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 367 | "languageCode": "A String", # Language of the title/description and other string attributes. Use language tags defined by BCP 47. For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to "en-US" if unset. |
| 368 | "materials": [ # The material of the product. For example, "leather", "wooden". A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [material](https://support.google.com/merchants/answer/6324410). Schema.org property [Product.material](https://schema.org/material). |
| 369 | "A String", |
| 370 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 371 | "name": "A String", # Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`. The branch ID must be "default_branch". |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 372 | "patterns": [ # The pattern or graphic print of the product. For example, "striped", "polka dot", "paisley". A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [pattern](https://support.google.com/merchants/answer/6324483). Schema.org property [Product.pattern](https://schema.org/pattern). |
| 373 | "A String", |
| 374 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 375 | "priceInfo": { # The price information of a Product. # Product price and cost information. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). |
| 376 | "cost": 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 377 | "currencyCode": "A String", # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 378 | "originalPrice": 3.14, # Price of the product without any discount. If zero, by default set to be the price. |
| 379 | "price": 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.priceSpecification](https://schema.org/priceSpecification). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 380 | "priceEffectiveTime": "A String", # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search. |
| 381 | "priceExpireTime": "A String", # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search. |
| 382 | "priceRange": { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests. |
| 383 | "originalPrice": { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id. |
| 384 | "exclusiveMaximum": 3.14, # Exclusive upper bound. |
| 385 | "exclusiveMinimum": 3.14, # Exclusive lower bound. |
| 386 | "maximum": 3.14, # Inclusive upper bound. |
| 387 | "minimum": 3.14, # Inclusive lower bound. |
| 388 | }, |
| 389 | "price": { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id. |
| 390 | "exclusiveMaximum": 3.14, # Exclusive upper bound. |
| 391 | "exclusiveMinimum": 3.14, # Exclusive lower bound. |
| 392 | "maximum": 3.14, # Inclusive upper bound. |
| 393 | "minimum": 3.14, # Inclusive lower bound. |
| 394 | }, |
| 395 | }, |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 396 | }, |
| 397 | "primaryProductId": "A String", # Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center Property [item_group_id](https://support.google.com/merchants/answer/6324507). Schema.org Property [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID). This field must be enabled before it can be used. [Learn more](/recommendations-ai/docs/catalog#item-group-id). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 398 | "promotions": [ # The promotions applied to the product. A maximum of 10 values are allowed per Product. |
| 399 | { # Promotion information. |
| 400 | "promotionId": "A String", # ID of the promotion. For example, "free gift". The value value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: a-zA-Z*. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [promotion](https://support.google.com/merchants/answer/7050148). |
| 401 | }, |
| 402 | ], |
| 403 | "publishTime": "A String", # The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation. |
| 404 | "rating": { # The rating of a Product. # The rating of this product. |
| 405 | "averageRating": 3.14, # The average rating of the Product. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned. |
| 406 | "ratingCount": 42, # The total number of ratings. This value is independent of the value of rating_histogram. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 407 | "ratingHistogram": [ # List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2 star, and so on. |
| 408 | 42, |
| 409 | ], |
| 410 | }, |
yoshi-code-bot | b539cc4 | 2021-08-03 00:20:27 -0700 | [diff] [blame] | 411 | "retrievableFields": "A String", # Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form "attributes.key" where "key" is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse may increase response payload size and serving latency. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 412 | "sizes": [ # The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in "US:MENS:M", "US" represents size system; "MENS" represents size type; "M" represents size value. In "GIRLS:27", size system is empty; "GIRLS" represents size type; "27" represents size value. In "32 inches", both size system and size type are empty, while size value is "32 inches". A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [size](https://support.google.com/merchants/answer/6324492), [size_type](https://support.google.com/merchants/answer/6324497) and [size_system](https://support.google.com/merchants/answer/6324502). Schema.org property [Product.size](https://schema.org/size). |
| 413 | "A String", |
| 414 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 415 | "tags": [ # Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Google Merchant Center property [custom_label_0–4](https://support.google.com/merchants/answer/6324473). |
| 416 | "A String", |
| 417 | ], |
| 418 | "title": "A String", # Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [title](https://support.google.com/merchants/answer/6324415). Schema.org property [Product.name](https://schema.org/name). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 419 | "ttl": "A String", # Input only. The TTL (time to live) of the product. If it is set, expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. |
yoshi-code-bot | 108b819 | 2021-05-23 03:48:02 -0700 | [diff] [blame] | 420 | "type": "A String", # Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 421 | "uri": "A String", # Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [link](https://support.google.com/merchants/answer/6324416). Schema.org property [Offer.url](https://schema.org/url). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 422 | "variants": [ # Output only. Product variants grouped together on primary product which share similar product attributes. It's automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests. |
| 423 | # Object with schema name: GoogleCloudRetailV2alphaProduct |
| 424 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 425 | }</pre> |
| 426 | </div> |
| 427 | |
| 428 | <div class="method"> |
| 429 | <code class="details" id="delete">delete(name, x__xgafv=None)</code> |
| 430 | <pre>Deletes a Product. |
| 431 | |
| 432 | Args: |
| 433 | name: string, Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to delete the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Product to delete does not exist, a NOT_FOUND error is returned. The Product to delete can neither be a Product.Type.COLLECTION Product member nor a Product.Type.PRIMARY Product with more than one variants. Otherwise, an INVALID_ARGUMENT error is returned. All inventory information for the named Product will be deleted. (required) |
| 434 | x__xgafv: string, V1 error format. |
| 435 | Allowed values |
| 436 | 1 - v1 error format |
| 437 | 2 - v2 error format |
| 438 | |
| 439 | Returns: |
| 440 | An object of the form: |
| 441 | |
| 442 | { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`. |
| 443 | }</pre> |
| 444 | </div> |
| 445 | |
| 446 | <div class="method"> |
| 447 | <code class="details" id="get">get(name, x__xgafv=None)</code> |
| 448 | <pre>Gets a Product. |
| 449 | |
| 450 | Args: |
| 451 | name: string, Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested Product does not exist, a NOT_FOUND error is returned. (required) |
| 452 | x__xgafv: string, V1 error format. |
| 453 | Allowed values |
| 454 | 1 - v1 error format |
| 455 | 2 - v2 error format |
| 456 | |
| 457 | Returns: |
| 458 | An object of the form: |
| 459 | |
| 460 | { # Product captures all metadata information of items to be recommended or searched. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 461 | "attributes": { # Highly encouraged. Extra product attributes to be included. For example, for products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the attributes here. Features that can take on one of a limited number of possible values. Two types of features can be set are: Textual features. some examples would be the brand/maker of a product, or country of a customer. Numerical features. Some examples would be the height/weight of a product, or age of a customer. For example: `{ "vendor": {"text": ["vendor123", "vendor456"]}, "lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]} }`. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries count: 200 by default; 100 for Type.VARIANT. * The key must be a UTF-8 encoded string with a length limit of 128 characters. * Max indexable entries count: 200 by default; 40 for Type.VARIANT. * Max searchable entries count: 30. * For indexable attribute, the key must match the pattern: a-zA-Z0-9*. For example, key0LikeThis or KEY_1_LIKE_THIS. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 462 | "a_key": { # A custom attribute that is not explicitly modeled in Product. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 463 | "indexable": True or False, # If true, custom attribute values are indexed, so that it can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 464 | "numbers": [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". At most 400 values are allowed.Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned. |
| 465 | 3.14, |
| 466 | ], |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 467 | "searchable": True or False, # If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 468 | "text": [ # The textual values of this custom attribute. For example, `["yellow", "green"]` when the key is "color". At most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned. |
| 469 | "A String", |
| 470 | ], |
| 471 | }, |
| 472 | }, |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 473 | "audience": { # An intended audience of the Product for whom it's sold. # The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product. |
| 474 | "ageGroups": [ # The age groups of the audience. Strongly encouraged to use the standard values: "newborn" (up to 3 months old), "infant" (3–12 months old), "toddler" (1–5 years old), "kids" (5–13 years old), "adult" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge). |
| 475 | "A String", |
| 476 | ], |
| 477 | "genders": [ # The genders of the audience. Strongly encouraged to use the standard values: "male", "female", "unisex". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender). |
| 478 | "A String", |
| 479 | ], |
| 480 | }, |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 481 | "availability": "A String", # The online availability of the Product. Default to Availability.IN_STOCK. Google Merchant Center Property [availability](https://support.google.com/merchants/answer/6324448). Schema.org Property [Offer.availability](https://schema.org/availability). |
| 482 | "availableQuantity": 42, # The available quantity of the item. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 483 | "availableTime": "A String", # The timestamp when this Product becomes available for SearchService.Search. |
| 484 | "brands": [ # The brands of the product. A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [brand](https://support.google.com/merchants/answer/6324351). Schema.org property [Product.brand](https://schema.org/brand). |
| 485 | "A String", |
| 486 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 487 | "categories": [ # Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, please replace it with other character(s). For example, if a shoes product belongs to both ["Shoes & Accessories" -> "Shoes"] and ["Sports & Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented as: "categories": [ "Shoes & Accessories > Shoes", "Sports & Fitness > Athletic Clothing > Shoes" ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property google_product_category. Schema.org property [Product.category] (https://schema.org/category). [mc_google_product_category]: https://support.google.com/merchants/answer/6324436 |
| 488 | "A String", |
| 489 | ], |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 490 | "collectionMemberIds": [ # The id of the collection members when type is Type.COLLECTION. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return. |
| 491 | "A String", |
| 492 | ], |
| 493 | "colorInfo": { # The color information of a Product. # The color of the product. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 494 | "colorFamilies": [ # The standard color families. Strongly recommended to use the following standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple", "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed". Normally it is expected to have only 1 color family. May consider using single "Mixed" instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 495 | "A String", |
| 496 | ], |
| 497 | "colors": [ # The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single "Mixed" instead of multiple values. A maximum of 5 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 498 | "A String", |
| 499 | ], |
| 500 | }, |
| 501 | "conditions": [ # The condition of the product. Strongly encouraged to use the standard values: "new", "refurbished", "used". A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [condition](https://support.google.com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://schema.org/itemCondition). |
| 502 | "A String", |
| 503 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 504 | "description": "A String", # Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [description](https://support.google.com/merchants/answer/6324468). schema.org property [Product.description](https://schema.org/description). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 505 | "expireTime": "A String", # The timestamp when this product becomes unavailable for SearchService.Search. If it is set, the Product is not available for SearchService.Search after expire_time. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499). |
| 506 | "fulfillmentInfo": [ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned. |
| 507 | { # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. |
| 508 | "placeIds": [ # The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 2000 values are allowed. Each value must be a string with a length limit of 10 characters, matching the pattern [a-zA-Z0-9_-]+, such as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is returned. |
| 509 | "A String", |
| 510 | ], |
| 511 | "type": "A String", # The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * "pickup-in-store" * "ship-to-store" * "same-day-delivery" * "next-day-delivery" * "custom-type-1" * "custom-type-2" * "custom-type-3" * "custom-type-4" * "custom-type-5" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. |
| 512 | }, |
| 513 | ], |
| 514 | "gtin": "A String", # The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gtin](https://support.google.com/merchants/answer/6324461). Schema.org property [Product.isbn](https://schema.org/isbn) or [Product.gtin8](https://schema.org/gtin8) or [Product.gtin12](https://schema.org/gtin12) or [Product.gtin13](https://schema.org/gtin13) or [Product.gtin14](https://schema.org/gtin14). If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 515 | "id": "A String", # Immutable. Product identifier, which is the final component of name. For example, this field is "id_1", if name is `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [id](https://support.google.com/merchants/answer/6324405). Schema.org Property [Product.sku](https://schema.org/sku). |
| 516 | "images": [ # Product images for the product.Highly recommended to put the main image to the first. A maximum of 300 images are allowed. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image). |
| 517 | { # Product thumbnail/detail image. |
| 518 | "height": 42, # Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 519 | "uri": "A String", # Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image). |
| 520 | "width": 42, # Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 521 | }, |
| 522 | ], |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 523 | "languageCode": "A String", # Language of the title/description and other string attributes. Use language tags defined by BCP 47. For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to "en-US" if unset. |
| 524 | "materials": [ # The material of the product. For example, "leather", "wooden". A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [material](https://support.google.com/merchants/answer/6324410). Schema.org property [Product.material](https://schema.org/material). |
| 525 | "A String", |
| 526 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 527 | "name": "A String", # Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`. The branch ID must be "default_branch". |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 528 | "patterns": [ # The pattern or graphic print of the product. For example, "striped", "polka dot", "paisley". A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [pattern](https://support.google.com/merchants/answer/6324483). Schema.org property [Product.pattern](https://schema.org/pattern). |
| 529 | "A String", |
| 530 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 531 | "priceInfo": { # The price information of a Product. # Product price and cost information. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). |
| 532 | "cost": 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 533 | "currencyCode": "A String", # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 534 | "originalPrice": 3.14, # Price of the product without any discount. If zero, by default set to be the price. |
| 535 | "price": 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.priceSpecification](https://schema.org/priceSpecification). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 536 | "priceEffectiveTime": "A String", # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search. |
| 537 | "priceExpireTime": "A String", # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search. |
| 538 | "priceRange": { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests. |
| 539 | "originalPrice": { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id. |
| 540 | "exclusiveMaximum": 3.14, # Exclusive upper bound. |
| 541 | "exclusiveMinimum": 3.14, # Exclusive lower bound. |
| 542 | "maximum": 3.14, # Inclusive upper bound. |
| 543 | "minimum": 3.14, # Inclusive lower bound. |
| 544 | }, |
| 545 | "price": { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id. |
| 546 | "exclusiveMaximum": 3.14, # Exclusive upper bound. |
| 547 | "exclusiveMinimum": 3.14, # Exclusive lower bound. |
| 548 | "maximum": 3.14, # Inclusive upper bound. |
| 549 | "minimum": 3.14, # Inclusive lower bound. |
| 550 | }, |
| 551 | }, |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 552 | }, |
| 553 | "primaryProductId": "A String", # Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center Property [item_group_id](https://support.google.com/merchants/answer/6324507). Schema.org Property [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID). This field must be enabled before it can be used. [Learn more](/recommendations-ai/docs/catalog#item-group-id). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 554 | "promotions": [ # The promotions applied to the product. A maximum of 10 values are allowed per Product. |
| 555 | { # Promotion information. |
| 556 | "promotionId": "A String", # ID of the promotion. For example, "free gift". The value value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: a-zA-Z*. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [promotion](https://support.google.com/merchants/answer/7050148). |
| 557 | }, |
| 558 | ], |
| 559 | "publishTime": "A String", # The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation. |
| 560 | "rating": { # The rating of a Product. # The rating of this product. |
| 561 | "averageRating": 3.14, # The average rating of the Product. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned. |
| 562 | "ratingCount": 42, # The total number of ratings. This value is independent of the value of rating_histogram. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 563 | "ratingHistogram": [ # List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2 star, and so on. |
| 564 | 42, |
| 565 | ], |
| 566 | }, |
yoshi-code-bot | b539cc4 | 2021-08-03 00:20:27 -0700 | [diff] [blame] | 567 | "retrievableFields": "A String", # Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form "attributes.key" where "key" is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse may increase response payload size and serving latency. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 568 | "sizes": [ # The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in "US:MENS:M", "US" represents size system; "MENS" represents size type; "M" represents size value. In "GIRLS:27", size system is empty; "GIRLS" represents size type; "27" represents size value. In "32 inches", both size system and size type are empty, while size value is "32 inches". A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [size](https://support.google.com/merchants/answer/6324492), [size_type](https://support.google.com/merchants/answer/6324497) and [size_system](https://support.google.com/merchants/answer/6324502). Schema.org property [Product.size](https://schema.org/size). |
| 569 | "A String", |
| 570 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 571 | "tags": [ # Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Google Merchant Center property [custom_label_0–4](https://support.google.com/merchants/answer/6324473). |
| 572 | "A String", |
| 573 | ], |
| 574 | "title": "A String", # Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [title](https://support.google.com/merchants/answer/6324415). Schema.org property [Product.name](https://schema.org/name). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 575 | "ttl": "A String", # Input only. The TTL (time to live) of the product. If it is set, expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. |
yoshi-code-bot | 108b819 | 2021-05-23 03:48:02 -0700 | [diff] [blame] | 576 | "type": "A String", # Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 577 | "uri": "A String", # Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [link](https://support.google.com/merchants/answer/6324416). Schema.org property [Offer.url](https://schema.org/url). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 578 | "variants": [ # Output only. Product variants grouped together on primary product which share similar product attributes. It's automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests. |
| 579 | # Object with schema name: GoogleCloudRetailV2alphaProduct |
| 580 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 581 | }</pre> |
| 582 | </div> |
| 583 | |
| 584 | <div class="method"> |
| 585 | <code class="details" id="import_">import_(parent, body=None, x__xgafv=None)</code> |
| 586 | <pre>Bulk import of multiple Products. Request processing may be synchronous. No partial updating is supported. Non-existing items are created. Note that it is possible for a subset of the Products to be successfully updated. |
| 587 | |
| 588 | Args: |
| 589 | parent: string, Required. `projects/1234/locations/global/catalogs/default_catalog/branches/default_branch` If no updateMask is specified, requires products.create permission. If updateMask is specified, requires products.update permission. (required) |
| 590 | body: object, The request body. |
| 591 | The object takes the form of: |
| 592 | |
| 593 | { # Request message for Import methods. |
| 594 | "errorsConfig": { # Configuration of destination for Import related errors. # The desired location of errors incurred during the Import. |
| 595 | "gcsPrefix": "A String", # Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Import errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message. |
| 596 | }, |
| 597 | "inputConfig": { # The input config source for products. # Required. The desired input location of the data. |
| 598 | "bigQuerySource": { # BigQuery source import data from. # BigQuery input source. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 599 | "dataSchema": "A String", # The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: Using https://support.google.com/analytics/answer/3437719. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 600 | "datasetId": "A String", # Required. The BigQuery data set to copy the data from with a length limit of 1,024 characters. |
| 601 | "gcsStagingDir": "A String", # Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the BigQuery export to a specific Cloud Storage directory. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 602 | "partitionDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`. # BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. Only supported when ImportProductsRequest.reconciliation_mode is set to `FULL`. |
| 603 | "day": 42, # 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. |
| 604 | "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. |
| 605 | "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. |
| 606 | }, |
yoshi-code-bot | f0c2fa6 | 2021-04-23 08:24:04 -0700 | [diff] [blame] | 607 | "projectId": "A String", # The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 608 | "tableId": "A String", # Required. The BigQuery table to copy the data from with a length limit of 1,024 characters. |
| 609 | }, |
| 610 | "gcsSource": { # Google Cloud Storage location for input content. format. # Google Cloud Storage location for the input content. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 611 | "dataSchema": "A String", # The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: Using https://support.google.com/analytics/answer/3437719. |
yoshi-code-bot | f0c2fa6 | 2021-04-23 08:24:04 -0700 | [diff] [blame] | 612 | "inputUris": [ # Required. Google Cloud Storage URIs to input files. URI can be up to 2000 characters long. URIs can match the full object path (for example, `gs://bucket/directory/object.json`) or a pattern matching one or more files, such as `gs://bucket/directory/*.json`. A request can contain at most 100 files, and each file can be up to 2 GB. See [Importing product information](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog) for the expected file format and setup instructions. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 613 | "A String", |
| 614 | ], |
| 615 | }, |
| 616 | "productInlineSource": { # The inline source for the input config for ImportProducts method. # The Inline source for the input content for products. |
yoshi-code-bot | 1a4514d | 2021-07-13 00:20:24 -0700 | [diff] [blame] | 617 | "products": [ # Required. A list of products to update/create. Each product must have a valid Product.id. Recommended max of 100 items. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 618 | { # Product captures all metadata information of items to be recommended or searched. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 619 | "attributes": { # Highly encouraged. Extra product attributes to be included. For example, for products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the attributes here. Features that can take on one of a limited number of possible values. Two types of features can be set are: Textual features. some examples would be the brand/maker of a product, or country of a customer. Numerical features. Some examples would be the height/weight of a product, or age of a customer. For example: `{ "vendor": {"text": ["vendor123", "vendor456"]}, "lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]} }`. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries count: 200 by default; 100 for Type.VARIANT. * The key must be a UTF-8 encoded string with a length limit of 128 characters. * Max indexable entries count: 200 by default; 40 for Type.VARIANT. * Max searchable entries count: 30. * For indexable attribute, the key must match the pattern: a-zA-Z0-9*. For example, key0LikeThis or KEY_1_LIKE_THIS. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 620 | "a_key": { # A custom attribute that is not explicitly modeled in Product. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 621 | "indexable": True or False, # If true, custom attribute values are indexed, so that it can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 622 | "numbers": [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". At most 400 values are allowed.Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned. |
| 623 | 3.14, |
| 624 | ], |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 625 | "searchable": True or False, # If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 626 | "text": [ # The textual values of this custom attribute. For example, `["yellow", "green"]` when the key is "color". At most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned. |
| 627 | "A String", |
| 628 | ], |
| 629 | }, |
| 630 | }, |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 631 | "audience": { # An intended audience of the Product for whom it's sold. # The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product. |
| 632 | "ageGroups": [ # The age groups of the audience. Strongly encouraged to use the standard values: "newborn" (up to 3 months old), "infant" (3–12 months old), "toddler" (1–5 years old), "kids" (5–13 years old), "adult" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge). |
| 633 | "A String", |
| 634 | ], |
| 635 | "genders": [ # The genders of the audience. Strongly encouraged to use the standard values: "male", "female", "unisex". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender). |
| 636 | "A String", |
| 637 | ], |
| 638 | }, |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 639 | "availability": "A String", # The online availability of the Product. Default to Availability.IN_STOCK. Google Merchant Center Property [availability](https://support.google.com/merchants/answer/6324448). Schema.org Property [Offer.availability](https://schema.org/availability). |
| 640 | "availableQuantity": 42, # The available quantity of the item. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 641 | "availableTime": "A String", # The timestamp when this Product becomes available for SearchService.Search. |
| 642 | "brands": [ # The brands of the product. A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [brand](https://support.google.com/merchants/answer/6324351). Schema.org property [Product.brand](https://schema.org/brand). |
| 643 | "A String", |
| 644 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 645 | "categories": [ # Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, please replace it with other character(s). For example, if a shoes product belongs to both ["Shoes & Accessories" -> "Shoes"] and ["Sports & Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented as: "categories": [ "Shoes & Accessories > Shoes", "Sports & Fitness > Athletic Clothing > Shoes" ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property google_product_category. Schema.org property [Product.category] (https://schema.org/category). [mc_google_product_category]: https://support.google.com/merchants/answer/6324436 |
| 646 | "A String", |
| 647 | ], |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 648 | "collectionMemberIds": [ # The id of the collection members when type is Type.COLLECTION. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return. |
| 649 | "A String", |
| 650 | ], |
| 651 | "colorInfo": { # The color information of a Product. # The color of the product. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 652 | "colorFamilies": [ # The standard color families. Strongly recommended to use the following standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple", "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed". Normally it is expected to have only 1 color family. May consider using single "Mixed" instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 653 | "A String", |
| 654 | ], |
| 655 | "colors": [ # The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single "Mixed" instead of multiple values. A maximum of 5 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 656 | "A String", |
| 657 | ], |
| 658 | }, |
| 659 | "conditions": [ # The condition of the product. Strongly encouraged to use the standard values: "new", "refurbished", "used". A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [condition](https://support.google.com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://schema.org/itemCondition). |
| 660 | "A String", |
| 661 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 662 | "description": "A String", # Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [description](https://support.google.com/merchants/answer/6324468). schema.org property [Product.description](https://schema.org/description). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 663 | "expireTime": "A String", # The timestamp when this product becomes unavailable for SearchService.Search. If it is set, the Product is not available for SearchService.Search after expire_time. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499). |
| 664 | "fulfillmentInfo": [ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned. |
| 665 | { # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. |
| 666 | "placeIds": [ # The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 2000 values are allowed. Each value must be a string with a length limit of 10 characters, matching the pattern [a-zA-Z0-9_-]+, such as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is returned. |
| 667 | "A String", |
| 668 | ], |
| 669 | "type": "A String", # The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * "pickup-in-store" * "ship-to-store" * "same-day-delivery" * "next-day-delivery" * "custom-type-1" * "custom-type-2" * "custom-type-3" * "custom-type-4" * "custom-type-5" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. |
| 670 | }, |
| 671 | ], |
| 672 | "gtin": "A String", # The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gtin](https://support.google.com/merchants/answer/6324461). Schema.org property [Product.isbn](https://schema.org/isbn) or [Product.gtin8](https://schema.org/gtin8) or [Product.gtin12](https://schema.org/gtin12) or [Product.gtin13](https://schema.org/gtin13) or [Product.gtin14](https://schema.org/gtin14). If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 673 | "id": "A String", # Immutable. Product identifier, which is the final component of name. For example, this field is "id_1", if name is `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [id](https://support.google.com/merchants/answer/6324405). Schema.org Property [Product.sku](https://schema.org/sku). |
| 674 | "images": [ # Product images for the product.Highly recommended to put the main image to the first. A maximum of 300 images are allowed. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image). |
| 675 | { # Product thumbnail/detail image. |
| 676 | "height": 42, # Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 677 | "uri": "A String", # Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image). |
| 678 | "width": 42, # Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 679 | }, |
| 680 | ], |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 681 | "languageCode": "A String", # Language of the title/description and other string attributes. Use language tags defined by BCP 47. For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to "en-US" if unset. |
| 682 | "materials": [ # The material of the product. For example, "leather", "wooden". A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [material](https://support.google.com/merchants/answer/6324410). Schema.org property [Product.material](https://schema.org/material). |
| 683 | "A String", |
| 684 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 685 | "name": "A String", # Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`. The branch ID must be "default_branch". |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 686 | "patterns": [ # The pattern or graphic print of the product. For example, "striped", "polka dot", "paisley". A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [pattern](https://support.google.com/merchants/answer/6324483). Schema.org property [Product.pattern](https://schema.org/pattern). |
| 687 | "A String", |
| 688 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 689 | "priceInfo": { # The price information of a Product. # Product price and cost information. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). |
| 690 | "cost": 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 691 | "currencyCode": "A String", # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 692 | "originalPrice": 3.14, # Price of the product without any discount. If zero, by default set to be the price. |
| 693 | "price": 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.priceSpecification](https://schema.org/priceSpecification). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 694 | "priceEffectiveTime": "A String", # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search. |
| 695 | "priceExpireTime": "A String", # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search. |
| 696 | "priceRange": { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests. |
| 697 | "originalPrice": { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id. |
| 698 | "exclusiveMaximum": 3.14, # Exclusive upper bound. |
| 699 | "exclusiveMinimum": 3.14, # Exclusive lower bound. |
| 700 | "maximum": 3.14, # Inclusive upper bound. |
| 701 | "minimum": 3.14, # Inclusive lower bound. |
| 702 | }, |
| 703 | "price": { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id. |
| 704 | "exclusiveMaximum": 3.14, # Exclusive upper bound. |
| 705 | "exclusiveMinimum": 3.14, # Exclusive lower bound. |
| 706 | "maximum": 3.14, # Inclusive upper bound. |
| 707 | "minimum": 3.14, # Inclusive lower bound. |
| 708 | }, |
| 709 | }, |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 710 | }, |
| 711 | "primaryProductId": "A String", # Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center Property [item_group_id](https://support.google.com/merchants/answer/6324507). Schema.org Property [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID). This field must be enabled before it can be used. [Learn more](/recommendations-ai/docs/catalog#item-group-id). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 712 | "promotions": [ # The promotions applied to the product. A maximum of 10 values are allowed per Product. |
| 713 | { # Promotion information. |
| 714 | "promotionId": "A String", # ID of the promotion. For example, "free gift". The value value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: a-zA-Z*. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [promotion](https://support.google.com/merchants/answer/7050148). |
| 715 | }, |
| 716 | ], |
| 717 | "publishTime": "A String", # The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation. |
| 718 | "rating": { # The rating of a Product. # The rating of this product. |
| 719 | "averageRating": 3.14, # The average rating of the Product. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned. |
| 720 | "ratingCount": 42, # The total number of ratings. This value is independent of the value of rating_histogram. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 721 | "ratingHistogram": [ # List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2 star, and so on. |
| 722 | 42, |
| 723 | ], |
| 724 | }, |
yoshi-code-bot | b539cc4 | 2021-08-03 00:20:27 -0700 | [diff] [blame] | 725 | "retrievableFields": "A String", # Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form "attributes.key" where "key" is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse may increase response payload size and serving latency. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 726 | "sizes": [ # The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in "US:MENS:M", "US" represents size system; "MENS" represents size type; "M" represents size value. In "GIRLS:27", size system is empty; "GIRLS" represents size type; "27" represents size value. In "32 inches", both size system and size type are empty, while size value is "32 inches". A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [size](https://support.google.com/merchants/answer/6324492), [size_type](https://support.google.com/merchants/answer/6324497) and [size_system](https://support.google.com/merchants/answer/6324502). Schema.org property [Product.size](https://schema.org/size). |
| 727 | "A String", |
| 728 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 729 | "tags": [ # Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Google Merchant Center property [custom_label_0–4](https://support.google.com/merchants/answer/6324473). |
| 730 | "A String", |
| 731 | ], |
| 732 | "title": "A String", # Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [title](https://support.google.com/merchants/answer/6324415). Schema.org property [Product.name](https://schema.org/name). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 733 | "ttl": "A String", # Input only. The TTL (time to live) of the product. If it is set, expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. |
yoshi-code-bot | 108b819 | 2021-05-23 03:48:02 -0700 | [diff] [blame] | 734 | "type": "A String", # Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 735 | "uri": "A String", # Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [link](https://support.google.com/merchants/answer/6324416). Schema.org property [Offer.url](https://schema.org/url). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 736 | "variants": [ # Output only. Product variants grouped together on primary product which share similar product attributes. It's automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests. |
| 737 | # Object with schema name: GoogleCloudRetailV2alphaProduct |
| 738 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 739 | }, |
| 740 | ], |
| 741 | }, |
| 742 | }, |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 743 | "notificationPubsubTopic": "A String", # Pub/Sub topic for receiving notification. If this field is set, when the import is finished, a notification will be sent to specified Pub/Sub topic. The message data will be JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. Only supported when ImportProductsRequest.reconciliation_mode is set to `FULL`. |
| 744 | "reconciliationMode": "A String", # The mode of reconciliation between existing products and the products to be imported. Defaults to ReconciliationMode.INCREMENTAL. |
| 745 | "requestId": "A String", # Unique identifier provided by client, within the ancestor dataset scope. Ensures idempotency and used for request deduplication. Server-generated if unspecified. Up to 128 characters long and must match the pattern: "[a-zA-Z0-9_]+". This is returned as Operation.name in ImportMetadata. Only supported when ImportProductsRequest.reconciliation_mode is set to `FULL`. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 746 | "updateMask": "A String", # Indicates which fields in the provided imported 'products' to update. If not set, will by default update all fields. |
| 747 | } |
| 748 | |
| 749 | x__xgafv: string, V1 error format. |
| 750 | Allowed values |
| 751 | 1 - v1 error format |
| 752 | 2 - v2 error format |
| 753 | |
| 754 | Returns: |
| 755 | An object of the form: |
| 756 | |
| 757 | { # This resource represents a long-running operation that is the result of a network API call. |
| 758 | "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| 759 | "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. |
| 760 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 761 | "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 762 | { |
| 763 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 764 | }, |
| 765 | ], |
| 766 | "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. |
| 767 | }, |
| 768 | "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| 769 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 770 | }, |
| 771 | "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| 772 | "response": { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| 773 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 774 | }, |
| 775 | }</pre> |
| 776 | </div> |
| 777 | |
| 778 | <div class="method"> |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 779 | <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, readMask=None, requireTotalSize=None, x__xgafv=None)</code> |
| 780 | <pre>Gets a list of Products. |
| 781 | |
| 782 | Args: |
| 783 | parent: string, Required. The parent branch resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/0`. Use `default_branch` as the branch ID, to list products under the default branch. If the caller does not have permission to list Products under this branch, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned. (required) |
| 784 | filter: string, A filter to apply on the list results. Supported features: * List all the products under the parent branch if filter is unset. * List Product.Type.VARIANT Products sharing the same Product.Type.PRIMARY Product. For example: `primary_product_id = "some_product_id"` * List Products bundled in a Product.Type.COLLECTION Product. For example: `collection_product_id = "some_product_id"` * List Products with a partibular type. For example: `type = "PRIMARY"` `type = "VARIANT"` `type = "COLLECTION"` If the field is unrecognizable, an INVALID_ARGUMENT error is returned. If the specified Product.Type.PRIMARY Product or Product.Type.COLLECTION Product does not exist, a NOT_FOUND error is returned. |
| 785 | pageSize: integer, Maximum number of Products to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned. |
| 786 | pageToken: string, A page token ListProductsResponse.next_page_token, received from a previous ProductService.ListProducts call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ProductService.ListProducts must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned. |
| 787 | readMask: string, The fields of Product to return in the responses. If not set or empty, the following fields are returned: * Product.name * Product.id * Product.title * Product.uri * Product.images * Product.price_info * Product.brands If "*" is provided, all fields are returned. Product.name is always returned no matter what mask is set. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. |
| 788 | requireTotalSize: boolean, If true and page_token is empty, ListProductsResponse.total_size is set to the total count of matched items irrespective of pagination. Notice that setting this field to true affects the performance. |
| 789 | x__xgafv: string, V1 error format. |
| 790 | Allowed values |
| 791 | 1 - v1 error format |
| 792 | 2 - v2 error format |
| 793 | |
| 794 | Returns: |
| 795 | An object of the form: |
| 796 | |
| 797 | { # Response message for ProductService.ListProducts method. |
| 798 | "nextPageToken": "A String", # A token that can be sent as ListProductsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| 799 | "products": [ # The Products. |
| 800 | { # Product captures all metadata information of items to be recommended or searched. |
| 801 | "attributes": { # Highly encouraged. Extra product attributes to be included. For example, for products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the attributes here. Features that can take on one of a limited number of possible values. Two types of features can be set are: Textual features. some examples would be the brand/maker of a product, or country of a customer. Numerical features. Some examples would be the height/weight of a product, or age of a customer. For example: `{ "vendor": {"text": ["vendor123", "vendor456"]}, "lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]} }`. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries count: 200 by default; 100 for Type.VARIANT. * The key must be a UTF-8 encoded string with a length limit of 128 characters. * Max indexable entries count: 200 by default; 40 for Type.VARIANT. * Max searchable entries count: 30. * For indexable attribute, the key must match the pattern: a-zA-Z0-9*. For example, key0LikeThis or KEY_1_LIKE_THIS. |
| 802 | "a_key": { # A custom attribute that is not explicitly modeled in Product. |
| 803 | "indexable": True or False, # If true, custom attribute values are indexed, so that it can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details. |
| 804 | "numbers": [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". At most 400 values are allowed.Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned. |
| 805 | 3.14, |
| 806 | ], |
| 807 | "searchable": True or False, # If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned. |
| 808 | "text": [ # The textual values of this custom attribute. For example, `["yellow", "green"]` when the key is "color". At most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned. |
| 809 | "A String", |
| 810 | ], |
| 811 | }, |
| 812 | }, |
| 813 | "audience": { # An intended audience of the Product for whom it's sold. # The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product. |
| 814 | "ageGroups": [ # The age groups of the audience. Strongly encouraged to use the standard values: "newborn" (up to 3 months old), "infant" (3–12 months old), "toddler" (1–5 years old), "kids" (5–13 years old), "adult" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge). |
| 815 | "A String", |
| 816 | ], |
| 817 | "genders": [ # The genders of the audience. Strongly encouraged to use the standard values: "male", "female", "unisex". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender). |
| 818 | "A String", |
| 819 | ], |
| 820 | }, |
| 821 | "availability": "A String", # The online availability of the Product. Default to Availability.IN_STOCK. Google Merchant Center Property [availability](https://support.google.com/merchants/answer/6324448). Schema.org Property [Offer.availability](https://schema.org/availability). |
| 822 | "availableQuantity": 42, # The available quantity of the item. |
| 823 | "availableTime": "A String", # The timestamp when this Product becomes available for SearchService.Search. |
| 824 | "brands": [ # The brands of the product. A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [brand](https://support.google.com/merchants/answer/6324351). Schema.org property [Product.brand](https://schema.org/brand). |
| 825 | "A String", |
| 826 | ], |
| 827 | "categories": [ # Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, please replace it with other character(s). For example, if a shoes product belongs to both ["Shoes & Accessories" -> "Shoes"] and ["Sports & Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented as: "categories": [ "Shoes & Accessories > Shoes", "Sports & Fitness > Athletic Clothing > Shoes" ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property google_product_category. Schema.org property [Product.category] (https://schema.org/category). [mc_google_product_category]: https://support.google.com/merchants/answer/6324436 |
| 828 | "A String", |
| 829 | ], |
| 830 | "collectionMemberIds": [ # The id of the collection members when type is Type.COLLECTION. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return. |
| 831 | "A String", |
| 832 | ], |
| 833 | "colorInfo": { # The color information of a Product. # The color of the product. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 834 | "colorFamilies": [ # The standard color families. Strongly recommended to use the following standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple", "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed". Normally it is expected to have only 1 color family. May consider using single "Mixed" instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 835 | "A String", |
| 836 | ], |
| 837 | "colors": [ # The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single "Mixed" instead of multiple values. A maximum of 5 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 838 | "A String", |
| 839 | ], |
| 840 | }, |
| 841 | "conditions": [ # The condition of the product. Strongly encouraged to use the standard values: "new", "refurbished", "used". A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [condition](https://support.google.com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://schema.org/itemCondition). |
| 842 | "A String", |
| 843 | ], |
| 844 | "description": "A String", # Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [description](https://support.google.com/merchants/answer/6324468). schema.org property [Product.description](https://schema.org/description). |
| 845 | "expireTime": "A String", # The timestamp when this product becomes unavailable for SearchService.Search. If it is set, the Product is not available for SearchService.Search after expire_time. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499). |
| 846 | "fulfillmentInfo": [ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned. |
| 847 | { # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. |
| 848 | "placeIds": [ # The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 2000 values are allowed. Each value must be a string with a length limit of 10 characters, matching the pattern [a-zA-Z0-9_-]+, such as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is returned. |
| 849 | "A String", |
| 850 | ], |
| 851 | "type": "A String", # The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * "pickup-in-store" * "ship-to-store" * "same-day-delivery" * "next-day-delivery" * "custom-type-1" * "custom-type-2" * "custom-type-3" * "custom-type-4" * "custom-type-5" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. |
| 852 | }, |
| 853 | ], |
| 854 | "gtin": "A String", # The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gtin](https://support.google.com/merchants/answer/6324461). Schema.org property [Product.isbn](https://schema.org/isbn) or [Product.gtin8](https://schema.org/gtin8) or [Product.gtin12](https://schema.org/gtin12) or [Product.gtin13](https://schema.org/gtin13) or [Product.gtin14](https://schema.org/gtin14). If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned. |
| 855 | "id": "A String", # Immutable. Product identifier, which is the final component of name. For example, this field is "id_1", if name is `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [id](https://support.google.com/merchants/answer/6324405). Schema.org Property [Product.sku](https://schema.org/sku). |
| 856 | "images": [ # Product images for the product.Highly recommended to put the main image to the first. A maximum of 300 images are allowed. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image). |
| 857 | { # Product thumbnail/detail image. |
| 858 | "height": 42, # Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 859 | "uri": "A String", # Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image). |
| 860 | "width": 42, # Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 861 | }, |
| 862 | ], |
| 863 | "languageCode": "A String", # Language of the title/description and other string attributes. Use language tags defined by BCP 47. For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to "en-US" if unset. |
| 864 | "materials": [ # The material of the product. For example, "leather", "wooden". A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [material](https://support.google.com/merchants/answer/6324410). Schema.org property [Product.material](https://schema.org/material). |
| 865 | "A String", |
| 866 | ], |
| 867 | "name": "A String", # Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`. The branch ID must be "default_branch". |
| 868 | "patterns": [ # The pattern or graphic print of the product. For example, "striped", "polka dot", "paisley". A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [pattern](https://support.google.com/merchants/answer/6324483). Schema.org property [Product.pattern](https://schema.org/pattern). |
| 869 | "A String", |
| 870 | ], |
| 871 | "priceInfo": { # The price information of a Product. # Product price and cost information. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). |
| 872 | "cost": 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895). |
| 873 | "currencyCode": "A String", # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned. |
| 874 | "originalPrice": 3.14, # Price of the product without any discount. If zero, by default set to be the price. |
| 875 | "price": 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.priceSpecification](https://schema.org/priceSpecification). |
| 876 | "priceEffectiveTime": "A String", # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search. |
| 877 | "priceExpireTime": "A String", # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search. |
| 878 | "priceRange": { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests. |
| 879 | "originalPrice": { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id. |
| 880 | "exclusiveMaximum": 3.14, # Exclusive upper bound. |
| 881 | "exclusiveMinimum": 3.14, # Exclusive lower bound. |
| 882 | "maximum": 3.14, # Inclusive upper bound. |
| 883 | "minimum": 3.14, # Inclusive lower bound. |
| 884 | }, |
| 885 | "price": { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id. |
| 886 | "exclusiveMaximum": 3.14, # Exclusive upper bound. |
| 887 | "exclusiveMinimum": 3.14, # Exclusive lower bound. |
| 888 | "maximum": 3.14, # Inclusive upper bound. |
| 889 | "minimum": 3.14, # Inclusive lower bound. |
| 890 | }, |
| 891 | }, |
| 892 | }, |
| 893 | "primaryProductId": "A String", # Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center Property [item_group_id](https://support.google.com/merchants/answer/6324507). Schema.org Property [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID). This field must be enabled before it can be used. [Learn more](/recommendations-ai/docs/catalog#item-group-id). |
| 894 | "promotions": [ # The promotions applied to the product. A maximum of 10 values are allowed per Product. |
| 895 | { # Promotion information. |
| 896 | "promotionId": "A String", # ID of the promotion. For example, "free gift". The value value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: a-zA-Z*. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [promotion](https://support.google.com/merchants/answer/7050148). |
| 897 | }, |
| 898 | ], |
| 899 | "publishTime": "A String", # The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation. |
| 900 | "rating": { # The rating of a Product. # The rating of this product. |
| 901 | "averageRating": 3.14, # The average rating of the Product. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned. |
| 902 | "ratingCount": 42, # The total number of ratings. This value is independent of the value of rating_histogram. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 903 | "ratingHistogram": [ # List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2 star, and so on. |
| 904 | 42, |
| 905 | ], |
| 906 | }, |
yoshi-code-bot | b539cc4 | 2021-08-03 00:20:27 -0700 | [diff] [blame] | 907 | "retrievableFields": "A String", # Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form "attributes.key" where "key" is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse may increase response payload size and serving latency. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 908 | "sizes": [ # The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in "US:MENS:M", "US" represents size system; "MENS" represents size type; "M" represents size value. In "GIRLS:27", size system is empty; "GIRLS" represents size type; "27" represents size value. In "32 inches", both size system and size type are empty, while size value is "32 inches". A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [size](https://support.google.com/merchants/answer/6324492), [size_type](https://support.google.com/merchants/answer/6324497) and [size_system](https://support.google.com/merchants/answer/6324502). Schema.org property [Product.size](https://schema.org/size). |
| 909 | "A String", |
| 910 | ], |
| 911 | "tags": [ # Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Google Merchant Center property [custom_label_0–4](https://support.google.com/merchants/answer/6324473). |
| 912 | "A String", |
| 913 | ], |
| 914 | "title": "A String", # Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [title](https://support.google.com/merchants/answer/6324415). Schema.org property [Product.name](https://schema.org/name). |
| 915 | "ttl": "A String", # Input only. The TTL (time to live) of the product. If it is set, expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. |
| 916 | "type": "A String", # Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset. |
| 917 | "uri": "A String", # Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [link](https://support.google.com/merchants/answer/6324416). Schema.org property [Offer.url](https://schema.org/url). |
| 918 | "variants": [ # Output only. Product variants grouped together on primary product which share similar product attributes. It's automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests. |
| 919 | # Object with schema name: GoogleCloudRetailV2alphaProduct |
| 920 | ], |
| 921 | }, |
| 922 | ], |
| 923 | "totalSize": 42, # The total count of matched Products irrespective of pagination. The total number of Products returned by pagination may be less than the total_size that matches. This field is ignored if ListProductsRequest.require_total_size is not set or ListProductsRequest.page_token is not empty. |
| 924 | }</pre> |
| 925 | </div> |
| 926 | |
| 927 | <div class="method"> |
| 928 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 929 | <pre>Retrieves the next page of results. |
| 930 | |
| 931 | Args: |
| 932 | previous_request: The request for the previous page. (required) |
| 933 | previous_response: The response from the request for the previous page. (required) |
| 934 | |
| 935 | Returns: |
| 936 | A request object that you can call 'execute()' on to request the next |
| 937 | page. Returns None if there are no more items in the collection. |
| 938 | </pre> |
| 939 | </div> |
| 940 | |
| 941 | <div class="method"> |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 942 | <code class="details" id="patch">patch(name, allowMissing=None, body=None, updateMask=None, x__xgafv=None)</code> |
| 943 | <pre>Updates a Product. |
| 944 | |
| 945 | Args: |
| 946 | name: string, Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`. The branch ID must be "default_branch". (required) |
| 947 | body: object, The request body. |
| 948 | The object takes the form of: |
| 949 | |
| 950 | { # Product captures all metadata information of items to be recommended or searched. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 951 | "attributes": { # Highly encouraged. Extra product attributes to be included. For example, for products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the attributes here. Features that can take on one of a limited number of possible values. Two types of features can be set are: Textual features. some examples would be the brand/maker of a product, or country of a customer. Numerical features. Some examples would be the height/weight of a product, or age of a customer. For example: `{ "vendor": {"text": ["vendor123", "vendor456"]}, "lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]} }`. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries count: 200 by default; 100 for Type.VARIANT. * The key must be a UTF-8 encoded string with a length limit of 128 characters. * Max indexable entries count: 200 by default; 40 for Type.VARIANT. * Max searchable entries count: 30. * For indexable attribute, the key must match the pattern: a-zA-Z0-9*. For example, key0LikeThis or KEY_1_LIKE_THIS. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 952 | "a_key": { # A custom attribute that is not explicitly modeled in Product. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 953 | "indexable": True or False, # If true, custom attribute values are indexed, so that it can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 954 | "numbers": [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". At most 400 values are allowed.Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned. |
| 955 | 3.14, |
| 956 | ], |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 957 | "searchable": True or False, # If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 958 | "text": [ # The textual values of this custom attribute. For example, `["yellow", "green"]` when the key is "color". At most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned. |
| 959 | "A String", |
| 960 | ], |
| 961 | }, |
| 962 | }, |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 963 | "audience": { # An intended audience of the Product for whom it's sold. # The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product. |
| 964 | "ageGroups": [ # The age groups of the audience. Strongly encouraged to use the standard values: "newborn" (up to 3 months old), "infant" (3–12 months old), "toddler" (1–5 years old), "kids" (5–13 years old), "adult" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge). |
| 965 | "A String", |
| 966 | ], |
| 967 | "genders": [ # The genders of the audience. Strongly encouraged to use the standard values: "male", "female", "unisex". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender). |
| 968 | "A String", |
| 969 | ], |
| 970 | }, |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 971 | "availability": "A String", # The online availability of the Product. Default to Availability.IN_STOCK. Google Merchant Center Property [availability](https://support.google.com/merchants/answer/6324448). Schema.org Property [Offer.availability](https://schema.org/availability). |
| 972 | "availableQuantity": 42, # The available quantity of the item. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 973 | "availableTime": "A String", # The timestamp when this Product becomes available for SearchService.Search. |
| 974 | "brands": [ # The brands of the product. A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [brand](https://support.google.com/merchants/answer/6324351). Schema.org property [Product.brand](https://schema.org/brand). |
| 975 | "A String", |
| 976 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 977 | "categories": [ # Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, please replace it with other character(s). For example, if a shoes product belongs to both ["Shoes & Accessories" -> "Shoes"] and ["Sports & Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented as: "categories": [ "Shoes & Accessories > Shoes", "Sports & Fitness > Athletic Clothing > Shoes" ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property google_product_category. Schema.org property [Product.category] (https://schema.org/category). [mc_google_product_category]: https://support.google.com/merchants/answer/6324436 |
| 978 | "A String", |
| 979 | ], |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 980 | "collectionMemberIds": [ # The id of the collection members when type is Type.COLLECTION. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return. |
| 981 | "A String", |
| 982 | ], |
| 983 | "colorInfo": { # The color information of a Product. # The color of the product. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 984 | "colorFamilies": [ # The standard color families. Strongly recommended to use the following standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple", "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed". Normally it is expected to have only 1 color family. May consider using single "Mixed" instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 985 | "A String", |
| 986 | ], |
| 987 | "colors": [ # The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single "Mixed" instead of multiple values. A maximum of 5 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 988 | "A String", |
| 989 | ], |
| 990 | }, |
| 991 | "conditions": [ # The condition of the product. Strongly encouraged to use the standard values: "new", "refurbished", "used". A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [condition](https://support.google.com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://schema.org/itemCondition). |
| 992 | "A String", |
| 993 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 994 | "description": "A String", # Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [description](https://support.google.com/merchants/answer/6324468). schema.org property [Product.description](https://schema.org/description). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 995 | "expireTime": "A String", # The timestamp when this product becomes unavailable for SearchService.Search. If it is set, the Product is not available for SearchService.Search after expire_time. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499). |
| 996 | "fulfillmentInfo": [ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned. |
| 997 | { # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. |
| 998 | "placeIds": [ # The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 2000 values are allowed. Each value must be a string with a length limit of 10 characters, matching the pattern [a-zA-Z0-9_-]+, such as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is returned. |
| 999 | "A String", |
| 1000 | ], |
| 1001 | "type": "A String", # The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * "pickup-in-store" * "ship-to-store" * "same-day-delivery" * "next-day-delivery" * "custom-type-1" * "custom-type-2" * "custom-type-3" * "custom-type-4" * "custom-type-5" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. |
| 1002 | }, |
| 1003 | ], |
| 1004 | "gtin": "A String", # The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gtin](https://support.google.com/merchants/answer/6324461). Schema.org property [Product.isbn](https://schema.org/isbn) or [Product.gtin8](https://schema.org/gtin8) or [Product.gtin12](https://schema.org/gtin12) or [Product.gtin13](https://schema.org/gtin13) or [Product.gtin14](https://schema.org/gtin14). If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1005 | "id": "A String", # Immutable. Product identifier, which is the final component of name. For example, this field is "id_1", if name is `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [id](https://support.google.com/merchants/answer/6324405). Schema.org Property [Product.sku](https://schema.org/sku). |
| 1006 | "images": [ # Product images for the product.Highly recommended to put the main image to the first. A maximum of 300 images are allowed. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image). |
| 1007 | { # Product thumbnail/detail image. |
| 1008 | "height": 42, # Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 1009 | "uri": "A String", # Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image). |
| 1010 | "width": 42, # Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 1011 | }, |
| 1012 | ], |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1013 | "languageCode": "A String", # Language of the title/description and other string attributes. Use language tags defined by BCP 47. For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to "en-US" if unset. |
| 1014 | "materials": [ # The material of the product. For example, "leather", "wooden". A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [material](https://support.google.com/merchants/answer/6324410). Schema.org property [Product.material](https://schema.org/material). |
| 1015 | "A String", |
| 1016 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1017 | "name": "A String", # Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`. The branch ID must be "default_branch". |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1018 | "patterns": [ # The pattern or graphic print of the product. For example, "striped", "polka dot", "paisley". A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [pattern](https://support.google.com/merchants/answer/6324483). Schema.org property [Product.pattern](https://schema.org/pattern). |
| 1019 | "A String", |
| 1020 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1021 | "priceInfo": { # The price information of a Product. # Product price and cost information. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). |
| 1022 | "cost": 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1023 | "currencyCode": "A String", # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1024 | "originalPrice": 3.14, # Price of the product without any discount. If zero, by default set to be the price. |
| 1025 | "price": 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.priceSpecification](https://schema.org/priceSpecification). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1026 | "priceEffectiveTime": "A String", # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search. |
| 1027 | "priceExpireTime": "A String", # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search. |
| 1028 | "priceRange": { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests. |
| 1029 | "originalPrice": { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id. |
| 1030 | "exclusiveMaximum": 3.14, # Exclusive upper bound. |
| 1031 | "exclusiveMinimum": 3.14, # Exclusive lower bound. |
| 1032 | "maximum": 3.14, # Inclusive upper bound. |
| 1033 | "minimum": 3.14, # Inclusive lower bound. |
| 1034 | }, |
| 1035 | "price": { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id. |
| 1036 | "exclusiveMaximum": 3.14, # Exclusive upper bound. |
| 1037 | "exclusiveMinimum": 3.14, # Exclusive lower bound. |
| 1038 | "maximum": 3.14, # Inclusive upper bound. |
| 1039 | "minimum": 3.14, # Inclusive lower bound. |
| 1040 | }, |
| 1041 | }, |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1042 | }, |
| 1043 | "primaryProductId": "A String", # Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center Property [item_group_id](https://support.google.com/merchants/answer/6324507). Schema.org Property [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID). This field must be enabled before it can be used. [Learn more](/recommendations-ai/docs/catalog#item-group-id). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1044 | "promotions": [ # The promotions applied to the product. A maximum of 10 values are allowed per Product. |
| 1045 | { # Promotion information. |
| 1046 | "promotionId": "A String", # ID of the promotion. For example, "free gift". The value value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: a-zA-Z*. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [promotion](https://support.google.com/merchants/answer/7050148). |
| 1047 | }, |
| 1048 | ], |
| 1049 | "publishTime": "A String", # The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation. |
| 1050 | "rating": { # The rating of a Product. # The rating of this product. |
| 1051 | "averageRating": 3.14, # The average rating of the Product. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned. |
| 1052 | "ratingCount": 42, # The total number of ratings. This value is independent of the value of rating_histogram. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 1053 | "ratingHistogram": [ # List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2 star, and so on. |
| 1054 | 42, |
| 1055 | ], |
| 1056 | }, |
yoshi-code-bot | b539cc4 | 2021-08-03 00:20:27 -0700 | [diff] [blame] | 1057 | "retrievableFields": "A String", # Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form "attributes.key" where "key" is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse may increase response payload size and serving latency. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1058 | "sizes": [ # The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in "US:MENS:M", "US" represents size system; "MENS" represents size type; "M" represents size value. In "GIRLS:27", size system is empty; "GIRLS" represents size type; "27" represents size value. In "32 inches", both size system and size type are empty, while size value is "32 inches". A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [size](https://support.google.com/merchants/answer/6324492), [size_type](https://support.google.com/merchants/answer/6324497) and [size_system](https://support.google.com/merchants/answer/6324502). Schema.org property [Product.size](https://schema.org/size). |
| 1059 | "A String", |
| 1060 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1061 | "tags": [ # Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Google Merchant Center property [custom_label_0–4](https://support.google.com/merchants/answer/6324473). |
| 1062 | "A String", |
| 1063 | ], |
| 1064 | "title": "A String", # Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [title](https://support.google.com/merchants/answer/6324415). Schema.org property [Product.name](https://schema.org/name). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1065 | "ttl": "A String", # Input only. The TTL (time to live) of the product. If it is set, expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. |
yoshi-code-bot | 108b819 | 2021-05-23 03:48:02 -0700 | [diff] [blame] | 1066 | "type": "A String", # Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1067 | "uri": "A String", # Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [link](https://support.google.com/merchants/answer/6324416). Schema.org property [Offer.url](https://schema.org/url). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1068 | "variants": [ # Output only. Product variants grouped together on primary product which share similar product attributes. It's automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests. |
| 1069 | # Object with schema name: GoogleCloudRetailV2alphaProduct |
| 1070 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1071 | } |
| 1072 | |
| 1073 | allowMissing: boolean, If set to true, and the Product is not found, a new Product will be created. In this situation, `update_mask` is ignored. |
| 1074 | updateMask: string, Indicates which fields in the provided Product to update. The immutable and output only fields are NOT supported. If not set, all supported fields (the fields that are neither immutable nor output only) are updated. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. |
| 1075 | x__xgafv: string, V1 error format. |
| 1076 | Allowed values |
| 1077 | 1 - v1 error format |
| 1078 | 2 - v2 error format |
| 1079 | |
| 1080 | Returns: |
| 1081 | An object of the form: |
| 1082 | |
| 1083 | { # Product captures all metadata information of items to be recommended or searched. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1084 | "attributes": { # Highly encouraged. Extra product attributes to be included. For example, for products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the attributes here. Features that can take on one of a limited number of possible values. Two types of features can be set are: Textual features. some examples would be the brand/maker of a product, or country of a customer. Numerical features. Some examples would be the height/weight of a product, or age of a customer. For example: `{ "vendor": {"text": ["vendor123", "vendor456"]}, "lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]} }`. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries count: 200 by default; 100 for Type.VARIANT. * The key must be a UTF-8 encoded string with a length limit of 128 characters. * Max indexable entries count: 200 by default; 40 for Type.VARIANT. * Max searchable entries count: 30. * For indexable attribute, the key must match the pattern: a-zA-Z0-9*. For example, key0LikeThis or KEY_1_LIKE_THIS. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1085 | "a_key": { # A custom attribute that is not explicitly modeled in Product. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1086 | "indexable": True or False, # If true, custom attribute values are indexed, so that it can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1087 | "numbers": [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". At most 400 values are allowed.Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned. |
| 1088 | 3.14, |
| 1089 | ], |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1090 | "searchable": True or False, # If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1091 | "text": [ # The textual values of this custom attribute. For example, `["yellow", "green"]` when the key is "color". At most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned. |
| 1092 | "A String", |
| 1093 | ], |
| 1094 | }, |
| 1095 | }, |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1096 | "audience": { # An intended audience of the Product for whom it's sold. # The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product. |
| 1097 | "ageGroups": [ # The age groups of the audience. Strongly encouraged to use the standard values: "newborn" (up to 3 months old), "infant" (3–12 months old), "toddler" (1–5 years old), "kids" (5–13 years old), "adult" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge). |
| 1098 | "A String", |
| 1099 | ], |
| 1100 | "genders": [ # The genders of the audience. Strongly encouraged to use the standard values: "male", "female", "unisex". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender). |
| 1101 | "A String", |
| 1102 | ], |
| 1103 | }, |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1104 | "availability": "A String", # The online availability of the Product. Default to Availability.IN_STOCK. Google Merchant Center Property [availability](https://support.google.com/merchants/answer/6324448). Schema.org Property [Offer.availability](https://schema.org/availability). |
| 1105 | "availableQuantity": 42, # The available quantity of the item. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1106 | "availableTime": "A String", # The timestamp when this Product becomes available for SearchService.Search. |
| 1107 | "brands": [ # The brands of the product. A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [brand](https://support.google.com/merchants/answer/6324351). Schema.org property [Product.brand](https://schema.org/brand). |
| 1108 | "A String", |
| 1109 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1110 | "categories": [ # Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, please replace it with other character(s). For example, if a shoes product belongs to both ["Shoes & Accessories" -> "Shoes"] and ["Sports & Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented as: "categories": [ "Shoes & Accessories > Shoes", "Sports & Fitness > Athletic Clothing > Shoes" ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property google_product_category. Schema.org property [Product.category] (https://schema.org/category). [mc_google_product_category]: https://support.google.com/merchants/answer/6324436 |
| 1111 | "A String", |
| 1112 | ], |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1113 | "collectionMemberIds": [ # The id of the collection members when type is Type.COLLECTION. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return. |
| 1114 | "A String", |
| 1115 | ], |
| 1116 | "colorInfo": { # The color information of a Product. # The color of the product. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 1117 | "colorFamilies": [ # The standard color families. Strongly recommended to use the following standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple", "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed". Normally it is expected to have only 1 color family. May consider using single "Mixed" instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 1118 | "A String", |
| 1119 | ], |
| 1120 | "colors": [ # The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single "Mixed" instead of multiple values. A maximum of 5 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 1121 | "A String", |
| 1122 | ], |
| 1123 | }, |
| 1124 | "conditions": [ # The condition of the product. Strongly encouraged to use the standard values: "new", "refurbished", "used". A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [condition](https://support.google.com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://schema.org/itemCondition). |
| 1125 | "A String", |
| 1126 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1127 | "description": "A String", # Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [description](https://support.google.com/merchants/answer/6324468). schema.org property [Product.description](https://schema.org/description). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1128 | "expireTime": "A String", # The timestamp when this product becomes unavailable for SearchService.Search. If it is set, the Product is not available for SearchService.Search after expire_time. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499). |
| 1129 | "fulfillmentInfo": [ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned. |
| 1130 | { # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. |
| 1131 | "placeIds": [ # The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 2000 values are allowed. Each value must be a string with a length limit of 10 characters, matching the pattern [a-zA-Z0-9_-]+, such as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is returned. |
| 1132 | "A String", |
| 1133 | ], |
| 1134 | "type": "A String", # The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * "pickup-in-store" * "ship-to-store" * "same-day-delivery" * "next-day-delivery" * "custom-type-1" * "custom-type-2" * "custom-type-3" * "custom-type-4" * "custom-type-5" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. |
| 1135 | }, |
| 1136 | ], |
| 1137 | "gtin": "A String", # The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gtin](https://support.google.com/merchants/answer/6324461). Schema.org property [Product.isbn](https://schema.org/isbn) or [Product.gtin8](https://schema.org/gtin8) or [Product.gtin12](https://schema.org/gtin12) or [Product.gtin13](https://schema.org/gtin13) or [Product.gtin14](https://schema.org/gtin14). If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1138 | "id": "A String", # Immutable. Product identifier, which is the final component of name. For example, this field is "id_1", if name is `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [id](https://support.google.com/merchants/answer/6324405). Schema.org Property [Product.sku](https://schema.org/sku). |
| 1139 | "images": [ # Product images for the product.Highly recommended to put the main image to the first. A maximum of 300 images are allowed. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image). |
| 1140 | { # Product thumbnail/detail image. |
| 1141 | "height": 42, # Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 1142 | "uri": "A String", # Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image). |
| 1143 | "width": 42, # Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 1144 | }, |
| 1145 | ], |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1146 | "languageCode": "A String", # Language of the title/description and other string attributes. Use language tags defined by BCP 47. For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to "en-US" if unset. |
| 1147 | "materials": [ # The material of the product. For example, "leather", "wooden". A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [material](https://support.google.com/merchants/answer/6324410). Schema.org property [Product.material](https://schema.org/material). |
| 1148 | "A String", |
| 1149 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1150 | "name": "A String", # Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`. The branch ID must be "default_branch". |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1151 | "patterns": [ # The pattern or graphic print of the product. For example, "striped", "polka dot", "paisley". A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [pattern](https://support.google.com/merchants/answer/6324483). Schema.org property [Product.pattern](https://schema.org/pattern). |
| 1152 | "A String", |
| 1153 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1154 | "priceInfo": { # The price information of a Product. # Product price and cost information. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). |
| 1155 | "cost": 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1156 | "currencyCode": "A String", # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1157 | "originalPrice": 3.14, # Price of the product without any discount. If zero, by default set to be the price. |
| 1158 | "price": 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.priceSpecification](https://schema.org/priceSpecification). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1159 | "priceEffectiveTime": "A String", # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search. |
| 1160 | "priceExpireTime": "A String", # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search. |
| 1161 | "priceRange": { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests. |
| 1162 | "originalPrice": { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id. |
| 1163 | "exclusiveMaximum": 3.14, # Exclusive upper bound. |
| 1164 | "exclusiveMinimum": 3.14, # Exclusive lower bound. |
| 1165 | "maximum": 3.14, # Inclusive upper bound. |
| 1166 | "minimum": 3.14, # Inclusive lower bound. |
| 1167 | }, |
| 1168 | "price": { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id. |
| 1169 | "exclusiveMaximum": 3.14, # Exclusive upper bound. |
| 1170 | "exclusiveMinimum": 3.14, # Exclusive lower bound. |
| 1171 | "maximum": 3.14, # Inclusive upper bound. |
| 1172 | "minimum": 3.14, # Inclusive lower bound. |
| 1173 | }, |
| 1174 | }, |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1175 | }, |
| 1176 | "primaryProductId": "A String", # Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center Property [item_group_id](https://support.google.com/merchants/answer/6324507). Schema.org Property [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID). This field must be enabled before it can be used. [Learn more](/recommendations-ai/docs/catalog#item-group-id). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1177 | "promotions": [ # The promotions applied to the product. A maximum of 10 values are allowed per Product. |
| 1178 | { # Promotion information. |
| 1179 | "promotionId": "A String", # ID of the promotion. For example, "free gift". The value value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: a-zA-Z*. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [promotion](https://support.google.com/merchants/answer/7050148). |
| 1180 | }, |
| 1181 | ], |
| 1182 | "publishTime": "A String", # The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation. |
| 1183 | "rating": { # The rating of a Product. # The rating of this product. |
| 1184 | "averageRating": 3.14, # The average rating of the Product. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned. |
| 1185 | "ratingCount": 42, # The total number of ratings. This value is independent of the value of rating_histogram. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 1186 | "ratingHistogram": [ # List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2 star, and so on. |
| 1187 | 42, |
| 1188 | ], |
| 1189 | }, |
yoshi-code-bot | b539cc4 | 2021-08-03 00:20:27 -0700 | [diff] [blame] | 1190 | "retrievableFields": "A String", # Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form "attributes.key" where "key" is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse may increase response payload size and serving latency. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1191 | "sizes": [ # The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in "US:MENS:M", "US" represents size system; "MENS" represents size type; "M" represents size value. In "GIRLS:27", size system is empty; "GIRLS" represents size type; "27" represents size value. In "32 inches", both size system and size type are empty, while size value is "32 inches". A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [size](https://support.google.com/merchants/answer/6324492), [size_type](https://support.google.com/merchants/answer/6324497) and [size_system](https://support.google.com/merchants/answer/6324502). Schema.org property [Product.size](https://schema.org/size). |
| 1192 | "A String", |
| 1193 | ], |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1194 | "tags": [ # Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Google Merchant Center property [custom_label_0–4](https://support.google.com/merchants/answer/6324473). |
| 1195 | "A String", |
| 1196 | ], |
| 1197 | "title": "A String", # Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [title](https://support.google.com/merchants/answer/6324415). Schema.org property [Product.name](https://schema.org/name). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1198 | "ttl": "A String", # Input only. The TTL (time to live) of the product. If it is set, expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. |
yoshi-code-bot | 108b819 | 2021-05-23 03:48:02 -0700 | [diff] [blame] | 1199 | "type": "A String", # Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset. |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1200 | "uri": "A String", # Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [link](https://support.google.com/merchants/answer/6324416). Schema.org property [Offer.url](https://schema.org/url). |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1201 | "variants": [ # Output only. Product variants grouped together on primary product which share similar product attributes. It's automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests. |
| 1202 | # Object with schema name: GoogleCloudRetailV2alphaProduct |
| 1203 | ], |
| 1204 | }</pre> |
| 1205 | </div> |
| 1206 | |
| 1207 | <div class="method"> |
| 1208 | <code class="details" id="removeFulfillmentPlaces">removeFulfillmentPlaces(product, body=None, x__xgafv=None)</code> |
yoshi-code-bot | b539cc4 | 2021-08-03 00:20:27 -0700 | [diff] [blame] | 1209 | <pre>Incrementally removes place IDs from a Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately manifested in the Product queried by GetProduct or ListProducts. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1210 | |
| 1211 | Args: |
| 1212 | product: string, Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. (required) |
| 1213 | body: object, The request body. |
| 1214 | The object takes the form of: |
| 1215 | |
| 1216 | { # Request message for RemoveFulfillmentPlaces method. |
| 1217 | "allowMissing": True or False, # If set to true, and the Product is not found, the fulfillment information will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, an INVALID_ARGUMENT error is returned if the Product is not found. |
| 1218 | "placeIds": [ # Required. The IDs for this type, such as the store IDs for "pickup-in-store" or the region IDs for "same-day-delivery", to be removed for this type. At least 1 value is required, and a maximum of 2000 values are allowed. Each value must be a string with a length limit of 10 characters, matching the pattern [a-zA-Z0-9_-]+, such as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is returned. |
| 1219 | "A String", |
| 1220 | ], |
| 1221 | "removeTime": "A String", # The time when the fulfillment updates are issued, used to prevent out-of-order updates on fulfillment information. If not provided, the internal system time will be used. |
| 1222 | "type": "A String", # Required. The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Supported values: * "pickup-in-store" * "ship-to-store" * "same-day-delivery" * "next-day-delivery" * "custom-type-1" * "custom-type-2" * "custom-type-3" * "custom-type-4" * "custom-type-5" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. This field directly corresponds to Product.fulfillment_info.type. |
| 1223 | } |
| 1224 | |
| 1225 | x__xgafv: string, V1 error format. |
| 1226 | Allowed values |
| 1227 | 1 - v1 error format |
| 1228 | 2 - v2 error format |
| 1229 | |
| 1230 | Returns: |
| 1231 | An object of the form: |
| 1232 | |
| 1233 | { # This resource represents a long-running operation that is the result of a network API call. |
| 1234 | "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| 1235 | "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. |
| 1236 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 1237 | "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 1238 | { |
| 1239 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 1240 | }, |
| 1241 | ], |
| 1242 | "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. |
| 1243 | }, |
| 1244 | "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| 1245 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 1246 | }, |
| 1247 | "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| 1248 | "response": { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| 1249 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 1250 | }, |
| 1251 | }</pre> |
| 1252 | </div> |
| 1253 | |
| 1254 | <div class="method"> |
| 1255 | <code class="details" id="setInventory">setInventory(name, body=None, x__xgafv=None)</code> |
yoshi-code-bot | b539cc4 | 2021-08-03 00:20:27 -0700 | [diff] [blame] | 1256 | <pre>Updates inventory information for a Product while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by GetProduct or ListProducts. When inventory is updated with CreateProduct and UpdateProduct, the specified inventory field value(s) will overwrite any existing value(s) while ignoring the last update time for this field. Furthermore, the last update time for the specified inventory fields will be overwritten to the time of the CreateProduct or UpdateProduct request. If no inventory fields are set in CreateProductRequest.product, then any pre-existing inventory information for this product will be used. If no inventory fields are set in UpdateProductRequest.set_mask, then any existing inventory information will be preserved. Pre-existing inventory information can only be updated with SetInventory, AddFulfillmentPlaces, and RemoveFulfillmentPlaces. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1257 | |
| 1258 | Args: |
| 1259 | name: string, Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`. The branch ID must be "default_branch". (required) |
| 1260 | body: object, The request body. |
| 1261 | The object takes the form of: |
| 1262 | |
| 1263 | { # Request message for SetInventory method. |
| 1264 | "allowMissing": True or False, # If set to true, and the Product with name Product.name is not found, the inventory update will still be processed and retained for at most 1 day until the Product is created. If set to false, an INVALID_ARGUMENT error is returned if the Product is not found. |
| 1265 | "inventory": { # Product captures all metadata information of items to be recommended or searched. # Required. The inventory information to update. The allowable fields to update are: * Product.price_info * Product.availability * Product.available_quantity * Product.fulfillment_info The updated inventory fields must be specified in SetInventoryRequest.set_mask. If SetInventoryRequest.inventory.name is empty or invalid, an INVALID_ARGUMENT error is returned. If the caller does not have permission to update the Product named in Product.name, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Product to update does not have existing inventory information, the provided inventory information will be inserted. If the Product to update has existing inventory information, the provided inventory information will be merged while respecting the last update time for each inventory field, using the provided or default value for SetInventoryRequest.set_time. The last update time is recorded for the following inventory fields: * Product.price_info * Product.availability * Product.available_quantity * Product.fulfillment_info If a full overwrite of inventory information while ignoring timestamps is needed, UpdateProduct should be invoked instead. |
| 1266 | "attributes": { # Highly encouraged. Extra product attributes to be included. For example, for products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the attributes here. Features that can take on one of a limited number of possible values. Two types of features can be set are: Textual features. some examples would be the brand/maker of a product, or country of a customer. Numerical features. Some examples would be the height/weight of a product, or age of a customer. For example: `{ "vendor": {"text": ["vendor123", "vendor456"]}, "lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]} }`. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries count: 200 by default; 100 for Type.VARIANT. * The key must be a UTF-8 encoded string with a length limit of 128 characters. * Max indexable entries count: 200 by default; 40 for Type.VARIANT. * Max searchable entries count: 30. * For indexable attribute, the key must match the pattern: a-zA-Z0-9*. For example, key0LikeThis or KEY_1_LIKE_THIS. |
| 1267 | "a_key": { # A custom attribute that is not explicitly modeled in Product. |
| 1268 | "indexable": True or False, # If true, custom attribute values are indexed, so that it can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details. |
| 1269 | "numbers": [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". At most 400 values are allowed.Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned. |
| 1270 | 3.14, |
| 1271 | ], |
| 1272 | "searchable": True or False, # If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned. |
| 1273 | "text": [ # The textual values of this custom attribute. For example, `["yellow", "green"]` when the key is "color". At most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned. |
| 1274 | "A String", |
| 1275 | ], |
| 1276 | }, |
| 1277 | }, |
| 1278 | "audience": { # An intended audience of the Product for whom it's sold. # The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product. |
| 1279 | "ageGroups": [ # The age groups of the audience. Strongly encouraged to use the standard values: "newborn" (up to 3 months old), "infant" (3–12 months old), "toddler" (1–5 years old), "kids" (5–13 years old), "adult" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge). |
| 1280 | "A String", |
| 1281 | ], |
| 1282 | "genders": [ # The genders of the audience. Strongly encouraged to use the standard values: "male", "female", "unisex". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender). |
| 1283 | "A String", |
| 1284 | ], |
| 1285 | }, |
| 1286 | "availability": "A String", # The online availability of the Product. Default to Availability.IN_STOCK. Google Merchant Center Property [availability](https://support.google.com/merchants/answer/6324448). Schema.org Property [Offer.availability](https://schema.org/availability). |
| 1287 | "availableQuantity": 42, # The available quantity of the item. |
| 1288 | "availableTime": "A String", # The timestamp when this Product becomes available for SearchService.Search. |
| 1289 | "brands": [ # The brands of the product. A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [brand](https://support.google.com/merchants/answer/6324351). Schema.org property [Product.brand](https://schema.org/brand). |
| 1290 | "A String", |
| 1291 | ], |
| 1292 | "categories": [ # Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, please replace it with other character(s). For example, if a shoes product belongs to both ["Shoes & Accessories" -> "Shoes"] and ["Sports & Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented as: "categories": [ "Shoes & Accessories > Shoes", "Sports & Fitness > Athletic Clothing > Shoes" ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property google_product_category. Schema.org property [Product.category] (https://schema.org/category). [mc_google_product_category]: https://support.google.com/merchants/answer/6324436 |
| 1293 | "A String", |
| 1294 | ], |
| 1295 | "collectionMemberIds": [ # The id of the collection members when type is Type.COLLECTION. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return. |
| 1296 | "A String", |
| 1297 | ], |
| 1298 | "colorInfo": { # The color information of a Product. # The color of the product. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 1299 | "colorFamilies": [ # The standard color families. Strongly recommended to use the following standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple", "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed". Normally it is expected to have only 1 color family. May consider using single "Mixed" instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 1300 | "A String", |
| 1301 | ], |
| 1302 | "colors": [ # The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single "Mixed" instead of multiple values. A maximum of 5 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). |
| 1303 | "A String", |
| 1304 | ], |
| 1305 | }, |
| 1306 | "conditions": [ # The condition of the product. Strongly encouraged to use the standard values: "new", "refurbished", "used". A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [condition](https://support.google.com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://schema.org/itemCondition). |
| 1307 | "A String", |
| 1308 | ], |
| 1309 | "description": "A String", # Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [description](https://support.google.com/merchants/answer/6324468). schema.org property [Product.description](https://schema.org/description). |
| 1310 | "expireTime": "A String", # The timestamp when this product becomes unavailable for SearchService.Search. If it is set, the Product is not available for SearchService.Search after expire_time. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499). |
| 1311 | "fulfillmentInfo": [ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned. |
| 1312 | { # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. |
| 1313 | "placeIds": [ # The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 2000 values are allowed. Each value must be a string with a length limit of 10 characters, matching the pattern [a-zA-Z0-9_-]+, such as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is returned. |
| 1314 | "A String", |
| 1315 | ], |
| 1316 | "type": "A String", # The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * "pickup-in-store" * "ship-to-store" * "same-day-delivery" * "next-day-delivery" * "custom-type-1" * "custom-type-2" * "custom-type-3" * "custom-type-4" * "custom-type-5" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. |
| 1317 | }, |
| 1318 | ], |
| 1319 | "gtin": "A String", # The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gtin](https://support.google.com/merchants/answer/6324461). Schema.org property [Product.isbn](https://schema.org/isbn) or [Product.gtin8](https://schema.org/gtin8) or [Product.gtin12](https://schema.org/gtin12) or [Product.gtin13](https://schema.org/gtin13) or [Product.gtin14](https://schema.org/gtin14). If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned. |
| 1320 | "id": "A String", # Immutable. Product identifier, which is the final component of name. For example, this field is "id_1", if name is `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [id](https://support.google.com/merchants/answer/6324405). Schema.org Property [Product.sku](https://schema.org/sku). |
| 1321 | "images": [ # Product images for the product.Highly recommended to put the main image to the first. A maximum of 300 images are allowed. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image). |
| 1322 | { # Product thumbnail/detail image. |
| 1323 | "height": 42, # Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 1324 | "uri": "A String", # Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image). |
| 1325 | "width": 42, # Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 1326 | }, |
| 1327 | ], |
| 1328 | "languageCode": "A String", # Language of the title/description and other string attributes. Use language tags defined by BCP 47. For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to "en-US" if unset. |
| 1329 | "materials": [ # The material of the product. For example, "leather", "wooden". A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [material](https://support.google.com/merchants/answer/6324410). Schema.org property [Product.material](https://schema.org/material). |
| 1330 | "A String", |
| 1331 | ], |
| 1332 | "name": "A String", # Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`. The branch ID must be "default_branch". |
| 1333 | "patterns": [ # The pattern or graphic print of the product. For example, "striped", "polka dot", "paisley". A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [pattern](https://support.google.com/merchants/answer/6324483). Schema.org property [Product.pattern](https://schema.org/pattern). |
| 1334 | "A String", |
| 1335 | ], |
| 1336 | "priceInfo": { # The price information of a Product. # Product price and cost information. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). |
| 1337 | "cost": 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895). |
| 1338 | "currencyCode": "A String", # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned. |
| 1339 | "originalPrice": 3.14, # Price of the product without any discount. If zero, by default set to be the price. |
| 1340 | "price": 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.priceSpecification](https://schema.org/priceSpecification). |
| 1341 | "priceEffectiveTime": "A String", # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search. |
| 1342 | "priceExpireTime": "A String", # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search. |
| 1343 | "priceRange": { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests. |
| 1344 | "originalPrice": { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id. |
| 1345 | "exclusiveMaximum": 3.14, # Exclusive upper bound. |
| 1346 | "exclusiveMinimum": 3.14, # Exclusive lower bound. |
| 1347 | "maximum": 3.14, # Inclusive upper bound. |
| 1348 | "minimum": 3.14, # Inclusive lower bound. |
| 1349 | }, |
| 1350 | "price": { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id. |
| 1351 | "exclusiveMaximum": 3.14, # Exclusive upper bound. |
| 1352 | "exclusiveMinimum": 3.14, # Exclusive lower bound. |
| 1353 | "maximum": 3.14, # Inclusive upper bound. |
| 1354 | "minimum": 3.14, # Inclusive lower bound. |
| 1355 | }, |
| 1356 | }, |
| 1357 | }, |
| 1358 | "primaryProductId": "A String", # Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center Property [item_group_id](https://support.google.com/merchants/answer/6324507). Schema.org Property [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID). This field must be enabled before it can be used. [Learn more](/recommendations-ai/docs/catalog#item-group-id). |
| 1359 | "promotions": [ # The promotions applied to the product. A maximum of 10 values are allowed per Product. |
| 1360 | { # Promotion information. |
| 1361 | "promotionId": "A String", # ID of the promotion. For example, "free gift". The value value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: a-zA-Z*. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [promotion](https://support.google.com/merchants/answer/7050148). |
| 1362 | }, |
| 1363 | ], |
| 1364 | "publishTime": "A String", # The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation. |
| 1365 | "rating": { # The rating of a Product. # The rating of this product. |
| 1366 | "averageRating": 3.14, # The average rating of the Product. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned. |
| 1367 | "ratingCount": 42, # The total number of ratings. This value is independent of the value of rating_histogram. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
| 1368 | "ratingHistogram": [ # List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2 star, and so on. |
| 1369 | 42, |
| 1370 | ], |
| 1371 | }, |
yoshi-code-bot | b539cc4 | 2021-08-03 00:20:27 -0700 | [diff] [blame] | 1372 | "retrievableFields": "A String", # Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form "attributes.key" where "key" is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse may increase response payload size and serving latency. |
yoshi-code-bot | a36e3b1 | 2021-07-27 00:20:26 -0700 | [diff] [blame] | 1373 | "sizes": [ # The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in "US:MENS:M", "US" represents size system; "MENS" represents size type; "M" represents size value. In "GIRLS:27", size system is empty; "GIRLS" represents size type; "27" represents size value. In "32 inches", both size system and size type are empty, while size value is "32 inches". A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [size](https://support.google.com/merchants/answer/6324492), [size_type](https://support.google.com/merchants/answer/6324497) and [size_system](https://support.google.com/merchants/answer/6324502). Schema.org property [Product.size](https://schema.org/size). |
| 1374 | "A String", |
| 1375 | ], |
| 1376 | "tags": [ # Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Google Merchant Center property [custom_label_0–4](https://support.google.com/merchants/answer/6324473). |
| 1377 | "A String", |
| 1378 | ], |
| 1379 | "title": "A String", # Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [title](https://support.google.com/merchants/answer/6324415). Schema.org property [Product.name](https://schema.org/name). |
| 1380 | "ttl": "A String", # Input only. The TTL (time to live) of the product. If it is set, expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. |
| 1381 | "type": "A String", # Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset. |
| 1382 | "uri": "A String", # Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [link](https://support.google.com/merchants/answer/6324416). Schema.org property [Offer.url](https://schema.org/url). |
| 1383 | "variants": [ # Output only. Product variants grouped together on primary product which share similar product attributes. It's automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests. |
| 1384 | # Object with schema name: GoogleCloudRetailV2alphaProduct |
| 1385 | ], |
| 1386 | }, |
| 1387 | "setMask": "A String", # Indicates which inventory fields in the provided Product to update. If not set or set with empty paths, all inventory fields will be updated. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned and the entire update will be ignored. |
| 1388 | "setTime": "A String", # The time when the request is issued, used to prevent out-of-order updates on inventory fields with the last update time recorded. If not provided, the internal system time will be used. |
| 1389 | } |
| 1390 | |
| 1391 | x__xgafv: string, V1 error format. |
| 1392 | Allowed values |
| 1393 | 1 - v1 error format |
| 1394 | 2 - v2 error format |
| 1395 | |
| 1396 | Returns: |
| 1397 | An object of the form: |
| 1398 | |
| 1399 | { # This resource represents a long-running operation that is the result of a network API call. |
| 1400 | "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| 1401 | "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. |
| 1402 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 1403 | "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 1404 | { |
| 1405 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 1406 | }, |
| 1407 | ], |
| 1408 | "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. |
| 1409 | }, |
| 1410 | "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| 1411 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 1412 | }, |
| 1413 | "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| 1414 | "response": { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| 1415 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 1416 | }, |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 1417 | }</pre> |
| 1418 | </div> |
| 1419 | |
| 1420 | </body></html> |