In my previous blog I mentioned about Channel Advisor API. You can read that blog here. In this blog we will see how to use Channel Advisor Order service to get order details from Channel Advisor. This service is useful when you want to import orders from Channel Advisor to your own CMS or ERP. In my case I was working with Magento - Channel Advisor synchronization. So the requirement was to get order from Channel Advisor and add order to Magento.
Following is the code to create soap client for order service.
$client = new SoapClient("https://api.channeladvisor.com/ChannelAdvisorAPI/v4/OrderService.asmx?WSDL");
$headersData = array('DeveloperKey' => $developerKey, 'Password' => $password);
$head = new SoapHeader("http://api.channeladvisor.com/webservices/","APICredentials",$headersData);