# 2. Update

## Record Update Process

<mark style="color:blue;">`PUT`</mark>`{{WalletUrl}}/api/v1/campaign`&#x20;

{% hint style="info" %}
**Note:** To use this service, it is mandatory to include the **apikeypublic** and **apiclientpublic** parameters in the Header field.

\
[<mark style="color:green;">**WalletAPI Address**</mark>](https://developer.paywall.one/payment-orchestration-integration-document/environment)
{% endhint %}

**The parameters that need to be sent to the service are as follows:**

<table><thead><tr><th width="162">Parameter</th><th width="79">Type</th><th width="107">Required</th><th width="403">Description</th></tr></thead><tbody><tr><td>apikeypublic</td><td>string</td><td>Yes</td><td>It is the general key information used for service access.</td></tr><tr><td>apiclientpublic</td><td>string</td><td>Yes</td><td>It is the general access key that represents the application's identity.</td></tr></tbody></table>

{% tabs %}
{% tab title="Service Reguest - JSON" %}

```json
{
    "Value": {
        "Id": "44e93e35-d427-4ae9-a11c-b122447b6ac4",
        "Name": "düldül",
        "Description": "<string>",
        "MinimumDepositAmount": 100,
        "MaximumDepositAmount": 102,
        "BonusType": "Fixed",
        "BonusValue": 1,
        "CampaignType": "CashBack",
        "StartDate": "2025-09-25",
        "EndDate": "2025-09-27",
        "IsActive": true,
        "MerchantId": 2071,
        "TotalBonusGiven": 0.00,
        "CreatedAt": "2025-04-30T14:17:27.331977Z",
        "UpdatedAt": "2025-05-01T00:17:55.9933421Z"
    },
    "Errors": [],
    "IsSuccess": true,
    "IsFailure": false
}
```

{% endtab %}
{% endtabs %}

## Service Response

<table><thead><tr><th width="192">Parameter</th><th width="147.89192708333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>IsFailure</td><td>bool</td><td>It returns true if an error occurred during the transaction.</td></tr><tr><td>IsSuccess</td><td>bool</td><td>It returns true along with a successful result if the transaction was successful.</td></tr><tr><td>Errors</td><td>Array</td><td>It is an array structure containing the error messages encountered.</td></tr><tr><td>Value</td><td>Array</td><td>It contains the main data set returned as a result of the request.</td></tr></tbody></table>

## Service Response (Value)

<table><thead><tr><th width="234.05859375">Parameter</th><th width="162.38671875">Type</th><th width="348.94140625">Description</th></tr></thead><tbody><tr><td>Id</td><td>Guid</td><td>It is the unique identifier assigned by the system to the campaign.</td></tr><tr><td>Name</td><td>string</td><td>It is the name of the campaign defined in the system.</td></tr><tr><td>Description</td><td>string</td><td>It contains a brief description of the campaign.</td></tr><tr><td>MinimumDepositAmount</td><td>decimal</td><td>It is the minimum deposit amount required to benefit from the campaign.</td></tr><tr><td>MaximumDepositAmount</td><td>decimal</td><td>It is the maximum deposit amount for which the campaign is valid.</td></tr><tr><td>BonusType</td><td>string</td><td>It specifies the type of bonus to be applied in the campaign (e.g., percentage, fixed amount).</td></tr><tr><td>BonusValue</td><td>decimal</td><td>It shows the bonus value (in numerical terms).</td></tr><tr><td>CampaignType</td><td>string</td><td>It specifies the category type of the campaign.</td></tr><tr><td>StartDate</td><td>DateTime</td><td>It is the start date of the campaign.</td></tr><tr><td>EndDate</td><td>DateTime</td><td>It is the end date of the campaign.</td></tr><tr><td>IsActive</td><td>bool</td><td>It indicates whether the campaign is active or not.</td></tr><tr><td>MerchantId</td><td>Guid</td><td>It is the unique identifier of the business that defines the campaign.</td></tr><tr><td>TotalBonusGiven</td><td>decimal</td><td>It shows the total bonus amount distributed during the campaign period.</td></tr><tr><td>CreatedAt</td><td>DateTime</td><td>It is the date when the record was created in the system.</td></tr><tr><td>UpdatedAt</td><td>DateTime</td><td>It is the timestamp of the last update made to the record.</td></tr></tbody></table>
