- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2017
09:40 AM
12-01-2017
09:40 AM
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(); }
Labels:
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2017
07:15 AM
12-03-2017
07:15 AM
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!
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!