Deleting a saved item The “internalId” of a saved item can be queried using the getCustomProduct() function. A saved article can then be deleted with the “internalId”.
Example
$deletearticle = ‘articletodelete’;
try {
$getItemArgs = new getCustomProductRequestType();
$getItemArgs->environment = $environment;
$getItemArgs->messageLevel = $messageLevel;
$selection = new catalogueSelectionType();
$getItemArgs->selection = $selection;
$getItemArgs->selection->itemIdentifier = $deletearticle;
$product = $client->getCustomProduct($getItemArgs);
$internalId = $product->product->internalId;
} catch(Exception $e) {
echo “Error on request getCustomProduct: ” . $e->getMessage();
}
try {
$changeArgs->writeMode = ‘deactivate’;
$changeArgs->product = new selectedType();
$changeArgs->product->internalId = $internalId;
$erg = $client->setCustomProduct($changeArgs);
} catch(Exception $e) {
echo “Error on request setCustomerProduct: ” . $e->getMessage();
}