Showing results for 
Search instead for 
Did you mean: 

Soap V1 cataloginventory_stock_item.list question

Soap V1 cataloginventory_stock_item.list question


If I pass an array of product_id to cataloginventory_stock_item.list in Soap V1, it only returns the first product id in the array and ingnores the others.


In the magento code, it exspects and array (which I am sending), so I hardcoded an array in the magento code, and it worked. All the products specified was returned. If I pass the array from a PHP script, I does not work. Am I missing something here....


$client = new SoapClient('http://mydomain/api/soap/?wsdl');
$session = $client->login('soapapi', 'qwerty');
$params = array('250,251,252');
$result = $client->call($session, 'cataloginventory_stock_item.list',$params);


And this is the result.....It should have 3 products, but only returns 1.

array(1) {
  array(4) {
    string(3) "250"
    string(6) "mtk001"
    string(7) "23.0000"
    string(1) "1"

Any help will do....I have the latest CE version.

Tags (1)

Re: Soap V1 cataloginventory_stock_item.list question

Nevermind.....I got it.


You must declare your params like:


$params = array('filter'=>array('250',260','270'));