A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
We are receiving a 404 Not found on every inventory/set call we make within a single store. We are not having this issue on other stores
Prior to performing this call, we perform inventory_levels GET which provides our inventory_item_id & location_id
admin/api/2021-04/inventory_levels/set.json
Body: { “available” : 0, “inventory_item_id” : 41650641436781, “location_id” : 46696213 }
Response: Code 404: Not Found Data: {“errors”:“Not Found”}
X-Request-ID: 83f647bf-9aae-484a-84f0-c12866e31443
and
Body: { “available” : 45, “inventory_item_id” : 41666909831277, “location_id” : 46696213 }
Response: Code 404: Not Found Data: {“errors”:“Not Found”}
X-Request-ID: 88a19d93-5169-4b7d-bce9-6d372af7d2d3
Solved! Go to the solution
This is an accepted solution.
Thank you for the reply Graham, we found from our client that they provided the incorrect URL. The API was rerouting the request because of it.
After looking more into the logs, it seems like Shopify is rerouting the request to a GET.
Any information on what would cause Shopify to do this?
Hello @VeraCore ,
I looked into the x-request-id you provided, and I do see that your request is hitting our server as a GET, which you noted and would explain why you are receiving a 404.
That said, there shouldn't be any way for Shopify to redefine requests from a client - if you send a POST, it'll be received as a POST, if you send a GET it'll be received as a GET. Can you expand a bit on what you've found that is indicating that we are changing your HTTP method at the server side? I didn't see anything to match that in our logs but am open to investigate further.
Best,
To learn more visit the Shopify Help Center or the Community Blog.
This is an accepted solution.
Thank you for the reply Graham, we found from our client that they provided the incorrect URL. The API was rerouting the request because of it.