--- title: inventoryBulkAdjustQuantityAtLocation - GraphQL Admin description: Adjusts the inventory at a location for multiple inventory items. api_version: unstable api_name: admin source_url: html: https://shopify.dev/docs/api/admin-graphql/unstable/mutations/inventorybulkadjustquantityatlocation md: https://shopify.dev/docs/api/admin-graphql/unstable/mutations/inventorybulkadjustquantityatlocation.md --- # inventory​Bulk​Adjust​Quantity​At​Location mutation Requires `write_inventory` access scope. Also: The user must have a permission to adjust an inventory quantity. Deprecated. Use [inventoryAdjustQuantities](https://shopify.dev/docs/api/admin-graphql/latest/mutations/inventoryAdjustQuantities) instead. Adjusts the inventory at a location for multiple inventory items. ## Arguments * inventory​Item​Adjustments [\[Inventory​Adjust​Item​Input!\]!](https://shopify.dev/docs/api/admin-graphql/unstable/input-objects/InventoryAdjustItemInput) required Specifies adjustments for items. * location​Id [ID!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/ID) required Specifies where the item should be adjusted. *** ## Inventory​Bulk​Adjust​Quantity​At​Location​Payload returns * inventory​Levels [\[Inventory​Level!\]](https://shopify.dev/docs/api/admin-graphql/unstable/objects/InventoryLevel) Represents the updated inventory quantities of an inventory item at the location. * user​Errors [\[User​Error!\]!](https://shopify.dev/docs/api/admin-graphql/unstable/objects/UserError) non-null The list of errors that occurred from executing the mutation. *** ## Examples * ### Decrease the available inventory of a single item at a location by 10 #### Query ```graphql mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) { inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: "gid://shopify/Location/124656943") { inventoryLevels { id quantities(names: ["available"]) { name quantity } incoming item { id sku } location { id name } } } } ``` #### Variables ```json { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": -10 } ] } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/unstable/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) { inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: \"gid://shopify/Location/124656943\") { inventoryLevels { id quantities(names: [\"available\"]) { name quantity } incoming item { id sku } location { id name } } } }", "variables": { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": -10 } ] } }' ``` #### 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 mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) { inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: "gid://shopify/Location/124656943") { inventoryLevels { id quantities(names: ["available"]) { name quantity } incoming item { id sku } location { id name } } } }`, { variables: { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": -10 } ] }, }, ); 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 mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) { inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: "gid://shopify/Location/124656943") { inventoryLevels { id quantities(names: ["available"]) { name quantity } incoming item { id sku } location { id name } } } } QUERY variables = { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": -10 } ] } response = client.query(query: query, variables: variables) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: { "query": `mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) { inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: "gid://shopify/Location/124656943") { inventoryLevels { id quantities(names: ["available"]) { name quantity } incoming item { id sku } location { id name } } } }`, "variables": { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": -10 } ] }, }, }); ``` #### Response ```json { "inventoryBulkAdjustQuantityAtLocation": { "inventoryLevels": [ { "id": "gid://shopify/InventoryLevel/964427794?inventory_item_id=30322695", "quantities": [ { "name": "available", "quantity": -9 } ], "incoming": 0, "item": { "id": "gid://shopify/InventoryItem/30322695", "sku": "element-151" }, "location": { "id": "gid://shopify/Location/124656943", "name": "Shipping Origin" } } ] } } ``` * ### Increase the available inventory of a single item at a location by 3 #### Query ```graphql mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) { inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: "gid://shopify/Location/124656943") { inventoryLevels { id quantities(names: ["available"]) { name quantity } incoming item { id sku } location { id name } } } } ``` #### Variables ```json { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": 3 } ] } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/unstable/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) { inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: \"gid://shopify/Location/124656943\") { inventoryLevels { id quantities(names: [\"available\"]) { name quantity } incoming item { id sku } location { id name } } } }", "variables": { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": 3 } ] } }' ``` #### 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 mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) { inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: "gid://shopify/Location/124656943") { inventoryLevels { id quantities(names: ["available"]) { name quantity } incoming item { id sku } location { id name } } } }`, { variables: { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": 3 } ] }, }, ); 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 mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) { inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: "gid://shopify/Location/124656943") { inventoryLevels { id quantities(names: ["available"]) { name quantity } incoming item { id sku } location { id name } } } } QUERY variables = { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": 3 } ] } response = client.query(query: query, variables: variables) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: { "query": `mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) { inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: "gid://shopify/Location/124656943") { inventoryLevels { id quantities(names: ["available"]) { name quantity } incoming item { id sku } location { id name } } } }`, "variables": { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": 3 } ] }, }, }); ``` #### Response ```json { "inventoryBulkAdjustQuantityAtLocation": { "inventoryLevels": [ { "id": "gid://shopify/InventoryLevel/964427794?inventory_item_id=30322695", "quantities": [ { "name": "available", "quantity": 4 } ], "incoming": 0, "item": { "id": "gid://shopify/InventoryItem/30322695", "sku": "element-151" }, "location": { "id": "gid://shopify/Location/124656943", "name": "Shipping Origin" } } ] } } ``` * ### Increase the available inventory of multiple items at a location #### Query ```graphql mutation InventoryBulkAdjustQuantitiesAtLocationMutation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) { inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: "gid://shopify/Location/124656943") { inventoryLevels { id quantities(names: ["available"]) { name quantity } incoming item { id sku } location { id name } } } } ``` #### Variables ```json { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": 3 }, { "inventoryItemId": "gid://shopify/InventoryItem/113711323", "availableDelta": 5 }, { "inventoryItemId": "gid://shopify/InventoryItem/43729076", "availableDelta": 15 } ] } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/unstable/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "mutation InventoryBulkAdjustQuantitiesAtLocationMutation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) { inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: \"gid://shopify/Location/124656943\") { inventoryLevels { id quantities(names: [\"available\"]) { name quantity } incoming item { id sku } location { id name } } } }", "variables": { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": 3 }, { "inventoryItemId": "gid://shopify/InventoryItem/113711323", "availableDelta": 5 }, { "inventoryItemId": "gid://shopify/InventoryItem/43729076", "availableDelta": 15 } ] } }' ``` #### 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 mutation InventoryBulkAdjustQuantitiesAtLocationMutation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) { inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: "gid://shopify/Location/124656943") { inventoryLevels { id quantities(names: ["available"]) { name quantity } incoming item { id sku } location { id name } } } }`, { variables: { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": 3 }, { "inventoryItemId": "gid://shopify/InventoryItem/113711323", "availableDelta": 5 }, { "inventoryItemId": "gid://shopify/InventoryItem/43729076", "availableDelta": 15 } ] }, }, ); 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 mutation InventoryBulkAdjustQuantitiesAtLocationMutation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) { inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: "gid://shopify/Location/124656943") { inventoryLevels { id quantities(names: ["available"]) { name quantity } incoming item { id sku } location { id name } } } } QUERY variables = { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": 3 }, { "inventoryItemId": "gid://shopify/InventoryItem/113711323", "availableDelta": 5 }, { "inventoryItemId": "gid://shopify/InventoryItem/43729076", "availableDelta": 15 } ] } response = client.query(query: query, variables: variables) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: { "query": `mutation InventoryBulkAdjustQuantitiesAtLocationMutation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) { inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: "gid://shopify/Location/124656943") { inventoryLevels { id quantities(names: ["available"]) { name quantity } incoming item { id sku } location { id name } } } }`, "variables": { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": 3 }, { "inventoryItemId": "gid://shopify/InventoryItem/113711323", "availableDelta": 5 }, { "inventoryItemId": "gid://shopify/InventoryItem/43729076", "availableDelta": 15 } ] }, }, }); ``` #### Response ```json { "inventoryBulkAdjustQuantityAtLocation": { "inventoryLevels": [ { "id": "gid://shopify/InventoryLevel/964427794?inventory_item_id=30322695", "quantities": [ { "name": "available", "quantity": 4 } ], "incoming": 0, "item": { "id": "gid://shopify/InventoryItem/30322695", "sku": "element-151" }, "location": { "id": "gid://shopify/Location/124656943", "name": "Shipping Origin" } }, { "id": "gid://shopify/InventoryLevel/964427794?inventory_item_id=113711323", "quantities": [ { "name": "available", "quantity": 6 } ], "incoming": 0, "item": { "id": "gid://shopify/InventoryItem/113711323", "sku": "element-155" }, "location": { "id": "gid://shopify/Location/124656943", "name": "Shipping Origin" } }, { "id": "gid://shopify/InventoryLevel/964427794?inventory_item_id=43729076", "quantities": [ { "name": "available", "quantity": 16 } ], "incoming": 0, "item": { "id": "gid://shopify/InventoryItem/43729076", "sku": "draft-151" }, "location": { "id": "gid://shopify/Location/124656943", "name": "Shipping Origin" } } ] } } ``` * ### inventoryBulkAdjustQuantityAtLocation reference [Open in GraphiQL](http://localhost:3457/graphiql?query=mutation%20InventoryBulkAdjustQuantitiesAtLocation\(%24inventoryItemAdjustments%3A%20%5BInventoryAdjustItemInput!%5D!\)%20%7B%0A%20%20inventoryBulkAdjustQuantityAtLocation\(inventoryItemAdjustments%3A%20%24inventoryItemAdjustments%2C%20locationId%3A%20%22gid%3A%2F%2Fshopify%2FLocation%2F124656943%22\)%20%7B%0A%20%20%20%20inventoryLevels%20%7B%0A%20%20%20%20%20%20id%0A%20%20%20%20%20%20quantities\(names%3A%20%5B%22available%22%5D\)%20%7B%0A%20%20%20%20%20%20%20%20name%0A%20%20%20%20%20%20%20%20quantity%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20incoming%0A%20%20%20%20%20%20item%20%7B%0A%20%20%20%20%20%20%20%20id%0A%20%20%20%20%20%20%20%20sku%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20location%20%7B%0A%20%20%20%20%20%20%20%20id%0A%20%20%20%20%20%20%20%20name%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D\&variables=%7B%0A%20%20%22inventoryItemAdjustments%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22inventoryItemId%22%3A%20%22gid%3A%2F%2Fshopify%2FInventoryItem%2F30322695%22%2C%0A%20%20%20%20%20%20%22availableDelta%22%3A%20-10%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D) ##### GQL ```graphql mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) { inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: "gid://shopify/Location/124656943") { inventoryLevels { id quantities(names: ["available"]) { name quantity } incoming item { id sku } location { id name } } } } ``` ##### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/unstable/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) { inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: \"gid://shopify/Location/124656943\") { inventoryLevels { id quantities(names: [\"available\"]) { name quantity } incoming item { id sku } location { id name } } } }", "variables": { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": -10 } ] } }' ``` ##### 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 mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) { inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: "gid://shopify/Location/124656943") { inventoryLevels { id quantities(names: ["available"]) { name quantity } incoming item { id sku } location { id name } } } }`, { variables: { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": -10 } ] }, }, ); 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": `mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) { inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: "gid://shopify/Location/124656943") { inventoryLevels { id quantities(names: ["available"]) { name quantity } incoming item { id sku } location { id name } } } }`, "variables": { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": -10 } ] }, }, }); ``` ##### 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 mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) { inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: "gid://shopify/Location/124656943") { inventoryLevels { id quantities(names: ["available"]) { name quantity } incoming item { id sku } location { id name } } } } QUERY variables = { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": -10 } ] } response = client.query(query: query, variables: variables) ``` ## Input variables JSON ```json { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": -10 } ] } ``` ## Response JSON ```json { "inventoryBulkAdjustQuantityAtLocation": { "inventoryLevels": [ { "id": "gid://shopify/InventoryLevel/964427794?inventory_item_id=30322695", "quantities": [ { "name": "available", "quantity": -9 } ], "incoming": 0, "item": { "id": "gid://shopify/InventoryItem/30322695", "sku": "element-151" }, "location": { "id": "gid://shopify/Location/124656943", "name": "Shipping Origin" } } ] } } ```