Get

Returns retargeting conditions.

Attention.

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.

Input data

The input data structure in JSON is shown below.

{
   "method": "RetargetingCondition",
   "param": {
      /* RetargetingConditionRequest */
      "Action": (string),
      "SelectionCriteria": {
         /* RetargetingConditionSelectionCriteria */
         "RetargetingConditionIDS": [
            (int)
            ...
         ],
         "Logins": [
            (string)
            ...
         ]
      }
   }
}

Parameters are described below.

Parameter Description Required
RetargetingConditionRequest object
Action Action: Get. Yes
SelectionCriteria The SelectionCriteria object, which contains criteria for selecting retargeting conditions to delete. Yes
RetargetingConditionSelectionCriteria object
RetargetingConditionIDS Array containing the IDs of retargeting conditions to perform the operation for. No
Logins

Array containing usernames of clients to perform the operation for.

For direct advertisers, this parameter is ignored.

No
Notes
Attention.
  1. For advertisers: If the SelectionCriteria structure is empty, the operation will be performed for all the retargeting conditions.
  2. For agencies: At least one of the RetargetingConditionIDS or Logins parameters must be set. If both parameters are set, the operation will be performed for retargeting conditions that simultaneously meet both criteria: a condition ID set in the RetargetingConditionIDS array, and a username of the condition's owner that is set in the Logins array.
Parameter Description Required
RetargetingConditionRequest object
Action Action: Get. Yes
SelectionCriteria The SelectionCriteria object, which contains criteria for selecting retargeting conditions to delete. Yes
RetargetingConditionSelectionCriteria object
RetargetingConditionIDS Array containing the IDs of retargeting conditions to perform the operation for. No
Logins

Array containing usernames of clients to perform the operation for.

For direct advertisers, this parameter is ignored.

No
Notes
Attention.
  1. For advertisers: If the SelectionCriteria structure is empty, the operation will be performed for all the retargeting conditions.
  2. For agencies: At least one of the RetargetingConditionIDS or Logins parameters must be set. If both parameters are set, the operation will be performed for retargeting conditions that simultaneously meet both criteria: a condition ID set in the RetargetingConditionIDS array, and a username of the condition's owner that is set in the Logins array.

Output data

The output data structure in JSON is shown below.

{
   "data": {
      /* RetargetingConditionResponse */
      "RetargetingConditions": [
         {  /* RetargetingCondition */
            "IsAccessible": (string),
            "RetargetingConditionName": (string),
            "RetargetingConditionDescription": (string),
            "Login": (string),
            "RetargetingConditionID": (int),
            "RetargetingCondition": [
               {  /* RetargetingConditionItem */
                  "Type": (string),
                  "Goals": [
                     {  /* RetargetingConditionGoalItem */
                        "Time": (int),
                        "GoalID": (long)
                     }
                     ...
                  ] 
               } 
               ...
            ]
         }
         ...
      ]
   }
}

Parameters are described below.

Parameter Description
RetargetingConditionResponse object
RetargetingConditions The method returns an array of RetargetingCondition objects, each of which contains information about a retargeting condition.
RetargetingCondition object
IsAccessible

Yes — all the goals and segments in the retargeting condition are available; No — the condition has an inaccessible goal or segment, and impressions are not possible for this condition.

A goal or segment becomes unavailable if it is deleted, or if the owner revokes access (see Managing tag access in the Help for Yandex Metrica).

RetargetingConditionName Name of the retargeting condition (maximum 250 characters).
RetargetingConditionDescription Text description of the retargeting condition (maximum 4096 characters).
Login Username of the condition's owner.
RetargetingConditionID ID of the retargeting condition.
RetargetingCondition Array of RetargetingConditionItem objects. Each object contains a group that describes the desired user behavior. If the retargeting condition has several groups, they are united with the logical AND operator (the condition is satisified if all the groups of goals are achieved).
RetargetingConditionItem object
Type

Type of group:

  • all — The group is satisfied if all the goals and segments are met.
  • or — The group is satisfied if at least one of the goals or segments is met.
  • not — The group is satisfied if none of the goals or segments is met.

A retargeting condition that uses Yandex Metrica segments or Yandex Audience segments must contain at least one "all" or "or" type of group. A retargeting condition that consists solely of "not" groups can only use Yandex Metrica goals.

Goals Array of goals and segments (RetargetingConditionGoalItem objects).
RetargetingConditionGoalItem object
Time

Number of days (from 1 to 90) for checking whether goals are completed or segments are matched.

GoalID ID of the goal or segment.
Parameter Description
RetargetingConditionResponse object
RetargetingConditions The method returns an array of RetargetingCondition objects, each of which contains information about a retargeting condition.
RetargetingCondition object
IsAccessible

Yes — all the goals and segments in the retargeting condition are available; No — the condition has an inaccessible goal or segment, and impressions are not possible for this condition.

A goal or segment becomes unavailable if it is deleted, or if the owner revokes access (see Managing tag access in the Help for Yandex Metrica).

RetargetingConditionName Name of the retargeting condition (maximum 250 characters).
RetargetingConditionDescription Text description of the retargeting condition (maximum 4096 characters).
Login Username of the condition's owner.
RetargetingConditionID ID of the retargeting condition.
RetargetingCondition Array of RetargetingConditionItem objects. Each object contains a group that describes the desired user behavior. If the retargeting condition has several groups, they are united with the logical AND operator (the condition is satisified if all the groups of goals are achieved).
RetargetingConditionItem object
Type

Type of group:

  • all — The group is satisfied if all the goals and segments are met.
  • or — The group is satisfied if at least one of the goals or segments is met.
  • not — The group is satisfied if none of the goals or segments is met.

A retargeting condition that uses Yandex Metrica segments or Yandex Audience segments must contain at least one "all" or "or" type of group. A retargeting condition that consists solely of "not" groups can only use Yandex Metrica goals.

Goals Array of goals and segments (RetargetingConditionGoalItem objects).
RetargetingConditionGoalItem object
Time

Number of days (from 1 to 90) for checking whether goals are completed or segments are matched.

GoalID ID of the goal or segment.

Examples of input data

Python

{
   'Action': 'Get',
   'SelectionCriteria': {
      'Logins': ['agrom','larry']
   }
}

PHP

array(
   'Action' => 'Get',
   'SelectionCriteria' => array(
      'Logins' => array('agrom','larry')
   )
)

Perl

{
   'Action' => 'Get',
   'SelectionCriteria' => {
      'Logins' => ['agrom','larry']
   }
}