--- layout: m1x_soap title: Attribute List ---
Aliases:
Allows you to retrieve the list of category attributes.
Aliases:
Arguments:
| Type | Name | Description |
|---|---|---|
| string | sessionId | Session ID |
Returns:
| Type | Name | Description |
|---|---|---|
| array | result | Array of catalogAttributeEntity |
The catalogAttributeEntity content is as follows:
| Type | Name | Description |
|---|---|---|
| int | attribute_id |
Attribute ID |
| string | code |
Attribute code |
| string |
type |
Attribute type |
| string |
required |
Defines whether the attribute is required |
| string |
scope |
Attribute scope: global, website, or store |
$client = new SoapClient('http://magentohost/api/soap/?wsdl');
// If somestuff requires api authentification,
// then get a session token
$session = $client->login('apiUser', 'apiKey');
$result = $client->call($session, 'catalog_category_attribute.list',);
var_dump($result);
// If you don't need the session anymore
//$client->endSession($session);
$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); // TODO : change url
$sessionId = $proxy->login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary
$result = $proxy->catalogCategoryAttributeList($sessionId);
var_dump($result);
$client = new SoapClient('http://magentohost/api/v2_soap/?wsdl');
$session = $client->login((object)array('username' => 'apiUser', 'apiKey' => 'apiKey'));
$result = $client->catalogCategoryAttributeList((object)array('sessionId' => $session->result));
var_dump ($result);
array
0 =>
array
'attribute_id' => null
'code' => string 'parent_id' (length=9)
'type' => null
'required' => null
'scope' => string 'global' (length=6)
1 =>
array
'attribute_id' => null
'code' => string 'increment_id' (length=12)
'type' => null
'required' => null
'scope' => string 'global' (length=6)
2 =>
array
'attribute_id' => null
'code' => string 'updated_at' (length=10)
'type' => null
'required' => null
'scope' => string 'global' (length=6)