---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.2
alternate:
  - https://yandex.com/dev/direct/doc/dg-v4/en/live/Retargeting_Update.md
  - https://yandex.com/dev/direct/doc/dg-v4/ru/live/Retargeting_Update.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/direct/doc/dg-v4/en/llms.txt

# Update
Changes retargeting parameters.

{% note alert %}

Disabled method. Use version 5 of the API.

For information about the compatibility of methods between versions Live 4 and 5, see the [Migration guide](https://yandex.com/dev/direct/doc/migration/concepts/methods.md).

{% endnote %}


## Input data

The input data structure in JSON is shown below.

```javascript
{
   "method": "Retargeting",
   "param": {
      /* RetargetingRequest */
      "Action": (string),
      "Login": (string),
      "Retargetings": [
         {  /* Retargeting */
            "Fields": [
               (string)
               ...
            ],
            "RetargetingID": (int),
            "ContextPrice": (float),
            "Currency": (string),
            "AutoBudgetPriority": (string),
            "StatusPaused": (string)
         }
         ...
      ]
   }
}
```

Parameters are described below.


#|
||
**<sup >Parameter</sup>**
|
**<sup >Description</sup>**
|
**<sup >Required</sup>**
||

||
**<sub >RetargetingRequest object</sub>**
||
||
`Action`
|
Action: Update.
|
Yes
||
||
`Login`
|
The username of the client to change retargeting parameters for.

For advertisers, this parameter is ignored.
|
For agencies
||
||
`Retargetings`
|
Array of `Retargeting` objects containing retargeting parameters for ads.
|
Yes
||

||
**<sub >Retargeting object</sub>**
||
||
`Fields`
|
Names of parameters to be updated. If omitted, all parameters will be updated (and if the value is not set, they will be reset).
|
No
||
||
`RetargetingID`
|
ID of the retargeting.
|
Yes
||
||
`ContextPrice`
|
Bid for the Yandex Advertising Network when using the MaximumCoverage and Default strategies (in the currency specified in the `Currency` parameter).

The maximum and minimum values are provided in the table.

If an automatic display strategy is selected for the campaign, the value that is passed is ignored, and the [209](https://yandex.com/dev/direct/doc/dg-v4/en/reference/ErrorCodes.md#warning209) warning is returned.
|
No
||
||
`Currency`
|
The currency the bid is shown in.

Acceptable values: RUB, CHF, EUR, KZT, TRY, UAH, USD, BYN. The value must match the campaign currency; otherwise, an error is returned with code [245](https://yandex.com/dev/direct/doc/dg-v4/en/reference/ErrorCodes.md#BadCurrency).
|
Yes
||
||
`AutoBudgetPriority`
|
Priority of the retargeting when using automatic strategies. Possible values:

- Low — Low priority.
- Medium — Average priority.
- High — High priority.

High priority provides 10-15% more impressions than for keywords/retargetings with medium priority. Low priority reduces impressions by the same amount. If there is only one retargeting for the ad or there are no keywords, this parameter does not affect the number of impressions.

The default value is Medium.

If a manual display strategy is selected for a campaign, the value that is passed is saved, but does not affect impressions.
|
No
||
||
`StatusPaused`
|
Retargeting is temporarily disabled (not used for displaying ads) — Yes/No. The predefined value is No.
|
No
||
|#

## Output data


{% note alert %}

An error when changing one of the retargetings does not cause the entire operation to be canceled, and does not affect the success of changing the other retargetings.

{% endnote %}


The output data structure in JSON is shown below.

```javascript
{
   "data": {
      /* RetargetingResponse */
      "ActionsResult": [
         {  /* RetargetingActionResult */
            "Warnings": [
               {  /* Warning */
                  "WarningCode": (int),
                  "WarningString": (string),
                  "Description": (string)
               }
               ...
            ],
            "Errors": [
               {  /* Error */
                  "FaultCode": (int),
                  "FaultString": (string),
                  "FaultDetail": (string)
               }
               ...
            ],
            "RetargetingID": (int)
         }
         ...
      ]
   }
}
```

Parameters are described below.


#|
||
**<sup >Parameter</sup>**
|
**<sup >Description</sup>**
||

||
**<sub >RetargetingResponse object</sub>**
||
||
`ActionsResult`
|
Array of `RetargetingActionResult` objects. Each object corresponds to an item in the `Retargetings` input array.
- If the operation was completed successfully, the object contains the retargeting ID.
- If the operation was completed but issues occurred during the operation, the object contains the retargeting ID and a `Warnings` array containing a description of those issues.
- The `Errors` array, if an error occurred.
The items in the array are in the same order as the objects in the `Retargetings`.
||

||
**<sub >RetargetingActionResult object</sub>**
||
||
`Warnings`
|
Array of `Warning` objects describing issues that occurred while performing the operation.
||
||
`Errors`
|
Array of `Error` objects with errors that occurred while performing the operation.
||
||
`RetargetingID`
|
ID of the retargeting.
||

||
**<sub >Warning object</sub>**
||
||
`WarningCode`
|
Warning code: [208](https://yandex.com/dev/direct/doc/dg-v4/en/reference/ErrorCodes.md#warning208), [209](https://yandex.com/dev/direct/doc/dg-v4/en/reference/ErrorCodes.md#warning209) or [210](https://yandex.com/dev/direct/doc/dg-v4/en/reference/ErrorCodes.md#warning210).
||
||
`WarningString`
|
Warning text.
||
||
`Description`
|
Warning description in JSON format. Can be used in combination with `WarningCode` to automatically identify the problem.
||

||
**<sub >Error object</sub>**
||
||
`FaultCode`
|
Error code.
||
||
`FaultString`
|
Textual message about the error.
||
||
`FaultDetail`
|
Detailed description of the reason for the error.
||
|#

## Examples of input data

# Python

```python
{
   'Action': 'Update',
   'Login': 'agrom', 
   'Retargetings': [
      {
         'Fields': ['AutoBudgetPriority'],
         'RetargetingID': 7521,
         'AutoBudgetPriority': 'High'
      }
   ]
}
```

# PHP

```php
array(
   'Action' => 'Update',
   'Login' => 'agrom',
   'Retargetings' => array(
      array(
         'Fields' => array('AutoBudgetPriority'),
         'RetargetingID' => 7521,
         'AutoBudgetPriority' ='High'
      )
   )
)
```

# Perl

```perl
{
   'Action' => 'Update',
   'Login' => 'agrom',
   'Retargetings' => [
      {
         'Fields' => ['AutoBudgetPriority'],
         'RetargetingID' => 7521,
         'AutoBudgetPriority' ='High'
      }
   ]
}
```

## Related information

- [Retargeting](https://yandex.com/dev/direct/doc/dg-v4/en/concepts/retargeting.md)

