update

Changes the parameters of retargeting lists.

  1. Restrictions
  2. Request
  3. Response

Restrictions

Maximum of 1000 retargeting lists per method call.

Changing the scope is not allowed.
  • If you modify a retargeting list that contains at least one rule with the ALL or ANY operator, it still must contain at least one rule with the ALL or ANY operator after your changes.

  • If you modify a retargeting list that consists exclusively of rules with the NONE operator, it must still contain only rules with the NONE operator after your changes.

Otherwise, the edit operation isn't performed, and an error is returned.

Request

Request structure in JSON format:

{
  "method": "update",
  "params": { /* params */
    "RetargetingLists": [{  /* RetargetingListUpdateItem */
      "Id": (long), /* required */
      "Name": (string),
      "Description": (string),
      "Rules": [{  /* RetargetingListRuleItem */
        "Arguments": [{  /* RetargetingListRuleArgumentItem */
          "MembershipLifeSpan": (int),
          "ExternalId": (long) /* required */
        }, ... ], /* required */
        "Operator": ( "ALL" | "ANY" | "NONE" ) /* required */
      }, ... ]
    }, ... ]
 }
} 
Parameter Type Description Required
Params structure (for JSON) / UpdateRequest structure (for SOAP)
RetargetingLists array of RetargetingListUpdateItem Retargeting lists to modify. Yes
RetargetingListUpdateItem structure
Id long ID of the retargeting list. Yes
Name string Name of the retargeting list (maximum of 250 characters). No
Description string Text note for the retargeting list (maximum of 4096 characters). No
Rules array of RetargetingListRuleItem Rules for selecting site users. Maximum of 50 items in the array. In order for the retargeting list to apply, the user must meet all the rules at once. No
RetargetingListRuleItem structure
Arguments array of RetargetingListRuleArgumentItem

Yandex.Metrica goals and segments, or Yandex.Audience segments. Maximum of 250 items in the array.

To get a list of available goals and segments, use the GetRetargetingGoals (Live) method in the Live 4 version of the API.

Yes
Operator RetargetingListRuleOperatorEnum

Logical operator for the retargeting list:

  • ALL — The rule is met if the user completed all the goals and is included in all the segments.

  • ANY — The rule is met if the user completed at least one of the goals or the user's session is included in at least one of the segments.

  • NONE — The rule is met if the user didn't complete any of the goals and the user's session isn't included in any of the segments.

A retargeting list that uses segments from Yandex.Metrica or Yandex.Audience must contain at leat one rule and the logical operator ALL or ANY. A retargeting list that consists exclusively of rules with the NONE operator can only contain Yandex.Metrica goals.

Yes
RetargetingListRuleArgumentItem structure
MembershipLifeSpan int Number of days (from 1 to 90) for checking whether goals are completed or segments are matched. For Yandex.Metrica goals and segments
ExternalId long

ID of the goal or segment.

To get a list of goals and segments available to the advertiser, use the GetRetargetingGoals (Live) method in the Live 4 version of the API.

Yes

Response

Response structure in JSON format:

{
  "result": {  /* result */
    "UpdateResults": [{  /* ActionResult */
      "Id": (long),
      "Warnings": [{  /* ExceptionNotification */
        "Code": (int), /* required */
        "Message": (string), /* required */
        "Details": (string)
       }, ...
      ],
      "Errors": [{  /* ExceptionNotification */
        "Code": (int), /* required */
        "Message": (string), /* required */
        "Details": (string)
       }, ...
      ] 
    }, ... ] /* required */
  }
}
Parameter Type Description
result structure (for JSON) / UpdateResponse structure (for SOAP)
UpdateResults array of ActionResult Results of changing parameters for retargeting lists.
ActionResult structure
Id long ID of the retargeting list. Returned if there aren't any errors. See the section Operations on object arrays.
Warnings array of ExceptionNotification

Warnings that occurred during the operation.

Errors array of ExceptionNotification

Errors that occurred during the operation.