Google Business Performance API یک روش API
جدید دارد که امکان واکشی چندین «DailyMetrics» را در یک درخواست API فراهم میکند.
زمانبندی منسوخ شدن و دستورالعملهای انتقال از روش API reportInsights v4 به API عملکرد نمایه کسبوکار Google را مرور کنید.
Method: accounts.locations.questions.answers.upsert
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
پاسخی ایجاد می کند یا پاسخ موجود نوشته شده توسط کاربر برای سوال مشخص شده را به روز می کند. یک کاربر فقط می تواند برای هر سوال یک پاسخ ایجاد کند.
درخواست HTTP
POST https://mybusiness.googleapis.com/v4/{parent=accounts/*/locations/*/questions/*}/answers:upsert
URL از دستور GRPC Transcoding استفاده می کند.
پارامترهای مسیر
پارامترها |
---|
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 Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[[["\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)."]]