add
Creates dynamic text ad targets and sets bids or priorities for the created targets.
The bid or priority is used depending on which display strategy is selected in the campaign:
If the campaign has an automatic strategy set up, the StrategyPriority parameter is used: ads for dynamic text ad targets with higher priority are allocated more traffic when possible, and they are the last ones to be stopped when budget funds are low.
If a manual strategy is set up in the campaign, the Bid parameter is used.
The ContextBid parameter is not 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 an automatic strategy is set up in the campaign, but the Bid parameter is set for a dynamic text ad target, this bid value won't be applied. When the strategy switches from automatic to manual, the bid will be selected by an automatic algorithm.
If a manual strategy is set up in the campaign, but the StrategyPriority parameter is set for a dynamic text ad target, the set priority value will be applied later when the strategy is switched 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.
Bids and prices are passed via the Yandex Direct API as integers. The value passed is a bid or price multiplied by 1,000,000.
All bids and prices are shown in the advertiser's currency.
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). Restriction. 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 feeds with the Yandex Market type and will be 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 fields for each type of feed, see Configuring filters in the Help for Yandex Direct. | 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 |
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). Restriction. 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 feeds with the Yandex Market type and will be 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 fields for each type of feed, see Configuring filters in the Help for Yandex Direct. | 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. |
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. |