- Resource: Location
- JSON representation
- BusinessHours
- TimePeriod
- DayOfWeek
- SpecialHours
- SpecialHourPeriod
- ServiceAreaBusiness
- BusinessType
- PointRadius
- LatLng
- Places
- PlaceInfo
- LocationKey
- AdWordsLocationExtensions
- OpenInfo
- OpenForBusiness
- LocationState
- Attribute
- RepeatedEnumAttributeValue
- UrlAttributeValue
- Metadata
- Duplicate
- Access
- PriceList
- Label
- Section
- SectionType
- Item
- Money
- Profile
- RelationshipData
- MoreHours
- Methods
Resource: 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.
JSON representation | |
---|---|
{ "name": string, "languageCode": string, "storeCode": string, "locationName": string, "primaryPhone": string, "additionalPhones": [ string ], "address": { object ( |
Fields | |
---|---|
name |
Google identifier for this location in the form: In the context of matches, this field will not be populated. |
languageCode |
The language of the location. Set during creation and not updateable. |
storeCode |
External identifier for this location, which must be unique inside a given account. This is a means of associating the location with your own records. |
locationName |
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, |
primaryPhone |
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. |
additionalPhones[] |
Up to two phone numbers (mobile or landline, no fax) at which your business can be called, in addition to your primary phone number. |
address |
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 |
primaryCategory |
Category that best describes the core business this location engages in. |
additionalCategories[] |
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. |
websiteUrl |
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. |
regularHours |
Operating hours for the business. |
specialHours |
Special hours for the business. This typically includes holiday hours, and other times outside of regular operating hours. These override regular business hours. |
serviceArea |
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. |
locationKey |
A collection of keys that link this business to other Google properties, such as a Google+ page and Google Maps Places. |
labels[] |
A collection of free-form strings to allow you to tag your business. These labels are NOT user facing; only you can see them. Limited to 255 characters (per label). |
adWordsLocationExtensions |
Additional information that is surfaced in AdWords. |
latlng |
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 |
openInfo |
A flag that indicates whether the location is currently open for business. |
locationState |
Output only. A set of booleans that reflects the state of a location. |
attributes[] |
Attributes for this location. |
metadata |
Output Only. Additional non-user-editable information. |
priceLists[] |
Deprecated: Price list information for this location. |
profile |
Describes your business in your own voice and shares with users the unique story of your business and offerings. |
relationshipData |
All locations and chain related to this one. |
moreHours[] |
More hours for a business's different departments or specific customers. |
BusinessHours
Represents the time periods that this location is open for business. Holds a collection of TimePeriod
instances.
JSON representation | |
---|---|
{
"periods": [
{
object ( |
Fields | |
---|---|
periods[] |
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. |
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.
JSON representation | |
---|---|
{ "openDay": enum ( |
Fields | |
---|---|
openDay |
Indicates the |
openTime |
Time in 24hr ISO 8601 extended format (hh:mm). Valid values are 00:00-24:00, where 24:00 represents midnight at the end of the specified day field. |
closeDay |
Indicates the |
closeTime |
Time in 24hr ISO 8601 extended format (hh:mm). Valid values are 00:00-24:00, where 24:00 represents midnight at the end of the specified day field. |
DayOfWeek
Represents a day of the week.
Enums | |
---|---|
DAY_OF_WEEK_UNSPECIFIED |
The day of the week is unspecified. |
MONDAY |
Monday |
TUESDAY |
Tuesday |
WEDNESDAY |
Wednesday |
THURSDAY |
Thursday |
FRIDAY |
Friday |
SATURDAY |
Saturday |
SUNDAY |
Sunday |
SpecialHours
Represents a set of time periods when a location's operational hours differ from its normal business hours.
JSON representation | |
---|---|
{
"specialHourPeriods": [
{
object ( |
Fields | |
---|---|
specialHourPeriods[] |
A list of exceptions to the business's regular hours. |
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 openTime
and startDate
must predate the closeTime
and endDate
. The closeTime
and endDate
can extend to 11:59 a.m. on the day after the specified startDate
. For example, the following inputs are valid:
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
The following inputs are not valid:
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
JSON representation | |
---|---|
{ "startDate": { object ( |
Fields | |
---|---|
startDate |
The calendar date this special hour period starts on. |
openTime |
The wall time on |
endDate |
The calendar date this special hour period ends on. If |
closeTime |
The wall time on |
isClosed |
If true, |
ServiceAreaBusiness
Service area businesses provide their service at the customer's location (for example, a locksmith or plumber).
JSON representation | |
---|---|
{ "businessType": enum ( |
Fields | ||
---|---|---|
businessType |
Indicates the |
|
Union field coverageArea . Indicates the coverage area where the business offers service. coverageArea can be only one of the following: |
||
radius |
Output only. The area that this business serves centered around a point. |
|
places |
The area that this business serves defined through a set of places. |
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). |
CUSTOMER_AND_BUSINESS_LOCATION |
Offers service at the business address and the surrounding area. |
PointRadius
A radius around a particular point (latitude/longitude).
JSON representation | |
---|---|
{
"latlng": {
object ( |
Fields | |
---|---|
latlng |
The latitude/longitude that specifies the center of an area defined by the radius. |
radiusKm |
The distance in kilometers of the area around the point. |
LatLng
An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.
JSON representation | |
---|---|
{ "latitude": number, "longitude": number } |
Fields | |
---|---|
latitude |
The latitude in degrees. It must be in the range [-90.0, +90.0]. |
longitude |
The longitude in degrees. It must be in the range [-180.0, +180.0]. |
Places
Defines the union of areas represented by a set of places.
JSON representation | |
---|---|
{
"placeInfos": [
{
object ( |
Fields | |
---|---|
placeInfos[] |
The areas represented by place IDs. Limited to a maximum of 20 places. |
PlaceInfo
Defines an area that's represented by a place ID.
JSON representation | |
---|---|
{ "name": string, "placeId": string } |
Fields | |
---|---|
name |
The localized name of the place. For example, |
placeId |
The ID of the place. Must correspond to a region. |
LocationKey
Alternate/surrogate key references for a location.
JSON representation | |
---|---|
{ "plusPageId": string, "placeId": string, "explicitNoPlaceId": boolean, "requestId": string } |
Fields | |
---|---|
plusPageId |
Output only. If this location has a Google+ page associated with it, this is populated with the Google+ page ID for this location. |
placeId |
If this location has been verified and is connected to/appears on Google Maps, this field is populated with the place ID for the location. This ID can be used in various Places APIs. If this location is unverified, this field may be populated if the location has been associated with a place that appears on Google Maps. This field can be set during Create calls, but not for Update. The additional |
explicitNoPlaceId |
Output only. A value of true indicates that an unset place ID is deliberate, which is different from no association being made yet. |
requestId |
Output only. The |
AdWordsLocationExtensions
Additional information that is surfaced in AdWords.
JSON representation | |
---|---|
{ "adPhone": string } |
Fields | |
---|---|
adPhone |
An alternate phone number to display on AdWords location extensions instead of the location's primary phone number. |
OpenInfo
Information related to the opening state of the business.
JSON representation | |
---|---|
{ "status": enum ( |
Fields | |
---|---|
status |
Indicates whether or not the Location is currently open for business. All locations are open by default, unless updated to be closed. |
canReopen |
Output only. Indicates whether this business is eligible for re-open. |
openingDate |
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. This value may only be applied to published locations (i.e. locationState.is_published = true). When updating the status field to this value, clients are required to set the updateMask explicitly to openInfo.status . No other update masks can be set during this update call. This is a temporary restriction which will be relaxed soon. |
LocationState
Contains a set of booleans that reflect the state of a Location.
JSON representation | |
---|---|
{ "isGoogleUpdated": boolean, "isDuplicate": boolean, "isSuspended": boolean, "canUpdate": boolean, "canDelete": boolean, "isVerified": boolean, "needsReverification": boolean, "isPendingReview": boolean, "isDisabled": boolean, "isPublished": boolean, "isDisconnected": boolean, "isLocalPostApiDisabled": boolean, "canModifyServiceList": boolean, "canHaveFoodMenus": boolean, "hasPendingEdits": boolean, "hasPendingVerification": boolean, "canOperateHealthData": boolean, "canOperateLodgingData": boolean } |
Fields | |
---|---|
isGoogleUpdated |
Output only. Indicates whether the place ID associated with this location has updates. |
isDuplicate |
Output only. Indicates whether the location is a duplicate of another location. |
isSuspended |
Output only. Indicates whether the location is suspended. Suspended locations are not visible to end users in Google products. If you believe this was a mistake, see the help center article. |
canUpdate |
Output only. Indicates whether the location can be updated. |
canDelete |
Output only. Indicates whether the location can be deleted using the Google My Business API. |
isVerified |
Output only. Indicates whether the location is verified. |
needsReverification |
Output only. Indicates whether the location requires reverification. |
isPendingReview |
Output only. Indicates whether the review of the location is pending. |
isDisabled |
Output only. Indicates whether the location is disabled. |
isPublished |
Output only. Indicates whether the location is published. |
isDisconnected |
Output only. Indicates whether the location is disconnected from a place on Google Maps. |
isLocalPostApiDisabled |
Output only. Indicates whether accounts.locations.localPosts is disabled for this location. |
canModifyServiceList |
Output only. Indicates if the listing can modify a ServiceList. |
canHaveFoodMenus |
Output only. Indicates if the listing is eligible for food menu. |
hasPendingEdits |
Output only. Indicates whether any of this Location's properties are in the edit pending state. |
hasPendingVerification |
Output only. Indicates whether the location has pending verification requests. |
canOperateHealthData |
Output only. Indicates whether the location can operate on Health data. |
canOperateLodgingData |
Output only. Indicates whether the location can operate on Lodging data. |
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.
JSON representation | |
---|---|
{ "attributeId": string, "valueType": enum ( |
Fields | |
---|---|
attributeId |
The ID of the attribute. Attribute IDs are provided by Google. |
valueType |
Output only. The type of value that this attribute contains. This should be used to determine how to interpret the value. |
values[] |
The values for this attribute. The type of the values supplied must match that expected for that attribute; see AttributeValueType. This is a repeated field where multiple attribute values may be provided. Attribute types only support one value. |
repeatedEnumValue |
When the attribute value type is REPEATED_ENUM, this contains the attribute value, and the other values fields must be empty. |
urlValues[] |
When the attribute value type is URL, this field contains the value(s) for this attribute, and the other values fields must be empty. |
RepeatedEnumAttributeValue
Values for an attribute with a valueType
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.
JSON representation | |
---|---|
{ "setValues": [ string ], "unsetValues": [ string ] } |
Fields | |
---|---|
setValues[] |
Enum values that are set. |
unsetValues[] |
Enum values that are unset. |
UrlAttributeValue
Values for an attribute with a valueType
of URL.
JSON representation | |
---|---|
{ "url": string } |
Fields | |
---|---|
url |
The URL. |
Metadata
Additional non-user-editable information about the location.
JSON representation | |
---|---|
{
"duplicate": {
object ( |
Fields | |
---|---|
duplicate |
Information about the location that this location duplicates. Only present when |
mapsUrl |
A link to the location on Maps. |
newReviewUrl |
A link to the page on Google Search where a customer can leave a review for the location. |
Duplicate
Information about the location that this location duplicates.
JSON representation | |
---|---|
{
"locationName": string,
"placeId": string,
"access": enum ( |
Fields | |
---|---|
locationName |
The resource name of the location that this duplicates. Only populated if the authenticated user has access rights to that location and that location is not deleted. |
placeId |
The place ID of the location that this duplicates. |
access |
Indicates whether the user has access to the location it duplicates. |
Access
User's access level to the location that it duplicates. This replaces Ownership and should be used instead.
Enums | |
---|---|
ACCESS_UNSPECIFIED |
Not specified. |
ACCESS_UNKNOWN |
Unable to determine whether the user has access to the location that it duplicates. |
ALLOWED |
User has access to the location that it duplicates. |
INSUFFICIENT |
User doesn't have access to the location that it duplicates. |
PriceList
Deprecated: A list of item price information. Price lists are structured as one or more price lists, each containing one or more sections with one or more items. For example, food price lists may represent breakfast/lunch/dinner menus, with sections for burgers/steak/seafood.
JSON representation | |
---|---|
{ "priceListId": string, "labels": [ { object ( |
Fields | |
---|---|
priceListId |
Required. ID for the price list. Price list, section, and item IDs cannot be duplicated within this Location. |
labels[] |
Required. Language-tagged labels for the price list. |
sourceUrl |
Optional source URL of where the price list was retrieved from. For example, this could be the URL of the page that was automatically scraped to populate the menu information. |
sections[] |
Required. Sections for this price list. Each price list must contain at least one section. |
Label
Label to be used when displaying the price list, section, or item.
JSON representation | |
---|---|
{ "displayName": string, "description": string, "languageCode": string } |
Fields | |
---|---|
displayName |
Required. Display name for the price list, section, or item. |
description |
Optional. Description of the price list, section, or item. |
languageCode |
Optional. The BCP-47 language code that these strings apply for. Only one set of labels may be set per language. |
Section
A section of the price list containing one or more items.
JSON representation | |
---|---|
{ "sectionId": string, "labels": [ { object ( |
Fields | |
---|---|
sectionId |
Required. ID for the section. Price list, section, and item IDs cannot be duplicated within this Location. |
labels[] |
Required. Language-tagged labels for the section. We recommend that section names and descriptions be 140 characters or less. At least one set of labels is required. |
sectionType |
Optional. Type of the current price list section. Default value is FOOD. |
items[] |
Items that are contained within this section of the price list. |
SectionType
Type of the section.
Enums | |
---|---|
SECTION_TYPE_UNSPECIFIED |
Not specified. |
FOOD |
Section contains items that represent food. |
SERVICES |
Section contains items that represent services. |
Item
A single list item. Each variation of an item in the price list should have its own Item with its own price data.
JSON representation | |
---|---|
{ "itemId": string, "labels": [ { object ( |
Fields | |
---|---|
itemId |
Required. ID for the item. Price list, section, and item IDs cannot be duplicated within this Location. |
labels[] |
Required. Language-tagged labels for the item. We recommend that item names be 140 characters or less, and descriptions 250 characters or less. At least one set of labels is required. |
price |
Optional. Price of the item. |
Money
Represents an amount of money with its currency type.
JSON representation | |
---|---|
{ "currencyCode": string, "units": string, "nanos": integer } |
Fields | |
---|---|
currencyCode |
The three-letter currency code defined in ISO 4217. |
units |
The whole units of the amount. For example if |
nanos |
Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If |
Profile
All information pertaining to the location's profile.
JSON representation | |
---|---|
{ "description": string } |
Fields | |
---|---|
description |
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.
JSON representation | |
---|---|
{ "parentChain": string } |
Fields | |
---|---|
parentChain |
The resource name of the Chain that this location is member of. |
MoreHours
The time periods during which a location is open for certain types of business.
JSON representation | |
---|---|
{
"hoursTypeId": string,
"periods": [
{
object ( |
Fields | |
---|---|
hoursTypeId |
Required. Type of hours. Clients should call {#link businessCategories:BatchGet} to get supported hours types for categories of their locations. |
periods[] |
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. |
Methods |
|
---|---|
|
Associates a location to a place ID. |
|
Gets all of the specified locations in the given account. |
|
Returns the paginated list of reviews for all specified locations. |
|
Clears an association between a location and its place ID. |
|
Creates a new location owned by the specified account, and returns it. |
|
Deletes a location. |
|
Reports all eligible verification options for a location in a specific language. |
|
Finds all of the possible locations that are a match to the specified location. |
|
Gets the specified location. |
|
Returns the food menus of a specific location. |
|
Gets the Google-updated version of the specified location. |
|
Returns the Health provider attributes of a specific location. |
|
Get the specified service list of a location. |
|
Lists the locations for the specified account. |
|
Updates the specified location. |
|
Returns a report containing insights on one or more metrics by location. |
(deprecated) |
Moves a location from an account that the user owns to another account that the same user administers. |
|
Updates the food menus of a specific location. |
|
Updates the Health provider attributes of a specific location. |
|
Updates the specified service list of a location. |
|
Starts the verification process for a location. |