The issue was with my use of the PHP Example. I got the following answer 
from the API Developers below...

Hello Alan,
>
> In this line 
> <https://gist.github.com/alancoleman/4150bccc24517d2fe8aa582e15f911be#file-addcompletecampaignsusingbatchjob-php-L87>
>  of 
> your code, you're creating another layer of array, resulting in an array of 
> array for ad group operations.
> Instead, it's supposed to be just one layer of all types of operations 
> together, so you have to change:
> $operations = array($adGroupOperations);
> to
> $operations = array_merge(array(), $adGroupOperations);
>
> Or more simply, just $operations = $adGroupOperations;
>
> Hope this help.
>
> Cheers,
>

On Tuesday, July 26, 2016 at 9:22:46 AM UTC+1, Alan Coleman wrote:
>
> Hello everyone,
>
> We've been testing the temporary IDs feature of the  
> <https://developers.google.com/adwords/api/docs/guides/batch-jobs#using_temporary_ids>
> BatchJobService 
> <https://developers.google.com/adwords/api/docs/guides/batch-jobs#using_temporary_ids>.
>  
> The Add Complete Campaign script 
> <https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201605/CampaignManagement/AddCompleteCampaignsUsingBatchJob.php>
>  
> works and makes complete sense (great feature by the way!).
>
> Is is possible to use this feature with an ID that has already been set? 
>
> So for example, if we have a campaign that has already been created and 
> for which we already have an ID, can we add AdGroups and Keywords using the
>  temporary IDs feature of the  
> <https://developers.google.com/adwords/api/docs/guides/batch-jobs#using_temporary_ids>
> BatchJobService 
> <https://developers.google.com/adwords/api/docs/guides/batch-jobs#using_temporary_ids>
> ?
>
> So taking the sequence example form the documentation, our approach would 
> look like this:
>
> *This sequence would:*
>>    
>>    - *Use a campaign that already exists with an ID of **12345678*
>>
>>
>>    - *Add an ad group with temporary ID -1 for campaign 12345678*
>>
>>
>>    - *Add an ad group ad for ad group -1*
>>
>>
>>    - *Add multiple ad group criteria (e.g., keywords) for ad group -1*
>>
>>
> The start of our operation would look something like this:
>
>
> *array* *(size=13)*
>>   0 => 
>>     *array* *(size=2)*
>>       0 => 
>>         *object*(*AdGroupOperation*)[*21*]
>>           *public* 'operand' => 
>>             *object*(*AdGroup*)[*11*]
>>               *public* 'id' => int -1
>>               *public* 'campaignId' => int 12345678
>>               *public* 'campaignName' => null
>>
>>
> We have tried this be get the following error:
>
> errorType=BatchJobProcessingError, trigger=, 
>> errorString=BatchJobProcessingError.FILE_FORMAT_ERROR, fieldPath=, 
>> reason=FILE_FORMAT_ERROR
>
>
> Any help would be appreciated.
>
> 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/3ef55f8a-eeda-4839-98d0-78556c577a94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Batc... Alan Coleman
    • ... 'Joyce Lava' via AdWords API Forum
    • ... Alan Coleman
      • ... 'Thanet Knack Praneenararat (AdWords API Team)' via AdWords API Forum

Reply via email to