Please see below my answers to the questions:

1) About create banner ad.

There is no example code available that shows how to create banner ad. 
> However, you may use the AddExpandedTextAds.java 
> <https://github.com/googleads/googleads-java-lib/blob/master/examples/adwords_axis/src/main/java/adwords/axis/v201609/basicoperations/AddExpandedTextAds.java>
>  (Java 
> client library example code) as a reference to create an ImageAd 
> <https://developers.google.com/adwords/api/docs/reference/v201609/AdGroupAdService.ImageAd>
>  or 
> use any Template Ads 
> <https://developers.google.com/adwords/api/docs/appendix/templateads> 
> available 
> in the API. Please follow these steps to help you get started:

a. create the ImageAd 
> <https://developers.google.com/adwords/api/docs/reference/v201609/AdGroupAdService.ImageAd>
>  object; 
> required fields can be seen in the doc.
> b. create the Image 
> <https://developers.google.com/adwords/api/docs/reference/v201609/AdGroupAdService.Image>
>  object. 
> Please consider the image requirements 
> <https://support.google.com/adwordspolicy/answer/176108?hl=en-GB> when 
> creating the Image object. Set this image to the ImageAd created in step a. 
> c. set the ImageAd as the ad 
> <https://developers.google.com/adwords/api/docs/reference/v201609/AdGroupAdService.AdGroupAd#ad>
>  of 
> the AdGroupAd 
> <https://developers.google.com/adwords/api/docs/reference/v201609/AdGroupAdService.AdGroupAd>,
> then do the AdGroupAdService.mutate 
> <https://developers.google.com/adwords/api/docs/reference/v201609/AdGroupAdService#mutate>
>  operation.

The AddHtml5Ad.java 
> <https://github.com/googleads/googleads-java-lib/blob/master/examples/adwords_axis/src/main/java/adwords/axis/v201609/advancedoperations/AddHtml5Ad.java>
>  (Java 
> client library example code) can also be used as a reference when dealing 
> with creation of TemplateAds. Available Template Ads are provided in the 
> link above. Other client libraries example codes are available here 
> <https://developers.google.com/adwords/api/docs/clientlibraries>.

2) About update ads.

The only field that you can update in an ad is the status field as 
> discussed here 
> <https://developers.google.com/adwords/api/docs/reference/v201609/AdGroupAdService#mutate>.
> There is no available example code that shows how to update the 
> adGroupAdStatus 
> <https://developers.google.com/adwords/api/docs/reference/v201609/AdGroupAdService.AdGroupAd#status>
>  but 
> you may refer to the below SOAP logs to see how it is being done. 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>     <soapenv:Header>
>         <ns1:RequestHeader 
> xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201609"; 
> soapenv:mustUnderstand="0">
> <ns1:clientCustomerId>YOUR_CLIENT_CUSTOMER_ID</ns1:clientCustomerId>
>             <ns1:developerToken>YOUR_DEVELOPER_TOKEN</ns1:developerToken>
>             <ns1:userAgent>YOUR_USER_AGENT</ns1:userAgent>
>             <ns1:validateOnly>false</ns1:validateOnly>
>             <ns1:partialFailure>false</ns1:partialFailure>
>         </ns1:RequestHeader>
>     </soapenv:Header>
>     <soapenv:Body>
>         <mutate xmlns="https://adwords.google.com/api/adwords/cm/v201609";>
>             <operations>
>                 <operator>SET</operator>
>                 <operand>
>                     <adGroupId>YOUR_ADGROUP_ID</adGroupId>
>                     <ad>
>                         <id>YOUR_AD_ID</id>
>                     </ad>
>                     <status>PAUSED</status>
>                 </operand>
>             </operations>
>         </mutate>
>     </soapenv:Body>
> </soapenv:Envelope>

> Additionally, If you need to update any other fields, then yes, you need 
> to remove the existing ad and create a new one.

Hope this helps.

Joyce, AdWords API Team 

Also find us on our blog and Google+:

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
For more options, visit this group at
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 
For more options, visit https://groups.google.com/d/optout.

Reply via email to