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

Module: Mage_Catalog

Resource: catalog_product

Aliases:

  • product
Method:
  • catalog_product.info (SOAP V1)
  • catalogProductInfo (SOAP V2)

Allows you to retrieve information about the required product.

Aliases:

  • product.info

Arguments:

TypeNameDescription
stringsessionIdSession ID
stringproductIdProduct ID or SKU
stringstoreViewStore view ID or code (optional)
arrayattributesArray of catalogProductRequestAttributes (optional)
stringidentifierTypeDefines whether the product ID or SKU value is passed in the “productId” parameter. (optional)

Returns:

TypeNameDescription
arrayinfoArray of catalogProductReturnEntity

The catalogProductRequestAttributes content is as follows:

TypeNameDescription
ArrayOfStringattributesArray of attributes
ArrayOfStringadditional_attributesArray of additional attributes

The catalogProductReturnEntity content is as follows:

TypeNameDescription
stringproduct_idProduct ID
stringskuProduct SKU
stringsetProduct set
stringtypeProduct type
ArrayOfStringcategoriesArray of categories
ArrayOfStringwebsitesArray of websites
stringcreated_atDate when the product was created
stringupdated_atDate when the product was last updated
stringtype_idType ID
stringnameProduct name
stringdescriptionProduct description
stringshort_descriptionShort description for a product
stringweightProduct weight
stringstatusStatus of a product
stringurl_keyRelative URL path that can be entered in place of a target path
stringurl_pathURL path
stringvisibilityProduct visibility on the frontend
ArrayOfStringcategory_idsArray of category IDs
ArrayOfStringwebsite_idsArray of website IDs
stringhas_optionsDefines whether the product has options
stringgift_message_availableDefines whether the gift message is available for the product
stringpriceProduct price
stringspecial_priceProduct special price
stringspecial_from_dateDate starting from which the special price is applied to the product
stringspecial_to_dateDate till which the special price is applied to the product
stringtax_class_idTax class ID
arraytier_priceArray of catalogProductTierPriceEntity
stringmeta_titleMate title
stringmeta_keywordMeta keyword
stringmeta_descriptionMeta description
stringcustom_designCustom design
stringcustom_layout_updateCustom layout update
stringoptions_containerOptions container
associativeArrayadditional_attributesArray of additional attributes
stringenable_googlecheckoutDefines whether Google Checkout is applied to the product

The catalogProductTierPriceEntity content is as follows:

TypeNameDescription
stringcustomer_group_idID of the customer group
stringwebsiteWebsite
intqtyQuantity to which the price will be applied
doublepricePrice that each item will cost

Examples

Request Example SOAP V1
$client = new SoapClient('http://magentohost/api/soap/?wsdl');

// If somestuff requires API authentication,
// then get a session token
$session = $client->login('apiUser', 'apiKey');

$result = $client->call($session, 'catalog_product.info', '4');
var_dump($result);

// If you don't need the session anymore
//$client->endSession($session);
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->catalogProductInfo($sessionId, '4');
var_dump($result);
Request Example SOAP V2 (WS-I Compliance Mode)
$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl');

$sessionId = $proxy->login((object)array('username' => 'apiUser', 'apiKey' => 'apiKey'));

$result = $proxy->catalogProductInfo((object)array('sessionId' => $sessionId->result, 'productId' => '4'));
var_dump($result->result);
Response Example SOAP V1
array
  'product_id' => string '4' (length=1)
  'sku' => string 'canon_powershot' (length=15)
  'set' => string '4' (length=1)
  'type' => string 'simple' (length=6)
  'categories' =>
    array
      0 => string '3' (length=1)
      1 => string '5' (length=1)
  'websites' =>
    array
      0 => string '2' (length=1)
  'type_id' => string 'simple' (length=6)
  'name' => string 'Canon PowerShot A630 8MP Digital Camera with 4x Optical Zoom' (length=60)
  'description' => string 'Replacing the highly popular PowerShot A620, the PowerShot A630 features a rotating 2.5-inch vari-angle LCD, 4x optical zoom lens, and a vast array of creative shooting modes.

The PowerShot A630 packs a vast array of advanced features into a remarkably compact space' (length=267)
  'short_description' => string 'Replacing the highly popular PowerShot A620, the PowerShot A630 features a rotating 2.5-inch vari-angle LCD, 4x optical zoom lens, and a vast array of creative shooting modes.' (length=175)
  'weight' => string '1.0000' (length=6)
  'old_id' => null
  'news_from_date' => null
  'news_to_date' => null
  'status' => string '1' (length=1)
  'url_key' => string 'canon-powershot-a630-8mp-digital-camera-with-4x-optical-zoom' (length=60)
  'url_path' => string 'canon-powershot-a630-8mp-digital-camera-with-4x-optical-zoom.html' (length=65)
  'visibility' => string '4' (length=1)
  'category_ids' =>
    array
      0 => string '3' (length=1)
      1 => string '5' (length=1)
  'required_options' => string '0' (length=1)
  'has_options' => string '0' (length=1)
  'image_label' => null
  'small_image_label' => null
  'thumbnail_label' => null
  'created_at' => string '2012-03-29 12:47:56' (length=19)
  'updated_at' => string '2012-03-29 12:47:56' (length=19)
  'country_of_manufacture' => null
  'price' => string '329.9900' (length=8)
  'group_price' =>
    array
      empty
  'special_price' => null
  'special_from_date' => null
  'special_to_date' => null
  'tier_price' =>
    array
      empty
  'minimal_price' => null
  'msrp_enabled' => string '2' (length=1)
  'msrp_display_actual_price_type' => string '4' (length=1)
  'msrp' => null
  'enable_googlecheckout' => string '1' (length=1)
  'tax_class_id' => string '2' (length=1)
  'meta_title' => null
  'meta_keyword' => null
  'meta_description' => null
  'is_recurring' => string '0' (length=1)
  'recurring_profile' => null
  'custom_design' => null
  'custom_design_from' => null
  'custom_design_to' => null
  'custom_layout_update' => null
  'page_layout' => null
  'options_container' => string 'container2' (length=10)
  'gift_message_available' => null