Skip to main content

Place orders with upsell campaign

Place orders with upsell campaign

Last updated: 24-Jun-2021
Rate this article:

Overview

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 name Type Required/Optional Description
CampaignCode String Required The upsell campaign code.
ParentCode String Required Product code of the product to be recommended to the shopper.
PriceOptions String Required Array of priceOptions strings used on parent product.
Quantity Integer Required Product quantity.

Request Example 

{ 
  "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. 

{ 
    "Country": "DE", 
    "Currency": "EUR", 
    "Items": [ 
        { 
            "Code": "NIQRPI0GTU", 
            "Quantity": 1 
        }, 
        { 
            "Code": "0XICS3OVDK", 
            "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": "DE", 
        "City": "Bucharest", 
        "Address1": "Example Street", 
        "Zip": "73331", 
        "Email": "example@email.com" 
    } 
} 
Rate this article:

Need help?

Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.

Not yet a Verifone customer?

We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.

Verifone logo