Inventory Item
Requires access scope or access scope.
A product variant's inventory information across all locations. The inventory item connects the product variant to its inventory levels at different locations, tracking stock keeping unit (SKU), whether quantities are tracked, shipping requirements, and customs information for the product.
Learn more about inventory object relationships.
Anchor to FieldsFields
- countryCodeOfOrigin (CountryCode)
- countryHarmonizedSystemCodes (CountryHarmonizedSystemCodeConnection!)
- createdAt (DateTime!)
- duplicateSkuCount (Int!)
- harmonizedSystemCode (String)
- id (ID!)
- inventoryHistoryUrl (URL)
- inventoryLevel (InventoryLevel)
- inventoryLevels (InventoryLevelConnection!)
- legacyResourceId (UnsignedInt64!)
- measurement (InventoryItemMeasurement!)
- provinceCodeOfOrigin (String)
- requiresShipping (Boolean!)
- sku (String)
- tracked (Boolean!)
- trackedEditable (EditableProperty!)
- unitCost (MoneyV2)
- updatedAt (DateTime!)
- variants (ProductVariantConnection)
- variant (ProductVariant!): deprecated
- Anchor to countryCodeOfOrigincountry•Country
Code Of Origin Code The ISO 3166-1 alpha-2 country code of where the item originated from.
- Anchor to countryHarmonizedSystemCodescountry•Country
Harmonized System Codes Harmonized System Code Connection! non-null A list of country specific harmonized system codes.
- 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 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.
- 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.
- 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 legacyResourceIdlegacy•Unsigned
Resource Id Int64! non-null The ID of the corresponding resource in the REST Admin API.
- Anchor to measurementmeasurement•Inventory
Item Measurement! non-null The packaging dimensions of the inventory item.
- 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 the inventory item requires shipping.
- •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.- Anchor to unitCostunit•Money
Cost V2 Unit cost associated with the inventory item. Note: the user must have "View product costs" permission granted in order to access this field once product granular permissions are enabled.
- 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.
- 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.
Arguments
- Anchor to variantvariant•Product
Variant! non-nullDeprecated
Anchor to QueriesQueries
- inventoryItem (InventoryItem)
- inventoryItems (InventoryItemConnection!)
- •query
Returns an InventoryItem object by ID.
- •ID!required
The ID of the
to return.
Arguments
- •ID!
- •query
Returns a list of inventory items.
- 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 MutationsMutations
- inventoryBulkToggleActivation (InventoryBulkToggleActivationPayload)
- inventoryItemUpdate (InventoryItemUpdatePayload)
- •mutation
Activates or deactivates an inventory item at multiple locations. When you activate an
at aLocation, 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
objects.Learn more about managing inventory quantities and states.
- Anchor to inventoryItemIdinventory•ID!
Item Id required The ID of the inventory item to modify the activation status locations for.
- Anchor to inventoryItemUpdatesinventory•[Inventory
Item Updates Bulk Toggle Activation Input!]! required A list of pairs of locations and activate status to update for the specified inventory item.
Arguments
- •mutation
Updates an
'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.- •ID!required
The ID of the inventory item to update.
- Anchor to inputinput•Inventory
Item Input! required
Arguments
- •ID!