--- layout: m1x_soap title: Attribute Types ---
Allows you to retrieve the list of possible attribute types.
Arguments:
| Type | Name | Description |
|---|---|---|
| string | sessionId | Session ID |
Return:
| 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 |
Faults:
No Faults.
$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy->login('apiUser', 'apiKey');
$result = $proxy->call(
$sessionId,
"product_attribute.types"
);
echo "<pre>";
var_dump($result);
$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->catalogProductAttributeTypes($sessionId);
var_dump($result);
array
0 =>
'value' => 'text'
'label' => 'Text Field'
1 =>
'value' => 'textarea'
'label' => 'Text Area'
2 =>
'value' => 'date'
'label' => 'Date'
3 =>
'value' => 'boolean'
'label' => 'Yes/No'
4 =>
'value' => 'multiselect'
'label' => 'Multiple Select'
5 =>
'value' => 'select'
'label' => 'Dropdown'
6 =>
'value' => 'price'
'label' => 'Price'
7 =>
'value' => 'media_image'
'label' => 'Media Image'