Step1. Generate admin token: I am using token for authorization, so create an admin token using this URL Http://{baseurl}/rest/V1/integration/admin/token
Step2. Add product : For adding the product, I am using following URLhttp://magentogit.com/rest/V1/products/{SKU} , this is magento2 default API using put method. For example:
http://baseurl/rest/V1/products/B201-SKU
header:
Content-Type - application/json
Authorization - Bearer token
Body:
{
"product": {
"sku": "B201-SKU",
"name": "B202",
"price": 30.00,
"status": 1,
"type_id": "simple",
"attribute_set_id":4,
"weight": 1
}
}
link: http://magento.stackexchange.com/questions/120570/how-to-add-product-in-magento-to-using-rest-api/12...
documentation: http://devdocs.magento.com/swagger/