Magento Product api does not provide this functionality
Although there are simple ways to extend a specific API in custom modules, itโs the fastest way if you donโt want to write a custom module (since I find it difficult to create a new magento developer).
Copy the source API class of the product from the folder corein localbefore editing anything (thus, the installation of Magento will remain "update-save").
- copy api.php from:
app/code/core/Mage/Catalog/Model/Product/Api.php - to:
app/code/local/Mage/Catalog/Model/Product/Api.php
Now change the method infoin the copied file to include full_url. Add the following line to $result-array. (Be sure to set the necessary commas at the end of the lines of the array.)
'full_url' => $product->getProductUrl(),
Your method code should look like this:
public function info($productId, $store = null, $attributes = null, $identifierType = null)
{
$product = $this->_getProduct($productId, $store, $identifierType);
$result = array(
'product_id' => $product->getId(),
'sku' => $product->getSku(),
'set' => $product->getAttributeSetId(),
'type' => $product->getTypeId(),
'categories' => $product->getCategoryIds(),
'websites' => $product->getWebsiteIds(),
'full_url' => $product->getProductUrl(),
);
foreach ($product->getTypeInstance(true)->getEditableAttributes($product) as $attribute) {
if ($this->_isAllowedAttribute($attribute, $attributes)) {
$result[$attribute->getAttributeCode()] = $product->getData(
$attribute->getAttributeCode());
}
}
return $result;
}
product.info full_url API.