Method: accounts.locations.questions.answers.upsert
Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Создает ответ или обновляет существующий ответ, написанный пользователем на указанный вопрос. Пользователь может создать только один ответ на вопрос.
HTTP-запрос
POST https://mybusiness.googleapis.com/v4/{parent=accounts/*/locations/*/questions/*}/answers:upsert
URL-адрес использует синтаксис транскодирования gRPC .
Параметры пути
Параметры |
---|
parent | string Название вопроса, на который нужно написать ответ. |
Тело запроса
Тело запроса содержит данные следующей структуры:
JSON-представление |
---|
{
"answer": {
object (Answer )
}
} |
Поля |
---|
answer | object ( Answer ) Новый ответ. |
Тело ответа
В случае успеха тело ответа содержит экземпляр Answer
.
Области авторизации
Требуется одна из следующих областей OAuth:
-
https://www.googleapis.com/auth/plus.business.manage
-
https://www.googleapis.com/auth/business.manage
Дополнительную информацию см. в обзоре OAuth 2.0 .
Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons "С указанием авторства 4.0", а примеры кода – по лицензии Apache 2.0. Подробнее об этом написано в правилах сайта. Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2025-07-25 UTC.
[null,null,["Последнее обновление: 2025-07-25 UTC."],[[["\u003cp\u003eThis document details the process for creating or updating an answer to a question on a Google My Business location using the \u003ccode\u003eanswers:upsert\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires specifying the question's name in the URL path and providing the new answer content in the request body.\u003c/p\u003e\n"],["\u003cp\u003eA successful response will return the complete \u003ccode\u003eAnswer\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization is required using specific OAuth scopes related to Google My Business management.\u003c/p\u003e\n"],["\u003cp\u003eThe API utilizes gRPC Transcoding for structuring the request URL.\u003c/p\u003e\n"]]],[],null,["# Method: accounts.locations.questions.answers.upsert\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization Scopes](#body.aspect)\n\nCreates an answer or updates the existing answer written by the user for the specified question. A user can only create one answer per question.\n\n### HTTP request\n\n`POST https://mybusiness.googleapis.com/v4/{parent=accounts/*/locations/*/questions/*}/answers:upsert`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-----------------------------------------------------------|\n| `parent` | `string` The name of the question to write an answer for. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation ||\n|---------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"answer\": { object (/my-business/reference/rest/v4/accounts.locations.questions.answers#Answer) } } ``` |\n\n| Fields ||\n|----------|-------------------------------------------------------------------------------------------------------------------|\n| `answer` | `object (`[Answer](/my-business/reference/rest/v4/accounts.locations.questions.answers#Answer)`)` The new answer. |\n\n### Response body\n\nIf successful, the response body contains an instance of [Answer](/my-business/reference/rest/v4/accounts.locations.questions.answers#Answer).\n\n### Authorization Scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/plus.business.manage`\n- `https://www.googleapis.com/auth/business.manage`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]