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

Required Scalar Argument

  • <parent> (string)
    • The name of the account in which to create this location.

Required Request Value

The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.

For example, a structure like this:

Location:
  ad-words-location-extensions:
    ad-phone: string
  additional-phones: [string]
  address:
    address-lines: [string]
    administrative-area: string
    language-code: string
    locality: string
    organization: string
    postal-code: string
    recipients: [string]
    region-code: string
    revision: integer
    sorting-code: string
    sublocality: string
  labels: [string]
  language-code: string
  latlng:
    latitude: number
    longitude: number
  location-key:
    explicit-no-place-id: boolean
    place-id: string
    plus-page-id: string
    request-id: string
  location-name: string
  location-state:
    can-delete: boolean
    can-update: boolean
    has-pending-edits: boolean
    has-pending-verification: boolean
    is-disabled: boolean
    is-disconnected: boolean
    is-duplicate: boolean
    is-google-updated: boolean
    is-local-post-api-disabled: boolean
    is-pending-review: boolean
    is-published: boolean
    is-suspended: boolean
    is-verified: boolean
    needs-reverification: boolean
  metadata:
    duplicate:
      access: string
      location-name: string
      place-id: string
    maps-url: string
    new-review-url: string
  name: string
  open-info:
    can-reopen: boolean
    opening-date:
      day: integer
      month: integer
      year: integer
    status: string
  primary-category:
    category-id: string
    display-name: string
  primary-phone: string
  profile:
    description: string
  relationship-data:
    parent-chain: string
  service-area:
    business-type: string
    radius:
      latlng:
        latitude: number
        longitude: number
      radius-km: number
  store-code: string
  website-url: string

