--- title: inventoryLevel - GraphQL Admin description: >- Returns an [InventoryLevel](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryLevel) object by ID. api_version: 2025-04 api_name: admin type: query api_type: graphql source_url: html: 'https://shopify.dev/docs/api/admin-graphql/2025-04/queries/inventoryLevel' md: 'https://shopify.dev/docs/api/admin-graphql/2025-04/queries/inventoryLevel.md' --- # inventory​Level query Returns an [InventoryLevel](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryLevel) object by ID. ## Arguments * id [ID!](https://shopify.dev/docs/api/admin-graphql/2025-04/scalars/ID) required The ID of the `InventoryLevel` to return. *** ## Possible returns * Inventory​Level [Inventory​Level](https://shopify.dev/docs/api/admin-graphql/2025-04/objects/InventoryLevel) The quantities of an inventory item at a specific location. Each inventory level connects one [`InventoryItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem) to one [`Location`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Location), tracking multiple quantity states like available, on-hand, incoming, and committed. The [`quantities`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryLevel#field-InventoryLevel.fields.quantities) field provides access to different inventory states. Learn [more about inventory states and relationships](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states#inventory-object-relationships). * can​Deactivate [Boolean!](https://shopify.dev/docs/api/admin-graphql/2025-04/scalars/Boolean) non-null Whether the inventory items associated with the inventory level can be deactivated. * created​At [Date​Time!](https://shopify.dev/docs/api/admin-graphql/2025-04/scalars/DateTime) non-null The date and time when the inventory level was created. * deactivation​Alert [String](https://shopify.dev/docs/api/admin-graphql/2025-04/scalars/String) Describes either the impact of deactivating the inventory level, or why the inventory level can't be deactivated. * id [ID!](https://shopify.dev/docs/api/admin-graphql/2025-04/scalars/ID) non-null A globally-unique ID. * item [Inventory​Item!](https://shopify.dev/docs/api/admin-graphql/2025-04/objects/InventoryItem) non-null Inventory item associated with the inventory level. * location [Location!](https://shopify.dev/docs/api/admin-graphql/2025-04/objects/Location) non-null The location associated with the inventory level. * quantities [\[Inventory​Quantity!\]!](https://shopify.dev/docs/api/admin-graphql/2025-04/objects/InventoryQuantity) non-null The quantity of an inventory item at a specific location, for a quantity [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states). * names [\[String!\]!](https://shopify.dev/docs/api/admin-graphql/2025-04/scalars/String) required ### Arguments The [names](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) of the requested inventory quantities. *** * scheduled​Changes [Inventory​Scheduled​Change​Connection!](https://shopify.dev/docs/api/admin-graphql/2025-04/connections/InventoryScheduledChangeConnection) non-null Scheduled changes for the requested quantity names. * first [Int](https://shopify.dev/docs/api/admin-graphql/2025-04/scalars/Int) ### Arguments The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * after [String](https://shopify.dev/docs/api/admin-graphql/2025-04/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/2025-04/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/2025-04/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * reverse [Boolean](https://shopify.dev/docs/api/admin-graphql/2025-04/scalars/Boolean) Default:false Reverse the order of the underlying list. * sort​Key [Scheduled​Change​Sort​Keys](https://shopify.dev/docs/api/admin-graphql/2025-04/enums/ScheduledChangeSortKeys) Default:ID Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). * query [String](https://shopify.dev/docs/api/admin-graphql/2025-04/scalars/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](https://shopify.dev/api/usage/search-syntax). * expected\_at time * * id id * quantity\_names string - Filter by `id` range. - Example: * `id:1234` * `id:>=1234` * `id:<=1234` *** * updated​At [Date​Time!](https://shopify.dev/docs/api/admin-graphql/2025-04/scalars/DateTime) non-null The date and time when the inventory level was updated. *** ## Examples * ### Get the location, inventory item, and quantities for an inventory level #### Query ```graphql query { inventoryLevel(id: "gid://shopify/InventoryLevel/523463154?inventory_item_id=30322695") { id quantities(names: ["available", "incoming", "committed", "damaged", "on_hand", "quality_control", "reserved", "safety_stock"]) { name quantity } item { id sku } location { id name } } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/2025-04/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query { inventoryLevel(id: \"gid://shopify/InventoryLevel/523463154?inventory_item_id=30322695\") { id quantities(names: [\"available\", \"incoming\", \"committed\", \"damaged\", \"on_hand\", \"quality_control\", \"reserved\", \"safety_stock\"]) { name quantity } item { id sku } location { id name } } }" }' ``` #### 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 { inventoryLevel(id: "gid://shopify/InventoryLevel/523463154?inventory_item_id=30322695") { id quantities(names: ["available", "incoming", "committed", "damaged", "on_hand", "quality_control", "reserved", "safety_stock"]) { name quantity } item { id sku } location { id name } } }`, ); 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 { inventoryLevel(id: "gid://shopify/InventoryLevel/523463154?inventory_item_id=30322695") { id quantities(names: ["available", "incoming", "committed", "damaged", "on_hand", "quality_control", "reserved", "safety_stock"]) { name quantity } item { id sku } location { id name } } } QUERY response = client.query(query: query) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `query { inventoryLevel(id: "gid://shopify/InventoryLevel/523463154?inventory_item_id=30322695") { id quantities(names: ["available", "incoming", "committed", "damaged", "on_hand", "quality_control", "reserved", "safety_stock"]) { name quantity } item { id sku } location { id name } } }`, }); ``` #### Response ```json { "inventoryLevel": { "id": "gid://shopify/InventoryLevel/523463154?inventory_item_id=30322695", "quantities": [ { "name": "available", "quantity": 2 }, { "name": "incoming", "quantity": 146 }, { "name": "committed", "quantity": 1 }, { "name": "damaged", "quantity": 0 }, { "name": "on_hand", "quantity": 33 }, { "name": "quality_control", "quantity": 0 }, { "name": "reserved", "quantity": 30 }, { "name": "safety_stock", "quantity": 0 } ], "item": { "id": "gid://shopify/InventoryItem/30322695", "sku": "element-151" }, "location": { "id": "gid://shopify/Location/346779380", "name": "Ottawa Store" } } } ``` ## Get the location, inventory item, and quantities for an inventory level [Open in GraphiQL](http://localhost:3457/graphiql?query=query%20%7B%0A%20%20inventoryLevel\(id%3A%20%22gid%3A%2F%2Fshopify%2FInventoryLevel%2F523463154%3Finventory_item_id%3D30322695%22\)%20%7B%0A%20%20%20%20id%0A%20%20%20%20quantities\(names%3A%20%5B%22available%22%2C%20%22incoming%22%2C%20%22committed%22%2C%20%22damaged%22%2C%20%22on_hand%22%2C%20%22quality_control%22%2C%20%22reserved%22%2C%20%22safety_stock%22%5D\)%20%7B%0A%20%20%20%20%20%20name%0A%20%20%20%20%20%20quantity%0A%20%20%20%20%7D%0A%20%20%20%20item%20%7B%0A%20%20%20%20%20%20id%0A%20%20%20%20%20%20sku%0A%20%20%20%20%7D%0A%20%20%20%20location%20%7B%0A%20%20%20%20%20%20id%0A%20%20%20%20%20%20name%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D) ##### GQL ```graphql query { inventoryLevel(id: "gid://shopify/InventoryLevel/523463154?inventory_item_id=30322695") { id quantities(names: ["available", "incoming", "committed", "damaged", "on_hand", "quality_control", "reserved", "safety_stock"]) { name quantity } item { id sku } location { id name } } } ``` ##### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/2025-04/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query { inventoryLevel(id: \"gid://shopify/InventoryLevel/523463154?inventory_item_id=30322695\") { id quantities(names: [\"available\", \"incoming\", \"committed\", \"damaged\", \"on_hand\", \"quality_control\", \"reserved\", \"safety_stock\"]) { name quantity } item { id sku } location { id name } } }" }' ``` ##### 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 { inventoryLevel(id: "gid://shopify/InventoryLevel/523463154?inventory_item_id=30322695") { id quantities(names: ["available", "incoming", "committed", "damaged", "on_hand", "quality_control", "reserved", "safety_stock"]) { name quantity } item { id sku } location { id name } } }`, ); const json = await response.json(); return json.data; } ``` ##### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `query { inventoryLevel(id: "gid://shopify/InventoryLevel/523463154?inventory_item_id=30322695") { id quantities(names: ["available", "incoming", "committed", "damaged", "on_hand", "quality_control", "reserved", "safety_stock"]) { name quantity } item { id sku } location { id name } } }`, }); ``` ##### 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 { inventoryLevel(id: "gid://shopify/InventoryLevel/523463154?inventory_item_id=30322695") { id quantities(names: ["available", "incoming", "committed", "damaged", "on_hand", "quality_control", "reserved", "safety_stock"]) { name quantity } item { id sku } location { id name } } } QUERY response = client.query(query: query) ``` ## Response JSON ```json { "inventoryLevel": { "id": "gid://shopify/InventoryLevel/523463154?inventory_item_id=30322695", "quantities": [ { "name": "available", "quantity": 2 }, { "name": "incoming", "quantity": 146 }, { "name": "committed", "quantity": 1 }, { "name": "damaged", "quantity": 0 }, { "name": "on_hand", "quantity": 33 }, { "name": "quality_control", "quantity": 0 }, { "name": "reserved", "quantity": 30 }, { "name": "safety_stock", "quantity": 0 } ], "item": { "id": "gid://shopify/InventoryItem/30322695", "sku": "element-151" }, "location": { "id": "gid://shopify/Location/346779380", "name": "Ottawa Store" } } } ```