My Magento 2.2.4 codebase runs multiple websites, and I am trying to add a product via API to a website with id of "4".
here's the payload of my POST request I tried:
{
"product": {
"sku": "000012553333",
"name": "B21232",
"price": 30.03,
"status": 1,
"type_id": "simple",
"attribute_set_id":4,
"weight": 1,
"extension_attributes": {
"website_ids": [4]
}
}
}
here's the endpoint:
https://example.com/rest/V1/products
So it adds the product to the website I want AND TO THE DEFAULT website.
So how do I get Magento 2 to add product to a specific website ONLY?
Thank you.