Location Not found - when setting onHand quantities for a fulfillmentService location

Shopify Partner
2 0 0



I am trying to set the on_hand quantities for a fulfillment service location using the following graphql API:

mutation inventorySetOnHandQuantities($input: InventorySetOnHandQuantitiesInput!) {
  inventorySetOnHandQuantities(input: $input) {
    inventoryAdjustmentGroup {
    userErrors {
 Please note the locationId passed in graphql variables is the same as the locationId of the fulfillmentService Location. And permitsSkuSharing option is set to true
And I receive the following error:
The specified location could not be found.
Replies 4 (4)

Shopify Staff
2731 298 769

Hi Ppadlia,


This error typically occurs when the locationId you're providing in the request does not exist or is not associated with your Shopify account. Here's a few suggestions to troubleshoot this issue:

  1. Check the locationId: Make sure the locationId you are passing is correct. You can fetch all your location IDs using the locations query to confirm.

  2. Fulfillment Service Location: If you're using a fulfillment service, ensure that you're using the correct locationId of the fulfillment service and not your store's location.

  3. Permissions: Ensure your app has necessary permissions to access and modify inventory levels at the specified location.

  4. Check your Fulfillment Service Settings: You mentioned that the `permitsSkuSharing` option is set to true. This setting allows sharing SKUs between your store and the fulfillment service. However, it may not allow inventory adjustments at the location You might want to check the settings or contact the fulfillment service provider for more details.

Try the above steps to troubleshoot and let us know if you're still seeing issues. Hope this helps!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Shopify Partner
2 0 0

I am using the correct fulfillment locationId. The same licationId works
when adjusting the quantities using inventoryAdjustQuantities but doesn't
work for inventorySetOnHandQuantities
"fulfillment_orders_opt_in": true,
"include_pending_stock": false,
"tracking_support": true,
"inventory_management": true,
"permits_sku_sharing": true

The only reason I mentioned permits_sku_sharing setting is due to the fact
that after setting that to true I was able to update the on_hand from
Shopify Admin UI,
but I am still not able to modify on_hand quantities using
GraphQl API call.
1 0 0


is there a solution to this? We are encountering the same problem.

We have two stores which both use the GraphQl API for product, inventory and order management. In the first shop, the inventorySetOnHandQuantites is working fine, but in the second shop (which has identical access rights), the call fails with the error.

Of course, we use the correct location ID for the second shop. If we run the exact query from the GraphiQL-App in the shop, there is no error.

Plus, calls that directly query locations or inventory levels actually show this location, so it definitely exists, we definietly have access rights and the ID is definitely correct.


Any help is much appreciated. Thank you in advance.



Shopify Partner
4 0 0