# Update promotion

Use the **updatePromotion** method to alter the details of an existing promotion.

## Request parameters

<table><thead><tr><th width="131.8665771484375">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>sessionID</code></td><td><p><strong>Required (string)</strong></p><p>Output of the <strong>Login</strong> method.</p></td></tr><tr><td><a href="/pages/tj0eHHRBQM1wg75hdRWG"><code>Promotion</code></a></td><td><p><strong>Required (object)</strong></p><p>Promotion object that you want to update.</p></td></tr></tbody></table>

### Request sample

```php
<?php
require ('PATH_TO_AUTH'); 

// Retrieve promotion details

$promotionCode = 'PROMOTION_CODE'; // code of the promotion that you want to update

try {
    $Discount = $client->getPromotion($sessionID, $promotionCode);
}
catch (SoapFault $e) {
    echo "Discount: " . $e->getMessage();
    exit;
}

var_dump("Discount", $Discount);

// Keep the promotion you want to update in $existingPromotion
try{
    $existingPromotion = $client->getPromotion($sessionID, $promotionCode);
}

catch (SoapFault $e) {
    echo "Existing Promotion: " . $e->getMessage();
    exit;
}

// Set the fields to update 
$existingPromotion->Description = 'Updated description';

// Update the promotion
try {
    $updatedPromotion = $client->updatePromotion($sessionID, $existingPromotion);
}

catch (SoapFault $e) {
    echo "UpdatedPromotion: " . $e->getMessage();
    exit;
}

var_dump("UpdatedPromotion", $updatedPromotion);

?>
```

## Response parameters

<table><thead><tr><th width="127.5999755859375">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><a href="/pages/362c07b22c941b5d11dd2578402f2f526260c486"><code>Promotion</code></a></td><td>Updated promotion object.</td></tr></tbody></table>


---

# Agent Instructions: 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:

```
GET https://docs.2checkout.com/soap-api-reference/soap-api-6.0/api-requests/promotions/update-promotion.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
