header

Magento 1.x Software Support Notice

For Magento Commerce 1, Magento is providing software support through June 2020. Depending on your Magento Commerce 1 version, software support may include both quality fixes and security patches. Please review our Magento Software Lifecycle Policy to see how your version of Magento Commerce 1 is supported.

For Magento Open Source 1.5 to 1.9, Magento is providing software security patches through June 2020 to ensure those sites remain secure and compliant. Visit our information page for more details about our software maintenance policy and other considerations for your business.

List of Additional Product Attributes

Edit this page on GitHub

Module: Product API

Resource: product

Method:

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

Arguments:

Type Name Description
string sessionId Session ID
string productType Product type (e.g., simple)
string attributeSetId Attribute set ID

Returns:

Type Name Description
int attribute_id Attribute ID
string code Attribute code
string
type Attribute type (e.g., text, select, date, etc.)
string
required Defines whether the attribute is required
string
scope Attribute scope (global, website, or store)

Faults:

Fault Code Fault Message
104 Product type is not in allowed types.
105 Product attribute set is not existed
106 Product 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
      ...