### List Customer Media Items Source: https://developers.google.com/my-business/reference/rest/v4/accounts.locations.media.customers/list Demonstrates how to list customer media items for a given location. This example shows the basic HTTP GET request structure. ```HTTP GET https://mybusiness.googleapis.com/v4/{parent=accounts/*/locations/*}/media/customers ``` -------------------------------- ### HTTP Request Example Source: https://developers.google.com/my-business/reference/rest/v4/accounts/listRecommendGoogleLocations This is an example of the HTTP GET request to list recommended Google Locations for a Business Profile account. Ensure you replace 'YOUR_ACCOUNT_ID' with the actual account ID. ```http GET https://mybusiness.googleapis.com/v4/accounts/YOUR_ACCOUNT_ID:recommendGoogleLocations ``` -------------------------------- ### accounts.locations.list with Query Parameters Source: https://developers.google.com/my-business/reference/businessinformation/rest/v1/accounts.locations/list Example of a GET request including query parameters for pagination, filtering, sorting, and specifying returned fields. Replace `YOUR_ACCOUNT_ID` with your account ID and adjust parameters as needed. ```bash GET https://mybusinessbusinessinformation.googleapis.com/v1/accounts/YOUR_ACCOUNT_ID/locations?pageSize=10&pageToken=PAGE_TOKEN&filter=some_filter&orderBy=title&readMask=title,storeCode ``` -------------------------------- ### GET Request for Monthly Search Keyword Impressions Source: https://developers.google.com/my-business/reference/performance/rest/v1/locations.searchkeywords.impressions.monthly/list This example demonstrates how to make a GET request to retrieve monthly search keyword impressions for a specific location within a defined date range. Ensure you replace `12345` with your actual location ID and adjust the `monthlyRange` parameters as needed. ```HTTP GET https://businessprofileperformance.googleapis.com/v1/locations/12345/searchkeywords/impressions/monthly?monthlyRange.start_month.year=2022&monthlyRange.start_month.month=1&monthlyRange.end_month.year=2022&monthlyRange.end_month.month=3 ``` -------------------------------- ### Start Python 2.X Web Server Source: https://developers.google.com/my-business/content/implement-oauth Command to start a simple HTTP server using Python 2.X for serving local files. This is useful for testing the HTML and JavaScript code locally. ```python python -m SimpleHTTPServer 8000 ``` -------------------------------- ### Start Python 3.X Web Server Source: https://developers.google.com/my-business/content/implement-oauth Command to start a simple HTTP server using Python 3.X for serving local files. This is useful for testing the HTML and JavaScript code locally. ```python python -m http.server 8000 ``` -------------------------------- ### Example Resource Path for an Account Source: https://developers.google.com/my-business/content/basic-setup This is an example of a resource path used to identify an account within the Business Profile APIs. ```text accounts/accountId ``` -------------------------------- ### HTTP Request Example Source: https://developers.google.com/my-business/reference/rest/v4/accounts.locations/batchGetReviews This is an example of an HTTP POST request to the batchGetReviews endpoint. It demonstrates how to specify the account name and includes a sample request body with location names, page size, and ordering preferences. ```HTTP POST https://mybusiness.googleapis.com/v4/accounts/accounts/123456789/locations:batchGetReviews { "locationNames": [ "accounts/accounts/123456789/locations/loc1", "accounts/accounts/123456789/locations/loc2" ], "pageSize": 10, "orderBy": "rating desc" } ``` -------------------------------- ### Example Request Body with Destination Account Source: https://developers.google.com/my-business/reference/rest/v4/accounts.locations/transfer An example of the JSON request body, demonstrating how to specify the destination account for the location transfer. ```JSON { "toAccount": "accounts/8675309" } ``` -------------------------------- ### Valid Special Hour Period Examples Source: https://developers.google.com/my-business/reference/businessinformation/rest/v1/accounts.locations Examples demonstrating valid configurations for special hour periods, including date ranges and times. ```text startDate=2015-11-23, openTime=08:00, closeTime=18:00 startDate=2015-11-23, endDate=2015-11-23, openTime=08:00, closeTime=18:00 startDate=2015-11-23, endDate=2015-11-24, openTime=13:00, closeTime=11:59 ``` -------------------------------- ### Fetch Multi Daily Metrics Time Series Example Source: https://developers.google.com/my-business/reference/performance/rest/v1/locations/fetchMultiDailyMetricsTimeSeries This example demonstrates how to fetch website clicks and call clicks for a specific location within a defined date range. It requires the `https://www.googleapis.com/auth/business.manage` scope for authorization. ```HTTP GET https://businessprofileperformance.googleapis.com/v1/locations/12345:fetchMultiDailyMetricsTimeSeries?dailyMetrics=WEBSITE_CLICKS&dailyMetrics=CALL_CLICKS&dailyRange.start_date.year=2022&dailyRange.start_date.month=1&dailyRange.start_date.day=1&dailyRange.end_date.year=2022&dailyRange.end_date.month=3&dailyRange.end_date.day=31 ``` -------------------------------- ### Example Resource Path for a Location Source: https://developers.google.com/my-business/content/basic-setup This is an example of a resource path used to identify a specific location within the Business Profile APIs. ```text locations/locationId ``` -------------------------------- ### Invalid Special Hour Period Examples Source: https://developers.google.com/my-business/reference/businessinformation/rest/v1/accounts.locations Examples illustrating invalid configurations for special hour periods, highlighting common errors in date ranges and times. ```text startDate=2015-11-23, openTime=13:00, closeTime=11:59 startDate=2015-11-23, endDate=2015-11-24, openTime=13:00, closeTime=12:00 startDate=2015-11-23, endDate=2015-11-25, openTime=08:00, closeTime=18:00 ``` -------------------------------- ### Update Food Menus Request Example Source: https://developers.google.com/my-business/content/update-food-menus This example demonstrates a PATCH request to update food menus, including all optional fields like cuisines, labels, sections, items with attributes, and media. ```http PATCH https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/foodMenus ``` ```json { "menus": [ { "cuisines": [ "AMERICAN" ], "labels": [ { "displayName": "Menu", "description": "Main Menu of my Restaurant", "languageCode": "en" } ], "sections": [ { "labels": { "displayName": "Main Dishes", "languageCode": "en" }, "items": [ { "labels": { "displayName": "Dish1", "description": "Dish1 - our original dish!", "languageCode": "en" }, "attributes": { "price": { "currencyCode": "USD", "units": 20 }, "dietaryRestriction": "ORGANIC", "nutritionFacts": { "calories": { "lowerAmount": 400, "upperAmount": 500, "unit": "CALORIE" }, "totalFat": { "lowerAmount": 95, "upperAmount": 110, "unit": "GRAM" }, "cholesterol": { "lowerAmount": 100, "upperAmount": 120, "unit": "MILLIGRAM" }, "sodium": { "lowerAmount": 30, "upperAmount": 45, "unit": "MILLIGRAM" }, "totalCarbohydrate": { "lowerAmount": 78, "upperAmount": 92, "unit": "MILLIGRAM" }, "protein": { "lowerAmount": 25, "upperAmount": 35, "unit":"MILLIGRAM" } }, "ingredients": [ { "labels": [ { "displayName": "Ingredient 1", "description": "Description for ingredient 1", "languageCode": "en" }, { "displayName": "Ingredient 2", "languageCode": "en" } ] } ], "servesNumPeople": 1, "preparationMethods": [ "BAKED", "BOILED", "FRIED" ], "portionSize": { "quantity": 2, "unit": { "displayName": "Pieces", "languageCode": "en" } }, "mediaKeys": [ "AF1QipP_VOlJzXs2aOJ31234565cb2KPrvN" ] }, "options": [ { "labels": ``` -------------------------------- ### Example Filter for Business Calls Insights Source: https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list This example demonstrates how to filter business calls insights by specifying a start date, end date, and metric type. The `AGGREGATE_COUNT` metric type ignores the day part of the date. ```string startDate=2021-08-01 AND endDate=2021-08-10 AND metricType=AGGREGATE_COUNT ``` -------------------------------- ### Initiate Media Upload from Bytes Source: https://developers.google.com/my-business/content/upload-photos Begin the process of uploading media from bytes by calling the startUpload endpoint. The response will contain a resourceName needed for the subsequent upload step. ```http POST https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/media:startUpload ``` -------------------------------- ### Get Daily Metrics Time Series Request Source: https://developers.google.com/my-business/reference/performance/rest/v1/locations/getDailyMetricsTimeSeries Example of an HTTP GET request to retrieve daily website clicks for a location within a specified date range. This demonstrates the required parameters like location ID, daily metric, and date range. ```HTTP GET https://businessprofileperformance.googleapis.com/v1/locations/12345:getDailyMetricsTimeSeries?dailyMetric=WEBSITE_CLICKS&dailyRange.start_date.year=2022&dailyRange.start_date.month=1&dailyRange.start_date.day=1&dailyRange.end_date.year=2022&dailyRange.end_date.month=3&dailyRange.end_date.day=31 ``` -------------------------------- ### Get Chain Source: https://developers.google.com/my-business/reference/businessinformation/rest Gets the specified chain. ```APIDOC ## GET /v1/{name=chains/*} ### Description Gets the specified chain. ### Method GET ### Endpoint /v1/{name=chains/*} ``` -------------------------------- ### v4.accounts.locations.media.startUpload Source: https://developers.google.com/my-business/reference/rest Initiates the media item upload process for a location by generating a MediaItemDataRef. ```APIDOC ## POST /v4/{parent=accounts/*/locations/*}/media:startUpload ### Description Generates a `MediaItemDataRef` for media item uploading. ### Method POST ### Endpoint /v4/{parent=accounts/*/locations/*}/media:startUpload ``` -------------------------------- ### GET /v4/{name=accounts/*} Source: https://developers.google.com/my-business/reference/rest Gets the specified account. This method is deprecated. ```APIDOC ## GET /v4/{name=accounts/*} ### Description Gets the specified account. This method is deprecated. ### Method GET ### Endpoint /v4/{name=accounts/*} ``` -------------------------------- ### v4.accounts.locations.get Source: https://developers.google.com/my-business/reference/rest Gets the specified location. This operation is performed using a GET request. ```APIDOC ## GET /v4/{name=accounts/*/locations/*} ### Description Gets the specified location. ### Method GET ### Endpoint /v4/{name=accounts/*/locations/*} ``` -------------------------------- ### Upload Video from URL Source: https://developers.google.com/my-business/content/upload-photos This example demonstrates how to upload a video to a location using its URL. Set mediaFormat to VIDEO and specify the desired locationAssociation category. ```json POST https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/media { "mediaFormat": "VIDEO", "locationAssociation": { "category": "ADDITIONAL" }, "sourceUrl": “http://example.com/biz/video.mp4" } ``` -------------------------------- ### Get Place Action Link Source: https://developers.google.com/my-business/reference/placeactions/rest/v1/locations.placeActionLinks Gets the specified place action link. ```APIDOC ## get ### Description Gets the specified place action link. ### Method GET (Assumed based on 'get' operation) ### Endpoint `/v1/locations/{locationId}/placeActions/{placeActionId}` (Assumed structure) ### Parameters #### Path Parameters - **locationId** (string) - Required - The identifier of the location. - **placeActionId** (string) - Required - The identifier of the place action link to retrieve. ``` -------------------------------- ### v4.accounts.locations.localPosts.get Source: https://developers.google.com/my-business/reference/rest Gets the specified local post. This operation is performed using a GET request. ```APIDOC ## GET /v4/{name=accounts/*/locations/*/localPosts/*} ### Description Gets the specified local post. ### Method GET ### Endpoint /v4/{name=accounts/*/locations/*/localPosts/*} ``` -------------------------------- ### v4.accounts.locations.followers.getMetadata Source: https://developers.google.com/my-business/reference/rest Get the followers settings for a location. This operation is performed using a GET request. ```APIDOC ## GET /v4/{name=accounts/*/locations/*/followers/metadata} ### Description Get the followers settings for a location. ### Method GET ### Endpoint /v4/{name=accounts/*/locations/*/followers/metadata} ``` -------------------------------- ### Pacing API Requests with Delays Source: https://developers.google.com/my-business/content/limits Demonstrates how to introduce delays between API requests to ensure even distribution and stay within QPM limits. ```python import time # Pace requests to stay within the 300 QPM limit (5 requests/sec) for request in batch_requests: send_request(request) time.sleep(0.2) # 200ms delay ensures a smooth distribution ``` -------------------------------- ### v4.accounts.locations.getServiceList Source: https://developers.google.com/my-business/reference/rest Get the specified service list of a location. This operation is performed using a GET request. ```APIDOC ## GET /v4/{name=accounts/*/locations/*/serviceList} ### Description Get the specified service list of a location. ### Method GET ### Endpoint /v4/{name=accounts/*/locations/*/serviceList} ``` -------------------------------- ### v4.accounts.locations.getGoogleUpdated Source: https://developers.google.com/my-business/reference/rest Gets the Google-updated version of the specified location. This operation is performed using a GET request. ```APIDOC ## GET /v4/{name=accounts/*/locations/*}:googleUpdated ### Description Gets the Google-updated version of the specified location. ### Method GET ### Endpoint /v4/{name=accounts/*/locations/*}:googleUpdated ``` -------------------------------- ### List Accounts with Page Size and Filter Source: https://developers.google.com/my-business/reference/rest/v4/accounts/list Demonstrates how to specify the number of accounts per page and filter the results by account type using query parameters. ```HTTP GET https://mybusiness.googleapis.com/v4/accounts?pageSize=10&filter=type%3DUSER_GROUP ``` -------------------------------- ### DrivingDirectionMetricsRequest Example Source: https://developers.google.com/my-business/reference/rest/v4/accounts.locations/reportInsights Example of a request body for driving direction insights, specifying the number of days and language code. ```json { "numDays": 30, "languageCode": "en" } ``` -------------------------------- ### Upload Media from Bytes (Initiate) Source: https://developers.google.com/my-business/content/upload-photos Initiates the process for uploading media from bytes. This call returns a resource name to be used in subsequent steps. ```APIDOC ## POST /v4/accounts/{accountId}/locations/{locationId}/media:startUpload ### Description Initiates an upload of media from bytes. This API call returns a `MediaItemDataRef` containing a `resourceName` that is required for the subsequent byte upload step. ### Method POST ### Endpoint `https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/media:startUpload` ### Response #### Success Response (200) - **resourceName** (string) - The resource name provided by Google for the media upload. ``` -------------------------------- ### Japanese Address Example (Kanji/Kana) Source: https://developers.google.com/my-business/content/japan-address-format-spec This is an example of a Japanese address in Kanji/Kana format, showing the postal code and address details. ```text 〒106-0032 東京都港区六本木6丁目10−1 ``` -------------------------------- ### List Customer Media Items with Pagination Source: https://developers.google.com/my-business/reference/rest/v4/accounts.locations.media.customers/list Shows how to list customer media items with specified page size and token for pagination. This is useful for retrieving large sets of media. ```HTTP GET https://mybusiness.googleapis.com/v4/{parent=accounts/*/locations/*}/media/customers?pageSize=200&pageToken=somePageToken ``` -------------------------------- ### Upload Media Bytes (Video) Source: https://developers.google.com/my-business/content/upload-photos Use this curl command to upload video bytes. Ensure you provide the correct file path and the resourceName obtained from the startUpload call. ```bash curl -X POST -T ~/Downloads/videoToUpload.mp4 "https://mybusiness.googleapis.com/upload/v1/media/{GoogleProvidedValue}?upload_type=media" ``` -------------------------------- ### Upload Media Bytes (Photo) Source: https://developers.google.com/my-business/content/upload-photos After initiating the upload, use this curl command to upload the actual photo bytes. Replace ~/Downloads/pictureToUpload.jpg with the path to your file and {GoogleProvidedValue} with the resourceName from the startUpload response. ```bash curl -X POST -T ~/Downloads/pictureToUpload.jpg "https://mybusiness.googleapis.com/upload/v1/media/{GoogleProvidedValue}?upload_type=media" ``` -------------------------------- ### HTTP Request for Get Metadata Source: https://developers.google.com/my-business/reference/rest/v4/accounts.locations.followers/getMetadata This snippet shows the GET request to retrieve follower metadata for a location. It requires the location's resource name in the URL. ```HTTP GET https://mybusiness.googleapis.com/v4/{name=accounts/*/locations/*/followers/metadata} ``` -------------------------------- ### accounts.locations.media.startUpload Source: https://developers.google.com/my-business/reference/rest/v4/accounts.locations.media/startUpload Generates a MediaItemDataRef for initiating media uploads to a specified Google My Business location. This method uses an HTTP POST request and requires the location's resource name as a path parameter. The request body must be empty, and the response contains the MediaItemDataRef object. ```APIDOC ## POST accounts.locations.media:startUpload ### Description Generates a `MediaItemDataRef` for initiating media uploads to a specified Google My Business location. ### Method POST ### Endpoint `https://mybusiness.googleapis.com/v4/{parent=accounts/*/locations/*}/media:startUpload` ### Path Parameters * **parent** (string) - Required - The resource name of the location this media item is to be added to. ### Request Body The request body must be empty. ### Response Body If successful, the response body contains an instance of `MediaItemDataRef`. ### Authorization Scopes Requires one of the following OAuth scopes: * `https://www.googleapis.com/auth/plus.business.manage` * `https://www.googleapis.com/auth/business.manage` ``` -------------------------------- ### Initiate Verification Process Source: https://developers.google.com/my-business/content/manage-verification After choosing a verification method, initiate the verification process with `locations.verify`. This call moves the location to a verified state or returns an error status. ```APIDOC ## Initiate the verification process After you choose a verification method, initiate the verification process with `locations.verify`. As a result of this call, the location moves to a verified state or an error status is returned. ``` POST https://mybusinessverifications.googleapis.com/v1/locations/{locationId} :verify // Use only one of the below verification methods // For postcard verification: { "method": "ADDRESS", "languageCode": "en", "addressInput": { "mailerContactName": "Ann Droyd" } } // For phone verification: { "method": "PHONE_CALL", "languageCode": "en", "phoneInput": { "phoneNumber": "800-555-0136" } } // For SMS verification: { "method": "SMS", "languageCode": "en", "phoneInput": { "phoneNumber": "800-555-0136" } } // For email verification: { "method": "EMAIL", "languageCode": "en", "emailInput": { "emailAddress": "ex@google.com" } } ``` ``` -------------------------------- ### HTTP Request for Get Voice of Merchant State Source: https://developers.google.com/my-business/reference/verifications/rest/v1/locations/getVoiceOfMerchantState This is the basic HTTP GET request to retrieve the Voice of Merchant state for a given location. Ensure the 'name' path parameter is correctly formatted. ```HTTP GET https://mybusinessverifications.googleapis.com/v1/{name=locations/*}/VoiceOfMerchantState ``` -------------------------------- ### List Accounts with Filter and Pagination Source: https://developers.google.com/my-business/reference/accountmanagement/rest/v1/accounts/list Example of listing accounts, filtering by type 'USER_GROUP', and paginating results with a page size of 10 and a specific page token. ```HTTP GET https://mybusinessaccountmanagement.googleapis.com/v1/accounts?filter=type%3DUSER_GROUP&pageSize=10&pageToken=somePageToken ``` -------------------------------- ### Finalize Photo Upload from Bytes Source: https://developers.google.com/my-business/content/upload-photos Complete the upload of photo bytes by calling Media.Create. Use the resourceName received from the startUpload step and specify the mediaFormat as PHOTO. ```json POST https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/media { "mediaFormat": "PHOTO", "locationAssociation": { "category": "COVER" }, "dataRef": { "resourceName": "GoogleProvidedValue" } } ``` -------------------------------- ### List reviews using Java Client Library Source: https://developers.google.com/my-business/content/review-data The following function uses Mybusiness.Accounts.Locations.Reviews.List to retrieve and print all reviews for a given location. Ensure you have the Mybusiness client library configured. ```Java /** * Returns a list of reviews. * @param locationName Name of the location to retrieve reviews for. * @return List A list of reviews. * @throws Exception */ public static List listReviews(String locationName) throws Exception { Mybusiness.Accounts.Locations.Reviews.List reviewsList = mybusiness.accounts().locations().reviews().list(locationName); ListReviewsResponse response = accountsList.execute(); List reviews = response.getReviews(); for (Reviews review : reviews) { System.out.println(review.toPrettyString()); } return reviews; } ``` -------------------------------- ### v4.accounts.locations.media.create Source: https://developers.google.com/my-business/reference/rest Creates a new media item for the specified location. ```APIDOC ## POST /v4/{parent=accounts/*/locations/*}/media ### Description Creates a new media item for the location. ### Method POST ### Endpoint /v4/{parent=accounts/*/locations/*}/media ``` -------------------------------- ### HTTP GET Request for Business Categories Source: https://developers.google.com/my-business/reference/businessinformation/rest/v1/categories/batchGet Use this GET request to retrieve business categories. You must provide at least one GConcept ID in the `names[]` parameter and specify the `languageCode` and `view`. The `regionCode` is optional. ```HTTP GET https://mybusinessbusinessinformation.googleapis.com/v1/categories:batchGet?names[]=//businesscategories.googleapis.com/categories/123&names[]=//businesscategories.googleapis.com/categories/456&languageCode=en®ionCode=US&view=FULL ``` -------------------------------- ### Create a Call to Action Post Source: https://developers.google.com/my-business/content/posts-data Create posts with a prominent call to action button. Specify the `actionType` (e.g., ORDER, BOOK) and the target `url`. This example sets `topicType` to `OFFER`, but it can be adjusted based on the CTA's purpose. ```HTTP $ POST https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/localPosts { "languageCode": "en-US", "summary": "Order your Thanksgiving turkeys now!!", "callToAction": { "actionType": "ORDER", "url": "http://google.com/order_turkeys_here", }, "media": [ { "mediaFormat": "PHOTO", "sourceUrl": "https://www.google.com/real-turkey-photo.jpg", } ], "topicType": "OFFER" } ``` -------------------------------- ### Create Admin Source: https://developers.google.com/my-business/reference/accountmanagement/rest/v1/locations.admins Invites the specified user to become an administrator for the specified location. ```APIDOC ## `create` Invites the specified user to become an administrator for the specified location. ``` -------------------------------- ### getServiceList Source: https://developers.google.com/my-business/reference/rest/v4/accounts.locations Get the specified service list of a location. ```APIDOC ## getServiceList ### Description Get the specified service list of a location. ### Method GET ### Endpoint /v4/accounts/{accountId}/locations/{locationName}:getServiceList ``` -------------------------------- ### accounts.admins.create Source: https://developers.google.com/my-business/reference/accountmanagement/rest/v1/accounts.admins/create Invites the specified user to become an administrator for the specified account. The invitee must accept the invitation in order to be granted access to the account. ```APIDOC ## POST https://mybusinessaccountmanagement.googleapis.com/v1/{parent=accounts/*}/admins ### Description Invites the specified user to become an administrator for the specified account. The invitee must accept the invitation in order to be granted access to the account. ### Method POST ### Endpoint `https://mybusinessaccountmanagement.googleapis.com/v1/{parent=accounts/*}/admins` ### Path Parameters * **parent** (string) - Required. The resource name of the account this admin is created for. `accounts/{account_id}`. ### Request Body The request body must contain an instance of the `Admin` object. ### Response Body If successful, the response body contains a newly created instance of `Admin`. ### Authorization Scopes Requires the following OAuth scope: * `https://www.googleapis.com/auth/business.manage` ``` -------------------------------- ### getGoogleUpdated Source: https://developers.google.com/my-business/reference/rest/v4/accounts.locations Gets the Google-updated version of the specified location. ```APIDOC ## getGoogleUpdated ### Description Gets the Google-updated version of the specified location. ### Method GET ### Endpoint /v4/accounts/{accountId}/locations/{locationName}:getGoogleUpdated ``` -------------------------------- ### Methods Source: https://developers.google.com/my-business/reference/rest/v4/chains Available methods for interacting with the Chain resource. ```APIDOC ## Methods ### `get` Gets the specified chain. ### `search` Searches the chain based on chain name. ``` -------------------------------- ### accounts.locations.batchGet Source: https://developers.google.com/my-business/reference/rest/v4/accounts.locations/batchGet Gets all of the specified locations in the given account. ```APIDOC ## POST accounts.locations.batchGet ### Description Gets all of the specified locations in the given account. ### Method POST ### Endpoint `https://mybusiness.googleapis.com/v4/{name=accounts/*}/locations:batchGet` ### Path Parameters * **name** (string) - Required - The name of the account from which to fetch locations. ### Request Body #### Request Body Structure ```json { "locationNames": [ string ] } ``` #### Fields * **locationNames[]** (string) - Required - A collection of locations to fetch, specified by their names. ### Response Body #### Success Response (200) Response message for Locations.BatchGetLocations. #### Response Structure ```json { "locations": [ { object (Location) } ] } ``` #### Fields * **locations[]** (object (Location)) - A collection of locations. ### Authorization Scopes Requires one of the following OAuth scopes: * `https://www.googleapis.com/auth/plus.business.manage` * `https://www.googleapis.com/auth/business.manage` ``` -------------------------------- ### v4.accounts.locations.questions.create Source: https://developers.google.com/my-business/reference/rest Adds a new question for the specified location. ```APIDOC ## POST /v4/{parent=accounts/*/locations/*}/questions ### Description Adds a question for the specified location. ### Method POST ### Endpoint /v4/{parent=accounts/*/locations/*}/questions ``` -------------------------------- ### GetGoogleUpdatedLocation Source: https://developers.google.com/my-business/reference/businessinformation/rpc Gets the Google-updated version of the specified location. ```APIDOC ## GetGoogleUpdatedLocation ### Description Gets the Google-updated version of the specified location. ### Method GET ### Endpoint /v1/{name}=locations/{locationId}:getGoogleUpdated ### Parameters #### Path Parameters - **name** (string) - Required - The name of the location to retrieve. Format: `locations/{locationId}`. ``` -------------------------------- ### Predefined Services Response Example Source: https://developers.google.com/my-business/content/services This is a partial response from the `categories.list` endpoint, showing supported `ServiceTypes` for a given category. Each service type includes a `serviceTypeId` and `displayName`. ```JSON { "categories": [ { "name": "gcid:hair_salon", "displayName": "Hairdresser", "serviceTypes": [ { "serviceTypeId": "job_type_id:body_waxing", "displayName": "Body Waxing" }, { "serviceTypeId": "job_type_id:hair_coloring", "displayName": "Hair coloring" }, { "serviceTypeId": "job_type_id:hair_extensions", "displayName": "Hair extensions" }, { "serviceTypeId": "job_type_id:hair_styling", "displayName": "Hair styling" }, { "serviceTypeId": "job_type_id:manicures", "displayName": "Manicures" }, { "serviceTypeId": "job_type_id:pedicures", "displayName": "Pedicures" } ] } } ``` -------------------------------- ### Get Location Source: https://developers.google.com/my-business/reference/businessinformation/rest Retrieves the details of a specific location. ```APIDOC ## GET /v1/{name=locations/*} ### Description Returns the specified location. ### Method GET ### Endpoint `/v1/{name=locations/*}` ```