This simple query works as expected with SOAP V2:

$result = $proxy->catalogProductList($sessionId);

but swap the Role resource access to Catalog Inventory > Retrieve stock data …and substitute this instead:

$result = $proxy->catalogInventoryStockItemList($sessionId, array('1', '2'));

…and the result is:

array(0) { }

But there are plenty of products with inventory of at least 1.

Any ideas? Thanks!



  • Do you have a product with Id 1 Or Id 2?
    – SH-
    Commented Nov 25, 2015 at 22:45
  • It return result if product with id 1 and 2 exist in your catalog Commented Nov 26, 2015 at 5:16
  • Thank SH and Minesh Patel. For now, unable to test any further...as even the first simple query has stopped working! The server hosts deny changing anything. Strange.
    – johnno
    Commented Dec 8, 2015 at 19:54

1 Answer 1


I had a similar problem. My situation was different in a few respects:

  1. I'm using the V1 API.
  2. I'm passing SKUs instead of product IDs.

Here was my original code:

$skus = ['SKU001', 'SKU002', 'SKU003'];
$results = $client->call(

Just like the documentation says, right? But I was getting an empty array result, too.

When I stepped through the Magento code using the debugger, I saw that only the first SKU in my list was being passed to the API method, and passed as a string, not an array. So I wrapped my array of SKUs in another array like so:

$results = $client->call(
        [$skus]);  // Note the square brackets here.

That solved the problem. It seems the API docs on Magento's website are just plain wrong.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.