View Single Post
  #1  
Old 12-14-2016, 05:13 AM
 
CarterMarter CarterMarter is offline
 

Newbie
  
Join Date: Dec 2016
Posts: 2
 

Default Create a new product using REST API

I am trying to create a new product using the REST API. I use the demo in a browser:
Code:
https://some-address/admin.php?target=RESTAPI&_key=my-write-key&_path=product/0&method=post&model[sku]=sweatshirt&model[price]=10.00&model[amount]=100&model[translations][0][ code ]=en&model[translations][0][name]=sweatshirt
(the intervals in [ code ] are to make the BBCode happy with formatting. Just ignore them)
The response only says null, with no error indications and the new product is not available in the catalog or in the database.
If I do
Code:
https://some-address/admin.php?target=RESTAPI&_key=my-write-key&_path=product
I receive a JSON array of product descriptions.

Am I doing something wrong?
REST API version: 5.3.2
XCART version: 5.3.1.6 Rev0
__________________
REST API 5.3.2
XCART 5.3.1.6 Rev0 Bitnami Windows
Reply With Quote