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

PostalAddress

Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains).

In typical usage an address would be created via user input or from importing existing data, depending on the type of process.

Advice on address input / editing: - Use an i18n-ready address widget such as https://github.com/googlei18n/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used.

For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478

JSON representation
{
  "revision": number,
  "regionCode": string,
  "languageCode": string,
  "postalCode": string,
  "sortingCode": string,
  "administrativeArea": string,
  "locality": string,
  "sublocality": string,
  "addressLines": [
    string
  ],
  "recipients": [
    string
  ],
  "organization": string
}
Fields
revision

number

The schema revision of the PostalAddress. This must be set to 0, which is the latest revision.

All new revisions must be backward compatible with old revisions.

regionCode

string

Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See http://cldr.unicode.org/ and http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: "CH" for Switzerland.

languageCode

string

Optional. BCP-47 language code of the contents of this address (if known). This is often the UI language of the input form or is expected to match one of the languages used in the address' country/region, or their transliterated equivalents. This can affect formatting in certain countries, but is not critical to the correctness of the data and will never affect any validation or other non-formatting related operations.

If this value is not known, it should be omitted (rather than specifying a possibly incorrect default).

Examples: "zh-Hant", "ja", "ja-Latn", "en".

postalCode

string

Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (e.g. state/zip validation in the U.S.A.).

sortingCode

string

Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number alone, representing the "sector code" (Jamaica), "delivery area indicator" (Malawi) or "post office indicator" (e.g. Côte d'Ivoire).

administrativeArea

string

Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (e.g. "Barcelona" and not "Catalonia"). Many countries don't use an administrative area in postal addresses. E.g. in Switzerland this should be left unpopulated.

locality

string

Optional. Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave locality empty and use addressLines.

sublocality

string

Optional. Sublocality of the address. For example, this can be neighborhoods, boroughs, districts.

addressLines[]

string

Unstructured address lines describing the lower levels of an address.

Because values in addressLines do not have type information and may sometimes contain multiple values in a single field (e.g. "Austin, TX"), it is important that the line order is clear. The order of address lines should be "envelope order" for the country/region of the address. In places where this can vary (e.g. Japan), address_language is used to make it explicit (e.g. "ja" for large-to-small ordering and "ja-Latn" or "en" for small-to-large). This way, the most specific line of an address can be selected based on the language.

The minimum permitted structural representation of an address consists of a regionCode with all remaining information placed in the addressLines. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved.

Creating an address only containing a regionCode and addressLines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas).

recipients[]

string

Optional. The recipient at the address. This field may, under certain circumstances, contain multiline information. For example, it might contain "care of" information.

organization

string

Optional. The name of the organization at the address.

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.

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.

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.

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.

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.

Send feedback about...

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