The Q&A API is now launched! Migration work is required. Please see our deprecation schedule for more information related to deprecated endpoints. You may also sign up for our mailing list to receive updates.

Package google.mybusiness.businessinformation.v1

Index

AttributesService

Allows clients to lookup and update attributes for a given location.

GetAttributes

rpc GetAttributes(GetAttributesRequest) returns (Attributes)

Looks up all the attributes set for a given location.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

GetGoogleUpdatedAttributes

rpc GetGoogleUpdatedAttributes(GetGoogleUpdatedAttributesRequest) returns (Attributes)

Gets the Google-updated version of the specified location.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

ListAttributeMetadata

rpc ListAttributeMetadata(ListAttributeMetadataRequest) returns (ListAttributeMetadataResponse)

Returns the list of attributes that would be available for a location with the given primary category and country.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

UpdateAttributes

rpc UpdateAttributes(UpdateAttributesRequest) returns (Attributes)

Update attributes for a given location.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

CategoriesService

This API provides information about supported categories for business locations on Google. For reference, see the categories section of this article: https://support.google.com/business/answer/3038177

BatchGetCategories

rpc BatchGetCategories(BatchGetCategoriesRequest) returns (BatchGetCategoriesResponse)

Returns a list of business categories for the provided language and GConcept ids.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

ListCategories

rpc ListCategories(ListCategoriesRequest) returns (ListCategoriesResponse)

Returns a list of business categories. Search will match the category name but not the category ID.

Search only matches the front of a category name (that is, 'food' may return 'Food Court' but not 'Fast Food Restaurant').

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

Chains

A service for looking up information about a Chain business.

GetChain

rpc GetChain(GetChainRequest) returns (Chain)

Gets the specified chain. Returns NOT_FOUND if the chain does not exist.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

SearchChains

rpc SearchChains(SearchChainsRequest) returns (SearchChainsResponse)

Searches the chain based on chain name.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

GoogleLocations

This API allows access and search GoogleLocation.

SearchGoogleLocations

rpc SearchGoogleLocations(SearchGoogleLocationsRequest) returns (SearchGoogleLocationsResponse)

Search all of the possible locations that are a match to the specified request.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

Locations

This API allows management of business locations on Google.

AssociateLocation

rpc AssociateLocation(AssociateLocationRequest) returns (Empty)

Associates a location to a place ID. Any previous association is overwritten. This operation is only valid if the location is unverified. The association must be valid, that is, it appears in the list of SearchGoogleLocations.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

ClearLocationAssociation

rpc ClearLocationAssociation(ClearLocationAssociationRequest) returns (Empty)

Clears an association between a location and its place ID. This operation is only valid if the location is unverified.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

CreateLocation

rpc CreateLocation(CreateLocationRequest) returns (Location)

Creates a new Location that will be owned by the logged in user.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

DeleteLocation

rpc DeleteLocation(DeleteLocationRequest) returns (Empty)

Deletes a location.

If this location cannot be deleted using the API and it is marked so in the google.mybusiness.businessinformation.v1.LocationState, use the Business Profile website.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

GetGoogleUpdatedLocation

rpc GetGoogleUpdatedLocation(GetGoogleUpdatedLocationRequest) returns (GoogleUpdatedLocation)

Gets the Google-updated version of the specified location.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

GetLocation

rpc GetLocation(GetLocationRequest) returns (Location)

Returns the specified location.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

ListLocations

rpc ListLocations(ListLocationsRequest) returns (ListLocationsResponse)

Lists the locations for the specified account.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

UpdateLocation

rpc UpdateLocation(UpdateLocationRequest) returns (Location)

Updates the specified location.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

AdWordsLocationExtensions

Additional information that is surfaced in AdWords.

Fields
ad_phone

string

Required. An alternate phone number to display on AdWords location extensions instead of the location's primary phone number.

AssociateLocationRequest

Request message for Locations.AssociateLocationRequest.

Fields
name

string

Required. The resource name of the location to associate.

place_id

string

The association to establish. If not set, it indicates no match.

Attribute

A location attribute. Attributes provide additional information about a location. The attributes that can be set on a location may vary based on the properties of that location (for example, category). Available attributes are determined by Google and may be added and removed without API changes.

Fields
name

string

Required. The resource name for this attribute.

value_type

AttributeValueType

Output only. The type of value that this attribute contains. This should be used to determine how to interpret the value.

values[]

Value

The values for this attribute. The type of the values supplied must match that expected for that attribute. This is a repeated field where multiple attribute values may be provided. Attribute types only support one value.

repeated_enum_value

RepeatedEnumAttributeValue

When the attribute value type is REPEATED_ENUM, this contains the attribute value, and the other values fields must be empty.

uri_values[]

UriAttributeValue

When the attribute value type is URL, this field contains the value(s) for this attribute, and the other values fields must be empty.

AttributeMetadata

Metadata for an attribute. Contains display information for the attribute, including a localized name and a heading for grouping related attributes together.

Fields
parent

string

The unique identifier for the attribute.

value_type

AttributeValueType

The value type for the attribute. Values set and retrieved should be expected to be of this type.

display_name

string

The localized display name for the attribute, if available; otherwise, the English display name.

