Update upsell campaign
Use the updateUpSellCampaign method to update an upsell campaign via JSON-RPC API 6.0.
Request parameters
sessionId
Required (string) Unique 2Checkout session ID code.
Code
Required (string) The code of the upsell campaign in UUID format.
UpsellCampaign
Required (object) New upsell campaign definition.
Name
Required (string) Name of campaign, max 500 characters.
StartDate
Optional (string) The date when the up-sell campaign starts, in the YYYY-MM-DD format. Can be NULL (starts immediately after enabling).
EndDate
Optional (string) The date when the up-sell campaign ends, in the YYYY-MM-DD format. Can be NULL (ends immediately after disabling).
DisplayForManualRenewals
Required (boolean/integer) Flag to control if the campaign will be displayed for manual subscription renewal orders. Can be set as true/false/0/1.
Discount
Required (object) Discount definition object, details below:
Discount.Type
Required (string) Type of discount. Can be FIXED or PERCENT.
Discount.Value
Required (integer) Percentage discount value (PERCENT discount only).
Discount.Values
Required (array of objects) List of currency discounts (FIXED discount only), details below:
Discount.Values.Currency
Required (string) Code of Currency for the related amount.
Discount.Values.Amount
Required (integer) Discount amount value for the related currency.
Discount.DefaultCurrency
Required (string) Code of default Currency (FIXED discount only).
PrimaryProduct
Required (object) Main (primary) product object, details below:
PrimaryProduct.Code
Required (string) The code of the product that the recommendation is made for.
PrimaryProduct.Quantity
Required (integer) The quantity for the primary product. Can be 0 (standing for any quantity).
PrimaryProduct.PriceOptions
Optional (array of objects) Price options list for the primary product, details below:
PrimaryProduct.PriceOptions.Code
Required (string) Price option group code.
PrimaryProduct.PriceOptions.Options
Optional (array of objects) Price options list, details below:
PrimaryProduct.PriceOptions.Options.Code
Required (string) Price option code.
PrimaryProduct.PriceOptions.Options.Value
Optional (integer) Price option value (for scale interval price option group only).
RecommendedProduct
Required (object) Recommended product object, details below:
RecommendedProduct.Code
Required (string) The code of the recommended product.
RecommendedProduct.Quantity
Required (integer) The quantity for the recommended product. Can be 0 (standing for “match quantity” setting).
RecommendedProduct.PriceOptions
Optional (array of objects) Price options list for the recommended product, details below:
RecommendedProduct.PriceOptions.Code
Required (string) Price option group code.
RecommendedProduct.PriceOptions.Options
Optional (array of objects) Price options list, details below:
RecommendedProduct.PriceOptions.Options.Code
Required (string) Price option code.
RecommendedProduct.PriceOptions.Options.Value
Optional (integer) Price option value (for scale interval price options group only).
Enabled
Required (boolean/integer) Sets the campaign enabled or disabled. Can be set as true/false/0/1.
Description
Required (array of objects) List of campaign language descriptions, details below:
Description.Language
Required (string) Code of the language.
Description.Text
Required (string) The text of the description in the associated language.
Request sample
Response parameters
Object
Object containing information related to the upsell campaigns, including product information and discount settings.
Last updated
Was this helpful?