REST Resource: accounts.locations

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 (PostalAddress)
  },
  "primaryCategory": {
    object (Category)
  },
  "additionalCategories": [
    {
      object (Category)
    }
  ],
  "websiteUrl": string,
  "regularHours": {
    object (BusinessHours)
  },
  "specialHours": {
    object (SpecialHours)
  },
  "serviceArea": {
    object (ServiceAreaBusiness)
  },
  "locationKey": {
    object (LocationKey)
  },
  "labels": [
    string
  ],
  "adWordsLocationExtensions": {
    object (AdWordsLocationExtensions)
  },
  "latlng": {
    object (LatLng)
  },
  "openInfo": {
    object (OpenInfo)
  },
  "locationState": {
    object (LocationState)
  },
  "attributes": [
    {
      object (Attribute)
    }
  ],
  "metadata": {
    object (Metadata)
  },
  "priceLists": [
    {
      object (PriceList)
    }
  ],
  "profile": {
    object (Profile)
  },
  "relationshipData": {
    object (RelationshipData)
  },
  "moreHours": [
    {
      object (MoreHours)
    }
  ]
}
Fields
name

string

Google identifier for this location in the form: accounts/{accountId}/locations/{locationId}

In the context of matches, this field will not be populated.

languageCode

string

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

storeCode

string

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

string

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").

primaryPhone

string

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[]

string

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

object (PostalAddress)

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 addressLines values in the address.

primaryCategory

object (Category)

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

additionalCategories[]

object (Category)

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

string

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

object (BusinessHours)

Operating hours for the business.

specialHours

object (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

object (ServiceAreaBusiness)

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

object (LocationKey)

A collection of keys that link this business to other Google properties, such as a Google+ page and Google Maps Places.

labels[]

string

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

object (AdWordsLocationExtensions)

Additional information that is surfaced in AdWords.

latlng

object (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 latlng value was accepted during create, or the latlng value was updated through the Business Profile website. This field cannot be updated.

openInfo

object (OpenInfo)

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

locationState

object (LocationState)

Output only. A set of booleans that reflects the state of a location.

attributes[]

object (Attribute)

Attributes for this location.

metadata

object (Metadata)

Output Only. Additional non-user-editable information.

priceLists[]
(deprecated)

object (PriceList)

Deprecated: Price list information for this location.

profile

object (Profile)

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

relationshipData

object (RelationshipData)

All locations and chain related to this one.

moreHours[]

object (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 (TimePeriod)
    }
  ]
}
Fields
periods[]

object (TimePeriod)

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 (DayOfWeek),
  "openTime": string,
  "closeDay": enum (DayOfWeek),
  "closeTime": string
}
Fields
openDay

enum (DayOfWeek)

Indicates the day of the week this period starts on.

openTime

string

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

enum (DayOfWeek)

Indicates the day of the week this period ends on.

closeTime

string

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 (SpecialHourPeriod)
    }
  ]
}
Fields
specialHourPeriods[]

object (SpecialHourPeriod)

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 (Date)
  },
  "openTime": string,
  "endDate": {
    object (Date)
  },
  "closeTime": string,
  "isClosed": boolean
}
Fields
startDate

object (Date)

The calendar date this special hour period starts on.

openTime

string

The wall time on startDate when a location opens, expressed 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. Must be specified if isClosed is false.

endDate

object (Date)

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

closeTime

string

The wall time on endDate when a location closes, expressed 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. Must be specified if isClosed is false.

isClosed

boolean

If true, endDate, openTime, and closeTime are ignored, and the date specified in startDate is treated as the location being closed for the entire day.

ServiceAreaBusiness

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

JSON representation
{
  "businessType": enum (BusinessType),

  // Union field coverageArea can be only one of the following:
  "radius": {
    object (PointRadius)
  },
  "places": {
    object (Places)
  }
  // End of list of possible types for union field coverageArea.
}
Fields
businessType

enum (BusinessType)

Indicates the type of the service area business.

Union field coverageArea. Indicates the coverage area where the business offers service. coverageArea can be only one of the following:
radius

object (PointRadius)

Output only. The area that this business serves centered around a point.

places

object (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 (LatLng)
  },
  "radiusKm": number
}
Fields
latlng

object (LatLng)

The latitude/longitude that specifies the center of an area defined by the radius.

radiusKm

number

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

number

The latitude in degrees. It must be in the range [-90.0, +90.0].

longitude

number

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 (PlaceInfo)
    }
  ]
}
Fields
placeInfos[]

object (PlaceInfo)

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

string

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

placeId

string

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

string

Output only. If this location has a Google+ page associated with it, this is populated with the Google+ page ID for this location.

placeId

string

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 bool qualifies whether an unset place ID is deliberate or not.

explicitNoPlaceId

boolean

Output only. A value of true indicates that an unset place ID is deliberate, which is different from no association being made yet.

requestId

string

Output only. The requestId used to create this location. May be empty if this location was created outside of the Google My Business API or Business Profile Locations.

AdWordsLocationExtensions

Additional information that is surfaced in AdWords.

JSON representation
{
  "adPhone": string
}
Fields
adPhone

string

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 (OpenForBusiness),
  "canReopen": boolean,
  "openingDate": {
    object (Date)
  }
}
Fields
status

enum (OpenForBusiness)

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

canReopen

boolean

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

openingDate

object (Date)

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

boolean