group_display_name

string

The localized display name of the group that contains this attribute, if available; otherwise, the English group name. Related attributes are collected into a group and should be displayed together under the heading given here.

repeatable

bool

If true, the attribute supports multiple values. If false, only a single value should be provided.

value_metadata[]

AttributeValueMetadata

For some types of attributes (for example, enums), a list of supported values and corresponding display names for those values is provided.

deprecated

bool

If true, the attribute is deprecated and should no longer be used. If deprecated, updating this attribute will not result in an error, but updates will not be saved. At some point after being deprecated, the attribute will be removed entirely and it will become an error.

AttributeValueMetadata

Metadata for supported attribute values.

Fields
value

Value

The attribute value.

display_name

string

The display name for this value, localized where available; otherwise, in English. The value display name is intended to be used in context with the attribute display name.

For example, for a "WiFi" enum attribute, this could contain "Paid" to represent paid Wi-Fi.

AttributeValueType

The value type of the attribute.

Enums
ATTRIBUTE_VALUE_TYPE_UNSPECIFIED Not specified.
BOOL The values for this attribute are boolean values.
ENUM The attribute has a predetermined list of available values that can be used. Metadata for this attribute will list these values.
URL The values for this attribute are URLs.
REPEATED_ENUM The attribute value is an enum with multiple possible values that can be explicitly set or unset.

Attributes

A container for all the attributes for a given location.

Fields
name

string

Required. Google identifier for this location in the form of locations/{location_id}/attributes.

attributes[]

Attribute

A collection of attributes that need to be updated.

BatchGetCategoriesRequest

Request message for BusinessCategories.BatchGetBusinessCategories.

Fields
names[]

string

Required. At least one name must be set. The GConcept ids the localized category names should be returned for. To return details for more than one category, repeat this parameter in the request.

language_code

string

Required. The BCP 47 code of language that the category names should be returned in.

region_code

string

Optional. The ISO 3166-1 alpha-2 country code used to infer non-standard language.

view

CategoryView

Required. Specifies which parts to the Category resource should be returned in the response.

BatchGetCategoriesResponse

Response message for BusinessCategories.BatchGetBusinessCategories.

Fields
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.

BusinessHours

Represents the time periods that this location is open for business. Holds a collection of [TimePeriod][google.mybusiness.mybusinessinformation.v1.TimePeriod] instances.

Fields
periods[]

TimePeriod

Required. A collection of times that this location is open for business. Each period represents a range of hours when the location is open during the week.

Categories

A collection of categories that describes the business. During updates, both fields must be set. Clients are prohibited from individually updating the primary or additional categories using the update mask.

Fields
primary_category

Category

Required. Category that best describes the core business this location engages in.

additional_categories[]

Category

Optional. Additional categories to describe your business. Categories help your customers find accurate, specific results for services they're interested in. To keep your business information accurate and live, make sure that you use as few categories as possible to describe your overall core business. Choose categories that are as specific as possible, but representative of your main business.

Category

A category describing what this business is (not what it does). For a list of valid category IDs, and the mappings to their human-readable names, see categories.list.

Fields
name

string

Required. A stable ID (provided by Google) for this category. The value must be specified when modifying the category (when creating or updating a location).

display_name

string

Output only. The human-readable name of the category. This is set when reading the location. When modifying the location, category_id must be set.

service_types[]

ServiceType

Output only. A list of all the service types that are available for this business category.

more_hours_types[]

MoreHoursType

Output only. More hours types that are available for this business category.

CategoryView

An enum to help limit the amount of data returned by the server.

Enums
CATEGORY_VIEW_UNSPECIFIED Not specified, equivalent to CATEGORY_METADATA_ONLY.
BASIC The server response will only include Category fields display_name, category_id and language_code. It omits any service type metadata related fields.
FULL Returns all the fields in the response.

Chain

A chain is a brand that your business's locations can be affiliated with.

Fields
name

string

Required. The chain's resource name, in the format chains/{chain_id}.

chain_names[]

ChainName

Names of the chain.

websites[]

ChainUri

Websites of the chain.

location_count

int32

Number of locations that are part of this chain.

ChainName

Name to be used when displaying the chain.

Fields
display_name

string

The display name for this chain.

language_code

string

The BCP 47 code of language of the name.

ChainUri

Url to be used when displaying the chain.

Fields
uri

string

The uri for this chain.

ClearLocationAssociationRequest

Request message for Locations.ClearLocationAssociationRequest.

Fields
name

string

Required. The resource name of the location to disassociate.

CreateLocationRequest

Request message for Locations.CreateLocation.

Fields
parent

string

Required. The name of the account in which to create this location.

location

Location

Required. The new location metadata.

validate_only

bool

Optional. If true, the request is validated without actually creating the location.

request_id

string

Optional. A unique request ID for the server to detect duplicated requests. We recommend using UUIDs. Max length is 50 characters.

DeleteLocationRequest

Request message for Locations.DeleteLocation.

Fields
name

string

Required. The name of the location to delete.

ErrorCode

All errors codes returned by the API.

