--- title: Location - GraphQL Admin description: >- Represents the location where the physical good resides. You can stock inventory at active locations. Active locations that have `fulfills_online_orders: true` and are configured with a shipping rate, pickup enabled or local delivery will be able to sell from their storefront. api_version: unstable api_name: admin source_url: html: 'https://shopify.dev/docs/api/admin-graphql/unstable/objects/Location' md: 'https://shopify.dev/docs/api/admin-graphql/unstable/objects/Location.md' --- # Location object Requires `read_locations` access scope, `read_inventory` access scope or `read_markets_home` access scope. Represents the location where the physical good resides. You can stock inventory at active locations. Active locations that have `fulfills_online_orders: true` and are configured with a shipping rate, pickup enabled or local delivery will be able to sell from their storefront. ## Fields * activatable [Boolean!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) non-null Whether the location can be reactivated. If `false`, then trying to activate the location with the [`LocationActivate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/locationActivate) mutation will return an error that describes why the location can't be activated. * address [Location​Address!](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationAddress) non-null The address of this location. * address​Verified [Boolean!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) non-null Whether the location address has been verified. * created​At [Date​Time!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/DateTime) non-null The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) that the location was added to a shop. * deactivatable [Boolean!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) non-null Whether this location can be deactivated. If `true`, then the location can be deactivated by calling the [`LocationDeactivate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/locationDeactivate) mutation. If `false`, then calling the mutation to deactivate it will return an error that describes why the location can't be deactivated. * deactivated​At [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) that the location was deactivated at. For example, 3:30 pm on September 7, 2019 in the time zone of UTC (Universal Time Coordinated) is represented as `"2019-09-07T15:50:00Z`". * deletable [Boolean!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) non-null Whether this location can be deleted. * fulfillment​Service [Fulfillment​Service](https://shopify.dev/docs/api/admin-graphql/unstable/objects/FulfillmentService) Name of the service provider that fulfills from this location. * fulfills​Online​Orders [Boolean!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) non-null Whether this location can fulfill online orders. * has​Active​Inventory [Boolean!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) non-null Whether this location has active inventory. * has​Unfulfilled​Orders [Boolean!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) non-null Whether this location has orders that need to be fulfilled. * id [ID!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/ID) non-null A globally-unique ID. * inventory​Level [Inventory​Level](https://shopify.dev/docs/api/admin-graphql/unstable/objects/InventoryLevel) The quantities of an inventory item at this location. * inventory​Item​Id [ID!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/ID) required ### Arguments The ID of the inventory item to obtain the inventory level for. *** * inventory​Levels [Inventory​Level​Connection!](https://shopify.dev/docs/api/admin-graphql/unstable/connections/InventoryLevelConnection) non-null A list of the quantities of the inventory items that can be stocked at this location. * first [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) ### Arguments The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * after [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * reverse [Boolean](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) Default:false Reverse the order of the underlying list. * query [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax). * created\_at time * * id id * inventory\_group\_id id - Filter by `id` range. - Example: * `id:1234` * `id:>=1234` * `id:<=1234` * inventory\_item\_id id * updated\_at time *** * is​Active [Boolean!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) non-null Whether the location is active. A deactivated location can be activated (change `isActive: true`) if it has `activatable` set to `true` by calling the [`locationActivate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/locationActivate) mutation. * is​Fulfillment​Service [Boolean!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) non-null Whether this location is a fulfillment service. * legacy​Resource​Id [Unsigned​Int64!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/UnsignedInt64) non-null The ID of the corresponding resource in the REST Admin API. * local​Pickup​Settings​V2 [Delivery​Local​Pickup​Settings](https://shopify.dev/docs/api/admin-graphql/unstable/objects/DeliveryLocalPickupSettings) Local pickup settings for the location. * metafield [Metafield](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Metafield) A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. * namespace [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) ### Arguments The container the metafield belongs to. If omitted, the app-reserved namespace will be used. * key [String!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) required The key for the metafield. *** * metafields [Metafield​Connection!](https://shopify.dev/docs/api/admin-graphql/unstable/connections/MetafieldConnection) non-null A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. * namespace [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) ### Arguments The metafield namespace to filter by. If omitted, the app-reserved namespace will be used. * keys [\[String!\]](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) List of keys of metafields in the format `namespace.key`, will be returned in the same format. * first [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * after [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * reverse [Boolean](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) Default:false Reverse the order of the underlying list. *** * metafields​By​Identifiers [\[Metafield\]!](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Metafield) non-null The metafields associated with the resource matching the supplied list of namespaces and keys. * identifiers [\[Has​Metafields​Identifier!\]!](https://shopify.dev/docs/api/admin-graphql/unstable/input-objects/HasMetafieldsIdentifier) required ### Arguments The list of metafields to retrieve by namespace and key. *** * name [String!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) non-null The name of the location. * ships​Inventory [Boolean!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) non-null Whether this location is used for calculating shipping rates. In multi-origin shipping mode, this flag is ignored. * suggested​Addresses [\[Location​Suggested​Address!\]!](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationSuggestedAddress) non-null List of suggested addresses for this location (empty if none). * updated​At [Date​Time!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/DateTime) non-null The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the location was last updated. ### Deprecated fields * is​Primary [Boolean!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) non-nullDeprecated * metafield​Definitions [Metafield​Definition​Connection!](https://shopify.dev/docs/api/admin-graphql/unstable/connections/MetafieldDefinitionConnection) non-nullDeprecated * namespace [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) ### Arguments Filter metafield definitions by namespace. * pinned​Status [Metafield​Definition​Pinned​Status](https://shopify.dev/docs/api/admin-graphql/unstable/enums/MetafieldDefinitionPinnedStatus) Default:ANY Filter by the definition's pinned status. * first [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * after [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * reverse [Boolean](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) Default:false Reverse the order of the underlying list. * sort​Key [Metafield​Definition​Sort​Keys](https://shopify.dev/docs/api/admin-graphql/unstable/enums/MetafieldDefinitionSortKeys) Default:ID Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). * query [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax). * * default string * created\_at time * id id * key string * namespace string * owner\_type string * type string * updated\_at time - Filter by a case-insensitive search of multiple fields in a document. - Example: * `query=Bob Norman` * `query=title:green hoodie` Filter by the date and time when the metafield definition was created. - Example: * `created_at:>2020-10-21T23:39:20Z` * `created_at:=1234` * `id:<=1234` Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. - Example: * `key:some-key` Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. - Example: * `namespace:some-namespace` Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. - Example: * `owner_type:PRODUCT` Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. - Example: * `type:single_line_text_field` Filter by the date and time when the metafield definition was last updated. Example: * `updated_at:>2020-10-21T23:39:20Z` * `updated_at:[LocationConnection.nodes](https://shopify.dev/docs/api/admin-graphql/unstable/connections/LocationConnection#returns-nodes) * {}[LocationEdge.node](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationEdge#field-LocationEdge.fields.node) * {}[LocationSnapshot.location](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationSnapshot#field-LocationSnapshot.fields.location) * {}[LocationsCondition.locations](https://shopify.dev/docs/api/admin-graphql/unstable/objects/LocationsCondition#field-LocationsCondition.fields.locations) * {}[Order.retailLocation](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Order#field-Order.fields.retailLocation) * {}[OrderTransaction.location](https://shopify.dev/docs/api/admin-graphql/unstable/objects/OrderTransaction#field-OrderTransaction.fields.location) * {}[RefundLineItem.location](https://shopify.dev/docs/api/admin-graphql/unstable/objects/RefundLineItem#field-RefundLineItem.fields.location) * {}[ReverseFulfillmentOrderDisposition.location](https://shopify.dev/docs/api/admin-graphql/unstable/objects/ReverseFulfillmentOrderDisposition#field-ReverseFulfillmentOrderDisposition.fields.location) * {}[SubscriptionDeliveryMethodPickupOption.location](https://shopify.dev/docs/api/admin-graphql/unstable/objects/SubscriptionDeliveryMethodPickupOption#field-SubscriptionDeliveryMethodPickupOption.fields.location) * {}[SubscriptionPickupOption.location](https://shopify.dev/docs/api/admin-graphql/unstable/objects/SubscriptionPickupOption#field-SubscriptionPickupOption.fields.location) ### Possible type in * [Metafield​Referencer](https://shopify.dev/docs/api/admin-graphql/unstable/unions/MetafieldReferencer) *** ## Queries * [location](https://shopify.dev/docs/api/admin-graphql/unstable/queries/location) query Returns an inventory Location resource by ID. * id [ID](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/ID) ### Arguments The ID of the location to return. If no ID is provided, the primary location of the Shop is returned. *** * [location​By​Identifier](https://shopify.dev/docs/api/admin-graphql/unstable/queries/locationByIdentifier) query Return a location by an identifier. * identifier [Location​Identifier​Input!](https://shopify.dev/docs/api/admin-graphql/unstable/input-objects/LocationIdentifierInput) required ### Arguments The identifier of the location. *** * [locations](https://shopify.dev/docs/api/admin-graphql/unstable/queries/locations) query Returns a list of active inventory locations. * first [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) ### Arguments The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * after [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * reverse [Boolean](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) Default:false Reverse the order of the underlying list. * sort​Key [Location​Sort​Keys](https://shopify.dev/docs/api/admin-graphql/unstable/enums/LocationSortKeys) Default:NAME Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). * query [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax). * * default string * active string - Filter by a case-insensitive search of multiple fields in a document. - Example: * `query=Bob Norman` * `query=title:green hoodie` * address1 string * address2 string * city string * country string * created\_at time * geolocated boolean * * id id * legacy boolean - Filter by `id` range. - Example: * `id:1234` * `id:>=1234` * `id:<=1234` * location\_id id * name string * * pickup\_in\_store string * province string - - Valid values: * `enabled` * `disabled` * zip string * include​Legacy [Boolean](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) Default:false Whether to include the legacy locations of fulfillment services. * include​Inactive [Boolean](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) Default:false Whether to include the locations that are deactivated. *** * [locations​Available​For​Delivery​Profiles​Connection](https://shopify.dev/docs/api/admin-graphql/unstable/queries/locationsAvailableForDeliveryProfilesConnection) query Returns a list of all origin locations available for a delivery profile. * first [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) ### Arguments The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * after [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * reverse [Boolean](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) Default:false Reverse the order of the underlying list. *** * [locations​Available​For​Delivery​Profiles](https://shopify.dev/docs/api/admin-graphql/unstable/queries/locationsAvailableForDeliveryProfiles) query Deprecated *** ## \Location Queries ### Queried by * \[location](https://shopify.dev/docs/api/admin-graphql/unstable/queries/location) * \[location​By​Identifier](https://shopify.dev/docs/api/admin-graphql/unstable/queries/locationByIdentifier) * \[locations](https://shopify.dev/docs/api/admin-graphql/unstable/queries/locations) * \[locations​Available​For​Delivery​Profiles​Connection](https://shopify.dev/docs/api/admin-graphql/unstable/queries/locationsAvailableForDeliveryProfilesConnection) *** ## Mutations * [location​Activate](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/locationActivate) mutation Activates a location so that you can stock inventory at the location. Refer to the [`isActive`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-isactive) and [`activatable`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location#field-activatable) fields on the `Location` object. * location​Id [ID!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/ID) required ### Arguments The ID of a location to activate. *** * [location​Add](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/locationAdd) mutation Adds a new location. * input [Location​Add​Input!](https://shopify.dev/docs/api/admin-graphql/unstable/input-objects/LocationAddInput) required ### Arguments The properties of the location to add. *** * [location​Deactivate](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/locationDeactivate) mutation Deactivates a location and moves inventory, pending orders, and moving transfers to a destination location. * location​Id [ID!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/ID) required ### Arguments The ID of a location to deactivate. * destination​Location​Id [ID](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/ID) The ID of a destination location to which inventory, pending orders and moving transfers will be moved from the location to deactivate. *** * [location​Edit](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/locationEdit) mutation Edits an existing location. [As of the 2023-10 API version](https://shopify.dev/changelog/apps-can-now-change-the-name-and-address-of-their-fulfillment-service-locations), apps can change the name and address of their fulfillment service locations. * id [ID!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/ID) required ### Arguments The ID of a location to edit. * input [Location​Edit​Input!](https://shopify.dev/docs/api/admin-graphql/unstable/input-objects/LocationEditInput) required The updated properties for the location. *** *** ## <\~> Location Mutations ### Mutated by * <\~>[location​Activate](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/locationActivate) * <\~>[location​Add](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/locationAdd) * <\~>[location​Deactivate](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/locationDeactivate) * <\~>[location​Edit](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/locationEdit) *** ## Interfaces * * [Has​Metafield​Definitions](https://shopify.dev/docs/api/admin-graphql/unstable/interfaces/HasMetafieldDefinitions) interface * [Has​Metafields](https://shopify.dev/docs/api/admin-graphql/unstable/interfaces/HasMetafields) interface * [Legacy​Interoperability](https://shopify.dev/docs/api/admin-graphql/unstable/interfaces/LegacyInteroperability) interface * [Node](https://shopify.dev/docs/api/admin-graphql/unstable/interfaces/Node) interface *** ## ||-Location Implements ### Implements * ||-[Has​Metafield​Definitions](https://shopify.dev/docs/api/admin-graphql/unstable/interfaces/HasMetafieldDefinitions) * ||-[Has​Metafields](https://shopify.dev/docs/api/admin-graphql/unstable/interfaces/HasMetafields) * ||-[Legacy​Interoperability](https://shopify.dev/docs/api/admin-graphql/unstable/interfaces/LegacyInteroperability) * ||-[Node](https://shopify.dev/docs/api/admin-graphql/unstable/interfaces/Node)