# InventoryItem - admin - OBJECT
Version: 2025-01

## Description
Represents the goods available to be shipped to a customer.
It holds essential information about the goods, including SKU and whether it is tracked.
Learn [more about the relationships between inventory objects](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states#inventory-object-relationships).

### Access Scopes
`read_inventory` access scope or `read_products` access scope.


## Fields
* [countryCodeOfOrigin](/docs/api/admin/2025-01/enums/CountryCode): CountryCode - The ISO 3166-1 alpha-2 country code of where the item originated from.
* [createdAt](/docs/api/admin/2025-01/scalars/DateTime): DateTime! - The date and time when the inventory item was created.
* [duplicateSkuCount](/docs/api/admin/2025-01/scalars/Int): Int! - The number of inventory items that share the same SKU with this item.
* [harmonizedSystemCode](/docs/api/admin/2025-01/scalars/String): String - The harmonized system code of the item.
* [id](/docs/api/admin/2025-01/scalars/ID): ID! - A globally-unique ID.
* [inventoryHistoryUrl](/docs/api/admin/2025-01/scalars/URL): URL - The URL that points to the inventory history for the item.
* [inventoryLevel](/docs/api/admin/2025-01/objects/InventoryLevel): InventoryLevel - The inventory item's quantities at the specified location.
* [legacyResourceId](/docs/api/admin/2025-01/scalars/UnsignedInt64): UnsignedInt64! - The ID of the corresponding resource in the REST Admin API.
* [locationsCount](/docs/api/admin/2025-01/objects/Count): Count - The number of locations where this inventory item is stocked.
* [measurement](/docs/api/admin/2025-01/objects/InventoryItemMeasurement): InventoryItemMeasurement! - The packaging dimensions of the inventory item.
* [provinceCodeOfOrigin](/docs/api/admin/2025-01/scalars/String): String - The ISO 3166-2 alpha-2 province code of where the item originated from.
* [requiresShipping](/docs/api/admin/2025-01/scalars/Boolean): Boolean! - Whether the inventory item requires shipping.
* [sku](/docs/api/admin/2025-01/scalars/String): String - Inventory item SKU. Case-sensitive string.
* [tracked](/docs/api/admin/2025-01/scalars/Boolean): Boolean! - Whether inventory levels are tracked for the item.
* [trackedEditable](/docs/api/admin/2025-01/objects/EditableProperty): EditableProperty! - Whether the value of the `tracked` field for the inventory item can be changed.
* [unitCost](/docs/api/admin/2025-01/objects/MoneyV2): MoneyV2 - 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.
* [updatedAt](/docs/api/admin/2025-01/scalars/DateTime): DateTime! - The date and time when the inventory item was updated.
* [variant](/docs/api/admin/2025-01/objects/ProductVariant): ProductVariant! - The variant that owns this inventory item.

## Connections
* [countryHarmonizedSystemCodes](/docs/api/admin/2025-01/connections/CountryHarmonizedSystemCodeConnection): CountryHarmonizedSystemCodeConnection!
* [inventoryLevels](/docs/api/admin/2025-01/connections/InventoryLevelConnection): InventoryLevelConnection!



## Related queries
* [inventoryItem](/docs/api/admin/2025-01/queries/inventoryItem) Returns an
[InventoryItem](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem)
object by ID.
* [inventoryItems](/docs/api/admin/2025-01/queries/inventoryItems) Returns a list of inventory items.

## Related mutations
* [inventoryBulkToggleActivation](/docs/api/admin/2025-01/mutations/inventoryBulkToggleActivation) Modify the activation status of an inventory item at locations. Activating an inventory item at a particular location allows that location to stock that inventory item. Deactivating an inventory item at a location removes the inventory item's quantities and turns off the inventory item from that location.
* [inventoryItemUpdate](/docs/api/admin/2025-01/mutations/inventoryItemUpdate) Updates an inventory item.

## Related Unions

## Examples
### Get details about a specified inventory item
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query inventoryItem { inventoryItem(id: \\\"gid://shopify/InventoryItem/30322695\\\") { id tracked sku } }\"\n}'\n"
Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n  data: `query inventoryItem {\n    inventoryItem(id: \"gid://shopify/InventoryItem/30322695\") {\n      id\n      tracked\n      sku\n    }\n  }`,\n});\n"
Ruby example: "session = ShopifyAPI::Auth::Session.new(\n  shop: \"your-development-store.myshopify.com\",\n  access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n  session: session\n)\n\nquery = <<~QUERY\n  query inventoryItem {\n    inventoryItem(id: \"gid://shopify/InventoryItem/30322695\") {\n      id\n      tracked\n      sku\n    }\n  }\nQUERY\n\nresponse = client.query(query: query)\n" 
Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n  `#graphql\n  query inventoryItem {\n    inventoryItem(id: \"gid://shopify/InventoryItem/30322695\") {\n      id\n      tracked\n      sku\n    }\n  }`,\n);\n\nconst data = await response.json();\n"
Graphql query: "query inventoryItem {\n  inventoryItem(id: \"gid://shopify/InventoryItem/30322695\") {\n    id\n    tracked\n    sku\n  }\n}"
#### Graphql Input
null
#### Graphql Response
{
  "data": {
    "inventoryItem": {
      "id": "gid://shopify/InventoryItem/30322695",
      "tracked": true,
      "sku": "element-151"
    }
  }
}

