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: accounts.updatelabels
Stay organized with collections
Save and categorize content based on your preferences.
Updates labels that are assigned to the Merchant Center account by CSS user.
HTTP request
POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/accounts/{accountId}/updatelabels
Path parameters
Parameters |
merchantId |
string
The ID of the managing account.
|
accountId |
string
The ID of the account whose labels are updated.
|
Request body
The request body contains an instance of AccountsUpdateLabelsRequest
.
Response body
If successful, the response body contains data with the following structure:
JSON representation |
{
"kind": string
} |
Fields |
kind |
string
Identifies what kind of resource this is. Value: the fixed string "content#accountsUpdateLabelsResponse ".
|
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/content
For more information, see the OAuth 2.0 Overview.
AccountsUpdateLabelsRequest
JSON representation |
{
"labelIds": [
string
]
} |
Fields |
labelIds[] |
string
The IDs of labels that should be assigned to the account.
|
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\u003eUpdates labels assigned to a Merchant Center account by a CSS user.\u003c/p\u003e\n"],["\u003cp\u003eRequires a POST request to the specified URL with merchant ID and account ID as path parameters.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must contain an AccountsUpdateLabelsRequest object specifying the label IDs to be assigned.\u003c/p\u003e\n"],["\u003cp\u003eUpon successful execution, the response will contain a confirmation with kind as \u003ccode\u003econtent#accountsUpdateLabelsResponse\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/content\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["This document details the process for updating labels on a Merchant Center account via an API. It uses a `POST` request to `updatelabels` with the managing account's `merchantId` and the target account's `accountId` in the path. The request body, an `AccountsUpdateLabelsRequest`, includes an array `labelIds` to assign. The successful response includes a JSON with the field `kind` equal to `content#accountsUpdateLabelsResponse`. The request requires the `https://www.googleapis.com/auth/content` authorization scope.\n"],null,["# Method: accounts.updatelabels\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.AccountsUpdateLabelsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [AccountsUpdateLabelsRequest](#AccountsUpdateLabelsRequest)\n - [JSON representation](#AccountsUpdateLabelsRequest.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nUpdates labels that are assigned to the Merchant Center account by CSS user.\n\n### HTTP request\n\n`POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/accounts/{accountId}/updatelabels`\n\n### Path parameters\n\n| Parameters ||\n|--------------|----------------------------------------------------------|\n| `merchantId` | `string` The ID of the managing account. |\n| `accountId` | `string` The ID of the account whose labels are updated. |\n\n### Request body\n\nThe request body contains an instance of [AccountsUpdateLabelsRequest](/shopping-content/reference/rest/v2.1/accounts/updatelabels#AccountsUpdateLabelsRequest).\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------|\n| ``` { \"kind\": string } ``` |\n\n| Fields ||\n|--------|----------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Identifies what kind of resource this is. Value: the fixed string \"`content#accountsUpdateLabelsResponse`\". |\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).\n\nAccountsUpdateLabelsRequest\n---------------------------\n\n| JSON representation |\n|------------------------------------|\n| ``` { \"labelIds\": [ string ] } ``` |\n\n| Fields ||\n|--------------|--------------------------------------------------------------------|\n| `labelIds[]` | `string` The IDs of labels that should be assigned to the account. |"]]