--- title: inventoryItem - GraphQL Admin description: |- Returns an [InventoryItem](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem) object by ID. api_version: 2025-10 api_name: admin type: query api_type: graphql source_url: html: https://shopify.dev/docs/api/admin-graphql/latest/queries/inventoryItem md: https://shopify.dev/docs/api/admin-graphql/latest/queries/inventoryItem.md --- # inventory​Item query Returns an [InventoryItem](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem) object by ID. ## Arguments * id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required The ID of the `InventoryItem` to return. *** ## Possible returns * Inventory​Item [Inventory​Item](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem) 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). *** ## Examples * ### Get details about a specified inventory item #### Query ```graphql query inventoryItem { inventoryItem(id: "gid://shopify/InventoryItem/30322695") { id tracked sku } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/2025-10/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query inventoryItem { inventoryItem(id: \"gid://shopify/InventoryItem/30322695\") { id tracked sku } }" }' ``` #### React Router ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query inventoryItem { inventoryItem(id: "gid://shopify/InventoryItem/30322695") { id tracked sku } }`, ); const json = await response.json(); return json.data; } ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query inventoryItem { inventoryItem(id: "gid://shopify/InventoryItem/30322695") { id tracked sku } } QUERY response = client.query(query: query) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `query inventoryItem { inventoryItem(id: "gid://shopify/InventoryItem/30322695") { id tracked sku } }`, }); ``` #### Response ```json { "inventoryItem": { "id": "gid://shopify/InventoryItem/30322695", "tracked": true, "sku": "element-151" } } ``` * ### Get inventory item levels and product/variant information #### Query ```graphql 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 } } } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/2025-10/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "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 } } } }" }' ``` #### React Router ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql 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 } } } }`, ); const json = await response.json(); return json.data; } ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~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 } } } } QUERY response = client.query(query: query) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `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 } } } }`, }); ``` #### Response ```json { "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" } } } } ``` [Open in GraphiQL](http://localhost:3457/graphiql?query=query%20inventoryItem%20%7B%0A%20%20inventoryItem\(id%3A%20%22gid%3A%2F%2Fshopify%2FInventoryItem%2F30322695%22\)%20%7B%0A%20%20%20%20id%0A%20%20%20%20tracked%0A%20%20%20%20sku%0A%20%20%7D%0A%7D) ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query inventoryItem { inventoryItem(id: "gid://shopify/InventoryItem/30322695") { id tracked sku } }`, ); const json = await response.json(); return json.data; } ``` ##### GQL ``` query inventoryItem { inventoryItem(id: "gid://shopify/InventoryItem/30322695") { id tracked sku } } ``` ##### cURL ``` curl -X POST \ https://your-development-store.myshopify.com/admin/api/2025-10/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query inventoryItem { inventoryItem(id: \"gid://shopify/InventoryItem/30322695\") { id tracked sku } }" }' ``` ##### React Router ``` import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query inventoryItem { inventoryItem(id: "gid://shopify/InventoryItem/30322695") { id tracked sku } }`, ); const json = await response.json(); return json.data; } ``` ##### Node.js ``` const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `query inventoryItem { inventoryItem(id: "gid://shopify/InventoryItem/30322695") { id tracked sku } }`, }); ``` ##### Ruby ``` session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query inventoryItem { inventoryItem(id: "gid://shopify/InventoryItem/30322695") { id tracked sku } } QUERY response = client.query(query: query) ``` ## Response JSON ```json { "inventoryItem": { "id": "gid://shopify/InventoryItem/30322695", "tracked": true, "sku": "element-151" } } ```