Resource: CatalogItem
CatalogItem captures all metadata information of items to be recommended.
JSON representation | |
---|---|
{ "id": string, "categoryHierarchies": [ { object ( |
Fields | |
---|---|
id |
Required. Catalog item identifier. UTF-8 encoded string with a length limit of 128 bytes. This id must be unique among all catalog items within the same catalog. It should also be used when logging user events in order for the user events to be joined with the Catalog. |
categoryHierarchies[] |
Required. Catalog item categories. This field is repeated for supporting one catalog item belonging to several parallel category hierarchies. For example, if a shoes product belongs to both ["Shoes & Accessories" -> "Shoes"] and ["Sports & Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented as:
|
title |
Required. Catalog item title. UTF-8 encoded string with a length limit of 1 KiB. |
description |
Optional. Catalog item description. UTF-8 encoded string with a length limit of 5 KiB. |
itemAttributes |
Optional. Highly encouraged. Extra catalog item attributes to be included in the recommendation model. For example, for retail 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 item attributes here. |
languageCode |
Optional. Deprecated. The model automatically detects the text language. Your catalog can include text in different languages, but duplicating catalog items to provide text in multiple languages can result in degraded model performance. |
tags[] |
Optional. Filtering tags associated with the catalog item. Each tag should be a UTF-8 encoded string with a length limit of 1 KiB. This tag can be used for filtering recommendation results by passing the tag as part of the predict request filter. |
itemGroupId |
Optional. Variant group identifier for prediction results. UTF-8 encoded string with a length limit of 128 bytes. This field must be enabled before it can be used. Learn more. |
productMetadata |
Optional. Metadata specific to retail products. |
ProductCatalogItem
ProductCatalogItem captures item metadata specific to retail products.
JSON representation | |
---|---|
{ "costs": { string: number, ... }, "currencyCode": string, "stockState": enum ( |
Fields | ||
---|---|---|
costs |
Optional. A map to pass the costs associated with the product. For example: {"manufacturing": 45.5} The profit of selling this item is computed like so:
|
|
currencyCode |
Optional. Only required if the price is set. Currency code for price/costs. Use three-character ISO-4217 code. |
|
stockState |
Optional. Online stock state of the catalog item. Default is |
|
availableQuantity |
Optional. The available quantity of the item. |
|
canonicalProductUri |
Optional. Canonical URL directly linking to the item detail page with a length limit of 5 KiB.. |
|
images[] |
Optional. Product images for the catalog item. |
|
Union field price . Product price. Only one of 'exactPrice'/'priceRange' can be provided. price can be only one of the following: |
||
exactPrice |
Optional. The exact product price. |
|
priceRange |
Optional. The product price range. |
ExactPrice
Exact product price.
JSON representation | |
---|---|
{ "displayPrice": number, "originalPrice": number } |
Fields | |
---|---|
displayPrice |
Optional. Display price of the product. |
originalPrice |
Optional. Price of the product without any discount. If zero, by default set to be the 'displayPrice'. |
PriceRange
Product price range when there are a range of prices for different variations of the same product.
JSON representation | |
---|---|
{ "min": number, "max": number } |
Fields | |
---|---|
min |
Required. The minimum product price. |
max |
Required. The maximum product price. |
Image
Catalog item thumbnail/detail image.
JSON representation | |
---|---|
{ "uri": string, "height": integer, "width": integer } |
Fields | |
---|---|
uri |
Required. URL of the image with a length limit of 5 KiB. |
height |
Optional. Height of the image in number of pixels. |
width |
Optional. Width of the image in number of pixels. |
Methods |
|
---|---|
|
Creates a catalog item. |
|
Deletes a catalog item. |
|
Gets a specific catalog item. |
|
Bulk import of multiple catalog items. |
|
Gets a list of catalog items. |
|
Updates a catalog item. |