Stock configuration using Magento API

In one of my post I explained the basics of SOAP API, please refer Magento SOAP API before proceeding further

I am listing here the methods to update Product’s stock related information using SOAP API

$proxy = new SoapClient('http://url/api/soap/?wsdl');
$sessionId = $proxy->login('uname', 'upass@123'); 

$skus = array('abc123','abc234');

foreach($skus as $sku)
        $stockItemData = array(
            'stock_data' => array(
            'use_config_min_qty' => 0,
            'min_qty'=> 1,
            'is_in_stock' => 1

        $result = $proxy->call(

	echo $sku.'-';
        echo '<br/>';
}catch(Exception $e)
	echo $e->getMessage();


Hope this is helpful

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top