--- layout: m1x_soap title: Attribute Options ---
Aliases:
Allows you to retrieve the attribute options.
Aliases:
Arguments:
| Type | Name | Description |
|---|---|---|
| string | sessionId | Session ID |
| string | attributeId | Attribute ID or code |
| string | storeView | Store view ID or code |
Returns:
| Type | Name | Description |
|---|---|---|
| array | result | Array of catalogAttributeOptionEntity |
The catalogAttributeOptionEntity content is as follows:
| Type | Name | Description |
|---|---|---|
| string | label | Option label |
| string | value | Option value |
$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.options', '65');
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->catalogCategoryAttributeOptions($sessionId, '65');
var_dump($result);
$client = new SoapClient('http://magentohost/api/v2_soap/?wsdl');
$session = $client->login((object)array('username' => 'apiUser', 'apiKey' => 'apiKey'));
$result = $client->catalogCategoryAttributeOptions((object)array('sessionId' => $session->result, 'attributeId' => '65'));
var_dump ($result);
array
0 =>
array
'label' => string 'Yes' (length=3)
'value' => int 1
1 =>
array
'label' => string 'No' (length=2)
'value' => int 0