> 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/update-a-cross-sell-campaign.md).

# Update a cross-sell campaign

Use the **updateCrossSellCampaign** method to update a cross-sell campaign for your 2Checkout account.

## Request parameters

<table><thead><tr><th width="162.7999267578125">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>CampaignCode</code></td><td><strong>Required (string)</strong><br>The campaign code that can be used when placing orders.</td></tr><tr><td><code>MasterProducts</code></td><td><strong>Required (array of strings)</strong><br>Array of product codes to apply to this campaign.</td></tr><tr><td><code>DisplayType</code></td><td><strong>Required (string)</strong><br>The display type of the campaign; Can be cart, review, finish.</td></tr><tr><td><code>DisplayInEmail</code></td><td><strong>Required (boolean)</strong><br>Determines if the campaign will be displayed in payment receipt emails.</td></tr><tr><td><code>Products</code></td><td><strong>Required (array of objects)</strong><br>Array of objects containing the product codes pointing to the promoted products when tied to each master product, the discount value, and the discount type (can only be percent).</td></tr><tr><td><code>ProductCode</code></td><td><strong>Required (string)</strong><br>Product code of the product to be recommended to the shopper.</td></tr><tr><td><code>Discount</code></td><td><strong>Required (float)</strong><br>Value of the discount.</td></tr><tr><td><code>DiscountType</code></td><td><strong>Required (string)</strong><br>Can only be 'PERCENT'.</td></tr><tr><td><code>Name</code></td><td><strong>Required (string)</strong><br>Name of the campaign.</td></tr><tr><td><code>CampaignStatus</code></td><td><strong>Optional (string)</strong><br>The status of the cross-sell campaign.</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></tbody></table>

### Request sample

```php
<?php 
$require ('PATH_TO_AUTH'); 
 
$csCampaign = new stdClass(); 
$csCampaign->CampaignCode = '2Xrl85eSkemBv3G3ea+9fg=='; 
$csCampaign->MasterProducts = ['C8851A5BC9']; 
$csCampaign->DisplayType = 'review'; 
$csCampaign->DisplayInEmail = true; 
$csCampaign->Name = 'testingSoap'; 
$csCampaign->StartDate = '2019-10-21'; 
$csCampaign->EndDate = '2021-10-21'; 
$csCampaign->CampaignStatus = 'ACTIVE'; 
$csCampaign->Products = []; 
$csCampaign->Products[0] = new stdClass(); 
$csCampaign->Products[0]->ProductCode = '512712FA53'; 
$csCampaign->Products[0]->Discount = 19; 
$csCampaign->Products[0]->DiscountType = 'PERCENT'; 
 
try { 
    $csCampaignResponse = $client->updateCrossSellCampaign($sessionID, $csCampaign); 
} catch (SoapFault $e) { 
    echo  $e->getMessage(); 
}
```

## Response parameters

<table><thead><tr><th width="154.2667236328125">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>CampaignCode</code></td><td><strong>Required (string)</strong><br>The campaign code that can be used when placing orders.</td></tr><tr><td><code>MasterProducts</code></td><td><p><strong>Required (array of strings)</strong></p><p>Array of product codes to apply to this campaign.</p></td></tr><tr><td><code>DisplayType</code></td><td><strong>Required (string)</strong><br>The display type of the campaign; Can be cart, review, finish.</td></tr><tr><td><code>DisplayInEmail</code></td><td><strong>Required (boolean)</strong><br>Determines if the campaign will be displayed in payment receipt emails. Can be 'true' or 'false'.</td></tr><tr><td><code>Products</code></td><td><strong>Required (array of objects)</strong><br>Array of objects containing the product codes pointing to the promoted products when tied to each master product, the discount value, and the discount type (can only be percent).</td></tr><tr><td><code>ProductCode</code></td><td><strong>Required (string)</strong><br>Product code of the product to be recommended to the shopper.</td></tr><tr><td><code>Discount</code></td><td><strong>Required (float)</strong><br>Value of the discount.</td></tr><tr><td><code>DiscountType</code></td><td><strong>Required (string)</strong><br>Can only be 'PERCENT'.</td></tr><tr><td><code>Name</code></td><td><strong>Required (string)</strong><br>Name of the campaign.</td></tr><tr><td><code>CampaignStatus</code></td><td><strong>Optional (string)</strong><br>The status of the cross-sell campaign.</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></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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.2checkout.com/soap-api-reference/soap-api-6.0/api-requests/cross-sell/update-a-cross-sell-campaign.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
