Location
Requires access scope, access scope or access scope.
A physical location where merchants store and fulfill inventory. Locations include retail stores, warehouses, popups, dropshippers, or other places where inventory is managed or stocked.
Active locations can fulfill online orders when configured with shipping rates, local pickup, or local delivery options. Locations track inventory quantities for products and process order fulfillment. Third-party apps using can create and manage their own locations.
Anchor to FieldsFields
- Anchor to activatableactivatable•Boolean!non-null
- Anchor to addressaddress•Location
Address! non-null The address of this location.
- Anchor to addressVerifiedaddress•Boolean!
Verified non-null Whether the location address has been verified.
- Anchor to createdAtcreated•Date
At Time! non-null The date and time (ISO 8601 format) that the location was added to a shop.
- Anchor to deactivatabledeactivatable•Boolean!non-null
- Anchor to deactivatedAtdeactivated•String
At The date and time (ISO 8601 format) 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
".- Anchor to deletabledeletable•Boolean!non-null
Whether this location can be deleted.
- Anchor to fulfillmentServicefulfillment•Fulfillment
Service Service Name of the service provider that fulfills from this location.
- Anchor to fulfillsOnlineOrdersfulfills•Boolean!
Online Orders non-null Whether this location can fulfill online orders.
- Anchor to hasActiveInventoryhas•Boolean!
Active Inventory non-null Whether this location has active inventory.
- Anchor to hasUnfulfilledOrdershas•Boolean!
Unfulfilled Orders non-null Whether this location has orders that need to be fulfilled.
- •ID!non-null
A globally-unique ID.
- Anchor to inventoryLevelinventory•Inventory
Level Level The quantities of an inventory item at this location.
- Anchor to inventoryItemIdinventory•ID!
Item Id required The ID of the inventory item to obtain the inventory level for.
Arguments
- Anchor to inventoryLevelsinventory•Inventory
Levels Level Connection! non-null A list of the quantities of the inventory items that can be stocked at this location.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
- Anchor to queryquery•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.
Arguments
- Anchor to isActiveis•Boolean!
Active non-null - Anchor to isFulfillmentServiceis•Boolean!
Fulfillment Service non-null Whether this location is a fulfillment service.
- Anchor to legacyResourceIdlegacy•Unsigned
Resource Id Int64! non-null The ID of the corresponding resource in the REST Admin API.
- Anchor to localPickupSettingsV2local•Delivery
Pickup Settings V2 Local Pickup Settings Local pickup settings for the location.
- Anchor to metafieldmetafield•Metafield
A custom field, including its
namespaceandkey, that's associated with a Shopify resource for the purposes of adding and storing additional information.- Anchor to namespacenamespace•String
The container the metafield belongs to. If omitted, the app-reserved namespace will be used.
- •String!required
The key for the metafield.
Arguments
- Anchor to metafieldsmetafields•Metafield
Connection! non-null A list of custom fields that a merchant associates with a Shopify resource.
- Anchor to namespacenamespace•String
The metafield namespace to filter by. If omitted, all metafields are returned.
- Anchor to keyskeys•[String!]
List of keys of metafields in the format
namespace.key, will be returned in the same format.- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to namename•String!non-null
The name of the location.
- Anchor to shipsInventoryships•Boolean!
Inventory non-null Whether this location is used for calculating shipping rates. In multi-origin shipping mode, this flag is ignored.
- Anchor to suggestedAddressessuggested•[Location
Addresses Suggested Address!]! non-null List of suggested addresses for this location (empty if none).
- Anchor to updatedAtupdated•Date
At Time! non-null The date and time (ISO 8601 format) when the location was last updated.
Deprecated fields
- Anchor to isPrimaryis•Boolean!
Primary non-nullDeprecated - Anchor to metafieldDefinitionsmetafield•Metafield
Definitions Definition Connection! non-nullDeprecated - Anchor to namespacenamespace•String
Filter metafield definitions by namespace.
- Anchor to pinnedStatuspinned•Metafield
Status Definition Pinned Status Default:ANY Filter by the definition's pinned status.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
- Anchor to sortKeysort•Metafield
Key Definition Sort Keys 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.
- Anchor to queryquery•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.
- Anchor to default•string
Filter by a case-insensitive search of multiple fields in a document.
query=Bob Normanquery=title:green hoodie- Anchor to created_at•time
Filter by the date and time when the metafield definition was created.
created_at:>2020-10-21T23:39:20Zcreated_at:<nowcreated_at:<=2024- Anchor to namespace•string
Filter by the metafield definition
namespacefield.namespace:some-namespace- Anchor to type•string
Filter by the metafield definition
typefield.type:single_line_text_field- Anchor to updated_at•time
Filter by the date and time when the metafield definition was last updated.
updated_at:>2020-10-21T23:39:20Zupdated_at:<nowupdated_at:<=2024
Example:
Example:
Example:
Example:
Example:
Arguments
Anchor to QueriesQueries
- •query
Retrieves a
Locationby its ID. Locations are physical places where merchants store inventory, such as warehouses, retail stores, or fulfillment centers.Each location tracks inventory levels, fulfillment capabilities, and address information. Active locations can stock products and fulfill orders based on their configuration settings.
- •ID
The ID of the location to return. If no ID is provided, the primary location of the Shop is returned.
Arguments
- •query
Return a location by an identifier.
- Anchor to identifieridentifier•Location
Identifier Input! required The identifier of the location.
Arguments
- •query
A paginated list of inventory locations where merchants can stock
Productitems and fulfillOrderitems.Returns only active locations by default. Use the
argument to retrieve deactivated locations that can no longer stock inventory or fulfill orders. Use theargument to include locations thatapps manage. Use thequeryargument to filter by location attributes like name, address, and whether local pickup is enabled.- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
- Anchor to sortKeysort•Location
Key Sort Keys 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.
- Anchor to queryquery•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.
- Anchor to default•string
Filter by a case-insensitive search of multiple fields in a document.
query=Bob Normanquery=title:green hoodie- Anchor to active•string
- Anchor to address1•string
- Anchor to address2•string
- Anchor to city•string
- Anchor to country•string
- Anchor to created_at•time
- Anchor to geolocated•boolean
- Anchor to legacy•boolean
- Anchor to location_id•id
- Anchor to name•string
- Anchor to pickup_in_store•string
enableddisabled- Anchor to province•string
- Anchor to zip•string
Example:
Valid values:
- Anchor to includeLegacyinclude•Boolean
Legacy Default:false Whether to include the legacy locations of fulfillment services.
- Anchor to includeInactiveinclude•Boolean
Inactive Default:false Whether to include the locations that are deactivated.
Arguments
- Anchor to locationsAvailableForDeliveryProfilesConnectionlocations•query
Available For Delivery Profiles Connection Returns a list of all origin locations available for a delivery profile.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
Anchor to MutationsMutations
- •mutation
Activates a location so that you can stock inventory at the location. Refer to the
andactivatablefields on theLocationobject.CautionAs of 2026-01, this mutation supports an optional idempotency key using the
@idempotentdirective. As of 2026-04, the idempotency key is required and must be provided using the@idempotentdirective. For more information, see the idempotency documentation.- Anchor to locationIdlocation•ID!
Id required The ID of a location to activate.
Arguments
- •mutation
Adds a new
Locationwhere you can stock inventory and fulfill orders. Locations represent physical places like warehouses, retail stores, or fulfillment centers.The location requires a name and address with at least a country code. You can specify whether the location fulfills online orders, which determines if its inventory is available for online sales. You can also attach custom metafields to store additional information about the location.
- Anchor to inputinput•Location
Add Input! required The properties of the location to add.
Arguments
- •mutation
Deactivates a location and moves inventory, pending orders, and moving transfers " "to a destination location.
CautionAs of 2026-01, this mutation supports an optional idempotency key using the
@idempotentdirective. As of 2026-04, the idempotency key is required and must be provided using the@idempotentdirective. For more information, see the idempotency documentation.- Anchor to locationIdlocation•ID!
Id required The ID of a location to deactivate.
- Anchor to destinationLocationIddestination•ID
Location Id The ID of a destination location to which inventory, pending orders and moving transfers will be moved from the location to deactivate.
Arguments
- •mutation
Updates the properties of an existing
Location. You can modify the location's name, address, whether it fulfills online orders, and custommetafields.Apps that created a
can edit the associated location to ensure accurate representation of their fulfillment network.Learn more about editing locations for fulfillment services.
- •ID!required
The ID of a location to edit.
- Anchor to inputinput•Location
Edit Input! required The updated properties for the location.
Arguments
- •ID!