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

Module: Complex Product API

Method:
  • product_downloadable_link.remove (SOAP V1)
  • catalogProductDownloadableLinkRemove (SOAP V2)

Allows you to remove a link/sample from a downloadable product.

Arguments:

TypeNameDescription
stringsessionIdSession ID
stringlinkId/sampleIdLink/sample ID
stringresourceTypeResource type. Can have one of the following values: ‘sample’ or ‘link’

Return:

TypeDescription
booleanTrue if the link/sample is removed from a downloadable product

Faults:

Fault CodeFault Message
412Link or sample with specified ID was not found.
415Validation error has occurred.
416Unable to remove link. Details in error message.

Examples

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

$sampleId = 7;
$linkId = 9;

$resultSample = $proxy->call(
    $sessionId,
    'product_downloadable_link.remove',
    array($sampleId, 'sample')
);

$resultLink = $proxy->call(
    $sessionId,
    'product_downloadable_link.remove',
    array($linkId, 'link')
);
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->catalogProductDownloadableLinkRemove($sessionId, '7', 'sample');
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->catalogProductDownloadableLinkRemove((object)array('sessionId' => $sessionId->result, 'linkId' => '7', 'resourceType' => 'sample'));
var_dump($result->result);