Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: inventoryAdjustQuantities(INVALID_LOCATION)

inventoryAdjustQuantities(INVALID_LOCATION)

Daniel0529
Shopify Partner
4 0 0

Hello, I would like to ask about the issue of modifying the "available" of "inventory_item_id". I am using the "inventoryAdjustQuantities" interface in version 2024-04, and most inventory can be modified through this interface. However, one of the inventory prompts "The specified location could not be found." After calling the modification interface, so I try to get the corresponding "locationId" of the product by calling the "Retrieve a list of inventory levels for a location" interface. Then found the "locationId" is just the one passed when calling the modification interface. It is strange that this "inventory_item_id" can function normally when using the "inventoryAdjustQuantity" interface in version 2023-07. I would like to know if there is an issue with this "inventory_item_id" or with the "inventoryAdjustQuantities" interface in the 2024-04 version. I look forward to your reply. Thank you.

Reply 1 (1)

sanjuthakur
Shopify Partner
7 1 2

You can use inventoryBulkAdjustQuantityAtLocation and pass inventoryItemAdjustments & location Id,

because say for example you have SKU1 with inventory_Item_id as X1 and if you have 2 locations it means you will have 2 inventory level ids L1 and L2 which will define quantities available at each location. So I guess is better to use inventoryBulkAdjustQuantityAtLocation