Adjust endpoint not working

Highlighted
Shopify Partner
10 0 1

Hi,

 

I am hitting the adust end point with values I know are correct, however it is returning a 404 error

 

Example for my dev shop http://tax-included.myshopify.com I call

/admin/inventory_levels/adjust.json 

width the values 

{ location_id: 41976462,

   inventory_item_id: 212382875662,

   available_adjustment: 2

}

 

and I get

{ code: 404, error: 'Not Found' }

 

Why does this not work? It was working before

0 Likes
Highlighted
Shopify Expert
9925 103 1763

Are you sure that location exists?

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes
Highlighted
Shopify Partner
10 0 1

Thanks for having a look Jason but I have check and double checked I get the location id up the locations of the store via
/admin/locations.json

And it exists

I also get the inventory_item_id by looking up the variant via
/admin/variants/${variant.id}.json

So I dont see any reason why I am getting 404 on a call that used to work.

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1555 81 282

Hey there.

Can you provide a request-id I can reference in the logs? This will give me a more direct picture of what you're encountering on my end.

Cheers.

0 Likes
Highlighted
Tourist
7 0 2

Hi Alex,

I found on  http://tax-included.myshopify.com  when I enabled multi location inventory it fixed the problem.

However I don't have the option to do that for my clients. 

tortoisegeneralstore.myshopify.com is experenicing the issue.

The values I use are 

{ location_id: 7504789564,
   inventory_item_id: 9510036045884,
  available_adjustment: 1 }

The request id is e04377a9-7162-419f-9723-4f8d5254bc09

1 Like
Highlighted
New Member
2 0 0

Hello,

 

I am also getting the same error not found result when trying to interact with Inventory levels. I can find the item under a inventory location but when I try and set/adjust the levels it says it can't find it. Were you able to find a solution to this issue?

 

-William

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1129 82 179

Delirious Apps - I noticed the location_id that you're submitting doesn't match a location_id where the item is actually stocked. I'd recommend checking '/admin/inventory_levels.json?inventory_item_ids=9510036045884' and then try the adjustment with a location listed there. By all means though please post back here if that doesn't do the trick.

William - would you be able to post back with a request ID from one of your failed attempts?

0 Likes
Highlighted
Tourist
7 0 2

Hi Josh,

Thank you that works now.

The store in question does not have multi location inventory enabled and it appears that the API changed in this case to just using the default store loctaion on update to throwing the 404 error. As our code was update running for 3 months before errors started happening.

Cheers,

Ryan

 

 

 

 

 

 

0 Likes
Highlighted
Tourist
3 0 2

Hi,

Am using REST API 2020-04 to update the inventory,

admin/api/2020-04/inventory_levels/adjust.json

 

{
"location_id": 35614621768,
"inventory_item_id": 34073939345480,
"available_adjustment": 1
}

 

when i trying to update the inventory am getting the response as below,

 

<html>
<body>
  <noscript>
    <a
  </noscript>

  <script type="text/javascript">
    window.location = "https:\/\/app.shopify.com\/services\/login\/identity?destination_uuid=fda8cf95-d837-40d7-a64f-f4ba36936cc4\u0026prompt=merge\u0026return_to=https%3A%2F%2Fapp.shopify.com%2Fservices%2Flogin%2Fidentity_callback%3Ffrom_signup%3Dfalse%26locale%3Den%26shop_name%3DFonz%2Binternational%26state%3DQVYvO7dfpVckloTJIbDtlzNULP1-etjwjhRr-zjAdPa1o7n1X6m-p7dEgH8FcwGXlKM2_lhyQYJlL-DdHPt51fJudoi2wqHRTW8pzAIYHOfRPu7C5Q0_w-Nxx7WQv5XPj-e2_L_46bnMc4_72vpMGmHko_rmHw34BFAEQ2q3NE4dB4cGVsQVUs9vHPfhxIB5ncwaDFPzxPCbUkBW6zkCWLPI2E7QZrSSh3cfjrJKHi9-aseTP2FBGn_8tCz4BP1z\u0026ui_locales=en\u0026ux=shop";
  </script>
</body>

</html>
 
anyone can help me, why am getting this response?.
X-Request-Id : e3e27b8b-9d77-41f3-bd38-23f569157c6e
1 Like
Highlighted
New Member
2 0 0

Hi, I'm having the same issue when trying to POST to /inventory_levels/set.json.

In my experience, this issue comes up when something about the request is malformed (for example, I ran into it when I POSTed when I should have PUT to /variants/<id>.json). I haven't been able to fix this one yet, though.

0 Likes