Error With Campaign Creation Rest API v14

168 views
Skip to first unread message

Diego Villanueva Araya

unread,
Jun 19, 2023, 6:41:24 PM6/19/23
to Google Ads API and AdWords API Forum
Hello Google Ads Team

I am trying to create a campaign using google ads API REST but I get an error message. Could you please advise? I'm working with a test account.

Below are the details


variables:

Request:

{
   "operations":[
      {
         "create":{
            "name":"Campaña Api Rest",
            "status":"PAUSED",
            "advertisingChannelType":"SEARCH",
            "advertisingChannelSubType":"UNSPECIFIED",
            "networkSettings":{
               "targetGoogleSearch":true,
               "targetSearchNetwork":true,
               "targetPartnerSearchNetwork":true
            },
            "geoTargetTypeSetting":{
               "positiveGeoTargetType":"PRESENCE"
            },
            "biddingStrategyType":"ENHANCED_CPC",
            "campaignBudget":"customers/2447006958/campaignBudgets/12698685038",
            "finalUrlSuffix":"kid={_kid}"
         }
      }
   ]
}

Response:

{
   "code":400,
   "message":"Request contains an invalid argument.",
   "status":"INVALID_ARGUMENT",
   "details":[
      {
         "@type":"type.googleapis.com/google.ads.googleads.v14.errors.GoogleAdsFailure",
         "errors":[
            {
               "errorCode":{
                  "fieldError":"REQUIRED"
               },
               "message":"The required field was not present.",
               "location":{
                  "fieldPathElements":[
                     {
                        "fieldName":"operations",
                        "index":0
                     },
                     {
                        "fieldName":"create"
                     },
                     {
                        "fieldName":"campaign_bidding_strategy"
                     }
                  ]
               }
            }
         ],
         "requestId":"sIbnHlO3z2HjzYcRrxIYzg"
      }
   ]
}

Google Ads API Forum Advisor

unread,
Jun 21, 2023, 12:13:32 PM6/21/23
to dvillanu...@gmail.com, adwor...@googlegroups.com
Hello Diego,

Welcome to Google Ads API Support team. Thank you for reaching out to us.

Kindly note that the in the Google Ads API, all bidding strategies are managed using one or both of the following:
  • The campaign_bidding_strategy union field of the Campaign object for standard strategies at the campaign level.
  • The BiddingStrategy object for portfolio strategies at the account level.

Reference links:
You may refer to this documentation (https://developers.google.com/google-ads/api/rest/reference/rest/v14/Campaign) for more information on campaign resource. You may also use our API Explorer (https://developers.google.com/google-ads/api/rest/reference/rest/v14/customers.campaigns/mutate?apix=true) for creating campaigns to easily add necessary campaign object fields.

Let us know if you have further questions.
 
This message is in relation to case "ref:_00D1U1174p._5004Q2mVNiq:ref"

Thanks,
 
Google Logo Google Ads API Team

 

Reply all
Reply to author
Forward
0 new messages