Method: categories.batchGet
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מחזירה רשימה של קטגוריות עסקיות עבור השפה ומזהי GConcept שצוינו.
בקשת HTTP
GET https://mybusiness.googleapis.com/v4/categories:batchGet
בכתובת ה-URL נעשה שימוש בתחביר המרת קידוד של gRPC.
פרמטרים של שאילתה
פרמטרים |
languageCode |
string
חובה. קוד השפה של BCP 47 שבו צריך להחזיר את שמות הקטגוריות.
|
categoryIds[] |
string
חובה. יש להגדיר שם אחד לפחות. מזהי GConcept שעבורם צריך להחזיר את שמות הקטגוריות שהותאמו לשוק המקומי.
|
regionCode |
string
זה שינוי אופציונלי. קוד המדינה בפורמט ISO 3166-1 alpha-2 המשמש להסקת השפה שאינה סטנדרטית.
|
view |
enum (CategoryView )
חובה. מציינת אילו חלקים של המשאב 'קטגוריה' יוחזרו בתשובה.
|
גוף הבקשה
גוף הבקשה חייב להיות ריק.
גוף התשובה
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכיל נתונים במבנה הבא:
הודעת תגובה בנושא קטגוריות העסק.BatchGetBusiness categories.
ייצוג JSON |
{
"categories": [
{
object (Category )
}
]
} |
שדות |
categories[] |
object (Category )
קטגוריות שתואמות למזהי GConcept שצוינו בבקשה. הם לא יופיעו באותו סדר כמו מזהי הקטגוריות בבקשה.
|
היקפי הרשאות
נדרש אחד מהיקפי ההרשאות הבאים של OAuth:
https://www.googleapis.com/auth/plus.business.manage
https://www.googleapis.com/auth/business.manage
למידע נוסף, קראו את המאמר סקירה כללית של OAuth 2.0.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[[["\u003cp\u003eReturns localized business category names for specified GConcept IDs and language.\u003c/p\u003e\n"],["\u003cp\u003eRequires providing GConcept IDs and language code as query parameters in a GET request.\u003c/p\u003e\n"],["\u003cp\u003eResponse includes a list of categories matching the provided GConcept IDs.\u003c/p\u003e\n"],["\u003cp\u003eRequires \u003ccode\u003ehttps://www.googleapis.com/auth/plus.business.manage\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/business.manage\u003c/code\u003e scope for authorization.\u003c/p\u003e\n"]]],[],null,["# Method: categories.batchGet\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.BatchGetBusinessCategoriesResponse.SCHEMA_REPRESENTATION)\n- [Authorization Scopes](#body.aspect)\n\nReturns a list of business categories for the provided language and GConcept ids.\n\n### HTTP request\n\n`GET https://mybusiness.googleapis.com/v4/categories:batchGet`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|-----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `languageCode` | `string` Required. The BCP 47 code of language that the category names should be returned in. |\n| `categoryIds[]` | `string` Required. At least one name must be set. The GConcept ids the localized category names should be returned for. |\n| `regionCode` | `string` Optional. The ISO 3166-1 alpha-2 country code used to infer non-standard language. |\n| `view` | `enum (`[CategoryView](/my-business/reference/rest/v4/CategoryView)`)` Required. Specifies which parts to the Category resource should be returned in the response. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\nResponse message for BusinessCategories.BatchGetBusinessCategories.\n\n| JSON representation ||\n|-----------------------------------------------------------------------------------------------|---|\n| ``` { \"categories\": [ { object (/my-business/reference/rest/v4/categories#Category) } ] } ``` |\n\n| Fields ||\n|----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `categories[]` | `object (`[Category](/my-business/reference/rest/v4/categories#Category)`)` Categories that match the GConcept ids provided in the request. They will not come in the same order as category ids in the request. |\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)."]]