--- layout: m1x_soap title: Category Attributes ---
The Mage_Catalog module allows you to manage categories and products.
Allows you to retrieve the list of category attributes and options.
Resource Name: catalog_category_attribute
Aliases:
Methods:
| Fault Code | Fault Message |
|---|---|
| 100 | Requested store view not found. |
| 101 | Requested attribute not found. |
$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy->login('apiUser', 'apiKey');
$attributes = $proxy->call($sessionId, 'category_attribute.list');
foreach ($attributes as &$attribute) {
if (isset($attribute['type'])
&& ($attribute['type'] == 'select' || $attribute['type'] == 'multiselect')) {
$attribute['options'] = $proxy->call($sessionId, 'category_attribute.options', $attribute['code']);
}
}
var_dump($attributes);