how to invoke API using magento

    $_SOAP = new SoapClient('http://192.168.1.25/magento/index.php/api/soap/?wsdl');  
    $sessionId = $_SOAP->login('patrick', '123456');  

 

    $orderList = $_SOAP->call($sessionId, 'sales_order.list',array(
                    array('created_at'=>array('from'=>$formTime,'to'=>$toTime))
                  )
    );  
    foreach($orderList as $order){  
        echo var_export($order);  
        break;   
    }  

    The function sales_order.list is to obtain the order according to the filter condition, the condition used here is the order time, and then print out all the information of the first order, this function does not contain all the information of the order, to get the detailed information, use another function .

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327090755&siteId=291194637