Enums
ERROR_CODE_UNSPECIFIED Missing error code.
INVALID_ATTRIBUTE_NAME One of the attributes provided cannot be applied to this location. Only attributes returned in the ListAttributeMetadata response maybe be applied to this location. All problematic attribute names will be returned in the attribute_names key under metadata.
ASSOCIATE_OPERATION_ON_VERIFIED_LOCATION This error is returned when a client tries to associate a location or clear a location association on a location that is in verified state.
ASSOCIATE_LOCATION_INVALID_PLACE_ID The place_id provided in the associateLocation request is not a match for the location or is invalid. Ensure that the place_id being set matches one of the IDs being returned in the SearchGoogleLocations response.
LAT_LNG_UPDATES_NOT_PERMITTED This project is not allowed to update the lat/lng field on the Location. You may either update the lat/lng using the pin drop functionality in the UI or provide us with an address.
PO_BOX_IN_ADDRESS_NOT_ALLOWED PO box cannot be used in address. Metadata keys include "field_mask".
BLOCKED_REGION Due to international sanctions that we are obliged to comply with, we are unable to accept businesses from this region. Metadata keys include "field_maks".
MISSING_BOTH_PHONE_AND_WEBSITE Either a phone or a website is required for CUSTOMER_LOCATION_ONLY businesses. Metadata keys include "field_mask".
MISSING_STOREFRONT_ADDRESS_OR_SAB All Locations must have at least a storefront address or a service area. Metadata keys include "field_mask".
LAT_LNG_TOO_FAR_FROM_ADDRESS The latitude/longitude and address pair are too far apart. Metadata keys include "field_mask".
LAT_LNG_REQUIRED The specified address cannot be located. Please provide a latitude/longitude. Metadata keys include "field_mask".
INVALID_CHARACTERS Invalid characters are found. Metadata keys include "field_mask" and "invalid_characters".
FORBIDDEN_WORDS Forbidden words are found. Metadata keys include "field_mask" and "forbidden_words".
INVALID_INTERCHANGE_CHARACTERS Invalid characters are found. Metadata keys include "field_mask".
FIELDS_REQUIRED_FOR_CATEGORY Additional fields are required for this category of location. Metadata keys include "field_mask", "value", and "fields_required".
STOREFRONT_REQUIRED_FOR_CATEGORY Your business category requires a storefront location customers can visit. Metadata keys include "field_mask".
ADDRESS_MISSING_REGION_CODE Address is missing required region_code. Metadata keys include "field_mask".
ADDRESS_EDIT_CHANGES_COUNTRY The address cannot be moved to different country. Metadata keys include "field_mask".
SPECIAL_HOURS_SET_WITHOUT_REGULAR_HOURS Special hours can only be specified if the location has regular business hours. Metadata empty.
INVALID_TIME_SCHEDULE Invalid time schedule, overlapped or end time is earlier than start time. Metadata keys include "field_mask".
INVALID_HOURS_VALUE Invalid hours format or value. Metadata keys include "field_mask".
OVERLAPPED_SPECIAL_HOURS Special_hours cannot overlap. Metadata keys include "field_mask".
INCOMPATIBLE_MORE_HOURS_TYPE_FOR_CATEGORY Your business primary category doesn't support this hours type. Metadata keys include "field_mask" and "incompatible_hours_type".
DUPLICATE_CHILDREN_LOCATIONS Duplicate children_locations in relationship_data. Metadata keys include "field_mask".
INCOMPATIBLE_SERVICE_AREA_AND_CATEGORY A service area business cannot have the selected primary category. Metadata keys include "field_mask".
INVALID_SERVICE_AREA_PLACE_ID Invalid place_id in service_area. Metadata keys include "field_mask" and "place_id".
INVALID_AREA_TYPE_FOR_SERVICE_AREA Invalid area type for service_area. Metadata keys include "field_mask" and "place_id".
OPENING_DATE_TOO_FAR_IN_THE_FUTURE Enter an opening date that's within a year. Metadata keys include "field_mask".
OPENING_DATE_MISSING_YEAR_OR_MONTH Opening date must have a year or a month specified. Metadata keys include "field_mask".
OPENING_DATE_BEFORE_1AD Opening date cannot be before 1 AD. Metadata keys include "field_mask".
TOO_MANY_ENTRIES Too many entries for the field. Metadata keys include "field_mask" and "max_count".
INVALID_PHONE_NUMBER Phone number input is not recognized. Metadata keys include "field_mask" and "value".
INVALID_PHONE_NUMBER_FOR_REGION Invalid phone number for region. Metadata keys include "field_mask" and "value".
MISSING_PRIMARY_PHONE_NUMBER Missing primary phone number. Metadata keys include "field_mask".
THROTTLED The field cannot be updated at this time. Metadata keys include "field_mask" and "value".
UNSUPPORTED_POINT_RADIUS_SERVICE_AREA Point radius service areas are no longer supported. Metadata keys include "field_mask".
INVALID_CATEGORY Invalid category id. Metadata keys include "field_mask" and "value".
CANNOT_REOPEN The business cannot reopen. Metadata keys include "field_mask".
INVALID_BUSINESS_OPENING_DATE Invalid business opening date. Metadata keys include "field_mask".
INVALID_LATLNG Invalid latlng. Metadata keys include "field_mask".
PROFILE_DESCRIPTION_CONTAINS_URL Business description should not contain URL. Metadata keys include "field_mask".
LODGING_CANNOT_EDIT_PROFILE_DESCRIPTION Lodging location's profile description can't be edited. Metadata keys include "field_mask".
INVALID_URL Invalid link. Metadata keys include "field_mask".
INVALID_ADDRESS Invalid address. Metadata keys include "field_mask".
PARENT_CHAIN_CANNOT_BE_THE_LOCATION_ITSELF ParentChain cannot be the location itself. Metadata keys include "field_mask" and "value".
RELATION_CANNOT_BE_THE_LOCATION_ITSELF Relation cannot be the location itself. Metadata keys include "field_mask" and "value".
MISSING_ADDRESS_COMPONENTS Missing value for address components. Metadata keys include "field_mask".
READ_ONLY_ADDRESS_COMPONENTS Can't edit readonly address components. Metadata keys include "field_mask".
STRING_TOO_LONG The string is too long. Metadata keys include "field_mask" and "max_length".
STRING_TOO_SHORT The string is too short. Metadata keys include "field_mask" and "min_length".
REQUIRED_FIELD_MISSING_VALUE Missing value for required field. Metadata keys include "field_mask".
ATTRIBUTE_PROVIDER_URL_NOT_ALLOWED URL for a provider cannot be added or edited. Metadata keys include "attribute_name".
ATTRIBUTE_INVALID_ENUM_VALUE Unknown value for enum attribute. Metadata keys include "attribute_name".
ATTRIBUTE_NOT_AVAILABLE Scalable attribute not valid for this location. Metadata keys include ""attribute_name".
ATTRIBUTE_CANNOT_BE_REPEATED Scalable attribute only be specified once. Metadata keys include "attribute_name".
ATTRIBUTE_TYPE_NOT_COMPATIBLE_FOR_CATEGORY Scalable attribute is not compatible with the categories set on the location. Metadata keys include "attribute_name".
ADDRESS_REMOVAL_NOT_ALLOWED Address removal is not allowed for your business. Metadata keys include "field_mask".
AMBIGUOUS_TITLE Best name is ambiguous for a language. Metadata keys include "field_mask".
INVALID_CATEGORY_FOR_SAB A pure SAB cannot have gcids that are subtypes of gcid:establishment_poi. Metadata keys include "field_mask" and "value".
RELATION_ENDPOINTS_TOO_FAR Relation endpoints are too far from each other. Metadata keys include "field_mask" and "value".
INVALID_SERVICE_ITEM Neither structured_service_item nor free_form_service_item is set. Metadata keys include "field_mask".
SERVICE_ITEM_LABEL_NO_DISPLAY_NAME Label is missing display name. Metadata keys include "field_mask".
SERVICE_ITEM_LABEL_DUPLICATE_DISPLAY_NAME Display name is not unique for all labels across all price lists. Metadata keys include "field_mask".
SERVICE_ITEM_LABEL_INVALID_UTF8 Label contains invalid UTF-8 symbols. Metadata keys include "field_mask".
FREE_FORM_SERVICE_ITEM_WITH_NO_CATEGORY_ID Missing category_id field in free_form_service_item. Metadata keys include "field_mask".
FREE_FORM_SERVICE_ITEM_WITH_NO_LABEL Missing label in free_form_service_item. Metadata keys include "field_mask".
SERVICE_ITEM_WITH_NO_SERVICE_TYPE_ID Missing service_type_id field in structured_service_item. Metadata keys include "field_mask".
INVALID_LANGUAGE Language code is invalid. Metadata keys include "field_mask".
PRICE_CURRENCY_MISSING Missing ISO 4217 currency code. Metadata keys include "field_mask".
PRICE_CURRENCY_INVALID Provided currency code is not valid ISO 4217. Metadata keys include "field_mask".
SERVICE_TYPE_ID_DUPLICATE Service type ids are not unique within the Location. Metadata keys include "field_mask".

