- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- ApplyRecommendationOperation
- CampaignBudgetParameters
- TextAdParameters
- KeywordParameters
- TargetCpaOptInParameters
- TargetRoasOptInParameters
- CalloutExtensionParameters
- CallExtensionParameters
- SitelinkExtensionParameters
- MoveUnusedBudgetParameters
- ResponsiveSearchAdParameters
- UseBroadMatchKeywordParameters
- ResponsiveSearchAdAssetParameters
- ResponsiveSearchAdImproveAdStrengthParameters
- RaiseTargetCpaBidTooLowParameters
- ForecastingSetTargetRoasParameters
- CalloutAssetParameters
- AdAssetApplyParameters
- ApplyScope
- CallAssetParameters
- SitelinkAssetParameters
- RaiseTargetCpaParameters
- LowerTargetRoasParameters
- ForecastingSetTargetCpaParameters
- LeadFormAssetParameters
- ApplyRecommendationResult
- Try it!
Applies given recommendations with corresponding apply parameters.
List of thrown errors: AuthenticationError AuthorizationError DatabaseError FieldError HeaderError InternalError MutateError QuotaError RecommendationError RequestError UrlFieldError
HTTP request
POST https://googleads.googleapis.com/v16/customers/{customerId}/recommendations:apply
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
customerId |
Required. The ID of the customer with the recommendation. |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{
"operations": [
{
object ( |
Fields | |
---|---|
operations[] |
Required. The list of operations to apply recommendations. If partialFailure=false all recommendations should be of the same type There is a limit of 100 operations per request. |
partialFailure |
If true, successful operations will be carried out and invalid operations will return errors. If false, operations will be carried out as a transaction if and only if they are all valid. Default is false. |
Response body
Response message for RecommendationService.ApplyRecommendation
.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "results": [ { object ( |
Fields | |
---|---|
results[] |
Results of operations to apply recommendations. |
partialFailureError |
Errors that pertain to operation failures in the partial failure mode. Returned only when partialFailure = true and all errors occur inside the operations. If any errors occur outside the operations (for example, auth errors) we return the RPC level error. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/adwords
For more information, see the OAuth 2.0 Overview.
ApplyRecommendationOperation
Information about the operation to apply a recommendation and any parameters to customize it.
JSON representation |
---|
{ "resourceName": string, // Union field |
Fields | |
---|---|
resourceName |
The resource name of the recommendation to apply. |
Union field apply_parameters . Parameters to use when applying the recommendation. apply_parameters can be only one of the following: |
|
campaignBudget |
Optional parameters to use when applying a campaign budget recommendation. |
textAd |
Optional parameters to use when applying a text ad recommendation. |
keyword |
Optional parameters to use when applying keyword recommendation. |
targetCpaOptIn |
Optional parameters to use when applying target CPA opt-in recommendation. |
targetRoasOptIn |
Optional parameters to use when applying target ROAS opt-in recommendation. |
calloutExtension |
Parameters to use when applying callout extension recommendation. |
callExtension |
Parameters to use when applying call extension recommendation. |
sitelinkExtension |
Parameters to use when applying sitelink recommendation. |
moveUnusedBudget |
Parameters to use when applying move unused budget recommendation. |
responsiveSearchAd |
Parameters to use when applying a responsive search ad recommendation. |
useBroadMatchKeyword |
Parameters to use when applying a use broad match keyword recommendation. |
responsiveSearchAdAsset |
Parameters to use when applying a responsive search ad asset recommendation. |
responsiveSearchAdImproveAdStrength |
Parameters to use when applying a responsive search ad improve ad strength recommendation. |
raiseTargetCpaBidTooLow |
Parameters to use when applying a raise target CPA bid too low recommendation. The apply is asynchronous and can take minutes depending on the number of ad groups there is in the related campaign. |
forecastingSetTargetRoas |
Parameters to use when applying a forecasting set target ROAS recommendation. |
calloutAsset |
Parameters to use when applying callout asset recommendation. |
callAsset |
Parameters to use when applying call asset recommendation. |
sitelinkAsset |
Parameters to use when applying sitelink asset recommendation. |
raiseTargetCpa |
Parameters to use when applying raise Target CPA recommendation. |
lowerTargetRoas |
Parameters to use when applying lower Target ROAS recommendation. |
forecastingSetTargetCpa |
Parameters to use when applying forecasting set target CPA recommendation. |
setTargetCpa |
Parameters to use when applying set target CPA recommendation. |
setTargetRoas |
Parameters to use when applying set target ROAS recommendation. |
leadFormAsset |
Parameters to use when applying lead form asset recommendation. |
CampaignBudgetParameters
Parameters to use when applying a campaign budget recommendation.
JSON representation |
---|
{ "newBudgetAmountMicros": string } |
Fields | |
---|---|
newBudgetAmountMicros |
New budget amount to set for target budget resource. This is a required field. |
TextAdParameters
Parameters to use when applying a text ad recommendation.
JSON representation |
---|
{
"ad": {
object ( |
Fields | |
---|---|
ad |
New ad to add to recommended ad group. All necessary fields need to be set in this message. This is a required field. |
KeywordParameters
Parameters to use when applying keyword recommendation.
JSON representation |
---|
{
"matchType": enum ( |
Fields | |
---|---|
matchType |
The match type of the keyword. This is a required field. |
adGroup |
The ad group resource to add keyword to. This is a required field. |
cpcBidMicros |
Optional, CPC bid to set for the keyword. If not set, keyword will use bid based on bidding strategy used by target ad group. |
TargetCpaOptInParameters
Parameters to use when applying Target CPA recommendation.
JSON representation |
---|
{ "targetCpaMicros": string, "newCampaignBudgetAmountMicros": string } |
Fields | |
---|---|
targetCpaMicros |
Average CPA to use for Target CPA bidding strategy. This is a required field. |
newCampaignBudgetAmountMicros |
Optional, budget amount to set for the campaign. |
TargetRoasOptInParameters
Parameters to use when applying a Target ROAS opt-in recommendation.
JSON representation |
---|
{ "targetRoas": number, "newCampaignBudgetAmountMicros": string } |
Fields | |
---|---|
targetRoas |
Average ROAS (revenue per unit of spend) to use for Target ROAS bidding strategy. The value is between 0.01 and 1000.0, inclusive. This is a required field, unless newCampaignBudgetAmountMicros is set. |
newCampaignBudgetAmountMicros |
Optional, budget amount to set for the campaign. |
CalloutExtensionParameters
Parameters to use when applying callout extension recommendation.
JSON representation |
---|
{
"calloutExtensions": [
{
object ( |
Fields | |
---|---|
calloutExtensions[] |
Callout extensions to be added. This is a required field. |
CallExtensionParameters
Parameters to use when applying call extension recommendation.
JSON representation |
---|
{
"callExtensions": [
{
object ( |
Fields | |
---|---|
callExtensions[] |
Call extensions to be added. This is a required field. |
SitelinkExtensionParameters
Parameters to use when applying sitelink recommendation.
JSON representation |
---|
{
"sitelinkExtensions": [
{
object ( |
Fields | |
---|---|
sitelinkExtensions[] |
Sitelinks to be added. This is a required field. |
MoveUnusedBudgetParameters
Parameters to use when applying move unused budget recommendation.
JSON representation |
---|
{ "budgetMicrosToMove": string } |
Fields | |
---|---|
budgetMicrosToMove |
Budget amount to move from excess budget to constrained budget. This is a required field. |
ResponsiveSearchAdParameters
Parameters to use when applying a responsive search ad recommendation.
JSON representation |
---|
{
"ad": {
object ( |
Fields | |
---|---|
ad |
Required. New ad to add to recommended ad group. |
UseBroadMatchKeywordParameters
Parameters to use when applying a use broad match keyword recommendation.
JSON representation |
---|
{ "newBudgetAmountMicros": string } |
Fields | |
---|---|
newBudgetAmountMicros |
New budget amount to set for target budget resource. |
ResponsiveSearchAdAssetParameters
Parameters to use when applying a responsive search ad asset recommendation.
JSON representation |
---|
{
"updatedAd": {
object ( |
Fields | |
---|---|
updatedAd |
Updated ad. The current ad's content will be replaced. |
ResponsiveSearchAdImproveAdStrengthParameters
Parameters to use when applying a responsive search ad improve ad strength recommendation.
JSON representation |
---|
{
"updatedAd": {
object ( |
Fields | |
---|---|
updatedAd |
Updated ad. The current ad's content will be replaced. |
RaiseTargetCpaBidTooLowParameters
Parameters to use when applying a raise target CPA bid too low recommendation. The apply is asynchronous and can take minutes depending on the number of ad groups there is in the related campaign..
JSON representation |
---|
{ "targetMultiplier": number } |
Fields | |
---|---|
targetMultiplier |
Required. A number greater than 1.0 indicating the factor by which to increase the target CPA. This is a required field. |
ForecastingSetTargetRoasParameters
Parameters to use when applying a forecasting set target roas recommendation.
JSON representation |
---|
{ "targetRoas": number, "campaignBudgetAmountMicros": string } |
Fields | |
---|---|
targetRoas |
New target ROAS (revenue per unit of spend) to set for a campaign resource. The value is between 0.01 and 1000.0, inclusive. |
campaignBudgetAmountMicros |
New campaign budget amount to set for a campaign resource. |
CalloutAssetParameters
Parameters to use when applying callout asset recommendations.
JSON representation |
---|
{
"adAssetApplyParameters": {
object ( |
Fields | |
---|---|
adAssetApplyParameters |
Required. Callout assets to be added. This is a required field. |
AdAssetApplyParameters
Common parameters used when applying ad asset recommendations.
JSON representation |
---|
{ "newAssets": [ { object ( |
Fields | |
---|---|
newAssets[] |
The assets to create and attach to a scope. This may be combined with existingAssets in the same call. |
existingAssets[] |
The resource names of existing assets to attach to a scope. This may be combined with newAssets in the same call. |
scope |
Required. The scope at which to apply the assets. Assets at the campaign scope level will be applied to the campaign associated with the recommendation. Assets at the customer scope will apply to the entire account. Assets at the campaign scope will override any attached at the customer scope. |
ApplyScope
Scope to apply the assets to.
Enums | |
---|---|
UNSPECIFIED |
The apply scope has not been specified. |
UNKNOWN |
Unknown. |
CUSTOMER |
Apply at the customer scope. |
CAMPAIGN |
Apply at the campaign scope. |
CallAssetParameters
Parameters to use when applying call asset recommendations.
JSON representation |
---|
{
"adAssetApplyParameters": {
object ( |
Fields | |
---|---|
adAssetApplyParameters |
Required. Call assets to be added. This is a required field. |
SitelinkAssetParameters
Parameters to use when applying sitelink asset recommendations.
JSON representation |
---|
{
"adAssetApplyParameters": {
object ( |
Fields | |
---|---|
adAssetApplyParameters |
Required. Sitelink assets to be added. This is a required field. |
RaiseTargetCpaParameters
Parameters to use when applying raise Target CPA recommendations.
JSON representation |
---|
{ "targetCpaMultiplier": number } |
Fields | |
---|---|
targetCpaMultiplier |
Required. Target to set CPA multiplier to. This is a required field. |
LowerTargetRoasParameters
Parameters to use when applying lower Target ROAS recommendations.
JSON representation |
---|
{ "targetRoasMultiplier": number } |
Fields | |
---|---|
targetRoasMultiplier |
Required. Target to set ROAS multiplier to. This is a required field. |
ForecastingSetTargetCpaParameters
Parameters to use when applying a set target CPA recommendation.
JSON representation |
---|
{ "targetCpaMicros": string, "campaignBudgetAmountMicros": string } |
Fields | |
---|---|
targetCpaMicros |
Average CPA to use for Target CPA bidding strategy. |
campaignBudgetAmountMicros |
New campaign budget amount to set for a campaign resource. |
LeadFormAssetParameters
Parameters to use when applying a lead form asset recommendation.
JSON representation |
---|
{
"adAssetApplyParameters": {
object ( |
Fields | |
---|---|
adAssetApplyParameters |
Required. Lead form assets to be added. This is a required field. |
setSubmitLeadFormAssetCampaignGoal |
If true, the "Submit Lead Form" goal will be set on the target campaign. As a result, ads will be shown as lead form creative ads. If false, the "Submit Lead Form" goal will not be set on the campaign and ads will contain lead form assets. |
ApplyRecommendationResult
The result of applying a recommendation.
JSON representation |
---|
{ "resourceName": string } |
Fields | |
---|---|
resourceName |
Returned for successful applies. |