Skip to main content
knowledgecenter.2checkout.com

Search cross-sell campaigns

Overview

Use the searchCrossSellCampaigns call to retrieve information on the cross-sell campaigns currently defined on your account. 

Request parameters

Parameters 

Type 

Required

Description 

CampaignName 

String 

Optional 

The name of the campaign.

Status 

String 

Optional 

The status of the campaign; can be ACTIVE/INACTIVE.

Products 

Array of strings 

Optional 

Array of product codes to apply to this campaign. 

RecommendedProducts 

Array of strings 

Optional 

Array of product codes recommended to the shopper.

StartDate 

String 

Optional 

The date when the cross-sell campaign starts, formatted as YYYY-MM-DD 

EndDate 

String 

Optional 

The date when the cross-sell campaign ends, formatted as YYYY-MM-DD 

Pagination 

Object 

Optional 

  

Page 

Int 

Optional 

The page number of the results.

Limit 

Int 

Optional 

The number of results per page.

Response 

The API will respond with an array of cross-sell objects. For more information refer to the overview of the cross-sell management in API

 

Request sample

<?php 
require ('PATH_TO_AUTH'); 
 
$searchFilters = new stdClass(); 
$searchFilters->CampaignName = "My cross sell campaign" 
$searchFilters->Status = "ACTIVE"; 
$searchFilters->Products = ['34924C876E']  
$searchFilters->RecommendedProducts = ["34999S876M"]; 
$searchFilters->Pagination = new stdClass(); 
$searchFilters->StartDate = '2020-01-01'; 
$searchFilters->EndDate = '2020-12-31'; 
$searchFilters->Pagination->Page = 2; 
$searchFilters->Pagination->Limit = 7; 
 
 
try { 
    $campaigns = $client->searchCrossSellCampaigns($sessionID, $searchFilters); 
 
} catch (SoapFault $e) { 
    echo  $e->getMessage(); 
} 

 

  • Was this article helpful?