add

Creates audience targets and sets bids and priorities for the created targets.

  1. How bids and priorities are applied
  2. Restrictions
  3. Request
  4. Response
Attention.
  • Bids and prices are passed via the Yandex.Direct API as integer numbers. The value that is passed represents the bid or price multiplied by 1,000,000.

  • All bids and prices are shown in the advertiser's currency.

Restrictions

Maximum of 50 audience targets in the TEXT_AD_GROUP and MOBILE_APP_AD_GROUP types of ad groups.

Maximum of one audience target in an ad group with the CPM_BANNER_AD_GROUP type and USER_PROFILE subtype.

You cannot add audience targets to an ad group of the CPM_BANNER_AD_GROUP type and KEYWORDS subtype, or to an ad group of the DYNAMIC_TEXT_AD_GROUP type.

Maximum of 1000 audience targets per method call.

For other restrictions, see the section Restrictions.

Request

Request structure in JSON format:

{
  "method": "add",
  "params": { /* params */
    "AudienceTargets": [{  /* AudienceTargetAddItem */
      "AdGroupId": (long), /* required */
      "RetargetingListId": (long),
      "InterestId": (long),
      "ContextBid": (long),
      "StrategyPriority": ( "LOW" | "NORMAL" | "HIGH" )
    }, ... ] /* required */
  }
}
ParameterTypeDescriptionRequired
Params structure (for JSON) / AddRequest structure (for SOAP)
AudienceTargetsarray of AudienceTargetAddItemAudience targets to add.Yes
AudienceTargetAddItem structure
AdGroupIdlongID of the group to add the audience target to.Yes
RetargetingListIdlong

ID of the retargeting list.

In the TEXT_AD_GROUP and MOBILE_APP_AD_GROUP types of ad groups, only audience targets that specify a retargeting list with the RETARGETING type and the FOR_TARGETS_AND_ADJUSTMENTS scope are allowed.

In the CPM_BANNER_AD_GROUP type of ad groups, only audience targets that specify a retargeting list with the AUDIENCE type and the FOR_TARGETS_ONLY scope are allowed.

The ID must be unique within the ad group (you can't have two audience targets with identical retargeting list IDs).

Either RetargetingListId or InterestId
InterestIdlong

ID of an app category interest.

To get the list of app categories, use the Dictionaries.get method and specify the dictionary name Interests in the request. You can only use interests that have the IsTargetable parameter set to YES in the reference list.

This parameter can only be used with the MOBILE_APP_AD_GROUP type of ad group. The ID must be unique within the ad group (you can't have two audience targets with identical interest IDs).

ContextBidlong

The bid in ad networks, multiplied by 1,000,000. Integer. Only used for a manual strategy.

Specified in the advertiser's currency. Restrictions are listed in the currency reference. To get it, use the Dictionaries.get method and specify the Currencies dictionary name in the request.

The default value is the minimum bid.

Attention. An image ad can be displayed only if the bid is at least as high as the minimum bid for an ad with an image.
No
StrategyPriorityPriorityEnum

The priority of the audience target: LOW, NORMAL or HIGH. Only used for an automatic strategy.

The default value is NORMAL.

No

Response

Response structure in JSON format:

{
  "result": { /* result */
    "AddResults": [{  /* ActionResult */
      "Id": (long),
      "Warnings": [{  /* ExceptionNotification */
        "Code": (int), /* required */
        "Message": (string), /* required */
        "Details": (string)
      }, ... ],
      "Errors": [{  /* ExceptionNotification */
        "Code": (int), /* required */
        "Message": (string), /* required */
        "Details": (string)
      }, ... ] 
    }, ... ]
  }
}
ParameterTypeDescription
Result structure (for JSON) / AddResponse structure (for SOAP)
AddResultsarray of ActionResultResults of adding audience targets.
ActionResult structure
Idlong

The ID of a created audience target. Returned if there aren't any errors. See the section Operations on object arrays.

Warningsarray of ExceptionNotification

Warnings that occurred during the operation.

Errorsarray of ExceptionNotification

Errors that occurred during the operation.