I would like to know how to retrieve products that belong to a specific category in Magento SOAP API V2, with WS-I compliance and also without.

Here's what I've tried in WS-I compliance mode:

$proxy = new SoapClient('http://foobar.local/api/v2_soap/?wsdl');

$sessionId = $proxy->login(array(
    'username' => 'foo',
    'apiKey' => 'bar'

$filters = array( 'complex_filter' =>
            'key' => 'category_ids',
            'value' => array( 'key' => 'like', 'value' => '%1%' )

$result = $proxy->catalogProductList(array('sessionId' => $sessionId->result, 'filters' => $filters));


I can use the complex filter to successfully filter by product_id however this fails to work for category_ids as it has another nested level. How can I retrieve products via the Magento API for a certain category ID? Should I be using catalog_category.assignedProducts?

  • 4
    I'm voting to close this question as off-topic due to inactivity from the OP. Feb 18, 2015 at 10:59
  • Are you kidding me? Not a specific coding question about the Magento e-Commerce platform? Feb 18, 2015 at 23:10
  • 2
    People vote blindly in efforts to rack up points. I've raised this but haven't gotten much of a response. Voting to re-open.
    – SR_Magento
    Feb 19, 2015 at 0:26
  • I would like to hear from the users including @AnnaVölkl that flagged this question, on how my question "does not appear to be about the Magento e-Commerce platform" and how it does not fit within the scope defined. Feb 19, 2015 at 1:31
  • 1
    @FrancisKim there is a limited inventory of reasons why questions can be put on hold. As Anna stated your question is on hold because it appears you failed to follow up on the first comment on Dec 9. However, I think what was missed was your follow-up edit on Dec 10 which I think addresses the comment. Reopening.
    – benmarks
    Feb 19, 2015 at 4:25

1 Answer 1


As you already noted in your question, the preferred way of retrieving products which belong to a specific category is catalogCategoryAssignedProducts for SOAPv2 (see documentation here).

catalogProductList is a way of retrieving products by attributes.

Please note that catalogCategoryAssignedProducts fetches only products from one specific category and not multiple ones.

The SOAP calls according to documentation are:


$result = $proxy->catalogCategoryAssignedProducts($sessionId, '4');


$result = $proxy->catalogCategoryAssignedProducts((object)array('sessionId' => $sessionId->result, 'categoryId' => '4'));

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.