GetAttributesRequest

Request for AttributesService.GetAttributes.

Fields
name

string

Required. Google identifier for this location in the form of locations/{location_id}/attributes.

GetChainRequest

Request message for Locations.GetChain.

Fields
name

string

Required. The chain's resource name, in the format chains/{chain_place_id}.

GetGoogleUpdatedAttributesRequest

Request for AttributesService.GetGoogleUpdatedAttributes.

Fields
name

string

Required. Google identifier for this location in the form of locations/{location_id}/attributes.

GetGoogleUpdatedLocationRequest

Request message for Locations.GetGoogleUpdatedLocation.

Fields
name

string

Required. The name of the location to fetch.

read_mask

FieldMask

Required. Read mask to specify what fields will be returned in the response.

GetLocationRequest

Request message for Locations.GetLocation.

Fields
name

string

Required. The name of the location to fetch.

read_mask

FieldMask

Required. Read mask to specify what fields will be returned in the response.

GoogleLocation

Represents a Location that is present on Google. This can be a location that has been claimed by the user, someone else, or could be unclaimed.

Fields
name

string

Resource name of this GoogleLocation, in the format googleLocations/{googleLocationId}.

location

Location

The sparsely populated Location information. This field can be re-used in CreateLocation if it is not currently claimed by a user.

