- [HTTP request](https://docs.cloud.google.com/gemini-enterprise-cx/ai-commerce-search/reference/rest/v2/projects.locations.catalogs.branches.products/patch.md.txt#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/gemini-enterprise-cx/ai-commerce-search/reference/rest/v2/projects.locations.catalogs.branches.products/patch.md.txt#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/gemini-enterprise-cx/ai-commerce-search/reference/rest/v2/projects.locations.catalogs.branches.products/patch.md.txt#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/gemini-enterprise-cx/ai-commerce-search/reference/rest/v2/projects.locations.catalogs.branches.products/patch.md.txt#body.request_body)
- [Response body](https://docs.cloud.google.com/gemini-enterprise-cx/ai-commerce-search/reference/rest/v2/projects.locations.catalogs.branches.products/patch.md.txt#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/gemini-enterprise-cx/ai-commerce-search/reference/rest/v2/projects.locations.catalogs.branches.products/patch.md.txt#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/gemini-enterprise-cx/ai-commerce-search/reference/rest/v2/projects.locations.catalogs.branches.products/patch.md.txt#body.aspect_1)
- [Try it!](https://docs.cloud.google.com/gemini-enterprise-cx/ai-commerce-search/reference/rest/v2/projects.locations.catalogs.branches.products/patch.md.txt#try-it)

Updates a `Product`.

### HTTP request

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

The URL uses [gRPC Transcoding](https://google.aip.dev/127) 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](https://docs.cloud.google.com/docs/authentication.md.txt#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:

- `retail.products.update`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).