Hello,
I’m new to the Shopify API..
I’m trying to implement a process in my server to update the inventory count for items from the api using the GraphiQL method outlined in the documentation…
Here is my Query:
const updateInventoryQuery = mutation inventoryAdjustQuantities($input: InventoryAdjustQuantitiesInput!) { inventoryAdjustQuantities(input: $input) { inventoryAdjustmentGroup { id reason changes { name delta quantityAfterChange item { id } location { id name } } } userErrors { field message } } }
;
module.exports = updateInventoryQuery;
I am only receiving the error:
“message”: “GraphQL Client: Not Found”,
I’ve tested in the Shopify GraphiQL App and I am receiving this response:
{
“errors”: [
{
“message”: “Access denied for inventoryAdjustQuantities field. Required access: write_inventory
access scope. Also: The user must have a permission to apply changes to inventory quantities.”,
“locations”: [
{
“line”: 2,
“column”: 3
}
],
“path”: [
“inventoryAdjustQuantities”
],
“extensions”: {
“code”: “ACCESS_DENIED”,
“documentation”: “Shopify API access scopes”,
“requiredAccess”: “write_inventory
access scope. Also: The user must have a permission to apply changes to inventory quantities.”
}
}
],
“data”: {
“inventoryAdjustQuantities”: null
},
“extensions”: {
“cost”: {
“requestedQueryCost”: 13,
“actualQueryCost”: 10,
“throttleStatus”: {
“maximumAvailable”: 2000,
“currentlyAvailable”: 1990,
“restoreRate”: 100
}
}
}
}
However I have checked the scope of the app and it is setup correctly:
Admin API access scopesread_inventory, write_inventory, read_locations, read_products
If anyone could shed any light on why this might be happening or if it’s even possible to accomplish what I’m trying to do with the api it would be greatly appreciated.