patrick de laet Posted December 9, 2010 Share Posted December 9, 2010 OK - I just installed 1.4 Alpha 4 and activated the Webservice on the Tools.How do I use this?(I know what webservices are - I consumed a lot of SOAP, RPC-XML, REST, ... services)Do you have an example? What URL do I have to call?regardsPatrick De laet[email protected] Link to comment Share on other sites More sharing options...
patrick de laet Posted December 9, 2010 Author Share Posted December 9, 2010 OK - I found it myself...eg: activate products for GET ...Then http://localhost/prestashop14/api/productsresponse is .... (Use Firebug to view the response) <?xml version="1.0" encoding="UTF-8"> Then do ... http://localhost/prestashop14/api/products/1 Response is ... <?xml version="1.0" encoding="UTF-8"?> <![CDATA[1]]> <![CDATA[1]]> <![CDATA[2]]> <![CDATA[]]> <![CDATA[]]> <![CDATA[]]> <![CDATA[]]> <![CDATA[]]> <![CDATA[0]]> <![CDATA[]]> <![CDATA[]]> <![CDATA[1]]> <![CDATA[1]]> <![CDATA[2]]> <![CDATA[2]]> <![CDATA[1]]> <![CDATA[124.581940]]> .........very nice - I'm gonna play a little bit with this and keep you informed on this thread.regardsPatrick De Laet Link to comment Share on other sites More sharing options...
patrick de laet Posted December 10, 2010 Author Share Posted December 10, 2010 We really need some doc on the Webservices API Request and Response.http://localhost/prestashop14/api/customers/1returns ... which is OK <?xml version="1.0" encoding="UTF-8"?> <![CDATA[1]]> <![CDATA[1]]> <![CDATA[1970-01-15]]> <![CDATA[]]> <![CDATA[]]> <![CDATA[2010-12-09 20:51:51]]> <![CDATA[0]]> <![CDATA[DOE]]> <![CDATA[ad807bdf0426766c05c64041124d30ce]]> <![CDATA[John]]> <![CDATA[[email protected]]]> <![CDATA[]]> <![CDATA[]]> <![CDATA[47ce86627c1f3c792a80773c5d2deaf8]]> <![CDATA[1]]> <![CDATA[1]]> <![CDATA[1]]> <![CDATA[1]]> But calling ...http://localhost/prestashop14/api/customers/123456returns ... nothing!Why doesn't the API returns an errorcode and an error as response?eg '123-Unknown customer'regardsPatrick De laet Link to comment Share on other sites More sharing options...
patrick de laet Posted December 14, 2010 Author Share Posted December 14, 2010 Another question that comes to mind ...How do I fetch all new orders from eg the last 2 hours?We sure need some doc on the Webservices.regardsPatrick De Laet Link to comment Share on other sites More sharing options...
Melinda Posted January 23, 2011 Share Posted January 23, 2011 I also would like to know how the webservices work. I am working on a manual for the community. Link to comment Share on other sites More sharing options...
Perilin Posted January 24, 2011 Share Posted January 24, 2011 ....But calling ...http://localhost/prestashop14/api/customers/123456returns ... nothing!Why doesn't the API returns an errorcode and an error as response?eg '123-Unknown customer'regardsPatrick De laet The API uses HTTP error codes. Just tested it and got an error 404 (not found) which is quite correct. Check out the response headers you get from the server Link to comment Share on other sites More sharing options...
jinxx Posted February 1, 2011 Share Posted February 1, 2011 I make some testing too. I'm thinking that POST request is not working at all. GET, HEAD, PUT and DELETE works well but if I'm trying a POST request, e.g http://localhost/api/manufacturers and I'm sending text/xml; charset=utf-8 <?xml version="1.0" encoding="UTF-8"?> <![CDATA[3]]> <![CDATA[3]]> <link_rewrite><![CDATA[apple-computer-inc]]></link_rewrite> <![CDATA[Apple Computer, Inc]]> <![CDATA[]]> <![CDATA[]]> <![CDATA[]]> <meta_title> <![CDATA[]]> <![CDATA[]]> <![CDATA[]]> </meta_title> <meta_description> <![CDATA[]]> <![CDATA[]]> <![CDATA[]]> </meta_description> <![CDATA[]]> <![CDATA[]]> <![CDATA[]]> <meta_keywords> <![CDATA[]]> <![CDATA[]]> <![CDATA[]]> </meta_keywords> It fires me with 500 and no response, even if I setted error outputs on (seeing other errors correctly). I tried to remove and , to remove content of theese with no succes How to make it right? Link to comment Share on other sites More sharing options...
tarmax Posted February 21, 2011 Share Posted February 21, 2011 Hello,Did you find a way to use the POST method to create a new entry ?I spent many times on it put i didn't manage to make it work.Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now