Hi,

You may refer to the sample SOAP request and response for the necessary 
fields/elements required to successfully create a Keyword criterion :

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
    <soapenv:Header>
        <ns1:RequestHeader 
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201708"; 
soapenv:mustUnderstand="0">
            <ns1:clientCustomerId>YOUR_CUSTOMER_ID</ns1:clientCustomerId>
            <ns1:developerToken>YOUR_DEVELOPER_TOKEN</ns1:developerToken>
            <ns1:userAgent>YOUR_USER_AGENT</ns1:userAgent>
            <ns1:validateOnly>false</ns1:validateOnly>
            <ns1:partialFailure>false</ns1:partialFailure>
        </ns1:RequestHeader>
    </soapenv:Header>
    <soapenv:Body>
        <mutate xmlns="https://adwords.google.com/api/adwords/cm/v201708";>
            <operations>
                <operator>ADD</operator>
                <operand 
xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201708"; 
xsi:type="ns2:BiddableAdGroupCriterion">
                    <ns2:adGroupId>THE_ADGROUP_ID</ns2:adGroupId>
                    <ns2:criterion xsi:type="ns2:Keyword">
                        <ns2:text>KEYWORD_TEXT</ns2:text>
                        <ns2:matchType>BROAD</ns2:matchType>
                    </ns2:criterion>
                    <ns2:userStatus>PAUSED</ns2:userStatus>
                    <ns2:biddingStrategyConfiguration>
                        <ns2:bids xsi:type="ns2:CpcBid">
                            <ns2:bid>
                                <ns2:microAmount>10000000</ns2:microAmount>
                            </ns2:bid>
                        </ns2:bids>
                    </ns2:biddingStrategyConfiguration>
                    <ns2:finalUrls>
                        
<ns2:urls>http://example.com/mars/cruise/?kw=mars+cruise</ns2:urls>
                    </ns2:finalUrls>
                </operand>
            </operations>
            <operations>
                <operator>ADD</operator>
                <operand 
xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201708"; 
xsi:type="ns3:NegativeAdGroupCriterion">
                    <ns3:adGroupId>THE_ADGROUP_ID</ns3:adGroupId>
                    <ns3:criterion xsi:type="ns3:Keyword">
                        <ns3:text>ANOTHER_KEYWORD_TEXT</ns3:text>
                        <ns3:matchType>EXACT</ns3:matchType>
                    </ns3:criterion>
                </operand>
            </operations>
        </mutate>
    </soapenv:Body>
</soapenv:Envelope>
[18 Sep 2017 16:58:00,460-soapXmlLogger:DEBUG:main] SOAP response:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
    <soap:Header>
        <ResponseHeader 
xmlns="https://adwords.google.com/api/adwords/cm/v201708";>
            <requestId>THE_REQUEST_ID</requestId>
            <serviceName>AdGroupCriterionService</serviceName>
            <methodName>mutate</methodName>
            <operations>2</operations>
            <responseTime>426</responseTime>
        </ResponseHeader>
    </soap:Header>
    <soap:Body>
        <mutateResponse 
xmlns="https://adwords.google.com/api/adwords/cm/v201708";>
            <rval>
                
<ListReturnValue.Type>AdGroupCriterionReturnValue</ListReturnValue.Type>
                <value 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="BiddableAdGroupCriterion">
                    <adGroupId>THE_ADGROUP_ID</adGroupId>
                    <criterion xsi:type="Keyword">
                        <id>THE_KEYWORD_ID_1</id>
                        <type>KEYWORD</type>
                        <Criterion.Type>Keyword</Criterion.Type>
                        <text>KEYWORD_TEXT</text>
                        <matchType>BROAD</matchType>
                    </criterion>
                    
<AdGroupCriterion.Type>BiddableAdGroupCriterion</AdGroupCriterion.Type>
                    <userStatus>PAUSED</userStatus>
                    <systemServingStatus>ELIGIBLE</systemServingStatus>
                    <approvalStatus>PENDING_REVIEW</approvalStatus>
                    <biddingStrategyConfiguration>
                        
<biddingStrategyType>MANUAL_CPC</biddingStrategyType>
                        
<biddingStrategySource>CAMPAIGN</biddingStrategySource>
                        <biddingScheme xsi:type="ManualCpcBiddingScheme">
                            
<BiddingScheme.Type>ManualCpcBiddingScheme</BiddingScheme.Type>
                            <enhancedCpcEnabled>false</enhancedCpcEnabled>
                        </biddingScheme>
                        <bids xsi:type="CpmBid">
                            <Bids.Type>CpmBid</Bids.Type>
                            <bid>
                                
<ComparableValue.Type>Money</ComparableValue.Type>
                                <microAmount>10000</microAmount>
                            </bid>
                            <cpmBidSource>ADGROUP</cpmBidSource>
                        </bids>
                        <bids xsi:type="CpcBid">
                            <Bids.Type>CpcBid</Bids.Type>
                            <bid>
                                
<ComparableValue.Type>Money</ComparableValue.Type>
                                <microAmount>10000000</microAmount>
                            </bid>
                            <cpcBidSource>CRITERION</cpcBidSource>
                        </bids>
                    </biddingStrategyConfiguration>
                    <finalUrls>
                        
<urls>http://example.com/mars/cruise/?kw=mars+cruise</urls>
                    </finalUrls>
                </value>
                <value 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="NegativeAdGroupCriterion">
                    <adGroupId>THE_ADGROUP_ID</adGroupId>
                    <criterion xsi:type="Keyword">
                        <id>THE_KEYWORD_ID_2</id>
                        <type>KEYWORD</type>
                        <Criterion.Type>Keyword</Criterion.Type>
                        <text>ANOTHER_KEYWORD_TEXT</text>
                        <matchType>EXACT</matchType>
                    </criterion>
                    
<AdGroupCriterion.Type>NegativeAdGroupCriterion</AdGroupCriterion.Type>
                </value>
            </rval>
        </mutateResponse>
    </soap:Body>
</soap:Envelope>


Let me know if this helps.

Best regards,
Peter
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
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/4d834b17-a328-4959-9933-a76feb0df840%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to