API to get Order details from Epicommerce

Vote:
 

Hi I am working on an Epicommerce based website. We need to get the order details from the Epicommerce and then send it to another service. Is there any API to get the order details? Or is there any other way to get the full order details( like how and where the order details are stored,in which table or object).

Thanks in advance.

#181857
Sep 01, 2017 0:23
Vote:
 

Depending on which version of Episerver Commerce you're using you can use the IOrderRepository to get what you need. Here's a good example: OrderApiController.

Hope this helps.

Frederik

#181858
Sep 01, 2017 2:44
Vote:
 

Thank you Frederik. This OrderAPI controller is a built-in or custom ?

#181873
Sep 01, 2017 13:02
Vote:
 

I need to get the order details when i'm checking out to payment. So how can I use the IOrderRepository to get the details like Order Id,customer Id, customer Name, Tracking number etc., . Can you please elaborate the process. I'm new to using Epicommerce.

#181888
Sep 02, 2017 18:17
Vote:
 

Episerver provides a good reference site that I recommend checking out: Quicksilver. To load the order details you can use the IOrderRepository.Load() method, example:

_orderRepository.Load<IPurchaseOrder>(orderNumber);

Hope this helps.

Frederik

#181889
Sep 02, 2017 22:42
Vote:
 

Thank you Frederik. But I am referring QuickSilver demo project only. Upto my knowledge, as I want to send the order details to my service when the user checkouts, I should need the customer details also. But in that particular controller I'm unable to get the ordernumber using IOrderRepository. I mean I dont know the ordernumber so how can I load the order using this 

_orderRepository.Load<IPurchaseOrder>(orderNumber);
#181890
Sep 03, 2017 7:15
Vote:
 

In that controller, what do you have if you don't have the order number?

Frederik

#181894
Sep 03, 2017 21:48
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.