Thanks, the ConstantDataService is what I was missing. I wish either the 
Criterion pages or the Appendix had mentioned that service.

On Monday, July 28, 2014 1:41:06 PM UTC-7, Josh Radcliff (AdWords API Team) 
wrote:
>
> Hi,
>
> You can only pass specific predefined *OperatingSystemVersion* objects, 
> identified by ID. To get the list of available objects and their IDs, 
> please use ConstantDataService.getOperatingSystemVersionCriterion 
> <https://developers.google.com/adwords/api/docs/reference/v201406/ConstantDataService#getOperatingSystemVersionCriterion>
> .
>
> Cheers,
> Josh, AdWords API Team
>
> On Monday, July 28, 2014 3:53:26 PM UTC-4, Kristopher Windsor wrote:
>>
>> Hi,
>>
>> I would like to apply an OperatingSystemVersion criterion to a campaign. 
>> The code below does not work because I create a criterion, but it does not 
>> have an ID.
>>
>>
>>   public function doOSVersionCriterion($campaign){
>>     $campaignCriterionService = $this->user->GetService(
>> 'CampaignCriterionService', ADWORDS_VERSION);
>>     
>>     $os = new OperatingSystemVersion('OS test 1', $this->params['osmajor'
>> ], $this->params['osminor'], 'GREATER_THAN_EQUAL_TO');
>>
>>     $op = new CampaignCriterionOperation();
>>     $op->operator = 'ADD';
>>     $op->operand = new CampaignCriterion($campaign->id, null, $os);
>>
>>     // Send request.
>>     $result = $campaignCriterionService->mutate( array($op) );
>>   }
>>
>>
>> Result:
>>
>> *Fatal error*:  Uncaught SoapFault exception: [soap:Server] 
>> [RequiredError.REQUIRED @ operations[0].operand.criterion.id] in 
>> /code/bidder/lib/legacy/adwords/Google/Api/Ads/Common/Lib/AdsSoapClient.
>> php:232
>> Stack
>>  trace: ... in 
>> */code/bidder/lib/legacy/adwords/Google/Api/Ads/Common/Lib/AdsSoapClient.php*
>>  
>> on line *232*
>>
>> I did find "Appendix A: Criteria Codes 
>> <https://developers.google.com/adwords/api/docs/appendix/mobileplatforms>" 
>> in the docs, and it lists some criteriaId, ie. iOS=630153. But it 
>> doesn't list the criteriaId for (in example) iOS >= 5.0. I am not sure how 
>> to apply such criterion, where I specify the minimum OS version.
>>
>>
>> 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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to