setBids

Assigns CPC, CPA, and priorities for filters.
You can assign CPC, CPA, or priority to an individual filter, to all filters in an ad group, or to all filters in a campaign.

CPC, CPA, or priority is used depending on which display strategy is selected in the campaign:

  • If the campaign uses the AVERAGE_ROI strategy, the StrategyPriority parameter is used: filters with higher priority get more traffic in search results or audience share in ad networks if possible. If the budget runs low, they are the last ones to be disabled.
  • If the campaign uses the AVERAGE_CPA_PER_CAMPAIGN or AVERAGE_CPA_PER_FILTER strategy, the AverageCpa parameter is used.
  • If the campaign uses the AVERAGE_CPC_PER_CAMPAIGN or AVERAGE_CPC_PER_FILTER strategy, the AverageCpc parameter is used.

If a bid is specified that doesn't match the strategy, it is ignored. If a priority is specified that doesn't match the strategy, the value is saved but is not used.

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 filters only.

Maximum number of objects per method call:

  • Campaigns: A maximum of campaign-ids-select
  • Groups: A maximum of adgroup-ids-select
  • SMART_AD targets (smart banners): A maximum of ids-select

Request

Request structure in JSON format:

{
  "method": "setBids",
  "params": { /* params */
    "Bids": [{  /* SetBidsItem */
      "CampaignId": (long),
      "AdGroupId": (long),
      "Id": (long),
      "AverageCpc": (long), /* nillable */
      "AverageCpa": (long), /* nillable */
      "StrategyPriority": ( "LOW" | "NORMAL" | "HIGH" )
    }, ... ] /* required */
  }
}

Parameter

Type

Description

Mandatory

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 in order to assign a single CPC or CPA for all filters in the campaign.

Use either CampaignId or AdGroupId or Id

AdGroupId

long

ID of the ad group. Specified in order to assign a single CPC, CPA, or priority to all filters in the group.

Id

long

The ID of the filter. Specified in order to assign a CPC, CPA, or priority to an individual filter.

AverageCpc

long, nillable

Average CPC multiplied by 1,000,000. Integer.
{% include input-bid-limits-network %}

At least one of the parameters AverageCpc, AverageCpa or StrategyPriority (or all may be present)

AverageCpa

long, nillable

Average CPC multiplied by 1,000,000. Integer.
{% include input-bid-limits-network %}

StrategyPriority

PriorityEnum

Priority: LOW, NORMAL or HIGH. Used only for the AVERAGE_ROI strategy.

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)

SetBidsResults

array of SetBidActionResult

Results of setting CPC, CPA, 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

The ID of the filter. 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.