setBids
Sets bids and priorities for targeting conditions 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.
Learn more
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: A maximum of
campaign-ids-select
- Groups: A maximum of
adgroup-ids-select
- Dynamic text ad targets: A maximum of
ids-select
Request
Request structure in JSON format:
{
"method": "setBids",
"params": { /* params */
"Bids": [{ /* SetBidsItem */
"CampaignId": (long),
"AdGroupId": (long),
"Id": (long),
"Bid": (long),
"ContextBid": (long)
}, ... ] /* required */
}
}
Parameter |
Type |
Description |
Mandatory |
params structure (for JSON) / SetRequest structure (for SOAP) |
|||
|
array of SetBidsItem |
Bids and/or priorities. |
Yes |
SetBidsItem structure |
|||
|
long |
The campaign ID. Specified when setting the same bid/priority for all dynamic text ad targets in a campaign. |
Use either |
|
long |
ID of the ad group. Specified when setting the same bid/priority for all dynamic text ad targets in a group. |
|
|
long |
ID of a dynamic text ad target. Specified when setting the bid or priority for an individual dynamic text ad target. |
|
|
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 |
Yes |
|
long |
This parameter is reserved for future use. |
No |
Alert
The CampaignId
, AdGroupId
and Id
parameters are mutually exclusive. A single request may only contain one of these parameters.
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) |
||
|
array of SetBidActionResult |
Results of setting bids and/or priorities. |
SetBidActionResult structure |
||
|
long |
The campaign ID. Returned if there aren't any errors (if it was specified in the request). |
|
long |
ID of the ad group. Returned if there aren't any errors (if it was specified in the request). |
|
long |
ID of a dynamic text ad target. Returned if there aren't any errors (if it was specified in the request). |
|
array of ExceptionNotification |
Warnings that occurred during the operation. |
|
array of ExceptionNotification |
Errors that occurred during the operation. |