X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   REST API access to Orders (https://forum.x-cart.com/showthread.php?t=69980)

Rafiqel 09-12-2014 02:12 PM

REST API access to Orders
 
I would like to access/modify orders their status and products using the REST APIs in x-cart 5.x what path/model should I use for the queries?

thanks in advance for your help!

qualiteam 09-14-2014 09:08 PM

Re: REST API access to Orders
 
I believe these examples should help you:
http://kb.x-cart.com/display/XDD/REST+API+documentation#RESTAPIdocumentation-Requestexamples

For orders just change "product" in requests to "order".

while.e.kyote 09-15-2014 06:02 PM

Re: REST API access to Orders
 
Any chance that can get ported back to 4.6.x?

Rafiqel 09-15-2014 09:19 PM

Re: REST API access to Orders
 
Quote:

Originally Posted by qualiteam
I believe these examples should help you:
http://kb.x-cart.com/display/XDD/REST+API+documentation#RESTAPIdocumentation-Requestexamples

For orders just change "product" in requests to "order".

Thanks Alex,
Is there a way to do filter on a get using attributes like ordernumber?

Dongan 09-16-2014 05:46 AM

Re: REST API access to Orders
 
We have done this to one of our clients. API feature for orders, customers and inventory update. It is pretty much needed for their mobile app, inventory management and portal to manage all at one place.

If you need any help, please drop an email to sales@mercuryminds.com

Quote:

Originally Posted by while.e.kyote
Any chance that can get ported back to 4.6.x?


qualiteam 09-16-2014 09:08 AM

Re: REST API access to Orders
 
Quote:

Originally Posted by Rafiqel
Is there a way to do filter on a get using attributes like ordernumber?


There is no function to filter by data fields yet, however you can read/update data by the ID:
Code:

...
$product = $client->get('product/1')->send()->json();
...


Rafiqel 09-16-2014 01:56 PM

Re: REST API access to Orders
 
The ID makes a lo of sense for Products, it is meaningless for orders as what I noticed is that we create a new order entry even if the user does not get it through checkout. on the other hand the ordernumber reflects real orders in the system and should be the one that is used as the "ID"

qualiteam 09-18-2014 10:42 PM

Re: REST API access to Orders
 
As far as I know there is an improvement planned for the upcoming 5.1.6 version.
So, I believe you will be able to get orders by their number after 5.1.6 is released.


All times are GMT -8. The time now is 09:30 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.