This Recommendations AI documentation references the Recommendations console. We recommend switching to the Retail console and using the Retail documentation, which documents Recommendations AI, the Retail console, and Retail Search.

If you are using the v1beta version of Recommendations AI, migrate to the Retail API version.

Method: projects.locations.catalogs.branches.products.patch

Updates a Product.

HTTP request

PATCH https://retail.googleapis.com/v2beta/{product.name=projects/*/locations/*/catalogs/*/branches/*/products/**}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
product.name

string

Immutable. Full resource name of the product, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/productId.

Query parameters

Parameters
updateMask

string (FieldMask format)

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.

The attribute key can be updated by setting the mask path as "attributes.${key_name}". If a key name is present in the mask but not in the patching product from the request, this key will be deleted after the update.

This is a comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".

allowMissing

boolean

If set to true, and the Product is not found, a new Product will be created. In this situation, updateMask is ignored.

Request body

The request body contains an instance of Product.

Response body

If successful, the response body contains an instance of Product.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • retail.products.update

For more information, see the IAM documentation.