### Get inventory item levels and product/variant information
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query inventoryItemToProductVariant { inventoryItem(id: \\\"gid://shopify/InventoryItem/30322695\\\") { id inventoryLevels(first: 1) { edges { node { id location { id name } quantities(names: [\\\"available\\\", \\\"committed\\\", \\\"incoming\\\", \\\"on_hand\\\", \\\"reserved\\\"]) { name quantity } } } } variant { id title product { id title } } } }\"\n}'\n"
Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n  data: `query inventoryItemToProductVariant {\n    inventoryItem(id: \"gid://shopify/InventoryItem/30322695\") {\n      id\n      inventoryLevels(first: 1) {\n        edges {\n          node {\n            id\n            location {\n              id\n              name\n            }\n            quantities(names: [\"available\", \"committed\", \"incoming\", \"on_hand\", \"reserved\"]) {\n              name\n              quantity\n            }\n          }\n        }\n      }\n      variant {\n        id\n        title\n        product {\n          id\n          title\n        }\n      }\n    }\n  }`,\n});\n"
Ruby example: "session = ShopifyAPI::Auth::Session.new(\n  shop: \"your-development-store.myshopify.com\",\n  access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n  session: session\n)\n\nquery = <<~QUERY\n  query inventoryItemToProductVariant {\n    inventoryItem(id: \"gid://shopify/InventoryItem/30322695\") {\n      id\n      inventoryLevels(first: 1) {\n        edges {\n          node {\n            id\n            location {\n              id\n              name\n            }\n            quantities(names: [\"available\", \"committed\", \"incoming\", \"on_hand\", \"reserved\"]) {\n              name\n              quantity\n            }\n          }\n        }\n      }\n      variant {\n        id\n        title\n        product {\n          id\n          title\n        }\n      }\n    }\n  }\nQUERY\n\nresponse = client.query(query: query)\n" 
Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n  `#graphql\n  query inventoryItemToProductVariant {\n    inventoryItem(id: \"gid://shopify/InventoryItem/30322695\") {\n      id\n      inventoryLevels(first: 1) {\n        edges {\n          node {\n            id\n            location {\n              id\n              name\n            }\n            quantities(names: [\"available\", \"committed\", \"incoming\", \"on_hand\", \"reserved\"]) {\n              name\n              quantity\n            }\n          }\n        }\n      }\n      variant {\n        id\n        title\n        product {\n          id\n          title\n        }\n      }\n    }\n  }`,\n);\n\nconst data = await response.json();\n"
Graphql query: "query inventoryItemToProductVariant {\n  inventoryItem(id: \"gid://shopify/InventoryItem/30322695\") {\n    id\n    inventoryLevels(first: 1) {\n      edges {\n        node {\n          id\n          location {\n            id\n            name\n          }\n          quantities(names: [\"available\", \"committed\", \"incoming\", \"on_hand\", \"reserved\"]) {\n            name\n            quantity\n          }\n        }\n      }\n    }\n    variant {\n      id\n      title\n      product {\n        id\n        title\n      }\n    }\n  }\n}"
#### Graphql Input
null
#### Graphql Response
{
  "data": {
    "inventoryItem": {
      "id": "gid://shopify/InventoryItem/30322695",
      "inventoryLevels": {
        "edges": [
          {
            "node": {
              "id": "gid://shopify/InventoryLevel/523463154?inventory_item_id=30322695",
              "location": {
                "id": "gid://shopify/Location/346779380",
                "name": "Ottawa Store"
              },
              "quantities": [
                {
                  "name": "available",
                  "quantity": 2
                },
                {
                  "name": "committed",
                  "quantity": 1
                },
                {
                  "name": "incoming",
                  "quantity": 0
                },
                {
                  "name": "on_hand",
                  "quantity": 33
                },
                {
                  "name": "reserved",
                  "quantity": 30
                }
              ]
            }
          }
        ]
      },
      "variant": {
        "id": "gid://shopify/ProductVariant/30322695",
        "title": "151cm",
        "product": {
          "id": "gid://shopify/Product/20995642",
          "title": "Element"
        }
      }
    }
  }
}