Hi,

I am trying to block an IP address for a campaign with the latest API 
version (v201607). 

Since I'm coding in NodeJS I'm using an unsupported library:
https://github.com/ChrisAlvares/node-adwords/

This is the XML generated by the library as it's sent to the API:

<?xml version="1.0" encoding="UTF-8"?>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"; xmlns:tns=
> "https://adwords.google.com/api/adwords/cm/v201609"; xmlns:xsi=
> "http://www.w3.org/2001/XMLSchema-instance";>
> <soap:Header>
> <ns1:RequestHeader xmlns:ns1=
> "https://adwords.google.com/api/adwords/cm/v201609"; xmlns=
> "https://adwords.google.com/api/adwords/cm/v201609";>
> <ns1:developerToken>*************</ns1:developerToken>
> <ns1:userAgent>*************</ns1:userAgent>
> <ns1:validateOnly>false</ns1:validateOnly>
> <ns1:clientCustomerId>*************</ns1:clientCustomerId>
> </ns1:RequestHeader>
> </soap:Header>
> <soap:Body>
> <mutate xmlns="https://adwords.google.com/api/adwords/cm/v201609";>
> <operations>
> <operator>ADD</operator>
> <operand>
> <campaignId>*************</campaignId>
> <isNegative>true</isNegative>
> <criterion>
> <id>1</id>
> <type>IP_BLOCK</type>
> <Criterion.Type>IpBlock</Criterion.Type>
> </criterion>
> <CampaignCriterion.Type>NegativeCampaignCriterion</CampaignCriterion.Type>
> </operand>
> </operations>
> </mutate>
> </soap:Body>
> </soap:Envelope>


I am getting the following error:

CampaignCriterionError.CONCRETE_TYPE_REQUIRED @ 
> operations[0].operand.criterion


I am relying on the the following docs:

*CampaignCriterionService | mutate*
https://developers.google.com/adwords/api/docs/reference/v201607/CampaignCriterionService#mutate
*CampaignCriterionOperation*
https://developers.google.com/adwords/api/docs/reference/v201607/CampaignCriterionService.CampaignCriterionOperation
*CampaignCriterion*
https://developers.google.com/adwords/api/docs/reference/v201607/CampaignCriterionService.CampaignCriterion
*Criterion\IpBlock*
https://developers.google.com/adwords/api/docs/reference/v201607/CampaignCriterionService.IpBlock

What am I missing here? Where do I have to specify a concrete type other 
than what I already did. Not to mention that the docs really state that 
most of these fields will be ignored but I've been trying to get the thing 
working in any way possible and I've ran out of options.

I would appreciate any help at this point. Thanks!

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/3c393a6c-2c52-4148-b1a7-6be66871273a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to