# createLocation (https://developer.godaddy.com/en/docs/references/rest/catalog/inventory/mutations/createLocation)

***

title: createLocation
description: "Create a new location."
full: true
----------

mutation

Requires `commerce.product:write`.

Create a new location.

## Required headers

| Header       | Required | Description                                                                                                                     |
| ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `x-store-id` | Yes      | ID of the store the operation targets. Omitting it returns HTTP 200 with a GraphQL error: `extensions.code: "UNAUTHENTICATED"`. |

Go to [Authentication](https://developer.godaddy.com/docs/api-users/auth) for credential setup.

## Arguments

* `input` `MutationCreateLocationInput!` **required**
  * `address` `CreateAddressInput!` **required**
    * `addressLine1` `String!` **required**
    * `countryCode` `String!` **required**
    * `addressDetails` `AddressDetailsInput` **optional**
      * `addressType` `String` **optional**
      * `buildingName` `String` **optional**
      * `deliveryService` `String` **optional**
      * `geoCoordinates` `GeoCoordinatesInput` **optional**
      * `streetName` `String` **optional**
      * `streetNumber` `String` **optional**
      * `streetType` `String` **optional**
      * `subBuilding` `String` **optional**
    * `addressLine2` `String` **optional**
    * `addressLine3` `String` **optional**
    * `adminArea1` `String` **optional**
    * `adminArea2` `String` **optional**
    * `adminArea3` `String` **optional**
    * `adminArea4` `String` **optional**
    * `postalCode` `String` **optional**
  * `label` `String!` **required**
  * `metafields` `[CreateMetafieldInput!]` **optional**
    * `key` `String!` **required**
    * `namespace` `String!` **required**
    * `type` `String!` **required** — Metafield value type. Live catalog validation accepts lowercase values such as `boolean`, `string`, `stringMultiLine`, `number`, `numberDecimal`, `date`, `dateTime`, `json`, `measurement`, `url`, `reference`, `money`, `list.string`, `list.number`, `list.numberDecimal`. Uppercase `STRING` is rejected.
    * `value` `String!` **required**
  * `name` `String` **optional**
  * `references` `[CreateReferenceInput!]` **optional**
    * `origin` `String!` **required**
    * `value` `String!` **required**
  * `status` `String` **optional** — The status of the location, one of `ACTIVE`, `INACTIVE`, `ARCHIVED`.

## Possible returns

* `Location` `Location` — A location represents the physical location of an inventory.

- `address` `Address` **nullable** — The address of the Location.
- `createdAt` `DateTime!` **non-null** — The timestamp of when the Location was created.
- `id` `ID!` **non-null** — The globally-unique ID of the Location.
- `inventoryAdjustments` `LocationInventoryAdjustmentsConnection` **nullable** — An immutable entity that represents a change in state of a quantity of SKU at a particular time and location. Each adjustment will either have a positive, negative, or neutral impact on the count of available SKUs in a location.
- `inventoryCounts` `LocationInventoryCountsConnection` **nullable** — The quantity of a SKU in a specific state at a particular time and location.
- `label` `String` **nullable** — The display name of the Location.
- `metafields` `LocationMetafieldsConnection` **nullable**
- `name` `String!` **non-null** — A unique and human-friendly name of the Location.
- `references` `LocationReferencesConnection` **nullable** — A reference to the resource in an external service. This can be useful for integrating the resource to any external service.
- `skus` `LocationSkusConnection` **nullable** — The SKUs are purchasable items in the catalog.
- `status` `String!` **non-null** — The status of the location, one of `ACTIVE`, `INACTIVE`, `ARCHIVED`.
- `updatedAt` `DateTime!` **non-null** — The timestamp of when the Location was updated.
- `SKUs` `LocationSKUsConnection` **nullable** deprecated — The SKUs are purchasable items in the catalog. Deprecated: Use skus instead.
