ChannelAdvisor GetOrderList Nusoap / PHP Example

I haveĀ  been working with Channel Advisor GetorderLisst API call to get order details between a specific date, below code will help you to get correct data from channeladvisor

require_once('nusoap.php');
$client = new nusoap_client('https://api.channeladvisor.com/ChannelAdvisorAPI/v7/OrderService.asmx?WSDL', true );
$client->namespaces = array(
  'soapenv'=>"http://schemas.xmlsoap.org/soap/envelope/",
  'web'=>"http://api.channeladvisor.com/webservices/",
  'ord'=>"http://api.channeladvisor.com/datacontracts/orders"
); 
$err = $client->getError();
if ($err)
{
//echo 'Constructor error' . $err . '';
}
$accountID='';
$headers = '
your key
your password';
$bodyxml = '
your account id

2016-02-10T00:00:00
  2016-02-11T00:00:00
Complete

';
$result = $client->call('GetOrderList', $bodyxml, false, false,$headers);
//Print out the results
print_r($result);

You may also like