Update

Changes retargeting parameters.

Attention.

This method is outdated and will soon be disabled. Use version 5 of the API.

For information about the compatibility of methods between versions Live 4 and 5, see the Migration guide.

Input data

The input data structure in JSON is shown below.

{
   "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.

ParameterDescriptionRequired
RetargetingRequest object
ActionAction: Update.Yes
Login

The username of the client to change retargeting parameters for.

For advertisers, this parameter is ignored.

For agencies
RetargetingsArray of Retargeting objects containing retargeting parameters for ads.Yes
Retargeting object
FieldsNames 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 ../concepts/multicurrency_const.html#multicurrency_const__limits table.

If an automatic display strategy is selected for the campaign, the value that is passed is ignored, and the 209 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.

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
StatusPausedRetargeting is temporarily disabled (not used for displaying ads) — Yes/No. The predefined value is No.No

Output data

Attention. 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.

The output data structure in JSON is shown below.

{
   "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.

ParameterDescription
RetargetingResponse object
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.
RetargetingActionResult object
WarningsArray of Warning objects describing issues that occurred while performing the operation.
ErrorsArray of Error objects with errors that occurred while performing the operation.
RetargetingIDID of the retargeting.
Warning object
WarningCodeWarning code: 208, 209 or 210.
WarningStringWarning text.
Description

Warning description in JSON format. Can be used in combination with WarningCode to automatically identify the problem.

Error object
FaultCodeError code.
FaultStringTextual message about the error.
FaultDetailDetailed description of the reason for the error.

Examples of input data

Python

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

PHP

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

Perl

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