inventory Item
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 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.
Arguments
- id (ID!)
- •ID!required
The ID of the
to return.
Anchor to Possible returnsPossible returns
- InventoryItem (InventoryItem)
- Anchor to InventoryItemInventory•Inventory
Item Item 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
field to get the inventory level for each location that stocks the item, and the level'squantitiesfield 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.
Show fields
- Anchor to countryCodeOfOrigincountry•Country
Code Of Origin Code The ISO 3166-1 alpha-2 country code of where the item originated from.
Show enum values
- Anchor to countryHarmonizedSystemCodescountry•Country
Harmonized System Codes Harmonized System Code Connection! non-null A list of country specific harmonized system codes.
Show fields
- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to createdAtcreated•Date
At Time! non-null The date and time when the inventory item was created.
- Anchor to duplicateSkuCountduplicate•Int!
Sku Count non-null The number of inventory items that share the same SKU with this item.
- Anchor to harmonizedSystemCodeharmonized•String
System Code The harmonized system code of the item. This must be a number between 6 and 13 digits.
- •ID!non-null
A globally-unique ID.
- Anchor to inventoryHistoryUrlinventory•URL
History Url The URL that points to the inventory history for the item.
- Anchor to inventoryLevelinventory•Inventory
Level Level The inventory item's quantities at the specified location.
Show fields
- Anchor to includeInactiveinclude•Boolean
Inactive Default:false Whether to return the inventory level if it is inactive.
- Anchor to locationIdlocation•ID!
Id required ID of the location for which the inventory level is requested.
Arguments
- Anchor to inventoryLevelsinventory•Inventory
Levels Level Connection! non-null A list of the inventory item's quantities for each location that the inventory item can be stocked at.
Show fields
- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to includeInactiveinclude•Boolean
Inactive Default:false Whether to include inactive inventory levels.
- Anchor to lastlast•Int
The last
nelements from the paginated 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.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to legacyResourceIdlegacy•Unsigned
Resource Id Int64! non-null The ID of the corresponding resource in the REST Admin API.
- Anchor to locationsCountlocations•Count
Count The number of locations where this inventory item is stocked.
Show fields
- Anchor to measurementmeasurement•Inventory
Item Measurement! non-null The packaging dimensions of the inventory item.
Show fields
- Anchor to provinceCodeOfOriginprovince•String
Code Of Origin The ISO 3166-2 alpha-2 province code of where the item originated from.
- Anchor to requiresShippingrequires•Boolean!
Shipping 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.
- Anchor to trackedtracked•Boolean!non-null
Whether inventory levels are tracked for the item.
- Anchor to trackedEditabletracked•Editable
Editable Property! non-null Whether the value of the
trackedfield for the inventory item can be changed.Show fields
- Anchor to unitCostunit•Money
Cost V2 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
- Anchor to updatedAtupdated•Date
At Time! non-null The date and time when the inventory item was updated.
- Anchor to variantsvariants•Product
Variant Connection A paginated list of the variants that reference this inventory item.
Show fields
- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to lastlast•Int
The last
nelements from the paginated list.
Arguments
- Anchor to variantvariant•Product
Variant! non-nullDeprecated Show fields