Skip to main content
object

Requires read_inventory access scope.

The quantities of an inventory item at a specific location. Each inventory level connects one InventoryItem to one Location, tracking multiple quantity states like available, on-hand, incoming, and committed.

The quantities field provides access to different inventory states. Learn more about inventory states and relationships.

Boolean!
non-null

Whether the inventory items associated with the inventory level can be deactivated.

DateTime!
non-null

The date and time when the inventory level was created.

String

Describes either the impact of deactivating the inventory level, or why the inventory level can't be deactivated.

ID!
non-null

A globally-unique ID.

InventoryItem!
non-null

Inventory item associated with the inventory level.

Location!
non-null

The location associated with the inventory level.

[InventoryQuantity!]!
non-null

The quantity of an inventory item at a specific location, for a quantity name.

Arguments

[String!]!
required

The names of the requested inventory quantities.


InventoryScheduledChangeConnection!
non-null

Scheduled changes for the requested quantity names.

Arguments

Int

The first n elements from the paginated list.

String

The elements that come after the specified cursor.

Int

The last n elements from the paginated list.

String

The elements that come before the specified cursor.

Boolean
Default:false

Reverse the order of the underlying list.

ScheduledChangeSortKeys
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.

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 expected_at
time
id

Filter by id range.

Example:

  • id:1234
  • id:>=1234
  • id:<=1234
Anchor to quantity_names
string

DateTime!
non-null

The date and time when the inventory level was updated.


Was this section helpful?

query

Returns an InventoryLevel object by ID.

Arguments

ID!
required

The ID of the InventoryLevel to return.



Was this section helpful?

mutation

Activates an inventory item at a Location by creating an InventoryLevel that tracks stock quantities. This enables you to manage inventory for a ProductVariant at the specified location.

When you activate an inventory item, you can set its initial quantities. The available argument sets the quantity that's available for sale. onHand argument sets the total physical quantity at the location. If you don't specify quantities, then available and onHand default to zero.


Caution

As of version 2026-01, this mutation supports an optional idempotency key using the @idempotent directive. As of version 2026-04, the idempotency key is required and must be provided using the @idempotent directive. For more information, see the idempotency documentation.


Learn more about managing inventory quantities and states.

Arguments

ID!
required

The ID of the inventory item to activate.

ID!
required

The ID of the location of the inventory item being activated.

Int

The initial available quantity of the inventory item being activated at the location.

Int

The initial on_hand quantity of the inventory item being activated at the location.

Anchor to stockAtLegacyLocationstockAtLegacyLocation
Boolean
Default:false

Allow activation at or away from fulfillment service location with sku sharing off. This will deactivate inventory at all other locations.


mutation

Activates or deactivates an inventory item at multiple locations. When you activate an InventoryItem at a Location, that location can stock and track quantities for that item. When you deactivate an inventory item at a location, the inventory item is no longer stocked at that location.

The mutation accepts an inventory item ID and a list of location-specific activation settings. It returns the updated inventory item and any activated InventoryLevel objects.

Learn more about managing inventory quantities and states.

Arguments

ID!
required

The ID of the inventory item to modify the activation status locations for.

Anchor to inventoryItemUpdatesinventoryItemUpdates
[InventoryBulkToggleActivationInput!]!
required

A list of pairs of locations and activate status to update for the specified inventory item.



Was this section helpful?

interface

Was this section helpful?