Output only. Indicates whether the place ID associated with this location has updates.

isDuplicate

boolean

Output only. Indicates whether the location is a duplicate of another location.

isSuspended

boolean

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

boolean

Output only. Indicates whether the location can be updated.

canDelete

boolean

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

isVerified

boolean

Output only. Indicates whether the location is verified.

needsReverification

boolean

Output only. Indicates whether the location requires reverification.

isPendingReview

boolean

Output only. Indicates whether the review of the location is pending.

isDisabled

boolean

Output only. Indicates whether the location is disabled.

isPublished

boolean

Output only. Indicates whether the location is published.

isDisconnected

boolean

Output only. Indicates whether the location is disconnected from a place on Google Maps.

isLocalPostApiDisabled

boolean

Output only. Indicates whether accounts.locations.localPosts is disabled for this location.

canModifyServiceList

boolean

Output only. Indicates if the listing can modify a ServiceList.

canHaveFoodMenus

boolean

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

hasPendingEdits

boolean

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

hasPendingVerification

boolean

Output only. Indicates whether the location has pending verification requests.

canOperateHealthData

boolean

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

canOperateLodgingData

boolean

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 (AttributeValueType),
  "values": [
    value
  ],
  "repeatedEnumValue": {
    object (RepeatedEnumAttributeValue)
  },
  "urlValues": [
    {
      object (UrlAttributeValue)
    }
  ]
}
Fields
attributeId

string

The ID of the attribute. Attribute IDs are provided by Google.

valueType

enum (AttributeValueType)

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

values[]

value (Value format)

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

object (RepeatedEnumAttributeValue)

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

urlValues[]

object (UrlAttributeValue)

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[]

string

Enum values that are set.

unsetValues[]

string

Enum values that are unset.

UrlAttributeValue

Values for an attribute with a valueType of URL.

JSON representation
{
  "url": string
}
Fields
url

string

The URL.

Metadata

Additional non-user-editable information about the location.

JSON representation
{
  "duplicate": {
    object (Duplicate)
  },
  "mapsUrl": string,
  "newReviewUrl": string
}
Fields
duplicate
(deprecated)

object (Duplicate)

Information about the location that this location duplicates. Only present when locationState.is_duplicate is true. Deprecated: We are no longer supporting detailed information for duplicates.

mapsUrl

string

A link to the location on Maps.

newReviewUrl

string

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 (Access)
}
Fields
locationName

string

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

string

The place ID of the location that this duplicates.

access

enum (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 (Label)
    }
  ],
  "sourceUrl": string,
  "sections": [
    {
      object (Section)
    }
  ]
}
Fields
priceListId

string

Required. ID for the price list. Price list, section, and item IDs cannot be duplicated within this Location.

labels[]

object (Label)

Required. Language-tagged labels for the price list.

sourceUrl

string

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[]

object (Section)

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

string

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

description

string

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

languageCode

string

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 (Label)
    }
  ],
  "sectionType": enum (SectionType),
  "items": [
    {
      object (Item)
    }
  ]
}
Fields
sectionId

string

Required. ID for the section. Price list, section, and item IDs cannot be duplicated within this Location.

labels[]

object (Label)

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

enum (SectionType)

Optional. Type of the current price list section. Default value is FOOD.

items[]

object (Item)

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 (Label)
    }
  ],
  "price": {
    object (Money)
  }
}
Fields
itemId

string

Required. ID for the item. Price list, section, and item IDs cannot be duplicated within this Location.

labels[]

object (Label)

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

object (Money)

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

string

The three-letter currency code defined in ISO 4217.

units

string (int64 format)

The whole units of the amount. For example if currencyCode is "USD", then 1 unit is one US dollar.

nanos

integer

Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If units is positive, nanos must be positive or zero. If units is zero, nanos can be positive, zero, or negative. If units is negative, nanos must be negative or zero. For example $-1.75 is represented as units=-1 and nanos=-750,000,000.

Profile

All information pertaining to the location's profile.

JSON representation
{
  "description": string
}
Fields
description

string

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

string

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

MoreHours

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

JSON representation
{
  "hoursTypeId": string,
  "periods": [
    {
      object (TimePeriod)
    }
  ]
}
Fields
hoursTypeId

string

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

periods[]

object (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.

Methods

associate

Associates a location to a place ID.

batchGet

Gets all of the specified locations in the given account.

batchGetReviews

Returns the paginated list of reviews for all specified locations.

clearAssociation

Clears an association between a location and its place ID.

create

Creates a new location owned by the specified account, and returns it.

delete

Deletes a location.

fetchVerificationOptions

Reports all eligible verification options for a location in a specific language.

findMatches

Finds all of the possible locations that are a match to the specified location.

get

Gets the specified location.

getFoodMenus

Returns the food menus of a specific location.

getGoogleUpdated

Gets the Google-updated version of the specified location.

getHealthProviderAttributes

Returns the Health provider attributes of a specific location.

getServiceList

Get the specified service list of a location.

list

Lists the locations for the specified account.

patch

Updates the specified location.

reportInsights

Returns a report containing insights on one or more metrics by location.

transfer
(deprecated)

Moves a location from an account that the user owns to another account that the same user administers.

updateFoodMenus

Updates the food menus of a specific location.

updateHealthProviderAttributes

Updates the Health provider attributes of a specific location.

updateServiceList

Updates the specified service list of a location.

verify

Starts the verification process for a location.