7/09/2011

Create New category via soap api

In magento 1.5 it's very easy to create a category via soap api

$proxy = new SoapClient('http://magentosite/api/soap/?wsdl');

$sessionId = $proxy->login('apiuser', 'apikey');

$newCategoryId = $proxy->call($sessionId,'category.create',array(3,array('name'=>'New openerp','is_active'=>1,'include_in_menu'=>2,'available_sort_by'=>'position','default_sort_by'=>'position')) );

//where 3 is the parent category

No comments:

Post a Comment