A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hello, When using API call to adjust inventory, the call received 404 error back.
API:inventory_levels/adjust.json
Post content: {"location_id": 61929390243,"inventory_item_id": 43914601693347,"available_adjustment": 1000}
The code worked until yesterday.
Please help!
Thanks.
Solved! Go to the solution
This is an accepted solution.
Hey @YaoWu,
Generally a 404 error presents itself when a specific resource can't be found - `404 Not Found` - often related to an id that is no longer accessible. There are many moving parts when it comes to inventory management with the API, as outlined in our docs here. Generally, I would suggest troubleshooting start by using a GET request to the InventoryItem and or InventoryLevel resources to confirm the ids are valid, are indeed found and accurate.
From there, if you are still facing an issue of unexpected 404 errors, please log the full request body, and the x-request-id response header returned with the error and share them here. I can take closer look and pass on any insights or next steps from there - Cheers!
awwdam | API Support @ 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
This is an accepted solution.
Hey @YaoWu,
Generally a 404 error presents itself when a specific resource can't be found - `404 Not Found` - often related to an id that is no longer accessible. There are many moving parts when it comes to inventory management with the API, as outlined in our docs here. Generally, I would suggest troubleshooting start by using a GET request to the InventoryItem and or InventoryLevel resources to confirm the ids are valid, are indeed found and accurate.
From there, if you are still facing an issue of unexpected 404 errors, please log the full request body, and the x-request-id response header returned with the error and share them here. I can take closer look and pass on any insights or next steps from there - Cheers!
awwdam | API Support @ 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
Thank you for your reply. We have figured out the cause of the problem, which is incorrect inventory location ID.
hi @awwdam :
I'm facing same issue, but both my locationId and Inventory item id is correct, but still getting not found error 404 on adjust inventory
URL: admin/api/2023-10/inventory_levels/adjust.json (POST)
X-Request-ID: 8c640015-66a6-4b4f-9df1-13765abcf38f
Body: