cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP API - Category not exist

SOAP API - Category not exist

Hi..
I'm try to working with Magento's API..

I've a problem with filters..!
With this code work fine:

$mage_url = 'https://svapoking.donagest.com/magento19/api/soap?wsdl'; 
$mage_user = 'username'; 
$mage_api_key = '******'; 
$soap = new SoapClient( $mage_url ); 
$session_id = $soap->login( $mage_user, $mage_api_key );

$filters = array( 
    'name' => array( 'like' => '%Goon 22mm%' )
); 

$result = $soap->call( $session_id, 'catalog_product.list', array($filters) );

But with categories not work..! But work with id..!

//login

$filters = array( 
    'name' => array( 'like' => '%Atom%' )
); 

try {
    $result = $soap->call( $session_id, 'catalog_category.info', $filters);
} catch( SoapFault $fault ) {
    echo $fault->getMessage();
}
1 REPLY 1

Re: SOAP API - Category not exist

I don't believe the category endpoints support filtering/search. You're best bet is either going to be finding a product and getting the categories from that or using the category tree endpoint:

 

http://devdocs.magento.com/guides/m1x/api/soap/catalog/catalogCategory/catalog_category.tree.html

----
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!