Which service is used to set / change AdGroup Bids?

27 views
Skip to first unread message

Jarad C

unread,
Feb 21, 2017, 5:59:40 PM2/21/17
to AdWords API Forum
I asked a question at StackOverflow (here). I am using Python.

I'm trying to set ad group bids using AdGroupService and mutate.

My suds response object looks like:
(AdGroupPage){
   totalNumEntries = 1
   Page.Type = "AdGroupPage"
   entries[] = 
      (AdGroup){
         id = 38496562285
         campaignId = 759990659
         campaignName = "Some Campaign #1"
         name = "Second group"
         status = "ENABLED"
         biddingStrategyConfiguration = 
            (BiddingStrategyConfiguration){
               biddingStrategyType = "MANUAL_CPC"
               bids[] = 
                  (CpcBid){
                     Bids.Type = "CpcBid"
                     bid = 
                        (Money){
                           ComparableValue.Type = "Money"
                           microAmount = 1230000
                        }
                     cpcBidSource = "ADGROUP"
                  },
            }
      },
 }

My operations object looks like:
operations = [{
    'operator': 'SET',
    'operand': {
        'id': 38496562285,
        'biddingStrategyConfiguration': {
            'bids': [{
                'bid': {
                    'microAmount': 4560000
                    }
                }]
            }
        }
    }]

I then do something like:
service = client.adwords_client.GetService('AdGroupService', version='v201609')
service
.mutate(operations)

It returns an error:
suds.TypeNotFound: Type not found: 'bid'

My question is, am I using the right service to update ad group bids?

If yes, how do I modify my above operations object if the goal is changing the ad group level bid?

If no, what service should I be using?

I couldn't find any examples of changing ad group level default bids.

Thanks

Jarad C

unread,
Feb 21, 2017, 6:32:10 PM2/21/17
to AdWords API Forum
Figured it out!

Looks like I was using the right service. I just needed to specify something I don't have a lot of experience with - "xsi_type".

operations = [{
      'operator': 'SET',
      'operand': {
        'id': 38496562285,
        'biddingStrategyConfiguration': {
          'bids': [{

            'xsi_type': 'CpcBid',
            'bid': {'microAmount': 4560000}
            }]
          }
        }
      }]

Peter Oliquino

unread,
Feb 21, 2017, 9:31:41 PM2/21/17
to AdWords API Forum
Hi Jarad,

Glad to hear that you've found the solution to your concern. Please feel free to contact our team if you encounter any other issues.

Cheers,
Peter
AdWords API Team
Reply all
Reply to author
Forward
0 new messages