Magento – Update price and quantity with rest api

apimagento2product

I had tried to update price of single item & I got below error

message: '%fieldName is a required field.'

I have used below url-

"http://localhost/magento2/rest/V1/products/{sku}".

method:"PUT"
body:{"items":{
       "price":50
        }
     };

How can I resolve this error?

Best Answer

Please try the json body as shown below:

{
 "product":
 {
   "price":123
 }
}
Related Topic