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

Module: Complex Product API

Resource: product_custom_option_value

Method:
  • product_custom_option_value.info (SOAP V1)
  • catalogProductCustomOptionValueInfo (SOAP V2)

Allows you to retrieve full information about the specified product custom option value.

Arguments:

TypeNameDescription
stringsessionIdSession ID
stringvalueIdValue ID
stringstoreStore view ID or code (optional)

Return:

TypeNameDescription
arrayresultArray of catalogProductCustomOptionValueInfoEntity

The catalogProductCustomOptionValueInfoEntity content is as follows:

TypeNameDescription
stringvalue_idOption value ID
stringoption_idOption ID
stringskuCustom option value row SKU
stringsort_orderOption value sort order
stringdefault_priceOption value default price
stringdefault_price_typeDefault price type. Possible values are as follows: “fixed” or “percent”
stringstore_priceOption value store price
stringstore_price_typeStore price type. Possible values are as follows: “fixed” or “percent”
stringpriceOption value price
stringprice_typePrice type. Possible values are as follows: “fixed” or “percent”
stringdefault_titleOption value default title
stringstore_titleOption value store title
stringtitleOption value title

Faults:

Fault CodeFault Message
101Option value with requested id does not exist.

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, 'product_custom_option_value.info', '5');
var_dump($result);
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->catalogProductCustomOptionValueInfo($sessionId, '5');
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->catalogProductCustomOptionValueInfo((object)array('sessionId' => $sessionId->result, 'valueId' => '5'));

var_dump($result->result);
Response Example SOAP V1
array
  'option_id' => string '5' (length=1)
  'sku' => string 'slider' (length=6)
  'sort_order' => string '0' (length=1)
  'default_title' => string 'slider' (length=6)
  'store_title' => string 'slider' (length=6)
  'title' => string 'slider' (length=6)
  'default_price' => string '239.9900' (length=8)
  'default_price_type' => string 'fixed' (length=5)
  'store_price' => string '239.9900' (length=8)
  'store_price_type' => string 'fixed' (length=5)
  'price' => string '239.9900' (length=8)
  'price_type' => string 'fixed' (length=5)
  'value_id' => string '2' (length=1)