Skip to main content
knowledgecenter.2checkout.com

Retrieve recommended upsell campaign

Overview

Use the getRecommendedUpsellCampaign method via SOAP API 6.0 to find a campaign for the product code and the other sent filters.

Request Parameters

Parameter Name Type Required/Optional Description
SessionId String Required

Unique 2Checkout session ID code.

 

ProductCode String Required

The primary product code.

Quantity Integer Optional

The product quantity.

PriceOptions String Optional

The price options for the primary product.

EnabledForRenewals Boolean Optional

Returns only upsell campaigns that are enabled (or not) for renewals.

Request Example

<?php

require ('PATH_TO_AUTH');

$productCode = 'upsell_module_po';
$quantity = 13;
$priceOptions = 'option1,module_scale_po2=5';
$enabledForRenewals = true;

try {
    $results = $client->getRecommendedUpsellCampaign($sessionID, $productCode, $quantity, $priceOptions, $enabledForRenewals);
    var_dump($results);
}
catch (SoapFault $e) {
    var_dump($e->getMessage());
}

Response

Parameters Type Description

UpSell

Object

Object containing information related to the upsell campaigns, including product information and discount settings.
  • Was this article helpful?