For the complete documentation index, see llms.txt. This page is also available as Markdown.

Place orders with upsell campaign

When calling the placeOrder method in order to place an order with an upsell campaign, the code of the master product and the campaign code need to be added to the UpSell object for the product item where it is applied.

UpSell Object for the placeOrder API method

Parameter
Type / Description

CampaignCode

Required (string) The upsell campaign code.

ParentCode

Required (string) Product code of the product to be recommended to the shopper.

PriceOptions

Required (string) Array of priceOptions strings used on parent product.

Quantity

Required (integer) Product quantity.

Request sample

{
  "Currency": "USD",
  "Language": "EN",
  "Country": "US",
  "CustomerIP": "10.10.10.10",
  "Source": "sourceAPI.net",
  "CustomerReference": 421820775,
  "Items": [
    {
      "Code": "15",
      "Quantity": 1
    },
    {
      "Code": "34924C876E",
      "Quantity": 1,
      "UpSell": {
        "CampaignCode": "1490b954-c299-430a-8134-e6a0501913ef",
        "ParentCode": "0BQ591VOTW",
        "PriceOptions": [
            "option_code_1"
        ],
        "Quantity": 5
      }
    }
  ],

  "BillingDetails":{
      "FirstName":"Customer First Name",
      "LastName":"Customer Last Name",
      "CountryCode":"US",
      "State":"California",
      "City":"San Francisco",
      "Address1":"Example Street",
      "Zip":"90210",
      "Email":"example@email.com"
  },

  "PaymentDetails": {
    "Type": "CC",
    "Currency": "USD",
    "CustomerIP": "10.10.10.10",
    "PaymentMethod": {
      "Vendor3DSReturnURL": "https://example.com",
      "Vendor3DSCancelURL": "https://example.com",
      "CardNumber": "4111111111111111",
      "CardType": "VISA",
      "ExpirationYear": "2020",
      "ExpirationMonth": "12",
      "CCID": "123"
    }
  }
}

Response

Using the same structure, the getContents method will take into account the discount associated with the upsell campaign and display the appropriate prices and taxes.

Last updated

Was this helpful?