Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Module: Product API

Resource: product

Method:
  • product.listOfAdditionalAttributes (SOAP V1)
  • catalogProductListOfAdditionalAttributes (SOAP V2)

Get the list of additional attributes. Additional attributes are attributes that are not in the default set of attributes.

Arguments:

TypeNameDescription
stringsessionIdSession ID
stringproductTypeProduct type (e.g., simple)
stringattributeSetIdAttribute set ID

Returns:

TypeNameDescription
intattribute_idAttribute ID
stringcodeAttribute code
stringtypeAttribute type (e.g., text, select, date, etc.)
stringrequiredDefines whether the attribute is required
stringscopeAttribute scope (global, website, or store)

Faults:

Fault CodeFault Message
104Product type is not in allowed types.
105Product attribute set is not existed
106Product attribute set is not belong catalog product entity type

Examples

Request Example SOAP V1
$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy->login('apiUser', 'apiKey');

$listAttributes = $proxy->call(
    $sessionId,
    'product.listOfAdditionalAttributes',
    array(
        'simple',
        13
    )
);
Request Example SOAP V2
$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->catalogProductListOfAdditionalAttributes($sessionId, 'simple', '13');
var_dump($result);
Response Example SOAP V1
array
  0 =>
    array
      'attribute_id' => string '89' (length=2)
      'code' => string 'old_id' (length=6)
      'type' => string 'text' (length=4)
      'required' => string '0' (length=1)
      'scope' => string 'global' (length=6)
  1 =>
    array
      'attribute_id' => string '93' (length=2)
      'code' => string 'news_from_date' (length=14)
      'type' => string 'date' (length=4)
      'required' => string '0' (length=1)
      'scope' => string 'website' (length=7)
  2 =>
    array
      ...