Hi Luca,

You're right, the validateOnly feature is exactly what you should be using 
for this. You can read more information about it on our developer 
site<https://developers.google.com/adwords/api/docs/guides/working-with-objects#validating-mutates>.
 
It looks like you're using Python, and you can see an example of 
validateOnly being used there in the 
examples<https://github.com/googleads/googleads-python-legacy-lib/blob/master/examples/adspygoogle/adwords/v201402/campaign_management/validate_text_ad.py>
.

It looks like you're following these guidelines already, however. Can you 
provide a log of the SOAP headers so I can see if the header is actually 
being added properly?

Regards,
Mike, AdWords API Advisor

On Wednesday, March 26, 2014 7:07:30 AM UTC-4, Luca Fiaschi wrote:
>
> Hi all I have discovered the validate_only property of the client, however 
> this property seems not to work as I would expect.
>
> I am trying to change the bids for some keywords and I hoped to get a mock 
> response for testing purpose before going to real production mode.
> However, even though I set this flag - the requests are executed on the 
> account:
>
> Am I missing something?
>
> def change_keyword_bid_value(client, kw_list, verbose = 0, mode = 'TEST'):
>     ad_group_criterion_service = 
> client.GetAdGroupCriterionService(version=API_VERSION)
>
>     all_operations = []
>     for kw in kw_list:
>         criterion_id = kw['id']
>         ad_group_id =kw['AdGroupId']
>         newbid = kw['microAmount']
>         operation = {
>             'operator': 'SET',
>             'operand': {
>                 'xsi_type': 'BiddableAdGroupCriterion',
>                 'adGroupId': str(ad_group_id),
>                 'criterion': {
>                     'id': str(criterion_id)
>                 },
>
>                 'biddingStrategyConfiguration': {
>                     'bids': [
>                         {
>                             'xsi_type': 'CpcBid',
>                             'bid': {
>                                 'microAmount': str(newbid)
>                             }
>                         }
>                     ]
>                 }
>             }
>         }
>
>         all_operations.append(operation)
>     client.partial_failure = True
>
>     client.validate_only = True
>     valid, failures = 
> partial_failure_process_chunks(ad_group_criterion_service, all_operations, 
> time_delay=10)
>     if verbose>1:
>         for el in valid:
>             print el
>
>         for el in failures:
>             print el
>     return valid, failures
>
>
>
>
>
>
> On Wednesday, March 26, 2014 10:47:44 AM UTC+1, Luca Fiaschi wrote:
>>
>> Hi all,
>> I have to execute some operations with service.Mutate(operations)
>> is there a generic way to get a dry run for this service (get mock 
>> response but do actually modify the live account)
>>
>> 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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to