what's the meaning of attr "xsi_type" in python

41 views
Skip to first unread message

liuwe...@gmail.com

unread,
Sep 20, 2018, 5:00:35 AM9/20/18
to AdWords API and Google Ads API Forum
hi AdWords API Team,what's the meaning of attr "xsi_type" in python,I can't find any info in reference

# Construct keyword ad group criterion object.
  keyword1
= {
     
'xsi_type': 'BiddableAdGroupCriterion',
     
'adGroupId': ad_group_id,
     
'criterion': {
         
'xsi_type': 'Keyword',
         
'matchType': 'BROAD',
         
'text': 'mars'
     
},
     
# These fields are optional.
     
'userStatus': 'PAUSED',
     
'finalUrls': {
         
'urls': ['http://example.com/mars']
     
}
 
}

  keyword2
= {
     
'xsi_type': 'NegativeAdGroupCriterion',
     
'adGroupId': ad_group_id,
     
'criterion': {
         
'xsi_type': 'Keyword',
         
'matchType': 'EXACT',
         
'text': 'pluto'
     
}
 
}


liuwe...@gmail.com

unread,
Sep 20, 2018, 5:00:35 AM9/20/18
to AdWords API and Google Ads API Forum

Dhanya Sundararaju (AdWords API Team)

unread,
Sep 20, 2018, 11:43:24 AM9/20/18
to AdWords API and Google Ads API Forum
Hi there,

The xsi_type is the Type of object that you specify when you run operations for a service. For example, in your screenshot, to add a keyword in AdGroup, you will need to call the AdGroupCriterionService, then, add an object of Type BiddableAdGroupCriterion or NegativeAdGroupCriterion. Then, to those objects you will need to add an object of Type Keyword where you will specify the text and matchtype. Please let me know if you have any further questions.

Regards,
Dhanya, AdWords API Team
Reply all
Reply to author
Forward
0 new messages