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)
-   -   Pulling a specific order by orderNumber via the REST API (https://forum.x-cart.com/showthread.php?t=72863)

cjipaygo 10-01-2015 06:33 AM

Pulling a specific order by orderNumber via the REST API
 
Is it possible to pull / get a specific Order from the orders table using the orderNumber field instead of the order_id field?

I've tried:

https://mysite.com/xcart-5/xcart/admin.php?target=RESTAPI&_key=my-5-xcart-api&_path=order/0&_method=get&_schema=complex&model[orderNumber]=1

But it doesn't work.

If I do this, it will of course get the data I specify. But I need to use the orderNumber.

https://mysite.com/xcart-5/xcart/admin.php?target=RESTAPI&_key=my-5-xcart-api&_path=order/1&_method=get&_schema=complex

Thanks,

Chris

qualiteam 10-02-2015 04:57 AM

Re: Pulling a specific order by orderNumber via the REST API
 
Hello Chris,

You can use the "_cnd" parameter to set conditions/restrictions on the data being retrieved by the API.

The parameter is not documented on the official http://kb.x-cart.com/ portal yet.
However, one of developers has created a small tutorial on using it.

The tutorial is in Russian, but Google Translate gives a somewhat correct translation:
http://dagdag-xcart5.blogspot.ru/2015/02/rest-api.html


All times are GMT -8. The time now is 08:11 AM.

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