Hi Fransceso,
In the python client lib inheritance of the SOAP objects is managed through
the xsi_type attribute. So in this case to explicitly indicate you are
sending a BiddableAdGroupCriterion type of object you need to use 'xsi_type'
: 'BiddableAdGroupCriterion' so your object will look like:
keyword1 = {
*'xsi_type': 'BiddableAdGroupCriterion',*
'adGroupId': ad_group_id,
'criterion': {
'xsi_type': 'Keyword',
'matchType': 'BROAD',
'text': 'mars'
},
# These fields are optional.
'userStatus': 'PAUSED',
'destinationUrl': 'http://example.com/mars'
}
Best, - David Torres - AdWords API Team
On Tuesday, May 7, 2013 6:12:04 AM UTC-4, Francesco Della Vedova wrote:
>
> Hi All,
> I'm using the latest version of the api in python.
> I'm trying to push new keywords, but i get the following error:
>
> adspygoogle.common.Errors.ValidationError: Field 'destinationUrl' is
> not in type 'AdGroupCriterion'
>
> with the following request to AdGroupCriterionService:
>
> {'AdGroupCriterion_Type': 'BiddableAdGroupCriterion',
> 'adGroupId': adgroup_id,
> 'criterion': {'Criterion_Type':
> 'Keyword',
> 'matchType': 'EXACT',
> 'text': decode(keyword,
> 'utf-8'),
> 'type': 'KEYWORD'},
> 'destinationUrl':
> campaign.dest_url(campaign_type)
> }
>
> thanks in advance!
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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].
For more options, visit https://groups.google.com/groups/opt_out.