rocket
Meet
Merchant API
- the official successor to Content API for Shopping.
update
Get the latest
on new Merchant API features, bug fixes, and updates.
add_alert
Note: Content API for Shopping will be sunset on August 18, 2026.
Method: products.update
Stay organized with collections
Save and categorize content based on your preferences.
Updates an existing product in your Merchant Center account. Only updates attributes provided in the request.
HTTP request
PATCH https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/products/{productId}
Path parameters
Parameters |
merchantId |
string
The ID of the account that contains the product. This account cannot be a multi-client account.
|
productId |
string
The REST ID of the product for which to update.
|
Query parameters
Parameters |
updateMask |
string (FieldMask format)
The comma-separated list of product attributes to be updated. Example: "title,salePrice" . Attributes specified in the update mask without a value specified in the body will be deleted from the product. You must specify the update mask to delete attributes. Only top-level product attributes can be updated. If not defined, product attributes with set values will be updated and other attributes will stay unchanged.
|
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 one of the following OAuth scopes:
https://www.googleapis.com/auth/content
For more information, see the OAuth 2.0 Overview.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-25 UTC.
[null,null,["Last updated 2025-02-25 UTC."],[[["\u003cp\u003eThis operation updates an existing product in your Merchant Center account, modifying only the attributes specified in the request.\u003c/p\u003e\n"],["\u003cp\u003eYou need to use an HTTP PATCH request with the product and merchant IDs in the URL path.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003eupdateMask\u003c/code\u003e query parameter lets you control which attributes are updated or deleted, requiring a FieldMask format for listing the target attributes.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should contain a \u003ccode\u003eProduct\u003c/code\u003e object with the desired updates, and the successful response will return the updated \u003ccode\u003eProduct\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/content\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],["This document details how to update a product in a Merchant Center account using a PATCH request. The `merchantId` and `productId` are required as path parameters. The `updateMask` query parameter specifies which product attributes to modify or delete. The request body contains the updated product information, while the response body returns the updated product. This operation needs the `https://www.googleapis.com/auth/content` OAuth scope for authorization. The request endpoint is `https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/products/{productId}`.\n"],null,["# Method: products.update\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nUpdates an existing product in your Merchant Center account. Only updates attributes provided in the request.\n\n### HTTP request\n\n`PATCH https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/products/{productId}`\n\n### Path parameters\n\n| Parameters ||\n|--------------|------------------------------------------------------------------------------------------------------------------------------|\n| `merchantId` | `string` The ID of the account that contains the product. This account cannot be a multi-client account. |\n| `productId` | `string` The [REST ID](/shopping-content/reference/rest/v2.1/products#Product.FIELDS.id) of the product for which to update. |\n\n### Query parameters\n\n| Parameters ||\n|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` The comma-separated list of product attributes to be updated. Example: `\"title,salePrice\"`. Attributes specified in the update mask without a value specified in the body will be deleted from the product. *You must specify the update mask to delete attributes.* Only top-level product attributes can be updated. If not defined, product attributes with set values will be updated and other attributes will stay unchanged. |\n\n### Request body\n\nThe request body contains an instance of [Product](/shopping-content/reference/rest/v2.1/products#Product).\n\n### Response body\n\nIf successful, the response body contains an instance of [Product](/shopping-content/reference/rest/v2.1/products#Product).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/content`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]