Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

How to get complete order information via REST API

 
Reply
   X-Cart forums > X-Cart 5 > General questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 06-27-2018, 03:29 AM
 
QuickBooksDev QuickBooksDev is offline
 

Newbie
  
Join Date: Nov 2011
Posts: 5
 

Default 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
__________________
QuickBooks Add-Ons, Programmnig and services
http://www.AaaTeX.com
Reply With Quote
  #2  
Old 06-29-2018, 04:06 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default 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:
Originally Posted by QuickBooksDev
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
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #3  
Old 06-29-2018, 04:18 AM
 
QuickBooksDev QuickBooksDev is offline
 

Newbie
  
Join Date: Nov 2011
Posts: 5
 

Default 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.
__________________
QuickBooks Add-Ons, Programmnig and services
http://www.AaaTeX.com
Reply With Quote
  #4  
Old 06-29-2018, 04:25 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: How to get complete order information via REST API

Quote:
Originally Posted by QuickBooksDev
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.

'&_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
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #5  
Old 06-29-2018, 05:31 AM
 
QuickBooksDev QuickBooksDev is offline
 

Newbie
  
Join Date: Nov 2011
Posts: 5
 

Default 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?
__________________
QuickBooks Add-Ons, Programmnig and services
http://www.AaaTeX.com
Reply With Quote
  #6  
Old 06-29-2018, 05:35 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: How to get complete order information via REST API

Quote:
Originally Posted by QuickBooksDev
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?

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
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #7  
Old 06-29-2018, 08:45 AM
 
QuickBooksDev QuickBooksDev is offline
 

Newbie
  
Join Date: Nov 2011
Posts: 5
 

Default 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!!!!
__________________
QuickBooks Add-Ons, Programmnig and services
http://www.AaaTeX.com
Reply With Quote
  #8  
Old 07-02-2018, 02:01 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: How to get complete order information via REST API

Quote:
Originally Posted by QuickBooksDev
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!!!!

Happy to hear, everything is working now!

Let me know if there are any other questions.

Tony
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #9  
Old 08-25-2018, 07:44 PM
  Dongan's Avatar 
Dongan Dongan is offline
 

X-Wizard
  
Join Date: Jul 2005
Location: www.mercuryminds.com
Posts: 1,531
 

Default 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)
Reply With Quote
  #10  
Old 11-08-2018, 10:33 PM
 
gior_08 gior_08 is offline
 

Member
  
Join Date: Sep 2008
Posts: 22
 

Default 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.
__________________
Xcart 4.x.x
Xcart 5.x.x
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > General questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:03 AM.

   

 
X-Cart forums © 2001-2020