Place orders with cross-selling campaigns
Last updated: 24-Jun-2021
Rate this article:
Overview
Cross-selling allows you to recommend additional products to customers and increase the average order value. The 2Checkout Public API supports classic cross-sell campaigns which means you can recommend more products from your own product catalog to your shoppers.
CrossSell Object for the placeOrder API method
Use the CrossSell object below to recommend additional products to customers via JSON-RPC API 6.0.
Parameter name | Type | Required/Optional | Description |
---|---|---|---|
ParentCode | String | Required | Product code of the product to be recommended to the shopper. |
CampaignCode | String | Required | The upsell campaign code. |
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,
"CrossSell":{
"ParentCode" : "15",
"CampaignCode" : "2Xrl83KSkemCv3G3dL%2B9eA%3D%3D"
}
}
],
"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 cross-sell campaign and display the appropriate prices and taxes.
{
"Country": "DE",
"Currency": "EUR",
"Items": [
{
"Code": "NIQRPI0GTU",
"Quantity": 1
},
{
"Code": "0XICS3OVDK",
"Quantity": 1,
"CrossSell":{
"ParentCode" : " NIQRPI0GTU ",
"CampaignCode" : "2Xrl83KSkemCv3G3dL%2B9eA%3D%3D"
}
}
],
"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: