Version: unstable
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/unstable/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"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 } } } }\",\n \"variables\": {\n \"inventoryItemAdjustments\": [\n {\n \"inventoryItemId\": \"gid://shopify/InventoryItem/30322695\",\n \"availableDelta\": -10\n }\n ]\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) {\n inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: \"gid://shopify/Location/124656943\") {\n inventoryLevels {\n id\n quantities(names: [\"available\"]) {\n name\n quantity\n }\n incoming\n item {\n id\n sku\n }\n location {\n id\n name\n }\n }\n }\n }`,\n \"variables\": {\n \"inventoryItemAdjustments\": [\n {\n \"inventoryItemId\": \"gid://shopify/InventoryItem/30322695\",\n \"availableDelta\": -10\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 mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) {\n inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: \"gid://shopify/Location/124656943\") {\n inventoryLevels {\n id\n quantities(names: [\"available\"]) {\n name\n quantity\n }\n incoming\n item {\n id\n sku\n }\n location {\n id\n name\n }\n }\n }\n }\nQUERY\n\nvariables = {\n \"inventoryItemAdjustments\": [{\"inventoryItemId\"=>\"gid://shopify/InventoryItem/30322695\", \"availableDelta\"=>-10}]\n}\n\nresponse = client.query(query: query, variables: variables)\n" PHP example: "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<[{\"inventoryItemId\"=>\"gid://shopify/InventoryItem/30322695\", \"availableDelta\"=>-10}],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) {\n inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: \"gid://shopify/Location/124656943\") {\n inventoryLevels {\n id\n quantities(names: [\"available\"]) {\n name\n quantity\n }\n incoming\n item {\n id\n sku\n }\n location {\n id\n name\n }\n }\n }\n }`,\n {\n variables: {\n \"inventoryItemAdjustments\": [\n {\n \"inventoryItemId\": \"gid://shopify/InventoryItem/30322695\",\n \"availableDelta\": -10\n }\n ]\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) {\n inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: \"gid://shopify/Location/124656943\") {\n inventoryLevels {\n id\n quantities(names: [\"available\"]) {\n name\n quantity\n }\n incoming\n item {\n id\n sku\n }\n location {\n id\n name\n }\n }\n }\n}"
input: { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": -10 } ] }
response: { "data": { "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" } } ] } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/unstable/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"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 } } } }\",\n \"variables\": {\n \"inventoryItemAdjustments\": [\n {\n \"inventoryItemId\": \"gid://shopify/InventoryItem/30322695\",\n \"availableDelta\": 3\n }\n ]\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) {\n inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: \"gid://shopify/Location/124656943\") {\n inventoryLevels {\n id\n quantities(names: [\"available\"]) {\n name\n quantity\n }\n incoming\n item {\n id\n sku\n }\n location {\n id\n name\n }\n }\n }\n }`,\n \"variables\": {\n \"inventoryItemAdjustments\": [\n {\n \"inventoryItemId\": \"gid://shopify/InventoryItem/30322695\",\n \"availableDelta\": 3\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 mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) {\n inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: \"gid://shopify/Location/124656943\") {\n inventoryLevels {\n id\n quantities(names: [\"available\"]) {\n name\n quantity\n }\n incoming\n item {\n id\n sku\n }\n location {\n id\n name\n }\n }\n }\n }\nQUERY\n\nvariables = {\n \"inventoryItemAdjustments\": [{\"inventoryItemId\"=>\"gid://shopify/InventoryItem/30322695\", \"availableDelta\"=>3}]\n}\n\nresponse = client.query(query: query, variables: variables)\n" PHP example: "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<[{\"inventoryItemId\"=>\"gid://shopify/InventoryItem/30322695\", \"availableDelta\"=>3}],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) {\n inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: \"gid://shopify/Location/124656943\") {\n inventoryLevels {\n id\n quantities(names: [\"available\"]) {\n name\n quantity\n }\n incoming\n item {\n id\n sku\n }\n location {\n id\n name\n }\n }\n }\n }`,\n {\n variables: {\n \"inventoryItemAdjustments\": [\n {\n \"inventoryItemId\": \"gid://shopify/InventoryItem/30322695\",\n \"availableDelta\": 3\n }\n ]\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation InventoryBulkAdjustQuantitiesAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) {\n inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: \"gid://shopify/Location/124656943\") {\n inventoryLevels {\n id\n quantities(names: [\"available\"]) {\n name\n quantity\n }\n incoming\n item {\n id\n sku\n }\n location {\n id\n name\n }\n }\n }\n}"
input: { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": 3 } ] }
response: { "data": { "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" } } ] } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/unstable/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"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 } } } }\",\n \"variables\": {\n \"inventoryItemAdjustments\": [\n {\n \"inventoryItemId\": \"gid://shopify/InventoryItem/30322695\",\n \"availableDelta\": 3\n },\n {\n \"inventoryItemId\": \"gid://shopify/InventoryItem/113711323\",\n \"availableDelta\": 5\n },\n {\n \"inventoryItemId\": \"gid://shopify/InventoryItem/43729076\",\n \"availableDelta\": 15\n }\n ]\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation InventoryBulkAdjustQuantitiesAtLocationMutation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) {\n inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: \"gid://shopify/Location/124656943\") {\n inventoryLevels {\n id\n quantities(names: [\"available\"]) {\n name\n quantity\n }\n incoming\n item {\n id\n sku\n }\n location {\n id\n name\n }\n }\n }\n }`,\n \"variables\": {\n \"inventoryItemAdjustments\": [\n {\n \"inventoryItemId\": \"gid://shopify/InventoryItem/30322695\",\n \"availableDelta\": 3\n },\n {\n \"inventoryItemId\": \"gid://shopify/InventoryItem/113711323\",\n \"availableDelta\": 5\n },\n {\n \"inventoryItemId\": \"gid://shopify/InventoryItem/43729076\",\n \"availableDelta\": 15\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 mutation InventoryBulkAdjustQuantitiesAtLocationMutation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) {\n inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: \"gid://shopify/Location/124656943\") {\n inventoryLevels {\n id\n quantities(names: [\"available\"]) {\n name\n quantity\n }\n incoming\n item {\n id\n sku\n }\n location {\n id\n name\n }\n }\n }\n }\nQUERY\n\nvariables = {\n \"inventoryItemAdjustments\": [{\"inventoryItemId\"=>\"gid://shopify/InventoryItem/30322695\", \"availableDelta\"=>3}, {\"inventoryItemId\"=>\"gid://shopify/InventoryItem/113711323\", \"availableDelta\"=>5}, {\"inventoryItemId\"=>\"gid://shopify/InventoryItem/43729076\", \"availableDelta\"=>15}]\n}\n\nresponse = client.query(query: query, variables: variables)\n" PHP example: "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<[{\"inventoryItemId\"=>\"gid://shopify/InventoryItem/30322695\", \"availableDelta\"=>3}, {\"inventoryItemId\"=>\"gid://shopify/InventoryItem/113711323\", \"availableDelta\"=>5}, {\"inventoryItemId\"=>\"gid://shopify/InventoryItem/43729076\", \"availableDelta\"=>15}],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation InventoryBulkAdjustQuantitiesAtLocationMutation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) {\n inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: \"gid://shopify/Location/124656943\") {\n inventoryLevels {\n id\n quantities(names: [\"available\"]) {\n name\n quantity\n }\n incoming\n item {\n id\n sku\n }\n location {\n id\n name\n }\n }\n }\n }`,\n {\n variables: {\n \"inventoryItemAdjustments\": [\n {\n \"inventoryItemId\": \"gid://shopify/InventoryItem/30322695\",\n \"availableDelta\": 3\n },\n {\n \"inventoryItemId\": \"gid://shopify/InventoryItem/113711323\",\n \"availableDelta\": 5\n },\n {\n \"inventoryItemId\": \"gid://shopify/InventoryItem/43729076\",\n \"availableDelta\": 15\n }\n ]\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation InventoryBulkAdjustQuantitiesAtLocationMutation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!) {\n inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: \"gid://shopify/Location/124656943\") {\n inventoryLevels {\n id\n quantities(names: [\"available\"]) {\n name\n quantity\n }\n incoming\n item {\n id\n sku\n }\n location {\n id\n name\n }\n }\n }\n}"
input: { "inventoryItemAdjustments": [ { "inventoryItemId": "gid://shopify/InventoryItem/30322695", "availableDelta": 3 }, { "inventoryItemId": "gid://shopify/InventoryItem/113711323", "availableDelta": 5 }, { "inventoryItemId": "gid://shopify/InventoryItem/43729076", "availableDelta": 15 } ] }
response: { "data": { "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" } } ] } } }