When calling inventory_levels/adjust.json, I keep getting inventory_item_id Required parameter missing or invalid. Here is my request below from Fiddler. Obviously xxx was substituted for the actual data. FYI, I can pull products, orders, locations, etc., but I have not been able to do any POST operations successfully yet.
POST https://xxxxxxxxxxxxxx.myshopify.com/admin/api/2021-01/inventory_levels/adjust.json HTTP/1.1
Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
Accept-Encoding: gzip, deflate
Solved! Go to the solution
Changing the content type from text/json to application/json fixed the issue. Thank you so much for your help!
Here is a Suggestion to the Shopify Dev Team. It would be helpful if you return an error message such as "Content type not supported text/json. Supported content types are: application/json....".
Let me also note that once I changed my content type, the API returned a very specific, and helpful error message about available_adjustment being a float instead of an integer. Notice that in my request I am passing 928.0000, which is not allowed. I was easily able to change this into an integer, and the API accepted my request just fine.
Thanks again for your help. This API is really easy to use. This is the only problem I ran into.