request_admin_rights_uri

string

A URL that will redirect the user to the request admin rights UI. This field is only present if the location has already been claimed by any user, including the current user.

GoogleUpdatedLocation

Represents a location that was modified by Google.

Fields
location

Location

The Google-updated version of this location.

diff_mask

FieldMask

The fields that Google updated.

pending_mask

FieldMask

The fields that have pending edits that haven't yet been pushed to Maps and Search.

Label

Label to be used when displaying the price list, section, or item.

Fields
display_name

string

Required. Display name for the price list, section, or item.

description

string

Optional. Description of the price list, section, or item.

language_code

string

Optional. The BCP-47 language code that these strings apply for. Only one set of labels may be set per language.

ListAttributeMetadataRequest

Request for AttributesService.ListAttributeMetadata.

Fields
parent

string

Resource name of the location to look up available attributes. If this field is set, category_name, region_code, language_code and show_all are not required and must not be set.

category_name

string

The primary category stable ID to find available attributes. Must be of the format categories/{category_id}.

region_code

string

The ISO 3166-1 alpha-2 country code to find available attributes.

language_code

string

The BCP 47 code of language to get attribute display names in. If this language is not available, they will be provided in English.

show_all

bool

Metadata for all available attributes are returned when this field is set to true, disregarding parent and category_name fields. language_code and region_code are required when show_all is set to true.

page_size

int32

How many attributes to include per page. Default is 200, minimum is 1.

page_token

string

If specified, the next page of attribute metadata is retrieved.

ListAttributeMetadataResponse

Response for AttributesService.ListAttributeMetadata.

Fields
attribute_metadata[]

AttributeMetadata

A collection of attribute metadata for the available attributes.

next_page_token

string

If the number of attributes exceeded the requested page size, this field will be populated with a token to fetch the next page of attributes on a subsequent call to attributes.list. If there are no more attributes, this field will not be present in the response.

ListCategoriesRequest

Request message for BusinessCategories.ListCategories.

Fields
region_code

string

Required. The ISO 3166-1 alpha-2 country code.

language_code

string

Required. The BCP 47 code of language.

filter

string

Optional. Filter string from user. The only field that supported is displayName. Eg: filter=displayName=foo.

page_size

int32

Optional. How many categories to fetch per page. Default is 100, minimum is 1, and maximum page size is 100.

page_token

string

Optional. If specified, the next page of categories will be fetched.

view

CategoryView

Required. Specifies which parts to the Category resource should be returned in the response.

ListCategoriesResponse

Response message for BusinessCategories.ListCategories.

Fields
categories[]

Category

The matching categories based on the requested parameters.

next_page_token

string

If the number of categories exceeded the requested page size, this field will be populated with a token to fetch the next page of categories on a subsequent call to ListCategories.

ListLocationsRequest

Request message for Locations.ListLocations.

Fields
parent

string

Required. The name of the account to fetch locations from. If the parent [Account] [google.mybusiness.accountmanagement.v1.Account] is of [AccountType] [google.mybusiness.accountmanagement.v1.Account.AccountType] PERSONAL, only Locations that are directly owned by the Account are returned, otherwise it will return all accessible locations from the Account, either directly or indirectly.

page_size

int32

Optional. How many locations to fetch per page. Default value is 10 if not set. Minimum is 1, and maximum page size is 100.

page_token

string

Optional. If specified, it fetches the next page of locations. The page token is returned by previous calls to ListLocations when there were more locations than could fit in the requested page size.

filter

string

Optional. A filter constraining the locations to return. The response includes only entries that match the filter. If filter is empty, then constraints are applied and all locations (paginated) are retrieved for the requested account.

For more information about valid fields and example usage, see Work with Location Data Guide.

order_by

string

Optional. Sorting order for the request. Multiple fields should be comma-separated, following SQL syntax. The default sorting order is ascending. To specify descending order, a suffix " desc" should be added. Valid fields to order_by are title and store_code. For example: "title, store_code desc" or "title" or "store_code desc"

read_mask

FieldMask

Required. Read mask to specify what fields will be returned in the response.

ListLocationsResponse

Response message for Locations.ListLocations.

Fields
locations[]

Location

The locations.

next_page_token

string

If the number of locations exceeded the requested page size, this field is populated with a token to fetch the next page of locations on a subsequent call to ListLocations. If there are no more locations, this field is not present in the response.

total_size

int32

The approximate number of Locations in the list irrespective of pagination.

Location

A location. See the help center article for a detailed description of these fields, or the category endpoint for a list of valid business categories.

Fields
name

string

Google identifier for this location in the form: locations/{location_id}.

language_code

string

Immutable. The language of the location. Set during creation and not updateable.

store_code

string

Optional. External identifier for this location, which must be unique within a given account. This is a means of associating the location with your own records.

title

string

Required. Location name should reflect your business's real-world name, as used consistently on your storefront, website, and stationery, and as known to customers. Any additional information, when relevant, can be included in other fields of the resource (for example, Address, Categories). Don't add unnecessary information to your name (for example, prefer "Google" over "Google Inc. - Mountain View Corporate Headquarters"). Don't include marketing taglines, store codes, special characters, hours or closed/open status, phone numbers, website URLs, service/product information, location/address or directions, or containment information (for example, "Chase ATM in Duane Reade").

