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)
  }
}
Fields
name

string

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

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 Google My Business 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[]

object(PriceList)

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.

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

Enums
DAY_OF_WEEK_UNSPECIFIED The unspecified day-of-week.
MONDAY The day-of-week of Monday.
TUESDAY The day-of-week of Tuesday.
WEDNESDAY The day-of-week of Wednesday.
THURSDAY The day-of-week of Thursday.
FRIDAY The day-of-week of Friday.
SATURDAY The day-of-week of Saturday.
SUNDAY The day-of-week of 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)

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 representing a latitude/longitude pair. This is expressed as a pair of doubles representing degrees latitude and degrees longitude. Unless specified otherwise, this 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.

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.

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 GMB API or Google My Business 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.

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.

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,
  "hasPendingVerification": 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. For more information, see metadata.duplicate.

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.

hasPendingVerification

boolean

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

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

object(Duplicate)

Information about the location that this location duplicates. Only present when locationState.is_duplicate is true.

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

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)
    }
  ],
  "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.

items[]

object(Item)

Items that are contained within this section of the price list.

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.

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

Methods

associate

Associates a location to a place ID.

batchGet

Gets all of the specified locations in the given account.

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.

getGoogleUpdated

Gets the Google-updated version of the specified 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

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

verify

Starts the verification process for a location.

Send feedback about...

Google My Business API
Google My Business API
Need help? Visit our support page.