I'm looking for the bulk variant of the product stock update API
/rest/default/V1/products/{productSku}/stockItems/{itemId}
Objective: I want to update quantities of multiple products in one API call
What I've tried
I checked the Magento2 guides on bulk APIs and came across this Bulk endpoints | Magento 2 Developer Documentation and based on the info from there updated the above link to this
PUT rest/async/bulk/V1/products/byProductSku/stockItems/byItemId
and this is the body
[
{
"productSku": "Test-Product",
"stockItem": {
"itemId": 32,
"qty": 338,
"is_in_stock": true,
"use_config_manage_stock": false
}
}
]
But this isn't working, I'm getting the error
{
"message": "Internal Error. Details are available in the Magento log file. Report ID: webapi-..."
}
My two main concerns are whether there is an API I can use that already does this, or if my approach mentioned above is possible and I need to change something to fix the issue.