phone_numbers

PhoneNumbers

Optional. The different phone numbers that customers can use to get in touch with the business.

categories

Categories

Optional. The different categories that describe the business.

storefront_address

PostalAddress

Optional. A precise, accurate address to describe your business location. PO boxes or mailboxes located at remote locations are not acceptable. At this time, you can specify a maximum of five address_lines values in the address. This field should only be set for businesses that have a storefront. This field should not be set for locations of type CUSTOMER_LOCATION_ONLY.

website_uri

string

Optional. A URL for this business. If possible, use a URL that represents this individual business location instead of a generic website/URL that represents all locations, or the brand.

regular_hours

BusinessHours

Optional. Operating hours for the business.

special_hours

SpecialHours

Optional. Special hours for the business. This typically includes holiday hours, and other times outside of regular operating hours. These override regular business hours. This field cannot be set without regular hours.

service_area

ServiceAreaBusiness

Optional. Service area businesses provide their service at the customer's location. If this business is a service area business, this field describes the area(s) serviced by the business.

labels[]

string

Optional. A collection of free-form strings to allow you to tag your business. These labels are NOT user facing; only you can see them. Must be between 1-255 characters per label.

ad_words_location_extensions

AdWordsLocationExtensions

Optional. Additional information that is surfaced in AdWords.

latlng

LatLng

Optional. User-provided latitude and longitude. When creating a location, this field is ignored if the provided address geocodes successfully. This field is only returned on get requests if the user-provided latlng value was accepted during create, or the latlng value was updated through the Business Profile website. This field can only be updated by approved clients.

open_info

OpenInfo

Optional. A flag that indicates whether the location is currently open for business.

metadata

Metadata

Output only. Additional non-user-editable information.

profile

Profile

Required. Describes your business in your own voice and shares with users the unique story of your business and offerings.

relationship_data

RelationshipData

Output only. All locations and chain related to this one.

more_hours[]

MoreHours

Optional. More hours for a business's different departments or specific customers.

service_items[]

ServiceItem

Optional. List of services supported by merchants. A service can be haircut, install water heater, etc. Duplicated service items will be removed automatically.

Metadata

Additional non-user-editable information about the location.

Fields
has_google_updated

bool

Output only. Indicates whether the place ID associated with this location has updates that need to be updated or rejected by the client. If this boolean is set, you should call the getGoogleUpdated method to lookup information that's needs to be verified.

has_pending_edits

bool

Output only. Indicates whether any of this Location's properties are in the edit pending state.

can_delete

bool

Output only. Indicates whether the location can be deleted using the API.

can_operate_local_post

bool

Output only. Indicates if the listing can manage local posts.

can_modify_service_list

bool

Output only. Indicates if the listing can modify the service list.

can_have_food_menus

bool

Output only. Indicates if the listing is eligible for food menu.

can_operate_health_data

bool

Output only. Indicates whether the location can operate on Health data.

can_operate_lodging_data

bool

Output only. Indicates whether the location can operate on Lodging data.

place_id

string

Output only. If this locationappears on Google Maps, this field is populated with the place ID for the location. This ID can be used in various Places APIs.

This field can be set during Create calls, but not for Update.

duplicate_location

string

Output only. The location resource that this location duplicates.

maps_uri

string

Output only. A link to the location on Maps.

new_review_uri

string

Output only. A link to the page on Google Search where a customer can leave a review for the location.

MoreHours

The time periods during which a location is open for certain types of business.

Fields
hours_type_id

string

