Hi Fitri,
First off, you would need to fetch the feed item attributes using the
FeedService
<https://developers.google.com/adwords/api/docs/reference/v201702/FeedService>
(sample
code below).
FeedItemServiceInterface feedItemService = adWordsServices.get(session,
FeedItemServiceInterface.class);
String query = String.format("SELECT FeedItemId, AttributeValues,
Scheduling WHERE Status = 'ENABLED' AND FeedId = YOUR_FEED_ID");
FeedItemPage feedItemPage = feedItemService.query(query);
System.out.println("--------------------------------------");
for (FeedItem i:feedItemPage.getEntries()) {
System.out.println("Feed ID : " + i.getFeedId());
System.out.println("Feed Item ID : " + i.getFeedItemId());
FeedItemAttributeValue[] fiav= i.getAttributeValues();
for(int j=0;j<fiav.length;j++){
System.out.println("Attribute Value : " + fiav[j].getStringValue());
}
System.out.println("--------------------------------------");
}
You can then refer to the AddCampaigns & AddAdGroups examples availabe here
<https://github.com/googleads/googleads-java-lib/tree/master/examples/adwords_axis/src/main/java/adwords/axis/v201702/basicoperations>
to
create your campaigns and ad groups via the API. While creating a
campaign/ad group, you can specify the attributes that you retrieved from
the feed. Also, you can refer to this example
<https://github.com/googleads/googleads-java-lib/blob/master/examples/adwords_axis/src/main/java/adwords/axis/v201702/extensions/AddSiteLinksUsingFeeds.java>
to
get an overview of how to go about creating feeds.
You can fetch the templateID
<https://developers.google.com/adwords/api/docs/reference/v201609/AdGroupAdService.TemplateAd#templateid>
of
a template ad using the field "TemplateId" in get call on AdGroupAdService.
In general, information regarding all fields available in a TemplateAd is
available here
<https://developers.google.com/adwords/api/docs/reference/v201609/AdGroupAdService.TemplateAd>.
You can also refer to this list
<https://developers.google.com/adwords/api/docs/appendix/selectorfields#v201609-AdGroupAdService>
of
all fields that can be fetched using the AdGroupAdService, including
template ads related fields. A complete list of all template ads that can
be created via AdWords API is available here
<https://developers.google.com/adwords/api/docs/appendix/templateads> (although
not all templates available in the AdWords web interface are available via
the API).
Most examples that I referred to are in the Java programming language,
however, you can find same examples in other client libraries
<https://developers.google.com/adwords/api/docs/clientlibraries> as well.
Hope this helps. Please revert if you have additional questions or concerns.
Regards,
Vishal, 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/bba38a58-270e-4a84-8853-a6ff1e399277%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.