All things Shopify and commerce
Hi there,
I'm fundamentally new to Shopify and working on an integration project using Azure Logic App. One of the requirements is to set the available inventory quantity in Shopify using this API endpoint (myShopify.com/admin/api/2023-04/inventory_levels/set.json). I test the API endpoint using Postman and it perfectly works.
The problem that I'm getting is in the Logic App, when I sent the request for the below input,
{ "uri": "https://myShopify.com/admin/api/2023-01/inventory_levels/set.json", "method": "POST", "headers": { "Accept": "*/*", "Content-Type": "application/json", "X-Shopify-Access-Token": "xxxxxxxxxxxxxxxxx" }, "body": { "available": 89, "inventory_item_id": 40978570519510, "location_id": 70811973482 } }
"body": { "errors": { "inventory_item_id": "expected Float to be a id" } }
I don't really understand the problem. I did googled it but could not find any similar issues encountered in Shopify.
Has anyone encountered this before? any help is greatly appreciated.
Regards,
Junius
Hello,
I think the problem is that you need to specific the whole ID as opposed to just the number. Try this:
{
"uri": "https://myShopify.com/admin/api/2023-01/inventory_levels/set.json",
"method": "POST",
"headers": {
"Accept": "*/*",
"Content-Type": "application/json",
"X-Shopify-Access-Token": "xxxxxxxxxxxxxxxxx"
},
"body": {
"available": 89,
"inventory_item_id": "gid://shopify/InventoryItem/40978570519510",
"location_id": "gid://shopify/Location/70811973482"
}
}
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024