BUG inventoryBulkAdjustQuantityAtLocation access denied

Solved
Highlighted
Excursionist
14 1 1
mutation {
  inventoryBulkAdjustQuantityAtLocation(
    locationId: "gid://shopify/Location/24519278646",
    inventoryItemAdjustments: [
      {inventoryItemId: "gid://shopify/InventoryItem/30281906978870", availableDelta: 0}
      ]) {

    inventoryLevels {
      available
    }
  }
}

ERROR:

 

{
    "data": {
        "inventoryBulkAdjustQuantityAtLocation": null
    },
    "errors": [
        {
            "message": "InventoryBulkAdjustQuantityAtLocation access denied",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": [
                "inventoryBulkAdjustQuantityAtLocation"
            ]
        }
    ],
    "extensions": {
        "cost": {
            "requestedQueryCost": 10,
            "actualQueryCost": 10,
            "throttleStatus": {
                "maximumAvailable": 2000.0,
                "currentlyAvailable": 1990,
                "restoreRate": 100.0
            }
        }
    }
}
0 Likes
Highlighted
Excursionist
14 1 1

This is an accepted solution.

I found the solution.

The issue is that I need a permission scope, but that scope I had it enable in the GraphQL settings, but in the API Rest settings I didn't so I add it and it works.

0 Likes
Highlighted
New Member
4 0 0

I know where the "API Rest settings' are ?   But where are the "GraphQL settings"  ?  I can't find anything like that anywhere.   access.jpg

0 Likes
Highlighted
New Member
4 0 0

I also can't get this API to work.  It gives me the same error when I try testing it.  

 

apptest.jpg

0 Likes
Highlighted
New Member
4 0 0

Also when I try to use this API call (  https://shopify.dev/docs/admin-api/graphql/reference/mutation/inventorybulkadjustquantityatlocation#...  ) via curl I get another error.  

REQ:

mutation { inventoryBulkAdjustQuantityAtLocation( locationId: "gid://shopify/Location/52054851751", inventoryItemAdjustments: [
{inventoryItemId: "gid://shopify/InventoryItem/37820143796391", availableDelta: -2},
{inventoryItemId: "gid://shopify/InventoryItem/37820147466407", availableDelta: -3},
{inventoryItemId: "gid://shopify/InventoryItem/37820150317223", availableDelta: 7},
{inventoryItemId: "gid://shopify/InventoryItem/37820149956775", availableDelta: 15},
]) { inventoryLevels { available } } }

 

RESP:

array(1) {
["errors"]=>
array(1) {
["query"]=>
string(37) "Required parameter missing or invalid"
}
}
bool(true)

0 Likes