| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Create a new product using REST API | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
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:
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:
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 |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Create a new product using REST API
I've tried it on my local computer and it has created a new product and responded with a JSON info about the new product (including its product_id):
http://devs.x-cart.com/en/basics/rest_api_documentation.html#creating-product Do you see any error messages in the var/log/ directory? Also, do you see any error messages in the JavaScript console in your browser when you open the URL? Are you sure that you use the correct key (that is allowed to write data to the database)?
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#3
|
|||||||
|
|||||||
Re: Create a new product using REST API
Thank you for your response. The only suspicious log I find is in the access log:
Code:
I doublechecked that I am using the read/write key. I also made sure that the read-only key and the read/write key are not the same. The only string I receive in the response stream is this null. I am pasting the request and response headers here (sensitive information masked): Request (when in browser): Code:
Response 304 (Not modified): Code:
I have the same situation when issuing the request from a program.
__________________
REST API 5.3.2 XCART 5.3.1.6 Rev0 Bitnami Windows |
|||||||
#4
|
|||||||||
|
|||||||||
Re: Create a new product using REST API
It sounds like the server returns some cached empty response, but I'm not sure why this may happen, unfortunately.
I think you should contact our support staff by submitting a ticket at https://secure.x-cart.com/ - they can check it right on your server.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
|||
X-Cart forums © 2001-2020
|