I read this page http://devdocs.magento.com/swagger/index.html, but I couldn't find any API for adding new product to website.
1 Answer
I'm not entirely sure what you are asking specifically, but using the swagger REST API reference, you are looking for the catalogProductRepositoryV1. Format the request to be something like this (assuming you were using c#):
var request = new RestRequest("V1/products", Method.POST);
You will need to send the attributes via a body parameter.
You will want to assign it to at least one category. This will be done as the custom attribute "category_ids".
Be sure to send it in this format:
"custom_attributes": [
{
"attribute_code": "string",
"value": "string"
}
]
I hope this helps.