I am trying to use Postman to make a POST request to the Magento API and I am getting back an error message that says:
{“message”:”Unable to save product”}.
Here is the code I am running through Postman.
{
"product":{"sku": "123456","name": "New Shoe","attribute_set_id": 11,"price": "status": "visibility": "type_id": ""created_at": "2016-12-04 15:03:"updated_at": "2016-12-04 15:03:"}
I am running it through a POST request under the /V1/products/
directory. I am able to Get information from the API with the access key I am using so I do not believe that it is an Authorization issue.
I have tried doing the same request changing some of the information using PUT and I am getting the same result. Any suggestions or thoughts would be greatly appreciated!
2
Answers
catalogProductRepositoryV1
Create product
You can open Magento2 source code, try to find this file vendor/magento/module-catalog/Model/ProductRepository.php:732
Change last catch to this:
You will see what your problem is. Example:
show exception message