Hello Imran,

You can refer to this example code 
<https://developers.google.com/adwords/api/docs/guides/campaign-drafts-experiments#creating_a_draft>
 on 
how to create a draft campaign. Once you have that, it will serve as a 
mirror of the base campaign, that said, you need to use the 
*draftCampaignId* if you wish to update an entity under the draft campaign 
(e.g. update the status of its ads). To do so, you may use the 
AdGroupAdService.mutate 
<https://developers.google.com/adwords/api/docs/reference/v201609/AdGroupAdService#mutate>
 operation. 
The steps may be as follows:

1. Get the adGroups under the draft campaign using *draftCampaignId*. An 
example code can be found here 
<https://developers.google.com/adwords/api/docs/guides/campaign-drafts-experiments#customizing_the_draft_campaign>
.
2. Get the ads under the adGroup found in #1 using the adGroupId returned. 
An example code that shows how to get an ad (e.g. ExpandedTextAd) in an 
adGroup is here 
<https://github.com/googleads/googleads-java-lib/blob/master/examples/adwords_axis/src/main/java/adwords/axis/v201609/basicoperations/GetExpandedTextAds.java>
.
3. Pause the ad using the adGroupId returned in #1 and adId returned in #2. 
An example code to pause an ad is available here 
<https://github.com/googleads/googleads-java-lib/blob/master/examples/adwords_axis/src/main/java/adwords/axis/v201609/basicoperations/PauseAd.java>
.

Other client libraries are available here 
<https://developers.google.com/adwords/api/docs/clientlibraries>.

Regards,
Joyce, AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
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/1e9d4a52-ed5b-463e-82ca-338d10d03aa0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to