- HTTP request
- Path parameters
- Request body
- Response body
- Authorization Scopes
- ApplyRecommendationOperation
- CampaignBudgetParameters
- TextAdParameters
- KeywordParameters
- TargetCpaOptInParameters
- TargetRoasOptInParameters
- CalloutExtensionParameters
- CallExtensionParameters
- SitelinkExtensionParameters
- MoveUnusedBudgetParameters
- ResponsiveSearchAdParameters
- ApplyRecommendationResult
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/v9/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
If successful, the response body contains data with the following structure:
Response message for RecommendationService.ApplyRecommendation
.
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 (e.g. 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 extension recommendation. |
|
moveUnusedBudget |
Parameters to use when applying move unused budget recommendation. |
|
responsiveSearchAd |
Parameters to use when applying a responsive search ad 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 extension recommendation.
JSON representation | |
---|---|
{
"sitelinkExtensions": [
{
object ( |
Fields | |
---|---|
sitelinkExtensions[] |
Sitelink extensions 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. |
ApplyRecommendationResult
The result of applying a recommendation.
JSON representation | |
---|---|
{ "resourceName": string } |
Fields | |
---|---|
resourceName |
Returned for successful applies. |