---
title: "POST /v1beta1/{+parent}/catalogItems"
method: POST
path: "/v1beta1/{+parent}/catalogItems"
tags: ["projects"]
---

# POST /v1beta1/{+parent}/catalogItems

`POST /v1beta1/{+parent}/catalogItems`

Creates a catalog item.

## Path parameters

- `parent` string, required

## Request body

- GoogleCloudRecommendationengineV1beta1CatalogItem — CatalogItem captures all metadata information of items to be recommended.
  - `description` string — Optional. Catalog item description. UTF-8 encoded string with a length limit of 5 KiB.
  - `title` string — Required. Catalog item title. UTF-8 encoded string with a length limit of 1 KiB.
  - `productMetadata` GoogleCloudRecommendationengineV1beta1ProductCatalogItem — ProductCatalogItem captures item metadata specific to retail products.
    - `exactPrice` GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice — Exact product price.
      - `displayPrice` number, float — Optional. Display price of the product.
      - `originalPrice` number, float — Optional. Price of the product without any discount. If zero, by default set to be the 'displayPrice'.
    - `costs` object — 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: * If 'exactPrice' is provided, profit = displayPrice - sum(costs) * If 'priceRange' is provided, profit = minPrice - sum(costs)
    - `availableQuantity` string, int64 — Optional. The available quantity of the item.
    - `canonicalProductUri` string — Optional. Canonical URL directly linking to the item detail page with a length limit of 5 KiB..
    - `priceRange` GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange — Product price range when there are a range of prices for different variations of the same product.
      - `max` number, float — Required. The maximum product price.
      - `min` number, float — Required. The minimum product price.
    - `stockState` 'STOCK_STATE_UNSPECIFIED' | 'IN_STOCK' | 'OUT_OF_STOCK' | 'PREORDER' | 'BACKORDER' — Optional. Online stock state of the catalog item. Default is `IN_STOCK`.
    - `images` GoogleCloudRecommendationengineV1beta1Image[] — Optional. Product images for the catalog item.
      - `uri` string — Required. URL of the image with a length limit of 5 KiB.
      - `height` integer — Optional. Height of the image in number of pixels.
      - `width` integer — Optional. Width of the image in number of pixels.
    - `currencyCode` string — Optional. Only required if the price is set. Currency code for price/costs. Use three-character ISO-4217 code.
  - `tags` string[] — 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` string — 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](/recommendations-ai/docs/catalog#item-group-id).
  - `itemAttributes` GoogleCloudRecommendationengineV1beta1FeatureMap — FeatureMap represents extra features that customers want to include in the recommendation model for catalogs/user events as categorical/numerical features.
    - `categoricalFeatures` object — Categorical features that can take on one of a limited number of possible values. Some examples would be the brand/maker of a product, or country of a customer. Feature names and values must be UTF-8 encoded strings. For example: `{ "colors": {"value": ["yellow", "green"]}, "sizes": {"value":["S", "M"]}`
    - `numericalFeatures` object — Numerical features. Some examples would be the height/weight of a product, or age of a customer. Feature names must be UTF-8 encoded strings. For example: `{ "lengths_cm": {"value":[2.3, 15.4]}, "heights_cm": {"value":[8.1, 6.4]} }`
  - `id` string — 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.
  - `languageCode` string — 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.
  - `categoryHierarchies` GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy[] — 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: "categoryHierarchies": [ { "categories": ["Shoes & Accessories", "Shoes"]}, { "categories": ["Sports & Fitness", "Athletic Clothing", "Shoes"] } ]
    - `categories` string[] — Required. Catalog item categories. Each category should be a UTF-8 encoded string with a length limit of 2 KiB. Note that the order in the list denotes the specificity (from least to most specific).

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/recommendationengine.md) · [All operations](https://skmtc.net/google/apis/recommendationengine/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/recommendationengine/versions/c67ad3b20e58/schema)
