{ "basePath": "", "baseUrl": "https://mybusiness.googleapis.com/", "batchPath": "batch", "canonicalName": "My Business", "description": "The Google My Business API provides an interface for managing business location information on Google.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/my-business/", "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" }, "id": "mybusiness:v4", "kind": "discovery#restDescription", "mtlsRootUrl": "https://mybusiness.mtls.googleapis.com/", "name": "mybusiness", "ownerDomain": "google.com", "ownerName": "Google", "parameters": { "$.xgafv": { "description": "V1 error format.", "enum": [ "1", "2" ], "enumDescriptions": [ "v1 error format", "v2 error format" ], "location": "query", "type": "string" }, "access_token": { "description": "OAuth access token.", "location": "query", "type": "string" }, "alt": { "default": "json", "description": "Data format for response.", "enum": [ "json", "media", "proto" ], "enumDescriptions": [ "Responses with Content-Type of application/json", "Media download with context-dependent Content-Type", "Responses with Content-Type of application/x-protobuf" ], "location": "query", "type": "string" }, "callback": { "description": "JSONP", "location": "query", "type": "string" }, "fields": { "description": "Selector specifying which fields to include in a partial response.", "location": "query", "type": "string" }, "key": { "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", "location": "query", "type": "string" }, "oauth_token": { "description": "OAuth 2.0 token for the current user.", "location": "query", "type": "string" }, "prettyPrint": { "default": "true", "description": "Returns response with indentations and line breaks.", "location": "query", "type": "boolean" }, "quotaUser": { "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", "location": "query", "type": "string" }, "uploadType": { "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "location": "query", "type": "string" }, "upload_protocol": { "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "location": "query", "type": "string" } }, "protocol": "rest", "resources": { "accounts": { "methods": { "create": { "description": "Creates an account with the specified name and type under the given parent.\n", "flatPath": "v4/accounts", "httpMethod": "POST", "id": "mybusiness.accounts.create", "parameterOrder": [], "parameters": { "primaryOwner": { "description": "The resource name of the account which will be the primary owner of the\naccount being created. It should be of the form `accounts/{account_id}/`.", "location": "query", "type": "string" } }, "path": "v4/accounts", "request": { "$ref": "Account" }, "response": { "$ref": "Account" } }, "deleteNotifications": { "description": "Clears the pubsub notification settings for the account.", "flatPath": "v4/accounts/{accountsId}/notifications", "httpMethod": "DELETE", "id": "mybusiness.accounts.deleteNotifications", "parameterOrder": [ "name" ], "parameters": { "name": { "description": "The resource name for the notification settings to be cleared.", "location": "path", "pattern": "^accounts/[^/]+/notifications$", "required": true, "type": "string" } }, "path": "v4/{+name}", "response": { "$ref": "Empty" } }, "generateAccountNumber": { "description": "Generates an account number for this account. The account number is not\nprovisioned when an account is created. Use this request to create an\naccount number when it is required.", "flatPath": "v4/accounts/{accountsId}:generateAccountNumber", "httpMethod": "POST", "id": "mybusiness.accounts.generateAccountNumber", "parameterOrder": [ "name" ], "parameters": { "name": { "description": "The name of the account to generate an account number for.", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, "type": "string" } }, "path": "v4/{+name}:generateAccountNumber", "request": { "$ref": "GenerateAccountNumberRequest" }, "response": { "$ref": "Account" } }, "get": { "description": "Gets the specified account. Returns `NOT_FOUND` if the\naccount does not exist or if the caller does not have access rights to it.", "flatPath": "v4/accounts/{accountsId}", "httpMethod": "GET", "id": "mybusiness.accounts.get", "parameterOrder": [ "name" ], "parameters": { "name": { "description": "The name of the account to fetch.", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, "type": "string" } }, "path": "v4/{+name}", "response": { "$ref": "Account" } }, "getNotifications": { "description": "Returns the pubsub notification settings for the account.", "flatPath": "v4/accounts/{accountsId}/notifications", "httpMethod": "GET", "id": "mybusiness.accounts.getNotifications", "parameterOrder": [ "name" ], "parameters": { "name": { "description": "The notification settings resource name.", "location": "path", "pattern": "^accounts/[^/]+/notifications$", "required": true, "type": "string" } }, "path": "v4/{+name}", "response": { "$ref": "Notifications" } }, "list": { "description": "Lists all of the accounts for the authenticated user. This includes all\naccounts that the user owns, as well as any accounts for which the user\nhas management rights.", "flatPath": "v4/accounts", "httpMethod": "GET", "id": "mybusiness.accounts.list", "parameterOrder": [], "parameters": { "filter": { "description": "A filter constraining the accounts to return. The response includes\nonly entries that match the filter. If `filter` is empty, then no\nconstraints are applied and all accounts (paginated) are retrieved for\nthe requested account.\n\nFor example, a request with the filter `type=USER_GROUP` will only return\nuser groups.", "location": "query", "type": "string" }, "name": { "description": "The resource name of the account for which the list of directly accessible\naccounts is to be retrieved. This only makes sense for Organizations and\nUser Groups. If empty, will return `ListAccounts` for the authenticated\nuser.", "location": "query", "type": "string" }, "pageSize": { "description": "How many accounts to fetch per page. Default is 20,\nminimum is 2, and maximum page size is 20.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { "description": "If specified, the next page of accounts is retrieved. The `pageToken` is\nreturned when a call to `accounts.list` returns more results than can fit\ninto the requested page size.", "location": "query", "type": "string" } }, "path": "v4/accounts", "response": { "$ref": "ListAccountsResponse" } }, "listRecommendGoogleLocations": { "description": "List all the GoogleLocations that\nhave been recommended to the specified GMB account.\nRecommendations are provided for personal accounts and location groups\nonly, requests for all other account types will result in an error.\nThe recommendations for location groups are based on the locations in that\ngroup.\n\nThe recommendations for personal accounts are based on all of\nthe locations that the user has access to on Google My Business (which\nincludes locations they can access through location groups), and is a\nsuperset of all recommendations generated for the user.", "flatPath": "v4/accounts/{accountsId}:recommendGoogleLocations", "httpMethod": "GET", "id": "mybusiness.accounts.listRecommendGoogleLocations", "parameterOrder": [ "name" ], "parameters": { "name": { "description": "Name of the account resource to fetch recommended Google locations for.", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, "type": "string" }, "pageSize": { "description": "How many locations to fetch per page. Default is 25, minimum is 1, and\nmaximum page size is 100.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { "description": "If specified, the next page of locations is retrieved.", "location": "query", "type": "string" } }, "path": "v4/{+name}:recommendGoogleLocations", "response": { "$ref": "ListRecommendedGoogleLocationsResponse" } }, "update": { "description": "Updates the specified business account. Personal accounts cannot be\nupdated using this method.\n", "flatPath": "v4/accounts/{accountsId}", "httpMethod": "PUT", "id": "mybusiness.accounts.update", "parameterOrder": [ "name" ], "parameters": { "name": { "description": "The name of the account to update.", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, "type": "string" }, "validateOnly": { "description": "If true, the request is validated without actually updating the account.", "location": "query", "type": "boolean" } }, "path": "v4/{+name}", "request": { "$ref": "Account" }, "response": { "$ref": "Account" } }, "updateNotifications": { "description": "Sets the pubsub notification settings for the account informing My Business\nwhich topic to send pubsub notifications for:\n\n- New reviews for locations administered by the account.\n- Updated reviews for locations administered by the account.\n- New `GoogleUpdates` for locations administered by the account.\n\nAn account will only have one notification settings resource, and only one\npubsub topic can be set.", "flatPath": "v4/accounts/{accountsId}/notifications", "httpMethod": "PUT", "id": "mybusiness.accounts.updateNotifications", "parameterOrder": [ "name" ], "parameters": { "name": { "description": "The notification settings resource name.", "location": "path", "pattern": "^accounts/[^/]+/notifications$", "required": true, "type": "string" } }, "path": "v4/{+name}", "request": { "$ref": "Notifications" }, "response": { "$ref": "Notifications" } } }, "resources": { "admins": { "methods": { "create": { "description": "Invites the specified user to become an administrator for the specified\naccount. The invitee must accept the invitation in order to be granted\naccess to the account. See AcceptInvitation to programmatically accept an\ninvitation.", "flatPath": "v4/accounts/{accountsId}/admins", "httpMethod": "POST", "id": "mybusiness.accounts.admins.create", "parameterOrder": [ "parent" ], "parameters": { "parent": { "description": "The resource name of the account this admin is created for.", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, "type": "string" } }, "path": "v4/{+parent}/admins", "request": { "$ref": "Admin" }, "response": { "$ref": "Admin" } }, "delete": { "description": "Removes the specified admin from the specified account.", "flatPath": "v4/accounts/{accountsId}/admins/{adminsId}", "httpMethod": "DELETE", "id": "mybusiness.accounts.admins.delete", "parameterOrder": [ "name" ], "parameters": { "name": { "description": "The resource name of the admin to remove from the account.", "location": "path", "pattern": "^accounts/[^/]+/admins/[^/]+$", "required": true, "type": "string" } }, "path": "v4/{+name}", "response": { "$ref": "Empty" } }, "list": { "description": "Lists the admins for the specified account.", "flatPath": "v4/accounts/{accountsId}/admins", "httpMethod": "GET", "id": "mybusiness.accounts.admins.list", "parameterOrder": [ "parent" ], "parameters": { "parent": { "description": "The name of the account from which to retrieve a list of admins.", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, "type": "string" } }, "path": "v4/{+parent}/admins", "response": { "$ref": "ListAccountAdminsResponse" } }, "patch": { "description": "Updates the Admin for the specified Account Admin. Only the AdminRole of\nthe Admin can be updated.", "flatPath": "v4/accounts/{accountsId}/admins/{adminsId}", "httpMethod": "PATCH", "id": "mybusiness.accounts.admins.patch", "parameterOrder": [ "name" ], "parameters": { "name": { "description": "The resource name of the admin to update.", "location": "path", "pattern": "^accounts/[^/]+/admins/[^/]+$", "required": true, "type": "string" } }, "path": "v4/{+name}", "request": { "$ref": "Admin" }, "response": { "$ref": "Admin" } } } }, "invitations": { "methods": { "accept": { "description": "Accepts the specified invitation.", "flatPath": "v4/accounts/{accountsId}/invitations/{invitationsId}:accept", "httpMethod": "POST", "id": "mybusiness.accounts.invitations.accept", "parameterOrder": [ "name" ], "parameters": { "name": { "description": "The name of the invitation that is being accepted.", "location": "path", "pattern": "^accounts/[^/]+/invitations/[^/]+$", "required": true, "type": "string" } }, "path": "v4/{+name}:accept", "request": { "$ref": "AcceptInvitationRequest" }, "response": { "$ref": "Empty" } }, "decline": { "description": "Declines the specified invitation.", "flatPath": "v4/accounts/{accountsId}/invitations/{invitationsId}:decline", "httpMethod": "POST", "id": "mybusiness.accounts.invitations.decline", "parameterOrder": [ "name" ], "parameters": { "name": { "description": "The name of the account invitation that is being declined.", "location": "path", "pattern": "^accounts/[^/]+/invitations/[^/]+$", "required": true, "type": "string" } }, "path": "v4/{+name}:decline", "request": { "$ref": "DeclineInvitationRequest" }, "response": { "$ref": "Empty" } }, "list": { "description": "Lists pending invitations for the specified account.", "flatPath": "v4/accounts/{accountsId}/invitations", "httpMethod": "GET", "id": "mybusiness.accounts.invitations.list", "parameterOrder": [ "parent" ], "parameters": { "parent": { "description": "The name of the account from which the list of invitations is being\nretrieved.", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, "type": "string" }, "targetType": { "description": "Specifies which target types should appear in the response.", "enum": [ "ALL", "ACCOUNTS_ONLY", "LOCATIONS_ONLY" ], "location": "query", "type": "string" } }, "path": "v4/{+parent}/invitations", "response": { "$ref": "ListInvitationsResponse" } } } }, "locations": { "methods": { "associate": { "description": "Associates a location to a place ID. Any previous association is\noverwritten. This operation is only valid if the location is unverified.\nThe association must be valid, that is, it appears in the list of\n`FindMatchingLocations`.", "flatPath": "v4/accounts/{accountsId}/locations/{locationsId}:associate", "httpMethod": "POST", "id": "mybusiness.accounts.locations.associate", "parameterOrder": [ "name" ], "parameters": { "name": { "description": "The resource name of the location to associate.", "location": "path", "pattern": "^accounts/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, "path": "v4/{+name}:associate", "request": { "$ref": "AssociateLocationRequest" }, "response": { "$ref": "Empty" } }, "batchGet": { "description": "Gets all of the specified locations in the given account.", "flatPath": "v4/accounts/{accountsId}/locations:batchGet", "httpMethod": "POST", "id": "mybusiness.accounts.locations.batchGet", "parameterOrder": [ "name" ], "parameters": { "name": { "description": "The name of the account from which to fetch locations.", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, "type": "string" } }, "path": "v4/{+name}/locations:batchGet", "request": { "$ref": "BatchGetLocationsRequest" }, "response": { "$ref": "BatchGetLocationsResponse" } }, "batchGetReviews": { "description": "Returns the paginated list of reviews for all specified locations.\nThis operation is only valid if the specified locations are verified.\n", "flatPath": "v4/accounts/{accountsId}/locations:batchGetReviews", "httpMethod": "POST", "id": "mybusiness.accounts.locations.batchGetReviews", "parameterOrder": [ "name" ], "parameters": { "name": { "description": "The name of the account from which to retrieve a list of reviews across\nmultiple locations.", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, "type": "string" } }, "path": "v4/{+name}/locations:batchGetReviews", "request": { "$ref": "BatchGetReviewsRequest" }, "response": { "$ref": "BatchGetReviewsResponse" } }, "clearAssociation": { "description": "Clears an association between a location and its place ID. This\noperation is only valid if the location is unverified.", "flatPath": "v4/accounts/{accountsId}/locations/{locationsId}:clearAssociation", "httpMethod": "POST", "id": "mybusiness.accounts.locations.clearAssociation", "parameterOrder": [ "name" ], "parameters": { "name": { "description": "The resource name of the location to disassociate.", "location": "path", "pattern": "^accounts/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, "path": "v4/{+name}:clearAssociation", "request": { "$ref": "ClearLocationAssociationRequest" }, "response": { "$ref": "Empty" } }, "create": { "description": "Creates a new location owned by the\nspecified account, and returns it.", "flatPath": "v4/accounts/{accountsId}/locations", "httpMethod": "POST", "id": "mybusiness.accounts.locations.create", "parameterOrder": [ "parent" ], "parameters": { "parent": { "description": "The name of the account in which to create this location.", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, "type": "string" }, "requestId": { "description": "A unique request ID for the server to detect duplicated requests.\nWe recommend using UUIDs. Max length is 50 characters.", "location": "query", "type": "string" }, "validateOnly": { "description": "If true, the request is validated without actually creating the location.", "location": "query", "type": "boolean" } }, "path": "v4/{+parent}/locations", "request": { "$ref": "Location" }, "response": { "$ref": "Location" } }, "delete": { "description": "Deletes a location.\n\n