setBids
Sets bids and priorities for dynamic text ad targets for dynamic ads.
You can set a bid or priority for an individual dynamic text ad target, for all dynamic text ad targets in an ad group, or for all dynamic text ad targets in a campaign.
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.
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
A single request can only set bids for the same type of objects — either for campaigns only, or for groups only, or for dynamic text ad targets only.
Maximum number of objects per method call:
- campaigns — maximum of 10
- groups — maximum of 1000
- dynamic text ad targets — maximum of 10,000
Request
Request structure in JSON format:
{
"method": "setBids",
"params": { /* params */
"Bids": [{ /* SetBidsItem */
"CampaignId": (long),
"AdGroupId": (long),
"Id": (long),
"Bid": (long),
"ContextBid": (long),
"StrategyPriority": ( "LOW" | "NORMAL" | "HIGH" )
}, ... ] /* required */
}
}
Parameter | Type | Description | Required |
Params structure (for JSON) / SetRequest structure (for SOAP) | |||
---|---|---|---|
Bids | array of SetBidsItem | Bids and/or priorities. | Yes |
SetBidsItem structure | |||
CampaignId | long | The campaign ID. Specified when setting the same bid/priority for all dynamic text ad targets in a campaign. | Either CampaignId, AdGroupId, or Id |
AdGroupId | long | ID of the ad group. Specified when setting the same bid/priority for all dynamic text ad targets in a group. | |
Id | long | ID of a dynamic text ad target. Specified when setting the bid or priority for an individual dynamic text ad target. | |
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. | At least one of the parameters Bid or StrategyPriority (or both) |
StrategyPriority | PriorityEnum | The priority of the dynamic text ad target: LOW, NORMAL or HIGH. Only used for an automatic strategy. | |
ContextBid | long | This parameter is reserved for future use. | No |
Parameter | Type | Description | Required |
Params structure (for JSON) / SetRequest structure (for SOAP) | |||
---|---|---|---|
Bids | array of SetBidsItem | Bids and/or priorities. | Yes |
SetBidsItem structure | |||
CampaignId | long | The campaign ID. Specified when setting the same bid/priority for all dynamic text ad targets in a campaign. | Either CampaignId, AdGroupId, or Id |
AdGroupId | long | ID of the ad group. Specified when setting the same bid/priority for all dynamic text ad targets in a group. | |
Id | long | ID of a dynamic text ad target. Specified when setting the bid or priority for an individual dynamic text ad target. | |
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. | At least one of the parameters Bid or StrategyPriority (or both) |
StrategyPriority | PriorityEnum | The priority of the dynamic text ad target: LOW, NORMAL or HIGH. Only used for an automatic strategy. | |
ContextBid | long | This parameter is reserved for future use. | No |
Response
Response structure in JSON format:
{
"result": { /* result */
"SetBidsResults": [{ /* SetBidsActionResult */
"CampaignId": (long),
"AdGroupId": (long),
"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) / SetResponse structure (for SOAP) | ||
---|---|---|
SetBidsResults | array of SetBidActionResult | Results of setting bids and/or priorities. |
SetBidActionResult structure | ||
CampaignId | long | The campaign ID. Returned if there aren't any errors (if it was specified in the request). |
AdGroupId | long | ID of the ad group. Returned if there aren't any errors (if it was specified in the request). |
Id | long | ID of a dynamic text ad target. Returned if there aren't any errors (if it was specified in the request). |
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) / SetResponse structure (for SOAP) | ||
---|---|---|
SetBidsResults | array of SetBidActionResult | Results of setting bids and/or priorities. |
SetBidActionResult structure | ||
CampaignId | long | The campaign ID. Returned if there aren't any errors (if it was specified in the request). |
AdGroupId | long | ID of the ad group. Returned if there aren't any errors (if it was specified in the request). |
Id | long | ID of a dynamic text ad target. Returned if there aren't any errors (if it was specified in the request). |
Warnings | array of ExceptionNotification | Warnings that occurred during the operation. |
Errors | array of ExceptionNotification | Errors that occurred during the operation. |