InventoryItem object
Represents the goods available to be shipped to a customer. It holds essential information about the goods, including SKU and whether it is tracked.
Required access
read_inventory access scope.
On this page
Connections
- countryHarmonizedSystemCodes (
[CountryHarmonizedSystemCodeConnection!](https://shopify.dev/docs/admin-api/graphql/reference/inventory/countryharmonizedsystemcode))
List of country specific harmonized system codes.
- inventoryLevels (
[InventoryLevelConnection!](https://shopify.dev/docs/admin-api/graphql/reference/inventory/inventorylevel))
Paginated list of inventory levels for each location that the inventory item is stocked at.
| Argument | Description |
|---|---|
after( [String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)) |
Returns the elements that come after the specified cursor. |
before( [String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)) |
Returns the elements that come before the specified cursor. |
first( [Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01)) |
Returns up to the first n elements from the list. |
last( [Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01)) |
Returns up to the last n elements from the list. |
query( [String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)) |
Supported filter parameters: + created_at+ inventory_group_id+ inventory_item_id+ updated_atSee the detailed search syntax for more information about using filters. |
reverse( [Boolean](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01)) |
Reverse the order of the underlying list. Default value: false |
Fields
- countryCodeOfOrigin (
[CountryCode](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/countrycode))
The ISO code of the country of origin. - createdAt (
[DateTime!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#datetime-2021-01))
The date and time when the inventory item was created. - duplicateSkuCount (
[Int!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01))
The number of inventory items that share the same SKU with this item. - harmonizedSystemCode (
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
The harmonized system code of the item. - id (
[ID!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01))
Globally unique identifier. - inventoryHistoryUrl (
[URL](https://shopify.dev/docs/admin-api/graphql/reference/scalar#url-2021-01))
URL for inventory history web page. - inventoryLevel (
[InventoryLevel](https://shopify.dev/docs/admin-api/graphql/reference/inventory/inventorylevel))
Get the inventory level at a specific location.
| Argument | Description |
|---|---|
locationId( [ID!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01)) REQUIRED |
ID of the location for which the inventory level is requested. |
- legacyResourceId (
[UnsignedInt64!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#unsignedint64-2021-01))
The ID of the corresponding resource in the REST Admin API. - locationsCount (
[Int!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01))
The number of locations where this inventory item is stocked. - provinceCodeOfOrigin (
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
The ISO code of the province of origin. - requiresShipping (
[Boolean!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01))
Whether the item requires shipping or not. - sku (
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
Inventory item SKU. - tracked (
[Boolean!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01))
Whether the inventory quantities of inventory levels for the item are tracked or not. - trackedEditable (
[EditableProperty!](https://shopify.dev/docs/admin-api/graphql/reference/shipping-and-fulfillment/editableproperty))
Whether changes to the inventory item tracked attribute are allowed. - unitCost (
[MoneyV2](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/moneyv2))
Unit cost associated with the inventory item. - updatedAt (
[DateTime!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#datetime-2021-01))
The date and time when the inventory item was updated. - variant (
[ProductVariant!](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/productvariant))
The variant that owns this inventory item.
Types that return InventoryItem
[InventoryLevel.item](https://shopify.dev/docs/admin-api/graphql/reference/inventory/inventorylevel#item-2021-01)[ProductVariant.inventoryItem](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/productvariant#inventoryitem-2021-01)[QueryRoot.inventoryItem](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/queryroot#inventoryitem-2021-01)[QueryRoot.inventoryItems](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/queryroot#inventoryitems-2021-01)
Mutations for InventoryItem
- inventoryItemUpdate
Updates an inventory item.
Implements
[LegacyInteroperability](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/legacyinteroperability)[Node](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/node)
An auto-generated type for paginating through multiple InventoryItems.
On this page
Fields
- edges (
[[InventoryItemEdge!]!](https://shopify.dev/docs/admin-api/graphql/reference/inventory/inventoryitem))
A list of edges. - pageInfo (
[PageInfo!](https://shopify.dev/docs/admin-api/graphql/reference/pageinfo))
Information to aid in pagination.
An auto-generated type which holds one InventoryItem and a cursor during pagination.
On this page
Fields
- cursor (
[String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
A cursor for use in pagination. - node (
[InventoryItem!](https://shopify.dev/docs/admin-api/graphql/reference/inventory/inventoryitem))
The item at the end of InventoryItemEdge.
Types that return InventoryItemEdge
[InventoryItemConnection.edges](https://shopify.dev/docs/admin-api/graphql/reference/inventory/inventoryitem#edges-2021-01)
