operand.adGroupId RequiredError and operand.ad, RequiredError in AddAdGroups.php Example

23 views
Skip to first unread message

Alessandro Viola

unread,
Oct 4, 2017, 5:10:06 PM10/4/17
to AdWords API Forum
HI all,
i have a problem with AddAdGroups.php Example (v201708), if i test the example, the response is:

[RequiredError.REQUIRED @ operations[0].operand.adGroupId, RequiredError.REQUIRED @ operations[0].operand.ad, RequiredError.REQUIRED @ operations[1].operand.adGroupId, RequiredError.REQUIRED @ operations[1].operand.ad]

There aren't ads on account, and there is present only one campaign. How can I fix it? I can't creat an adgroup without ad and i can't create ad without adgroup. :(

Thanks in advance.
Regards.

Vincent Racaza (AdWords API Team)

unread,
Oct 5, 2017, 2:17:16 AM10/5/17
to AdWords API Forum
Hi Alessandro,

There is no adding of ad in the AddAdGroups example as this is supposed to add ad groups only given the campaign ID. Could you confirm if you have updated the example file? Below is the sample SOAP request snippet using the example code:

<soapenv:Body>
   
<mutate xmlns="https://adwords.google.com/api/adwords/cm/v201708">
       
<operations>
           
<operator>ADD</operator>
           
<operand>
               
<campaignId>XXXXXXXXXX</campaignId>
               
<name>Earth to Mars Cruises #1</name>
               
<status>ENABLED</status>
               
<settings xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201708" xsi:type="ns2:TargetingSetting">
                   
<ns2:details>
                       
<ns2:criterionTypeGroup>PLACEMENT</ns2:criterionTypeGroup>
                       
<ns2:targetAll>false</ns2:targetAll>
                   
</ns2:details>
                   
<ns2:details>
                       
<ns2:criterionTypeGroup>VERTICAL</ns2:criterionTypeGroup>
                       
<ns2:targetAll>true</ns2:targetAll>
                   
</ns2:details>
               
</settings>
               
<biddingStrategyConfiguration>
                   
<bids xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201708" xsi:type="ns3:CpcBid">
                       
<ns3:bid>
                           
<ns3:microAmount>10000000</ns3:microAmount>
                       
</ns3:bid>
                   
</bids>
               
</biddingStrategyConfiguration>
           
</operand>
       
</operations>
       
<operations>
           
<operator>ADD</operator>
           
<operand>
               
<campaignId>XXXXXXXXXXXX</campaignId>
               
<name>Earth to Venus Cruises #27</name>
               
<status>ENABLED</status>
               
<biddingStrategyConfiguration>
                   
<bids xmlns:ns4="https://adwords.google.com/api/adwords/cm/v201708" xsi:type="ns4:CpcBid">
                       
<ns4:bid>
                           
<ns4:microAmount>10000000</ns4:microAmount>
                       
</ns4:bid>
                   
</bids>
               
</biddingStrategyConfiguration>
           
</operand>
       
</operations>
   
</mutate>
</soapenv:Body>

If indeed you have updates to the example file, can you provide your SOAP request and response logs so I can further check? If you haven't enabled the SOAP logs yet, you can enable it by following the "Configuring logging" section of this document. Kindly use the Reply privately to author option when replying.

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