Cross Sell
Christmas campaign["ACTIVE","INACTIVE"]MERCHPossible values: ["34924C876E","34AF4C876S"]["34924C876E","34AF4C876S"]2020-09-03T16:28:32+04:002020-12-03T16:28:32+04:00110application/jsonExample: application/jsonPossible values: Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"Returns Cross Sell campaign collection
Error
GET /rest/6.0/crosssells HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
{
"Items": [
{
"IdCrossSellingCampaign": 435908435,
"Name": "My campaign",
"CampaignCode": "2Xrl83GEn+uBr3G3ddW9eg==",
"DisplayType": "cart",
"ProductCode": "cart",
"MasterProducts": [
"SOME_PRODUCT_CODE"
],
"Products": [
{
"ProductCode": "SOME_PRODUCT_CODE",
"Discount": 10,
"DiscountType": "PERCENT",
"Type": "Own",
"AutoAdded": false,
"DiscountedPrice": [
{
"Currency": "EUR",
"Price": 9.04
}
],
"BasePrice": [
{
"Currency": "EUR",
"Price": 9.04
}
]
}
]
}
],
"Pagination": {
"Page": 1,
"Limit": 10,
"Count": 12
}
}code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"application/jsonName of campaign, max 255 chars.
New campaignarray of product code ids to which this cross sell is going to be applied to
FD86FD98Where should cross sell products be displayed
cartPossible values: true/false - display in payment receipt emails or not
falseWhen should campaign start
2020-12-20When should campaign end
2021-12-20Create campaign response
123New campaignFD86FD98cartPossible values: false2020-12-202021-12-20Validation errors, will be empty in case of successful request
Master products are not providedCreate campaign response
POST /rest/6.0/crosssells HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
Content-Type: application/json
Content-Length: 318
{
"Name": "New campaign",
"MasterProducts": [
"FD86FD98"
],
"DisplayType": "cart",
"DisplayInEmail": false,
"Products": [
{
"ProductCode": "FD86FD99",
"Discount": 15.5,
"DiscountType": "PERCENT",
"DiscountedPrice": [
{
"Currency": "EUR",
"Price": 9.04
}
],
"Errors": [
"Discount number is invalid"
]
}
],
"StartDate": "2020-12-20",
"EndDate": "2021-12-20"
}{
"CampaignCode": "123",
"Name": "New campaign",
"MasterProducts": [
"FD86FD98"
],
"DisplayType": "cart",
"DisplayInEmail": false,
"Products": [
{
"ProductCode": "FD86FD99",
"Discount": 15.5,
"DiscountType": "PERCENT",
"DiscountedPrice": [
{
"Currency": "EUR",
"Price": 9.04
}
],
"Errors": [
"Discount number is invalid"
]
}
],
"StartDate": "2020-12-20",
"EndDate": "2021-12-20",
"Errors": [
"Master products are not provided"
]
}code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"application/jsonThe unique code of the cross-sell campaign
2Xrl83KEs6KB1XG3db+9dQ==The cross-selll campaign status
ACTIVEPossible values: Name of campaign, max 255 chars.
New campaignarray of product code ids to which this cross sell is going to be applied to
FD86FD98Where should cross sell products be displayed
cartPossible values: true/false - display in payment receipt emails or not
falseWhen should campaign start
2020-12-20When should campaign end
2021-12-20Update campaign success response
The unique code of the cross-sell campaign
2Xrl83KEs6KB1XG3db+9dQ==The cross-selll campaign status
ACTIVEPossible values: Name of campaign, max 255 chars.
New campaignarray of product code ids to which this cross sell is going to be applied to
FD86FD98Where should cross sell products be displayed
cartPossible values: true/false - display in payment receipt emails or not
falseWhen should campaign start
2020-12-20When should campaign end
2021-12-20End date is invalidUpdate campaign error response
PUT /rest/6.0/crosssells HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
Content-Type: application/json
Content-Length: 303
{
"CampaignCode": "2Xrl85eSkemBv3G3ea+9fg==",
"MasterProducts": [
"PAV2019"
],
"DisplayType": "cart",
"DisplayInEmail": true,
"Name": "REST documentation campaign",
"StartDate": "2021-03-10",
"EndDate": "2021-04-10",
"CampaignStatus": "ACTIVE",
"Products": [
{
"ProductCode": "PAV2020",
"Discount": 5,
"DiscountType": "PERCENT"
}
]
}{
"CampaignCode": "2Xrl83KEs6KB1XG3db+9dQ==",
"MasterProducts": [
"PAV2019"
],
"DisplayType": "cart",
"DisplayInEmail": true,
"Products": [
{
"ProductCode": "PAV2020",
"Discount": 5,
"DiscountType": "PERCENT",
"AutoAdded": false,
"DiscountedPrice": [
{
"Currency": "EUR",
"Price": 20.19
},
{
"Currency": "USD",
"Price": 19.86
}
],
"Errors": []
}
],
"Name": "REST documentation campaign",
"CampaignStatus": "ACTIVE",
"StartDate": "2021-03-10",
"EndDate": "2021-10-210",
"Errors": []
}2Xrl83KSnemB5XG3ea+9hQ==application/jsonExample: application/jsonPossible values: Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"Returns Cross Sell campaign collection
2Xrl83KSnemB5XG3ea+9hQ==New campaignPossible values: ACTIVEPossible values: MERCHPossible values: FD86FD98cartPossible values: false2020-12-202021-12-20Error
GET /rest/6.0/crosssells/{campaignCode}/campaign HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
{
"CampaignCode": "2Xrl83KSnemB5XG3ea+9hQ==",
"Name": "New campaign",
"CampaignStatus": "ACTIVE",
"CampaignOwnerType": "MERCH",
"MasterProducts": [
"FD86FD98"
],
"DisplayType": "cart",
"DisplayInEmail": false,
"Products": [
{
"ProductCode": "FD86FD99",
"Discount": 15.5,
"DiscountType": "PERCENT",
"DiscountedPrice": [
{
"Currency": "EUR",
"Price": 9.04
}
],
"BasePrice": [
{
"Currency": "EUR",
"Price": 9.04
}
]
}
],
"StartDate": "2020-12-20",
"EndDate": "2021-12-20"
}code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"application/jsonReturns cross sell
The maximum number of recommended products; We recommend adding a maximum of 3 products as cross-selling options.
5Maximum product thumbnail size. Must be any of [60, 80, 100, 150].
100Possible values: Determines if the product short description is displayed next to the thumbnail or not.
falseValidation errors
POST /rest/6.0/crosssells/settings/ HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
{
"displayProductsMax": 5,
"maxThumbSize": 100,
"displayShortDescription": false
}Overview Add cross-sell campaigns texts.
application/jsonExample: application/jsonPossible values: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"language code
encampaign title in the related language
Limited offer this weekcampaign description in the related language
Buy this product at 5% discountOK
language code
encampaign title in the related language
Limited offer this weekcampaign description in the related language
Buy this product at 5% discountPOST /rest/6.0/crosssells/campaignTexts/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Content-Type: application/json
Content-Length: 178
[
{
"Language": "en",
"Title": "My campaign name",
"Description": "My campaign description"
},
{
"Language": "ro",
"Title": "Numele campaniei mele",
"Description": "Descrierea campaniei mele"
}
]OK
[
{
"Language": "en",
"Title": "My campaign name",
"Description": "My campaign description",
"Errors": []
},
{
"Language": "ro",
"Title": "Numele campaniei mele",
"Description": "Descrierea campaniei mele",
"Errors": []
}
]Overview Edit cross-sell campaigns texts.
application/jsonExample: application/jsonPossible values: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"language code
encampaign title in the related language
Limited offer this weekcampaign description in the related language
Buy this product at 5% discountOK
language code
encampaign title in the related language
Limited offer this weekcampaign description in the related language
Buy this product at 5% discountPUT /rest/6.0/crosssells/campaignTexts/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Content-Type: application/json
Content-Length: 178
[
{
"Language": "en",
"Title": "My campaign name",
"Description": "My campaign description"
},
{
"Language": "ro",
"Title": "Numele campaniei mele",
"Description": "Descrierea campaniei mele"
}
]OK
[
{
"Language": "en",
"Title": "My campaign name",
"Description": "My campaign description",
"Errors": [
"The campaign text already exists"
]
},
{
"Language": "ro",
"Title": "Numele campaniei mele",
"Description": "Descrierea campaniei mele",
"Errors": []
}
]Overview Extract information on all cross-sell campaigns texts.
application/jsonExample: application/jsonPossible values: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"OK
GET /rest/6.0/crossselltexts/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
OK
[
{
"Description": "<p>\n\tSave up to <em><strong>25%</strong></em> with this special offer!</p>",
"Language": "en",
"Title": "Exclusive, one-time deal!"
},
{
"Description": "<p>\n\tSparen Sie bis zu <em><strong>25%</strong></em> mit diesem Angebot.</p>",
"Language": "de",
"Title": "Exklusives Angebot!"
}
]Overview Extract information on all cross-sell campaigns texts.
ISO 4217 code for the language of the cross-sell campaign text.
enapplication/jsonExample: application/jsonPossible values: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"OK
GET /rest/6.0/crossselltexts/{Language}/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
OK
[
{
"Description": "<p>\n\tSave up to <em><strong>25%</strong></em> with this special offer!</p>",
"Language": "en",
"Title": "Exclusive, one-time deal!"
}
]Last updated
Was this helpful?