List all smart upgrades.
POST /json/listSmartUpgrades
[
'result' => 'success',
'data' => [
'smartupgrades' => [
[
'smartupgrade_id' => 567,
'name' => 'Basic to Premium',
'from_product_id' => 123,
'from_product_name' => 'Basic Course',
'to_product_id' => 124,
'to_product_name' => 'Premium Course',
'upgrade_price' => 49.00,
'currency' => 'EUR',
'is_active' => true,
'conversions_count' => 87,
'conversion_rate' => 12.5
],
[
'smartupgrade_id' => 568,
'name' => 'Premium to VIP',
'from_product_id' => 124,
'from_product_name' => 'Premium Course',
'to_product_id' => 125,
'to_product_name' => 'VIP Course',
'upgrade_price' => 99.00,
'currency' => 'EUR',
'is_active' => true,
'conversions_count' => 45,
'conversion_rate' => 8.3
]
// ... more smart upgrades
],
'total' => 12,
'limit' => 100,
'offset' => 0
]
]
use GoSuccess\Digistore24\Api\Digistore24;
use GoSuccess\Digistore24\Api\Client\Configuration;
// Initialize API client
$config = new Configuration('YOUR-API-KEY');
$api = new Digistore24($config);
// List all smart upgrades
$response = $api->smartUpgrade()->listSmartUpgrades(
limit: 50
);
echo "Total smart upgrades: {$response->total}\n\n";
foreach ($response->smartupgrades as $upgrade) {
echo "ID: {$upgrade->smartupgradeId}\n";
echo "Name: {$upgrade->name}\n";
echo "Path: {$upgrade->fromProductName} → {$upgrade->toProductName}\n";
echo "Price: {$upgrade->currency} {$upgrade->upgradePrice}\n";
echo "Conversions: {$upgrade->conversionsCount} ({$upgrade->conversionRate}%)\n\n";
}
// Filter by source product
$response = $api->smartUpgrade()->listSmartUpgrades(
fromProductId: 123
);
// Filter by target product
$response = $api->smartUpgrade()->listSmartUpgrades(
toProductId: 124
);
// Filter active upgrades only
$response = $api->smartUpgrade()->listSmartUpgrades(
isActive: true
);