Creates a new Location that will be owned by the logged in user.

Required Scalar Argument

  • <parent> (string)
    • Required. 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
  categories:
    primary-category:
      display-name: string
      name: string
  labels: [string]
  language-code: string
  latlng:
    latitude: number
    longitude: number
  metadata:
    can-delete: boolean
    can-have-business-calls: boolean
    can-have-food-menus: boolean
    can-modify-service-list: boolean
    can-operate-health-data: boolean
    can-operate-local-post: boolean
    can-operate-lodging-data: boolean
    duplicate-location: string
    has-google-updated: boolean
    has-pending-edits: boolean
    has-voice-of-merchant: boolean
    maps-uri: string
    new-review-uri: string
    place-id: string
  name: string
  open-info:
    can-reopen: boolean
    opening-date:
      day: integer
      month: integer
      year: integer
    status: string
  phone-numbers:
    additional-phones: [string]
    primary-phone: string
  profile:
    description: string
  relationship-data:
    parent-chain: string
    parent-location:
      place-id: string
      relation-type: string
  service-area:
    business-type: string
    region-code: string
  store-code: string
  storefront-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
  title: string
  website-uri: 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

    • Required. An alternate phone number to display on AdWords location extensions instead of the location's primary phone number.
  • ..categories.primary-category display-name=magna

    • Output only. The human-readable name of the category. This is set when reading the location. When modifying the location, category_id must be set.
  • name=no

    • Required. A stable ID (provided by Google) for this category. The value must be specified when modifying the category (when creating or updating a location).
  • ... labels=ipsum

    • Optional. A collection of free-form strings to allow you to tag your business. These labels are NOT user facing; only you can see them. Must be between 1-255 characters per label.
    • Each invocation of this argument appends the given value to the array.
  • language-code=voluptua.
    • Immutable. The language of the location. Set during creation and not updateable.
  • latlng latitude=0.5857873539022715
    • The latitude in degrees. It must be in the range [-90.0, +90.0].
  • longitude=0.16568728368878083

    • The longitude in degrees. It must be in the range [-180.0, +180.0].
  • ..metadata can-delete=true

    • Output only. Indicates whether the location can be deleted using the API.
  • can-have-business-calls=true
    • Output only. Indicates if the listing is eligible for business calls.
  • can-have-food-menus=true
    • Output only. Indicates if the listing is eligible for food menu.
  • can-modify-service-list=true
    • Output only. Indicates if the listing can modify the service list.
  • can-operate-health-data=true
    • Output only. Indicates whether the location can operate on Health data.
  • can-operate-local-post=false
    • Output only. Indicates if the listing can manage local posts.
  • can-operate-lodging-data=true
    • Output only. Indicates whether the location can operate on Lodging data.
  • duplicate-location=invidunt
    • Output only. The location resource that this location duplicates.
  • has-google-updated=true
    • Output only. Indicates whether the place ID associated with this location has updates that need to be updated or rejected by the client. If this boolean is set, you should call the getGoogleUpdated method to lookup information that's needs to be verified.
  • has-pending-edits=true
    • Output only. Indicates whether any of this Location's properties are in the edit pending state.
  • has-voice-of-merchant=false
    • Output only. Indicates if the listing has Voice of Merchant. If this boolean is false, you should call the locations.getVoiceOfMerchantState API to get details as to why they do not have Voice of Merchant.
  • maps-uri=ut
    • Output only. A link to the location on Maps.
  • new-review-uri=gubergren
    • Output only. A link to the page on Google Search where a customer can leave a review for the location.
  • place-id=rebum.

    • Output only. If this locationappears on Google Maps, this field is populated with the place ID for the location. This ID can be used in various Places APIs. This field can be set during Create calls, but not for Update.
  • .. name=est

    • Google identifier for this location in the form: locations/{location_id}.
  • open-info can-reopen=true
    • Output only. Indicates whether this business is eligible for re-open.
  • opening-date day=51
    • Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
  • month=94
    • Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
  • year=39

    • Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
  • .. status=ea

    • Required. Indicates whether or not the Location is currently open for business. All locations are open by default, unless updated to be closed.
  • ..phone-numbers additional-phones=dolor

    • Optional. 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.
  • primary-phone=lorem

    • Required. 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=eos

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

    • The resource name of the Chain that this location is member of. How to find Chain ID
  • parent-location place-id=sed
    • Required. Specify the location that is on the other side of the relation by its placeID.
  • relation-type=duo

    • Required. The type of the relationship.
  • ...service-area business-type=sed

    • Required. Indicates the type of the service area business.
  • region-code=no

    • Immutable. CLDR region code of the country/region that this service area business is based in. See http://cldr.unicode.org/ and http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: "CH" for Switzerland. This field is required for CUSTOMER_LOCATION_ONLY businesses, and is ignored otherwise. The region specified here can be different from regions for the areas that this business serves (e.g. service area businesses that provide services in regions other than the one that they are based in). If this location requires verification after creation, the address provided for verification purposes must be located within this region, and the business owner or their authorized representative must be able to receive postal mail at the provided verification address.
  • .. store-code=stet

    • Optional. External identifier for this location, which must be unique within a given account. This is a means of associating the location with your own records.
  • storefront-address address-lines=kasd
    • 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=et
    • 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=et
    • 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=et
    • Optional. The name of the organization at the address.
  • postal-code=vero
    • 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=erat
    • 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=sed
    • 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 https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: "CH" for Switzerland.
  • revision=81
    • 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=dolore
    • 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=et

    • Optional. Sublocality of the address. For example, this can be neighborhoods, boroughs, districts.
  • .. title=voluptua.

    • Required. 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").
  • website-uri=amet.
    • Optional. 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

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

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