> For the complete documentation index, see [llms.txt](https://docs.2checkout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.2checkout.com/soap-api-reference/soap-api-6.0/api-requests/cross-sell/search-cross-sell-campaigns.md).

# Search cross-sell campaigns

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

## Request parameters

<table><thead><tr><th width="196.9332275390625">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>CampaignName</code></td><td><strong>Optional (string)</strong><br>The name of the campaign.</td></tr><tr><td><code>Status</code></td><td><strong>Optional (string)</strong><br>The status of the campaign; can be ACTIVE/INACTIVE.</td></tr><tr><td><code>Products</code></td><td><strong>Optional (array of strings)</strong><br>Array of product codes to apply to this campaign.</td></tr><tr><td><code>RecommendedProducts</code></td><td><strong>Optional (array of strings)</strong><br>Array of product codes recommended to the shopper.</td></tr><tr><td><code>StartDate</code></td><td><strong>Optional (string)</strong><br>The date when the cross-sell campaign starts, formatted as YYYY-MM-DD</td></tr><tr><td><code>EndDate</code></td><td><strong>Optional (string)</strong><br>The date when the cross-sell campaign ends, formatted as YYYY-MM-DD</td></tr><tr><td><code>Type</code></td><td><strong>Optional (string)</strong><br>Can be MERCH/AFF.</td></tr><tr><td><code>Pagination</code></td><td><strong>Optional (object)</strong></td></tr><tr><td><code>Pagination.Page</code></td><td><strong>Optional (int)</strong><br>The page number of the results.</td></tr><tr><td><code>Pagination.Limit</code></td><td><strong>Optional (int)</strong><br>The number of results per page.</td></tr></tbody></table>

### Request sample

```php
<?php
declare(strict_types=1);

// Start clear CLI
echo chr(27).chr(91).'H'.chr(27).chr(91).'J';
// End clear CLI

$executionStartTime = microtime(true);

$apiVersion = '6.0';
$apiHost = "http://api.avangate.local";

$host = $apiHost."/soap/" . $apiVersion . "/";

$client = new SoapClient(
    $host."?wsdl",
    [
    'location' => $host,
    'trace' => 1,
    'cache_wsdl' => WSDL_CACHE_NONE
    ]
);
$client->__setCookie('XDEBUG_SESSION', 'PHPSTORM');

// Please be aware to consider valid data
$merchantCode = 'your_merchant_code';
$key = 'your_merchant_key';

// Generate hash for login
$date = gmdate('Y-m-d H:i:s');
$string = strlen($merchantCode) . $merchantCode . strlen($date) . $date;
$hash = hash_hmac('md5', $string, $key);

try {
    $sessionID = $client->login($merchantCode, $date, $hash);
} catch (SoapFault $e) {
    echo  $e->getMessage();
}

var_dump("Generated sessionID: ". $sessionID);
echo "\n\r";

// Build search parameters
$searchOptions = new \stdClass();

$searchOptions->Status = ['ACTIVE'];     // Optional | Ex: ['ACTIVE']
$searchOptions->Type = null;             // Optional | Ex: 'MERCH'
$searchOptions->CampaignName = null;     // Optional | Ex: 'UpdatedCampaign_4'
$searchOptions->Products = [];           // Optional | Ex: ["a01", "a02"]
$searchOptions->RecommendedProducts = [];// Optional | Ex: ["a03"]
$searchOptions->StartDate = null;        // Optional | Ex: 'YYYY-MM-DD'
$searchOptions->EndDate = null;          // Optional | Ex: 'YYYY-MM-DD'
$searchOptions->Pagination = null;       // Optional | Ex: {"Page": "1", "Limit": "10"}

try {
    $result = $client->searchCrossSellCampaigns($sessionID, $searchOptions);
    echo "\n\rSEARCH CROSS SELL CAMPAIGNS: \n\r";
    print_r(json_encode($result, JSON_PRETTY_PRINT));

} catch (SoapFault $e) {
    echo $e->getMessage();
}

$executionEndTime = microtime(true);

// The duration will be displayed in seconds and milliseconds.
$seconds = round($executionEndTime - $executionStartTime, 2);

// Print it out
echo "\n\rThis script took $seconds to execute.\n\r";
```

## Response parameters

<table><thead><tr><th width="121.199951171875">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>Items</code></td><td>An array of <a href="/soap-api-reference/soap-api-6.0/api-responses/cross-sell.md"><code>CrossSellCampaign</code></a> objects</td></tr><tr><td><code>Pagination</code></td><td><strong>Pagination</strong> <br>Object with the following parameters: <code>Page</code>, <code>Limit</code>, <code>Count</code></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.2checkout.com/soap-api-reference/soap-api-6.0/api-requests/cross-sell/search-cross-sell-campaigns.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