can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.

  • -r .ad-words-location-extensions ad-phone=et

    • An alternate phone number to display on AdWords location extensions instead of the location's primary phone number.
  • .. additional-phones=et

    • Up to two phone numbers (mobile or landline, no fax) at which your business can be called, in addition to your primary phone number.
    • Each invocation of this argument appends the given value to the array.
  • address address-lines=vero

    • Unstructured address lines describing the lower levels of an address.

      Because values in address_lines 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 region_code with all remaining information placed in the address_lines. 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 region_code and address_lines, 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). - Each invocation of this argument appends the given value to the array. * administrative-area=erat - 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. * language-code=sed - 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". * locality=duo - 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 address_lines. * organization=dolore - Optional. The name of the organization at the address. * postal-code=et - 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.). * recipients=voluptua. - Optional. The recipient at the address. This field may, under certain circumstances, contain multiline information. For example, it might contain "care of" information. - Each invocation of this argument appends the given value to the array. * region-code=amet. - 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. * revision=5 - 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. * sorting-code=diam - 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). * sublocality=dolor - Optional. Sublocality of the address. For example, this can be neighborhoods, boroughs, districts.

  • .. labels=et

    • 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).
    • Each invocation of this argument appends the given value to the array.
  • language-code=et
    • The language of the location. Set during creation and not updateable.
  • latlng latitude=0.05383208152352925
    • The latitude in degrees. It must be in the range [-90.0, +90.0].
  • longitude=0.017140519879742522

    • The longitude in degrees. It must be in the range [-180.0, +180.0].
  • ..location-key explicit-no-place-id=false

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

    • 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 explicit_no_place_id bool qualifies whether an unset place ID is deliberate or not. * plus-page-id=invidunt - Output only. If this location has a Google+ page associated with it, this is populated with the Google+ page ID for this location. * request-id=stet - Output only. The request_id used to create this location. May be empty if this location was created outside of the GMB API or Google My Business Locations.

  • .. location-name=vero

    • 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").
  • location-state can-delete=true
    • Output only. Indicates whether the location can be deleted using the Google My Business API.
  • can-update=true
    • Output only. Indicates whether the location can be updated.
  • has-pending-edits=false
    • Output only. Indicates whether any of this Location's properties are in the edit pending state.
  • has-pending-verification=true
    • Output only. Indicates whether the location has pending verification requests.
  • is-disabled=true
    • Output only. Indicates whether the location is disabled.
  • is-disconnected=false
    • Output only. Indicates whether the location is disconnected from a place on Google Maps.
  • is-duplicate=false
    • Output only. Indicates whether the location is a duplicate of another location. For more information, see metadata.duplicate.
  • is-google-updated=true
    • Output only. Indicates whether the place ID associated with this location has updates.
  • is-local-post-api-disabled=false
  • is-pending-review=false
    • Output only. Indicates whether the review of the location is pending.
  • is-published=false
    • Output only. Indicates whether the location is published.
  • is-suspended=false
    • 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] (https://support.google.com/business/answer/4569145).
  • is-verified=true
    • Output only. Indicates whether the location is verified.
  • needs-reverification=true

    • Output only. Indicates whether the location requires reverification.
  • ..metadata.duplicate access=sit

    • Indicates whether the user has access to the location it duplicates.
  • location-name=et
    • 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.
  • place-id=tempor

    • The place ID of the location that this duplicates.
  • .. maps-url=aliquyam

    • A link to the location on Maps.
  • new-review-url=ipsum

    • A link to the page on Google Search where a customer can leave a review for the location.
  • .. name=et

    • 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. * open-info can-reopen=true - Output only. Indicates whether this business is eligible for re-open. * opening-date day=94 - Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. * month=71 - Month of year. Must be from 1 to 12, or 0 if specifying a year without a month and day. * year=72 - Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year.

  • .. status=dolores

    • Indicates whether or not the Location is currently open for business. All locations are open by default, unless updated to be closed.
  • ..primary-category category-id=dolores

    • @OutputOnly. A stable ID (provided by Google) for this category. The category_id must be specified when modifying the category (when creating or updating a location).
  • display-name=et

    • @OutputOnly. The human-readable name of the category. This is set when reading the location. When modifying the location, category_id must be set.
  • .. primary-phone=sed

    • 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.
  • profile description=no

    • Description of the location in your own voice, not editable by anyone else.
  • ..relationship-data parent-chain=et

    • The resource name of the Chain that this location is member of. How to find Chain ID
  • ..service-area business-type=elitr

    • Indicates the type of the service area business.
  • radius.latlng latitude=0.9036304069319014
    • The latitude in degrees. It must be in the range [-90.0, +90.0].
  • longitude=0.3160448060928295

    • The longitude in degrees. It must be in the range [-180.0, +180.0].
  • .. radius-km=0.07842573666472352

    • The distance in kilometers of the area around the point.
  • ... store-code=sadipscing

    • 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.
  • website-url=aliquyam
    • 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.

About Cursors

The cursor position is key to comfortably set complex nested structures. The following rules apply:

  • The cursor position is always set relative to the current one, unless the field name starts with the . character. Fields can be nested such as in -r f.s.o .
  • The cursor position is set relative to the top-level structure if it starts with ., e.g. -r .s.s
  • You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify -r struct.sub_struct=bar.
  • You can move the cursor one level up by using ... Each additional . moves it up one additional level. E.g. ... would go three levels up.

Optional Output Flags

The method's return value a JSON encoded structure, which will be written to standard output by default.

  • -o out
    • out specifies the destination to which to write the server's result to. It will be a JSON-encoded structure. The destination may be - to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.

Optional Method Properties

You may set the following properties to further configure the call. Please note that -p is followed by one or more key-value-pairs, and is called like this -p k1=v1 k2=v2 even though the listing below repeats the -p for completeness.

  • -p request-id=string

    • A unique request ID for the server to detect duplicated requests. We recommend using UUIDs. Max length is 50 characters.
  • -p validate-only=boolean

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

Optional General Properties

The following properties can configure any call, and are not specific to this method.

  • -p $-xgafv=string

    • V1 error format.
  • -p access-token=string

    • OAuth access token.
  • -p alt=string

    • Data format for response.
  • -p callback=string

    • JSONP
  • -p fields=string

    • Selector specifying which fields to include in a partial response.
  • -p key=string

    • API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
  • -p oauth-token=string

    • OAuth 2.0 token for the current user.
  • -p pretty-print=boolean

    • Returns response with indentations and line breaks.
  • -p quota-user=string

    • Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
  • -p upload-type=string

    • Legacy upload protocol for media (e.g. "media", "multipart").
  • -p upload-protocol=string

    • Upload protocol for media (e.g. "raw", "multipart").