Method: accounts.locations.patch
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מעדכן את המיקום שצוין.
מותר להוסיף תמונות רק במיקום שיש לו דף Google+.
הפונקציה מחזירה את הערך NOT_FOUND
אם המיקום לא קיים.
בקשת HTTP
PATCH https://mybusiness.googleapis.com/v4/{name=accounts/*/locations/*}
בכתובת ה-URL נעשה שימוש בתחביר המרת gRPC.
פרמטרים של נתיב
פרמטרים |
name |
string
שם המיקום שיש לעדכן.
|
פרמטרים של שאילתה
פרמטרים |
updateMask |
string (FieldMask format)
השדות הספציפיים לעדכון. אם לא צוינה מסכה, המערכת תתייחס לכך כאל עדכון מלא וכל השדות יוגדרו לערכים שיועברו, כולל ביטול ההגדרה של שדות ריקים בבקשה. זוהי רשימה של שמות שדות מלאים, שמופרדים בפסיקים. דוגמה: "user.displayName,photo"
|
validateOnly |
boolean
אם True, הבקשה מאומתת בלי לעדכן בפועל את המיקום.
|
attributeMask |
string (FieldMask format)
מזהי המאפיינים שיש לעדכן. רק המאפיינים שצוינו במסכה יעודכנו. אם יש מאפיין במסכה אבל לא במיקום עצמו, הוא יוסר. מסיכה ריקה תעדכן את כל המאפיינים. בכל פעם שמגדירים את השדה הזה, ה-updateMask צריך לכלול מאפיינים כאחד מהשדות לעדכון. זוהי רשימה של שמות שדות מלאים, שמופרדים בפסיקים. דוגמה: "user.displayName,photo"
|
גוף הבקשה
גוף הבקשה מכיל מופע של Location
.
גוף התגובה
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכלול מופע של Location
.
היקפי הרשאות
כדי להשתמש בתכונה הזו יש צורך באחד מההיקפים הבאים של 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\u003eThis document outlines how to update a specific Google My Business location using the \u003ccode\u003ePATCH\u003c/code\u003e HTTP request method.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires specifying the location's name in the URL path and can include optional query parameters like \u003ccode\u003eupdateMask\u003c/code\u003e, \u003ccode\u003evalidateOnly\u003c/code\u003e, and \u003ccode\u003eattributeMask\u003c/code\u003e to control the update process.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should contain a \u003ccode\u003eLocation\u003c/code\u003e object with the desired updates, and a successful response will return the updated \u003ccode\u003eLocation\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization is necessary and requires one of the specified OAuth scopes: \u003ccode\u003ehttps://www.googleapis.com/auth/plus.business.manage\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/business.manage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003ePhotos can only be added to locations with an associated Google+ page, and attempting to update a non-existent location results in a \u003ccode\u003eNOT_FOUND\u003c/code\u003e error.\u003c/p\u003e\n"]]],["This describes updating a location using a `PATCH` request to the specified URL. The location is identified by its `name` in the path. Updates are controlled by the `updateMask` and `attributeMask` query parameters. A boolean `validateOnly` parameter allows for request validation without making changes. The request and response bodies both use a Location object. Authorization requires specific OAuth scopes. A location must have a Google+ page to be updated with photos, and requests for non-existent locations return `NOT_FOUND`.\n"],null,["# Method: accounts.locations.patch\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization Scopes](#body.aspect)\n\nUpdates the specified location.\n\nPhotos are only allowed on a location that has a Google+ page.\n\nReturns `NOT_FOUND` if the location does not exist.\n\n### HTTP request\n\n`PATCH https://mybusiness.googleapis.com/v4/{name=accounts/*/locations/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|----------------------------------------------|\n| `name` | `string` The name of the location to update. |\n\n### Query parameters\n\n| Parameters ||\n|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `updateMask` | `string (`[FieldMask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask)` format)` The specific fields to update. If no mask is specified, then this is treated as a full update and all fields are set to the values passed in, which may include unsetting empty fields in the request. This is a comma-separated list of fully qualified names of fields. Example: `\"user.displayName,photo\"`. |\n| `validateOnly` | `boolean` If true, the request is validated without actually updating the location. |\n| `attributeMask` | `string (`[FieldMask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask)` format)` The IDs of the attributes to update. Only attributes noted in the mask will be updated. If an attribute is present in the mask and not in the location, it will be removed. An empty mask will update all attributes. Whenever this field is set, the updateMask should include attributes as one of the fields to update. This is a comma-separated list of fully qualified names of fields. Example: `\"user.displayName,photo\"`. |\n\n### Request body\n\nThe request body contains an instance of [Location](/my-business/reference/rest/v4/accounts.locations#Location).\n\n### Response body\n\nIf successful, the response body contains an instance of [Location](/my-business/reference/rest/v4/accounts.locations#Location).\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)."]]