Skip to main content
object

Requires read_inventory access scope or read_products access scope.

An inventory item represents the inventory for a product variant. It holds the stock keeping unit (SKU), whether quantities are tracked, shipping requirements, and customs information.

Use the inventoryLevels field to get the inventory level for each location that stocks the item, and the level's quantities field to read its inventory quantities by name. Quantity names represent the inventory states that merchants use to track inventory.

Learn more about inventory object relationships.

•CountryCode

The ISO 3166-1 alpha-2 country code of where the item originated from.

Show enum values
Anchor to countryHarmonizedSystemCodescountryHarmonizedSystemCodes
•CountryHarmonizedSystemCodeConnection!
non-null

A list of country specific harmonized system codes.

Show fields

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•Boolean
Default:false

Reverse the order of the underlying list.


•DateTime!
non-null

The date and time when the inventory item was created.

•Int!
non-null

The number of inventory items that share the same SKU with this item.

Anchor to harmonizedSystemCodeharmonizedSystemCode
•String

The harmonized system code of the item. This must be a number between 6 and 13 digits.

•ID!
non-null

A globally-unique ID.

•URL

The URL that points to the inventory history for the item.

•InventoryLevel

The inventory item's quantities at the specified location.

Show fields

Arguments

•Boolean
Default:false

Whether to return the inventory level if it is inactive.

•ID!
required

ID of the location for which the inventory level is requested.


•InventoryLevelConnection!
non-null

A list of the inventory item's quantities for each location that the inventory item can be stocked at.

Show fields

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Boolean
Default:false

Whether to include inactive inventory levels.

•Int

The last n elements from the paginated list.

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

Show filters
Anchor to created_at
•time
•id

Filter by id range.

Example:

  • id:1234
  • id:>=1234
  • id:<=1234
Anchor to inventory_group_id
•id
Anchor to inventory_item_id
•id
Anchor to updated_at
•time
•Boolean
Default:false

Reverse the order of the underlying list.


•UnsignedInt64!
non-null

The ID of the corresponding resource in the REST Admin API.

•Count

The number of locations where this inventory item is stocked.

Show fields
•InventoryItemMeasurement!
non-null

The packaging dimensions of the inventory item.

Show fields
Anchor to provinceCodeOfOriginprovinceCodeOfOrigin
•String

The ISO 3166-2 alpha-2 province code of where the item originated from.

•Boolean!
non-null

Whether a customer needs to provide a shipping address when placing an order containing the inventory item.

•String

Inventory item SKU. Case-sensitive string.

•Boolean!
non-null

Whether inventory levels are tracked for the item.

•EditableProperty!
non-null

Whether the value of the tracked field for the inventory item can be changed.

Show fields
•MoneyV2

Unit cost associated with the inventory item. The shop's currency is used. Note: the user must have "View product costs" permission granted in order to access this field once product granular permissions are enabled.

Show fields
•DateTime!
non-null

The date and time when the inventory item was updated.

•ProductVariantConnection

A paginated list of the variants that reference this inventory item.

Show fields

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.


•ProductVariant!
non-nullDeprecated
Show fields

Was this section helpful?

•query

Retrieves an inventory item by its ID. An inventory item represents the inventory for a product variant, and holds the stock keeping unit (SKU), whether quantities are tracked, shipping requirements, and customs information.

Use the inventoryLevels field to get the inventory level for each location that stocks the item, and the level's quantities field to read its inventory quantities by name.

Learn more about inventory object relationships.

Show fields

Arguments

•ID!
required

The ID of the InventoryItem to return.


•query

Returns a list of inventory items.

Show fields

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

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

Show filters
Anchor to created_at
•time
•id

Filter by id range.

Example:

  • id:1234
  • id:>=1234
  • id:<=1234
•string

Filter by the inventory item sku field. Learn more about SKUs.

Example:

  • sku:XYZ-12345
Anchor to updated_at
•time
•Boolean
Default:false

Reverse the order of the underlying list.



Was this section helpful?

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

Show payload

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.

Show input fields

•mutation

Updates an InventoryItem's properties including whether inventory is tracked, cost, SKU, and whether shipping is required. Inventory items represent the goods available to be shipped to customers.

Show payload

Arguments

•ID!
required

The ID of the inventory item to update.

•InventoryItemInput!
required

The input fields that update an inventoryItem.

Show input fields


Was this section helpful?

•interface

Was this section helpful?