Re: How to set the bidCeiling & bidFloor for a Target ROAS Portfolio strategy via api in python?
Ok I got it to work. I needed to set the xsitype and also send all the fields for the respective biddingscheme object: Here is the working code: #!/usr/bin/env python # # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """This example updates a campaign by setting its status to PAUSED. To get campaigns, run get_campaigns.py. The LoadFromStorage method is pulling credentials and properties from a "googleads.yaml" file. By default, it looks for this file in your home directory. For more information, see the "Caching authentication information" section of our README. """ #test api strategy id #1855829761 from googleads import adwords STRATEGY_ID = '1855829761' def main(client, strategy_id): # Initialize appropriate service. campaign_service = client.GetService('BiddingStrategyService', version= 'v201809') # Construct operations and update campaign. operations = [{ 'operator': 'SET', 'operand': { 'id': strategy_id, 'name': 'TEST ' + strategy_id, 'biddingScheme': { 'xsi_type': 'TargetRoasBiddingScheme', # Optionally set additional bidding scheme parameters. 'targetRoas': 2.5, 'bidCeiling': { 'microAmount': '300' }, 'bidFloor': { 'microAmount': '00' } } } }] campaigns = campaign_service.mutate(operations) # Display results. for campaign in campaigns['value']: print ('Campaign with name "%s" and id "%s" was updated.' % (campaign['name'], campaign['id'])) if __name__ == '__main__': # Initialize client object. adwords_client = adwords.AdWordsClient.LoadFromStorage() main(adwords_client, STRATEGY_ID) On Friday, January 11, 2019 at 5:37:11 PM UTC-10, Skyler Christensen wrote: > > This is what I've got so far. I just don't know how to set the bidCeiling > or how to structure the operations object. > STRATEGY_ID = '1855829761' > > > def main(client, strategy_id): > # Initialize appropriate service. > campaign_service = client.GetService('BiddingStrategyService', version= > 'v201809') > > # Construct operations and update campaign. > operations = [{ > 'operator': 'SET', > 'operand': { > 'id': strategy_id, > 'name': 'TEST ' + strategy_id, > 'biddingScheme': { > 'TargetRoasBiddingScheme': { > 'bidCeiling': { > 'microAmount': '100' > } > } > # Optionally set additional bidding scheme parameters. > } > } > }] > campaigns = campaign_service.mutate(operations) > > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/c5643ab6-a4d5-4575-ae6a-74ee625f670c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: How to set the bidCeiling & bidFloor for a Target ROAS Portfolio strategy via api in python?
Oh and the error is that it can't find the key TargetRoasBiddingScheme On Friday, January 11, 2019 at 5:37:11 PM UTC-10, Skyler Christensen wrote: > > This is what I've got so far. I just don't know how to set the bidCeiling > or how to structure the operations object. > STRATEGY_ID = '1855829761' > > > def main(client, strategy_id): > # Initialize appropriate service. > campaign_service = client.GetService('BiddingStrategyService', version= > 'v201809') > > # Construct operations and update campaign. > operations = [{ > 'operator': 'SET', > 'operand': { > 'id': strategy_id, > 'name': 'TEST ' + strategy_id, > 'biddingScheme': { > 'TargetRoasBiddingScheme': { > 'bidCeiling': { > 'microAmount': '100' > } > } > # Optionally set additional bidding scheme parameters. > } > } > }] > campaigns = campaign_service.mutate(operations) > > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/0ac89303-92de-47e2-8cdf-73671d4e03be%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
How to set the bidCeiling & bidFloor for a Target ROAS Portfolio strategy via api in python?
This is what I've got so far. I just don't know how to set the bidCeiling or how to structure the operations object. STRATEGY_ID = '1855829761' def main(client, strategy_id): # Initialize appropriate service. campaign_service = client.GetService('BiddingStrategyService', version= 'v201809') # Construct operations and update campaign. operations = [{ 'operator': 'SET', 'operand': { 'id': strategy_id, 'name': 'TEST ' + strategy_id, 'biddingScheme': { 'TargetRoasBiddingScheme': { 'bidCeiling': { 'microAmount': '100' } } # Optionally set additional bidding scheme parameters. } } }] campaigns = campaign_service.mutate(operations) -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/76f38c40-e94a-464c-9140-f7a9a257edb9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Internal API error running GetCampaignsByLabel.php
That was exactly the issue! Thanks! On Tuesday, March 3, 2015 at 3:41:52 PM UTC-7, Josh Radcliff (AdWords API Team) wrote: Hi, I see you're trying to filter by label name. However, when using filters in predicates you need to use label IDs https://developers.google.com/adwords/api/docs/guides/labels#use_your_labels_to_retrieve_objects. Please give that a try and let me know if you still encounter errors. Thanks, Josh, AdWords API Team On Tuesday, March 3, 2015 at 2:33:21 PM UTC-5, Skyler Christensen wrote: So I have successfully executed other operations such as GetCampaigns.php and GetLabels.php, but when I run GetCampaignsByLabel.php I get an a generic internal api error message. My end goal is to simply get a list of the Campaigns that contain the label Tog_Sav and pause/enable them. Thanks! -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups AdWords API Forum group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups AdWords API Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/5dafd53d-9ee8-4f9a-8dce-d15f03155f69%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Internal API error running GetCampaignsByLabel.php
So I have successfully executed other operations such as GetCampaigns.php and GetLabels.php, but when I run GetCampaignsByLabel.php I get an a generic internal api error message. My end goal is to simply get a list of the Campaigns that contain the label Tog_Sav and pause/enable them. Thanks! -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups AdWords API Forum group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups AdWords API Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/ee43a30d-78e5-4494-a251-492b6ce001da%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. soap_xml.log Description: Binary data