Hi,

In the AdWords I'm able to set bid adjustments for Placements, Topics, 
Interests and Demographics - http://oi68.tinypic.com/33z2o12.jpg

But I can't figure out how to modify it via API. I didn't find an example, 
so I assumed that since all the targets are Criterions just like Mobile I 
can use the same code as for modifying mobile bid adjustment. But it fails.

For demographics (10 - Gender.Male, 503001 - AgeRange.18to24, 300 - 
ParentalStatus.Parent) it fails with CANNOT_BID_MODIFY_CRITERION_TYPE. For 
the rest (Placements, Topics, Interests) it fails 
with UNEXPECTED_INTERNAL_API_ERROR.

I'm using Java library v201509 (I know you released a new version recently).

Code:
Long adGroupId = XXXXXXXX;
Long criterionId = 10;

AdWordsServices services = new AdWordsServices();
AdGroupBidModifierServiceInterface adGroupBidModifierService = 
services.get(adwordsSession, AdGroupBidModifierServiceInterface.class);

Criterion criterion = new  Criterion();
criterion.setId(criterionId);

AdGroupBidModifier modifier = new AdGroupBidModifier();
modifier.setAdGroupId(adGroupId);
modifier.setCriterion(criterion);
modifier.setBidModifier(2);

AdGroupBidModifierOperation operation = new AdGroupBidModifierOperation();
operation.setOperand(modifier);
operation.setOperator(Operator.SET);

AdGroupBidModifierReturnValue result = adGroupBidModifierService.mutate(new 
AdGroupBidModifierOperation[] {operation});


What am I doing wrong and what is the correct way?

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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/789f1773-400c-46c2-82a5-21b5e9a977b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to