How to Update product using REST API magento 2?

In Magento 2, You can update already existing product using REST API. You need to call update product request url for perform update action.

For Update Product, you need to call PUT method as action Type.

Action: PUT

Request URL: <YOUR_SITE_URL>/rest/V1/products/<SKU>

ReplaceYOUR_SITE_URL with actual site URL and SKU with your product SKU which you want to update data.

For Header, You need to pass,
‘Content-Type:application/json’,’Authorization:Bearer ‘.$accessToken’

Where $accessToken is your site Access Token. You can get $accessToken from Create Access Token Magento 2

Using above script you can update the product in Magento 2.

 

Leave a Reply

Your email address will not be published. Required fields are marked *