How to get complete order information via REST API
We are trying to use the V5.3.3.3 version of the REST API to get orders on V5.3.5.3 XCart to import into QuickBooks.
We are not finding the API documentation to be of much help. We would like to be able to get all the information in 1 call which should include complete customer info (i.e.adresses, phone numbers, etc) and all items. But so far have only been able to get general info. All other attempts to do anything else gets a Unable to connect to the remote server No connection could be made because the target machine actively refused it This URL is the only one that works but does not provide complete order info (i.e. with items and customer info). "https://clientdomain.com/admin.php?target=RESTPAI&_key=" & APIKey & "&path=order" Using &_path fails same error Using &path=orderitems fails same error Please advise on how we can get complete orders from the rest api. Thanks |
Re: How to get complete order information via REST API
Hi @QuickBooksDev,
Did you try to use schema=complex in REST API request: https://devs.x-cart.com/rest-api/#what-data-i-can-pull Essentially, try to run the same request with _path=order, but add &_schema=complex bit to it and you will see whether the data returned is sufficient enough for your task. Tony Quote:
|
Re: How to get complete order information via REST API
Thanks for replying. I have looked at that web page but it is not clear how to do a orders complex schema. What should be in the URL? I have tried &schema=complex and & "&_schema=complex" but always get 'unable to connect ...'.
What is the correct URL format? I am use VB.Net not php so there may be things that I don't understand looking at the php. |
Re: How to get complete order information via REST API
Quote:
'&_schema=complex' should be in the URL. Did you try to open the URL in browser? Does it display anything? I am thinking maybe this problem is somewhat related to VB.Net making requests, not to X-Cart directly. Tony |
Re: How to get complete order information via REST API
Yes, I get the error
The site can't be reached. nnnn refunded to connect. Can you please give me the exact URL parameters to use? |
Re: How to get complete order information via REST API
Quote:
It should be something like: Code:
http://xcart.localhost/admin.php?target=RESTAPI&_key=yourkey&_path=order&_schema=complex What if you try to run request like this: Code:
http://xcart.localhost/admin.php?target=RESTAPI&_key=yourkey&_path=order/1&_schema=complex where 1 is ID of some order. Does it fire the same error? Tony |
Re: How to get complete order information via REST API
That seem to do the trick. Not sure why it didn't work before but this URL worked.
http://nnn.nnn.nnn.nn/admin.php?target=RESTAPI&_key=kkkkk&_path=order&_s chema=complex Thanks!!!! |
Re: How to get complete order information via REST API
Quote:
Happy to hear, everything is working now! Let me know if there are any other questions. Tony |
Re: How to get complete order information via REST API
Hi Tony,
Do we have APIs for placing an order? We need two APIs 1) Get all available shipping methods & cost based on the address 2) Order placement (Inputs: Customer address, payment method, shipping methods selected) |
Re: How to get complete order information via REST API
Hello,
following the help provided here https://devs.x-cart.com/rest-api/examples.html#changing-the-shipping-status-for-an-order, does anybody know if I change the shipping status (or the payment status) for an order the customer will get an email from the eshop? I tested and I did not got an email and I was thinking if I make something wrong. |
All times are GMT -8. The time now is 09:25 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.