I am using a PUT with this string admin/api/2024-04/inventory_items/42956524683431.json?cost=123.55
I get required parameter missing or invalid
Any help would be appreciated.
I am using a PUT with this string admin/api/2024-04/inventory_items/42956524683431.json?cost=123.55
I get required parameter missing or invalid
Any help would be appreciated.
Hi @Fromm60056 ,
PUT requires request payload, not passing cost as a search param into the URL. Here an example in Javascript
fetch(`https://${YOUR_SHOPIFY_DOMAIN}/admin/api/2024-04/inventory_items/42956524683431.json`, {
method: 'PUT',
headers: {
"Content-Type": "application/json",
"X-Shopify-Access-Token": "${YOUR_APP_ACCESS_TOKEN}",
},
body: JSON.stringify({
inventory_item: {
id: 42956524683431,
cost: "123.55"
}
}),
});