magento add and update product use magento api From http://prattski.com/2011/09/08/magento-addingupdating-products-with-v2-api/
<?php
//error_reporting(E_ALL);
//ini_set('display_errors', '1');
/**
* Get API Session
*/
$client = new SoapClient('http://core.local/api/v2_soap?wsdl=1');
$session = $client->login('augustash', 'password');
/**
* Set Product Data
*/
$newProductData = new stdClass();
$newProductData->name = 'Product Name';
$newProductData->description = 'Description';
$newProductData->short_description = 'Short Description';
$newProductData->websites = array(1,2);
$newProductData->categories = array(7,15);
$newProductData->status = 1;
$newProductData->price = 45;
$newProductData->tax_class_id = 2;
$newProductData->weight = 1;
/**
* Create Product Using V2 API
*/
$result = $client->catalogProductCreate(
$session, // Soap Session
'simple', // Product Type
4, // Attribute Set Id (Default)
'product-sku', // Product Sku
$newProductData // Product Data
);
/**
* Set Price for Wholesale Website
*/
$newProductData = new stdClass();
$newProductData->price = 20;
/**
* Update Product with Wholesale Price using V2 API
*/
$result = $client->catalogProductUpdate(
$session, // Soap Session
'product-sku', // Product Sku
$newProductData, // Product Data
'wholesale' // Store View Code
);
/**
* End Session
*/
$client->endSession($session);