Upsell
Search and filter upsell campaigns
The title of the campaign
Array of primary product codes
Array of recommended product codes
The UTC date in Y-m-d format
2019-11-05The UTC date in Y-m-d format
2019-11-05The UTC date in Y-m-d format
2022-11-10The UTC date in Y-m-d format
2020-10-02Retrieve upsells that are or are not enabled for renewals
Array of campaign UUIDs
Page number
Number of campaigns per page
OK
Current page number
Number of upsell campaigns in a page
Total number of filtered upsell campaigns
Total number of pages
Bad Request
Unauthorized
Internal Server Error
GET /rest/6.0/upsell HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: text
Accept: */*
{
"Page": 1,
"Limit": 1,
"Upsells": [
{
"Code": "65d44020-66f3-4c7c-a391-93039cef839a",
"Name": "Christmas Upsell campaign",
"StartDate": "2020-12-25",
"EndDate": "2021-12-27",
"DisplayForManualRenewals": true,
"Discount": {
"Type": "FIXED",
"Values": [
{
"Currency": "EUR",
"Amount": 10
}
],
"DefaultCurrency": "EUR"
},
"PrimaryProduct": {
"Code": "PC202012",
"Quantity": 1,
"PriceOptions": [
{
"Code": "POC1122",
"Options": [
{
"Code": "POOCODE445",
"Value": 1
}
]
}
]
},
"RecommendedProduct": {
"Code": "PC202012",
"Quantity": 1,
"PriceOptions": [
{
"Code": "POC1122",
"Options": [
{
"Code": "POOCODE445",
"Value": 1
}
]
}
]
},
"Enabled": true,
"Description": [
{
"Language": "EN",
"Text": "Buy <!--{RECOMMENDED_PRODUCT_NAME}--> for just <!--{RECOMMENDED_PRODUCT_PRICE}--> until Dec 31st"
}
]
}
],
"UpsellsCount": 1,
"PagesCount": 1
}code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"Name of campaign, max 500 chars.
Christmas Upsell campaignWhen will campaign start
2020-12-25When should campaign end
2021-12-27Flag that controls compaign display for manual renewals
trueFlag that controls if the compaign is enabled
trueCreate campaign response
Uniquely generated campaign code
65d44020-66f3-4c7c-a391-93039cef839aName of campaign
Christmas Upsell campaignWhen will campaign start
2020-12-25When will campaign end
2021-12-27Flag that controls compaign display for manual renewals
trueFlag that controls if the compaign is enabled
trueCreate campaign error response
POST /rest/6.0/upsell HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Content-Type: application/json
Accept: */*
Content-Length: 629
{
"Name": "Christmas Upsell campaign",
"StartDate": "2020-12-25",
"EndDate": "2021-12-27",
"DisplayForManualRenewals": true,
"Discount": {
"Type": "FIXED",
"Values": [
{
"Currency": "EUR",
"Amount": 10
}
],
"DefaultCurrency": "EUR"
},
"PrimaryProduct": {
"Code": "PC202012",
"Quantity": 1,
"PriceOptions": [
{
"Code": "POC1122",
"Options": [
{
"Code": "POOCODE445",
"Value": 1
}
]
}
]
},
"RecommendedProduct": {
"Code": "PC202012",
"Quantity": 1,
"PriceOptions": [
{
"Code": "POC1122",
"Options": [
{
"Code": "POOCODE445",
"Value": 1
}
]
}
]
},
"Enabled": true,
"Description": [
{
"Language": "EN",
"Text": "Buy <!--{RECOMMENDED_PRODUCT_NAME}--> for just <!--{RECOMMENDED_PRODUCT_PRICE}--> until Dec 31st"
}
]
}{
"Code": "65d44020-66f3-4c7c-a391-93039cef839a",
"Name": "Christmas Upsell campaign",
"StartDate": "2020-12-25",
"EndDate": "2021-12-27",
"DisplayForManualRenewals": true,
"Discount": {
"Type": "FIXED",
"Values": [
{
"Currency": "EUR",
"Amount": 10
}
],
"DefaultCurrency": "EUR"
},
"PrimaryProduct": {
"Code": "PC202012",
"Quantity": 1,
"PriceOptions": [
{
"Code": "POC1122",
"Options": [
{
"Code": "POOCODE445",
"Value": 1
}
]
}
]
},
"RecommendedProduct": {
"Code": "PC202012",
"Quantity": 1,
"PriceOptions": [
{
"Code": "POC1122",
"Options": [
{
"Code": "POOCODE445",
"Value": 1
}
]
}
]
},
"Enabled": true,
"Description": [
{
"Language": "EN",
"Text": "Buy <!--{RECOMMENDED_PRODUCT_NAME}--> for just <!--{RECOMMENDED_PRODUCT_PRICE}--> until Dec 31st"
}
]
}The primary product code
PC202012The quantity for the primary product
1The price options for the primary product
Returns only upsell campaigns that are (or not) enabled for renewals
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"Found recommended campaign
Uniquely generated campaign code
65d44020-66f3-4c7c-a391-93039cef839aName of campaign
Christmas Upsell campaignWhen will campaign start
2020-12-25When will campaign end
2021-12-27Flag that controls compaign display for manual renewals
trueFlag that controls if the compaign is enabled
trueGet recommended campaign error response
Recommended campaign not found
GET /rest/6.0/upsell/recommended?ProductCode=PC202012 HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: */*
{
"Code": "65d44020-66f3-4c7c-a391-93039cef839a",
"Name": "Christmas Upsell campaign",
"StartDate": "2020-12-25",
"EndDate": "2021-12-27",
"DisplayForManualRenewals": true,
"Discount": {
"Type": "FIXED",
"Values": [
{
"Currency": "EUR",
"Amount": 10
}
],
"DefaultCurrency": "EUR"
},
"PrimaryProduct": {
"Code": "PC202012",
"Quantity": 1,
"PriceOptions": [
{
"Code": "POC1122",
"Options": [
{
"Code": "POOCODE445",
"Value": 1
}
]
}
]
},
"RecommendedProduct": {
"Code": "PC202012",
"Quantity": 1,
"PriceOptions": [
{
"Code": "POC1122",
"Options": [
{
"Code": "POOCODE445",
"Value": 1
}
]
}
]
},
"Enabled": true,
"Description": [
{
"Language": "EN",
"Text": "Buy <!--{RECOMMENDED_PRODUCT_NAME}--> for just <!--{RECOMMENDED_PRODUCT_PRICE}--> until Dec 31st"
}
]
}Update Upsell campaign
Name of campaign, max 500 chars.
Christmas Upsell campaignWhen will campaign start
2020-12-25When should campaign end
2021-12-27Flag that controls compaign display for manual renewals
trueFlag that controls if the compaign is enabled
trueOK
Uniquely generated campaign code
65d44020-66f3-4c7c-a391-93039cef839aName of campaign
Christmas Upsell campaignWhen will campaign start
2020-12-25When will campaign end
2021-12-27Flag that controls compaign display for manual renewals
trueFlag that controls if the compaign is enabled
trueBad Request
PUT /rest/6.0/upsell/{upsellCode} HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: text
Content-Type: application/json
Accept: */*
Content-Length: 629
{
"Name": "Christmas Upsell campaign",
"StartDate": "2020-12-25",
"EndDate": "2021-12-27",
"DisplayForManualRenewals": true,
"Discount": {
"Type": "FIXED",
"Values": [
{
"Currency": "EUR",
"Amount": 10
}
],
"DefaultCurrency": "EUR"
},
"PrimaryProduct": {
"Code": "PC202012",
"Quantity": 1,
"PriceOptions": [
{
"Code": "POC1122",
"Options": [
{
"Code": "POOCODE445",
"Value": 1
}
]
}
]
},
"RecommendedProduct": {
"Code": "PC202012",
"Quantity": 1,
"PriceOptions": [
{
"Code": "POC1122",
"Options": [
{
"Code": "POOCODE445",
"Value": 1
}
]
}
]
},
"Enabled": true,
"Description": [
{
"Language": "EN",
"Text": "Buy <!--{RECOMMENDED_PRODUCT_NAME}--> for just <!--{RECOMMENDED_PRODUCT_PRICE}--> until Dec 31st"
}
]
}{
"Code": "65d44020-66f3-4c7c-a391-93039cef839a",
"Name": "Christmas Upsell campaign",
"StartDate": "2020-12-25",
"EndDate": "2021-12-27",
"DisplayForManualRenewals": true,
"Discount": {
"Type": "FIXED",
"Values": [
{
"Currency": "EUR",
"Amount": 10
}
],
"DefaultCurrency": "EUR"
},
"PrimaryProduct": {
"Code": "PC202012",
"Quantity": 1,
"PriceOptions": [
{
"Code": "POC1122",
"Options": [
{
"Code": "POOCODE445",
"Value": 1
}
]
}
]
},
"RecommendedProduct": {
"Code": "PC202012",
"Quantity": 1,
"PriceOptions": [
{
"Code": "POC1122",
"Options": [
{
"Code": "POOCODE445",
"Value": 1
}
]
}
]
},
"Enabled": true,
"Description": [
{
"Language": "EN",
"Text": "Buy <!--{RECOMMENDED_PRODUCT_NAME}--> for just <!--{RECOMMENDED_PRODUCT_PRICE}--> until Dec 31st"
}
]
}Delete Upsell campaign
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"application/jsonOK
No content
Delete campaign error response
DELETE /rest/6.0/upsell/{upsellCode} HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
No content
application/jsonExample: application/jsonPossible values: Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"Returns Upsell campaign settings
overlayGET /rest/6.0/upsell/settings/campaign/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Returns Upsell campaign settings
{
"UpsellingDisplayType": "overlay"
}Update Upsell campaign settings displayType
Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"Update displayType setting
overlayOK
overlayUpsell campaign settings error response
PUT /rest/6.0/upsell/settings/campaign/ HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Content-Type: application/json
Accept: */*
Content-Length: 34
{
"UpsellingDisplayType": "overlay"
}{
"UpsellingDisplayType": "overlay"
}Last updated
Was this helpful?