Cannot create new product with rest/V1/products POST method but can update with the same.
How to create a new product?
Hi @RB10100,
I guess you've cheked the documentation: http://devdocs.magento.com/swagger/#!/catalogProductRepositoryV1/catalogProductRepositoryV1SavePost
Are you sure you are using POST instead of PUT ?
Yes I am using POST
Hello,
you need to use put
/V1/products/{sku}
$productData = [ "sku" : "sku-test" "name": "Test", "price": 100, "status": 1 ];
I am getting {"message":"Invalid product data: %1","parameters":["Invalid attribute set entity type"]} error. Cannot create products.
@RB10100 wrote:I am getting {"message":"Invalid product data: %1","parameters":["Invalid attribute set entity type"]} error. Cannot create products.
So do i, pls help
Additional, i used the both of PUT and POST and them responded the same error
This is the body:
{
  "product": {
    "id": 0,
    "sku": "MS-Champ11",
    "name": "Champ Tee11",
    "attribute_set_id": 9,
    "price": 110,
    "status": 1,
    "visibility": 4,
    "type_id": "simple",
    "created_at": null,
    "updated_at": null,
    "weight": 5,
    "extension_attributes": null,
    "product_links": null,
    "options": null,
    "media_gallery_entries": null,
    "tier_prices": null,
    "custom_attributes": [
      {
        "attribute_code": "description",
        "value": "Test Description"
      }
    ]
  },
  "save_options": false
}