Method: accounts.emailPreferences.updateEmailPreferences
Updates the email preferences for a Merchant Center account user. MCA users should specify the MCA account rather than a sub-account of the MCA.
Preferences which are not explicitly selected in the update mask will not be updated.
It is invalid for updates to specify an UNCONFIRMED opt-in status value.
Use the name=accounts/*/users/me/emailPreferences alias to update preferences for the authenticated user.
HTTP request
PATCH https://merchantapi.googleapis.com/accounts/v1beta/{emailPreferences.name=accounts/*/users/*/emailPreferences}
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
emailPreferences.name |
string
Identifier. The name of the EmailPreferences. The endpoint is only supported for the authenticated user.
|
Query parameters
Parameters |
updateMask |
string (FieldMask format)
Required. List of fields being updated. The following fields are supported (in both snake_case and lowerCamelCase ):
|
Request body
The request body contains an instance of EmailPreferences
.
Response body
If successful, the response body contains an instance of EmailPreferences
.
Authorization scopes
Requires the following OAuth scope:
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-01-23 UTC.
[null,null,["Last updated 2025-01-23 UTC."],[[["This operation updates email preferences for a Merchant Center account user, focusing on the authenticated user."],["Only specified preferences within the `updateMask` will be modified, leaving others untouched."],["The request requires a `PATCH` call to a specific endpoint with path and query parameters."],["Request and response bodies utilize the `EmailPreferences` resource for data exchange."],["Authorization requires the `https://www.googleapis.com/auth/content` scope."]]],["This describes updating email preferences for a Merchant Center account user via a PATCH request to `https://merchantapi.googleapis.com/accounts/v1beta/{emailPreferences.name=accounts/*/users/*/emailPreferences}`. The request must include an `updateMask` query parameter specifying which fields to update (e.g., `newsAndTips`). The request body contains the new `EmailPreferences` values. The user should use the `name=accounts/*/users/me/emailPreferences` alias to update their preferences. The `https://www.googleapis.com/auth/content` OAuth scope is required. Successful updates return an instance of `EmailPreferences`.\n"]]