add

Creates targeting conditions for dynamic ads and sets bids or priorities for the created conditions.
The bid or priority is used depending on which display strategy is selected in the campaign:

  • If you've set up an automatic strategy for your campaign, the StrategyPriority parameter is used: ads for dynamic text ad targets with higher priority get more traffic if possible, and are paused last when the budget runs low.

  • If you've set up a manual strategy for your campaign, the Bid parameter is used.

The ContextBid parameter isn't used at this time.

If an item in the input array contains parameters that are not appropriate for the strategy, the values of these parameters are saved and a warning is issued.

  • If your campaign uses an automatic strategy, but the Bid parameter is set for a dynamic text ad target, this bid value won't be applied. When the strategy changes from automatic to manual, the bid will be selected by an automatic algorithm.

  • If your campaign uses a manual strategy, but the StrategyPriority parameter is set for a dynamic text ad target, the set priority value will be applied later when the strategy changes to an automatic one.

If the strategy allows for setting bids but the bid is not specified, the minimum bid is set by default (the minimum bid depends on the advertiser's currency). If the strategy allows for setting priority but the priority is not specified, the average priority is set by default.

Learn more

Restrictions

Dynamic text ad targets can only be added to a DYNAMIC_TEXT_AD_GROUP type of ad group.

Maximum of 50 dynamic text ad targets per ad group.

Maximum of 1000 dynamic text ad targets per method call.

Request

Request structure in JSON format:

{
  "method": "add",
  "params": {  /* params */
    "DynamicFeedAdTargets": [{  /* required */
      "Name": (string), /* required */
      "AdGroupId": (long), /* required */
      "Bid": (long),
      "ContextBid": (long),
      "Conditions" : {
        "Items" : [{ /* required */
          "Operand" : (string) /* required */,
          "Operator" : ( "CONTAINS_ANY" | "EQUALS_ANY" | "EXISTS" | "GREATER_THAN" | "IN_RANGE" | "LESS_THAN"| "NOT_CONTAINS_ALL") /* required */,
          "Arguments" : [ (string) ] /* required */
        }, ... ]
      },
      "AvailableItemsOnly" : ("YES"|"NO")
    }, ... ]
  }
}

Parameter

Type

Description

Required

params structure (for JSON) / AddRequest structure (for SOAP)

DynamicFeedAdTargets

array of DynamicFeedAdTargetAddItem

The dynamic text ad targets to add.

Yes

DynamicFeedAdTargetAddItem structure

Name

string

Name of a dynamic text ad target (maximum of 100 characters).

Yes

AdGroupId

long

ID of the group to add the dynamic text ad target to.

Yes

Bid

long

The bid on search, 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.

No

ContextBid

long

This parameter is reserved for future use.

No

Conditions

array of ConditionsArray

Rules for selecting product offers. A product offer is selected for display if it meets all the selection rules at the same time.

If this parameter is omitted, the filter selects all product offers from the feed (ITEMS_ALL selection type).

Alert

If the type of feed in an ad group is FLIGHTS or RETAIL, selection rules are not used.

No

AvailableItemsOnly

YesNoEnum

Select only products in stock. The default value is NO.
It can only be used in the “Yandex Market” type of feeds and is ignored in other feeds.

No

ConditionsArray structure

Items

array of ConditionsItem

Selection rules. No more than 30 filters in the array. The total length of the selection rules is a maximum of 65 KB (in JSON).

Yes

ConditionsItem structure

Operand

string

Feed parameter.

For a description of the fields for each feed type, see Configuring filters in the Yandex Direct Help.

Yes

Operator

StringConditionOperatorEnum

Comparison operator. For information on the compatibility of feed fields and operators, as well as restrictions on values, see Selection rule.

Yes

Arguments

array of string

An array of strings to compare the operand to.

Yes

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)
      }, ...  ]
    }, ...  ]
  }
}

Parameter

Type

Description

result structure (for JSON) / AddResponse structure (for SOAP)

AddResults

array of ActionResult

Results of adding dynamic text ad targets.

ActionResult structure

Id

long

ID of the created dynamic text ad target. 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.