Required. Type of hours. Clients should call {#link businessCategories:BatchGet} to get supported hours types for categories of their locations.

periods[]

TimePeriod

Required. A collection of times that this location is open. Each period represents a range of hours when the location is open during the week.

MoreHoursType

More hours types that a business can offers, in addition to its regular hours.

Fields
hours_type_id

string

Output only. A stable ID provided by Google for this hours type.

display_name

string

Output only. The human-readable English display name for the hours type.

localized_display_name

string

Output only. The human-readable localized display name for the hours type.

OpenInfo

Information related to the opening state of the business.

Fields
status

OpenForBusiness

Required. Indicates whether or not the Location is currently open for business. All locations are open by default, unless updated to be closed.

can_reopen

bool

Output only. Indicates whether this business is eligible for re-open.

opening_date

Date

Optional. The date on which the location first opened. If the exact day is not known, month and year only can be provided. The date must be in the past or be no more than one year in the future.

OpenForBusiness

Indicates the status of a location.

Enums
OPEN_FOR_BUSINESS_UNSPECIFIED Not specified.
OPEN Indicates that the location is open.
CLOSED_PERMANENTLY Indicates that the location has been permanently closed.
CLOSED_TEMPORARILY Indicates that the location has been temporarily closed.

PhoneNumbers

A collection of phone numbers for the business. During updates, both fields must be set. Clients may not update just the primary or additional phone numbers using the update mask. International phone format is preferred, such as "+1 415 555 0132", see more in (https://developers.google.com/style/phone-numbers#international-phone-numbers).

Fields
primary_phone

string

Required. A phone number that connects to your individual business location as directly as possible. Use a local phone number instead of a central, call center helpline number whenever possible.

additional_phones[]

string

Optional. Up to two phone numbers (mobile or landline, no fax) at which your business can be called, in addition to your primary phone number.

PlaceInfo

Defines an area that's represented by a place ID.

Fields
place_name

string

Required. The localized name of the place. For example, Scottsdale, AZ.

place_id

string

Required. The ID of the place. Must correspond to a region. (https://developers.google.com/places/web-service/supported_types#table3)

Places

Defines the union of areas represented by a set of places.

Fields
place_infos[]

PlaceInfo

The areas represented by place IDs. Limited to a maximum of 20 places.

Profile

All information pertaining to the location's profile.

Fields
description

string

Required. Description of the location in your own voice, not editable by anyone else.

RelationshipData

Information of all parent and children locations related to this one.

Fields
parent_location

RelevantLocation

The parent location that this location has relations with.

children_locations[]

RelevantLocation

The list of children locations that this location has relations with.

parent_chain

string

The resource name of the Chain that this location is member of. [How to find Chain ID] [Locations.SearchChains]

RelevantLocation

Information about another location that is related to current one. The relation can be any one of DEPARTMENT_OF or INDEPENDENT_ESTABLISHMENT_OF, and the location specified here can be on either side (parent/child) of the location.

Fields
place_id

string

Required. Specify the location that is on the other side of the relation by its placeID.

relation_type

RelationType

Required. The type of the relationship.

RelationType

The type relations to be specified.

Enums
RELATION_TYPE_UNSPECIFIED Type unspecified.
DEPARTMENT_OF This represents a relation between 2 locations which share one physical area, same brand/upper management/organization, but with different key attributes like store hours or phone numbers. For example, Costco Pharmacy is a department in Costco Wholesale.
INDEPENDENT_ESTABLISHMENT_IN This represents the cases where 2 locations are co-located in the same physical location, but from different companies (e.g. Starbucks in a Safeway, shops in a mall).

RepeatedEnumAttributeValue

Values for an attribute with a value_type of REPEATED_ENUM. This consists of two lists of value IDs: those that are set (true) and those that are unset (false). Values absent are considered unknown. At least one value must be specified.

Fields
set_values[]

string

Enum values that are set.

unset_values[]

string

Enum values that are unset.

SearchChainsRequest

Request message for Locations.SearchChains.

Fields
chain_name

string

Required. Search for a chain by its name. Exact/partial/fuzzy/related queries are supported. Examples: "walmart", "wal-mart", "walmmmart", "沃尔玛"

page_size

int32

The maximum number of matched chains to return from this query. The default is 10. The maximum possible value is 500.

SearchChainsResponse

Response message for Locations.SearchChains.

Fields
chains[]

Chain

Chains that match the queried chain_display_name in SearchChainsRequest. If there are no matches, this field will be empty. Results are listed in order of relevance.

SearchGoogleLocationsRequest

Request message for GoogleLocations.SearchGoogleLocations.

Fields
page_size

int32

The number of matches to return. The default value is 3, with a maximum of 10. Note that latency may increase if more are requested. There is no pagination.

Union field search_query. Search query. This can be provided either as a location object or as a string query. search_query can be only one of the following:
location

Location

Location to search for. If provided, will find locations which match the provided location details.

query

string

Text query to search for. The search results from a query string will be less accurate than if providing an exact location, but can provide more inexact matches.

SearchGoogleLocationsResponse

Response message for GoogleLocations.SearchGoogleLocations.

Fields
google_locations[]

GoogleLocation

A collection of GoogleLocations that are potential matches to the specified request, listed in order from most to least accuracy.

ServiceAreaBusiness

Service area businesses provide their service at the customer's location (for example, a locksmith or plumber).

Fields
business_type

BusinessType

Required. Indicates the [type] [google.mybusiness.businessinfo.v1.ServiceAreaBusiness.BusinessType] of the service area business.

places

Places

The area that this business serves defined through a set of places.

region_code

string

Immutable. CLDR region code of the country/region that this service area business is based in. See http://cldr.unicode.org/ and http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: "CH" for Switzerland.

This field is required for CUSTOMER_LOCATION_ONLY businesses, and is ignored otherwise.

The region specified here can be different from regions for the areas that this business serves (e.g. service area businesses that provide services in regions other than the one that they are based in).

If this location requires verification after creation, the address provided for verification purposes must be located within this region, and the business owner or their authorized representative must be able to receive postal mail at the provided verification address.

BusinessType

Indicates whether this business only offers services onsite at a customer location (for example, a tow truck), or at both an address and onsite (for example, a pizza store with a dining area, that also delivers to customers).

Enums
BUSINESS_TYPE_UNSPECIFIED Output only. Not specified.
CUSTOMER_LOCATION_ONLY Offers service only in the surrounding area (not at the business address). If a business is being updated from a CUSTOMER_AND_BUSINESS_LOCATION to a CUSTOMER_LOCATION_ONLY, the location update must include field mask storefront_address and set the field to empty.
CUSTOMER_AND_BUSINESS_LOCATION Offers service at the business address and the surrounding area.

ServiceItem

A message that describes a single service item. It is used to describe the type of service that the merchant provides. For example, haircut can be a service.

Fields
price

Money

Optional. Represents the monetary price of the service item. We recommend that currency_code and units should be set when including a price. This will be treated as a fixed price for the service item.

Union field service_item_info. One of the following fields should always be set. service_item_info can be only one of the following:
structured_service_item

StructuredServiceItem

Optional. This field will be set case of structured services data.

free_form_service_item

FreeFormServiceItem

Optional. This field will be set case of free-form services data.

FreeFormServiceItem

Represents a free-form service offered by the merchant. These are services that are not exposed as part of our structure service data. The merchant manually enters the names for of such services via a geomerchant surface.

Fields
category

string

Required. This field represents the category name (i.e. the category's stable ID). The category and service_type_id should match the possible combinations provided in the Category message.

label

Label

Required. Language-tagged labels for the item. We recommend that item names be 140 characters or less, and descriptions 250 characters or less. This field should only be set if the input is a custom service item. Standardized service types should be updated via service_type_id.

StructuredServiceItem

Represents a structured service offered by the merchant. For eg: toilet_installation.

Fields
service_type_id

string

Required. The service_type_id field is a Google provided unique ID that can be found in ServiceType. This information is provided by BatchGetCategories rpc service.

description

string

Optional. Description of structured service item. The character limit is 300.

ServiceType

A message describing a service type that the business offers.

Fields
service_type_id

string

Output only. A stable ID (provided by Google) for this service type.

display_name

string

Output only. The human-readable display name for the service type.

SpecialHourPeriod

Represents a single time period when a location's operational hours differ from its normal business hours. A special hour period must represent a range of less than 24 hours. The open_time and start_date must predate the close_time and end_date. The close_time and end_date can extend to 11:59 a.m. on the day after the specified start_date. For example, the following inputs are valid:

start_date=2015-11-23, open_time=08:00, close_time=18:00
start_date=2015-11-23, end_date=2015-11-23, open_time=08:00,
close_time=18:00 start_date=2015-11-23, end_date=2015-11-24,
open_time=13:00, close_time=11:59

The following inputs are not valid:

start_date=2015-11-23, open_time=13:00, close_time=11:59
start_date=2015-11-23, end_date=2015-11-24, open_time=13:00,
close_time=12:00 start_date=2015-11-23, end_date=2015-11-25,
open_time=08:00, close_time=18:00
Fields
start_date

Date

Required. The calendar date this special hour period starts on.

open_time

TimeOfDay

Optional. Valid values are 00:00-24:00 where 24:00 represents midnight at the end of the specified day field. Must be specified if closed is false.

end_date

Date

Optional. The calendar date this special hour period ends on. If end_date field is not set, default to the date specified in start_date. If set, this field must be equal to or at most 1 day after start_date.

close_time

TimeOfDay

Optional. Valid values are 00:00-24:00, where 24:00 represents midnight at the end of the specified day field. Must be specified if closed is false.

closed

bool

Optional. If true, end_date, open_time, and close_time are ignored, and the date specified in start_date is treated as the location being closed for the entire day.

SpecialHours

Represents a set of time periods when a location's operational hours differ from its normal business hours.

Fields
special_hour_periods[]

SpecialHourPeriod

Required. A list of exceptions to the business's regular hours.

TimePeriod

Represents a span of time that the business is open, starting on the specified open day/time and closing on the specified close day/time. The closing time must occur after the opening time, for example later in the same day, or on a subsequent day.

Fields
open_day

DayOfWeek

Required. Indicates the day of the week this period starts on.

open_time

TimeOfDay

Required. Valid values are 00:00-24:00, where 24:00 represents midnight at the end of the specified day field.

close_day

DayOfWeek

Required. Indicates the day of the week this period ends on.

close_time

TimeOfDay

Required. Valid values are 00:00-24:00, where 24:00 represents midnight at the end of the specified day field.

UpdateAttributesRequest

Request for AttributesService.UpdateAttributes.

Fields
attributes

Attributes

A collection of attributes that need to be updated.

attribute_mask

FieldMask

Required. Attribute name of attributes that you'd like to update. Represented by attributes/{attribute}.

Updates: All attributes provided in the attributes field that you would like to update must be set in the attribute_mask. Attributes set in the above list but not in the attribute_mask will be ignored.

Deletes: If you'd like to delete certain attributes, they must be specified in the attribute_mask with no matching entry in the attributes list. If you'd like to delete all attributes set on a location, you should look up all the applicable attributes for the location and then add them to the attribute_mask with an empty attributes field.

UpdateLocationRequest

Request message for Locations.UpdateLocation.

Fields
location

Location

Required. The updated location information.

update_mask

FieldMask

Required. The specific fields to update.

validate_only

bool

Optional. If true, the request is validated without actually updating the location. When this field is set, we will only return validation errors if there were any. The response will be empty if no errors were found.

UriAttributeValue

Values for an attribute with a value_type of URL.

Fields
uri

string

Required. The proposed URI value for this attribute.