Create ads and apply label using BatchJob and TemporaryIds

26 views
Skip to first unread message

ax...@turo.com

unread,
Sep 18, 2017, 10:22:00 PM9/18/17
to AdWords API Forum
Hey There, 

I am trying to upload in a single batchjobs a few ads AND apply Labels to them. I figured using temporary ids is the best way to do that efficiently. 
Before sending these operations, the labels have been created and the operation lists contains all the ads first and then the Label operations. 

However, everytime I run I get a "reason = "FILE_FORMAT_ERROR" error on the Batch job. I tried running the two operations separately (creating the ads, grabbing the ad id from the Interface, apply the Label) and it works fine. That makes me think I am doing something wrong around the TEmporary ID. 

I am using v201705, using python library,  and below are a couple of operations I am trying to run (create ads  then apply label)

Thanks a lot for your help!


{
 'operand': 
     {'ad': 
         {'description': 'Drive The Car You Want For 30% Less Than Traditional Rental Agencies!',
          'finalUrls': ['https://turo.com/search'],
          'headlinePart1': 'Rent The Perfect Car With Turo',
           'headlinePart2': 'Porsche Car Rental',
            'id': -2,
             'path1': 'Car-Rental',
              'path2': 'Porsche',
              'xsi_type': 'ExpandedTextAd'
             },
       'adGroupId': 46702815518
     },
  'operator': 'ADD',
  'xsi_type': 'AdGroupAdOperation'
},
{'
 operand': 
      {'adGroupId': 46702815518, 
        'adId': -2, 
        'labelId': 1505139661
      },
  'operator': 'ADD',
  'xsi_type': 'AdGroupAdLabelOperation'
}



Vincent Racaza (AdWords API Team)

unread,
Sep 19, 2017, 1:57:03 AM9/19/17
to AdWords API Forum
Hi,

Yes, you are correct. You can use temporary IDs for the dependent objects in your batch jobs. For the FILE_FORMAT_ERROR, this error occurs when the input file passed in the BatchJob upload has a format error. Could you check if your request body conforms to the BatchJobOpsService.wsdl and your request meets the upload requirements listed on this guide?

If you can confirm that your request body is correct and you meet the upload requirements, and still the error persists, then so we can further check this, can you provide your clientCustomerID as well as the failed batch job IDs? Kindly use the Reply privately to author option.

Thanks,
Vincent
AdWords API Team
Reply all
Reply to author
Forward
0 new messages