I want to remove campaign via api (meaning SET campaign status to REMOVED 
according to google api 
https://developers.google.com/adwords/api/docs/samples/php/basic-operations#remove-a-campaign)
The issue is that it asks me for the languageCode and domainName (which are 
dynamic search ads fields), why removing a campaign needs these two fields? 
And I don't think my campaign is a dynamic search ad campaign.
It succeeded if I set campaign status to PAUSED or ENABLED, only REMOVED 
does not work.
Please help! thank you!


The soap request looks like:

<?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/v201710"; 
soapenv:mustUnderstand="0">

            <ns1:clientCustomerId>123-345-1008</ns1:clientCustomerId>

            <ns1:developerToken>REDACTED</ns1:developerToken>

            <ns1:userAgent>xxx (AwApi-Java, AdWords-Axis/3.10.0, 
Common-Java/3.10.0, Axis/1.4, Java/1.8.0_91, maven)</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/v201710";>

            <operations>

                <operator>SET</operator>

                <operand>

                    <id>1408927584</id>

                    <name>campaginBudget1</name>

                    <status>REMOVED</status>

                    <servingStatus>SERVING</servingStatus>

                    <startDate>20180518</startDate>

                    <endDate>20371230</endDate>

                    <budget>

                        <budgetId>1464626154</budgetId>

                        <amount>

                            <microAmount>1230000</microAmount>

                        </amount>

                        <deliveryMethod>STANDARD</deliveryMethod>

                        <isExplicitlyShared>false</isExplicitlyShared>

                        <status>ENABLED</status>

                    </budget>

                    <frequencyCap/>

                    <settings 
xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201710"; 
xsi:type="ns2:DynamicSearchAdsSetting"/>

                    <advertisingChannelType>SEARCH</advertisingChannelType>

                    <networkSetting>

                        <targetGoogleSearch>true</targetGoogleSearch>

                        <targetSearchNetwork>true</targetSearchNetwork>

                        <targetContentNetwork>true</targetContentNetwork>

                        
<targetPartnerSearchNetwork>false</targetPartnerSearchNetwork>

                    </networkSetting>

                    <biddingStrategyConfiguration>

                        <biddingScheme 
xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201710"; 
xsi:type="ns3:ManualCpcBiddingScheme">

                            
<ns3:enhancedCpcEnabled>false</ns3:enhancedCpcEnabled>

                        </biddingScheme>

                    </biddingStrategyConfiguration>

                </operand>

            </operations>

        </mutate>

    </soapenv:Body>

</soapenv:Envelope>



And the response looks like:

<?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/v201710";>

            <requestId>00056cd075b736a10a62aa13bd094b12</requestId>

            <serviceName>CampaignService</serviceName>

            <methodName>mutate</methodName>

            <operations>1</operations>

            <responseTime>80</responseTime>

        </ResponseHeader>

    </soap:Header>

    <soap:Body>

        <soap:Fault>

            <faultcode>soap:Client</faultcode>

            <faultstring>[RequiredError.REQUIRED @ 
operations[0].operand.settings[0].domainName, RequiredError.REQUIRED @ 
operations[0].operand.settings[0].languageCode]</faultstring>

            <detail>

                <ApiExceptionFault 
xmlns="https://adwords.google.com/api/adwords/cm/v201710";>

                    <message>[RequiredError.REQUIRED @ 
operations[0].operand.settings[0].domainName, RequiredError.REQUIRED @ 
operations[0].operand.settings[0].languageCode]</message>

                    
<ApplicationException.Type>ApiException</ApplicationException.Type>

                    <errors 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="RequiredError">

                        
<fieldPath>operations[0].operand.settings[0].domainName</fieldPath>

                        <fieldPathElements>

                            <field>operations</field>

                            <index>0</index>

                        </fieldPathElements>

                        <fieldPathElements>

                            <field>operand</field>

                        </fieldPathElements>

                        <fieldPathElements>

                            <field>settings</field>

                            <index>0</index>

                        </fieldPathElements>

                        <fieldPathElements>

                            <field>domainName</field>

                        </fieldPathElements>

                        <trigger/>

                        <errorString>RequiredError.REQUIRED</errorString>

                        <ApiError.Type>RequiredError</ApiError.Type>

                        <reason>REQUIRED</reason>

                    </errors>

                    <errors 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="RequiredError">

                        
<fieldPath>operations[0].operand.settings[0].languageCode</fieldPath>

                        <fieldPathElements>

                            <field>operations</field>

                            <index>0</index>

                        </fieldPathElements>

                        <fieldPathElements>

                            <field>operand</field>

                        </fieldPathElements>

                        <fieldPathElements>

                            <field>settings</field>

                            <index>0</index>

                        </fieldPathElements>

                        <fieldPathElements>

                            <field>languageCode</field>

                        </fieldPathElements>

                        <trigger/>

                        <errorString>RequiredError.REQUIRED</errorString>

                        <ApiError.Type>RequiredError</ApiError.Type>

                        <reason>REQUIRED</reason>

                    </errors>

                </ApiExceptionFault>

            </detail>

        </soap:Fault>

    </soap:Body>

</soap:Envelope>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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/eaca5cb3-9a75-4cc6-b7b6-adda20b08ac0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • ... Kain
    • ... 'Luis Xander Talag (AdWords API Team)' via AdWords API and Google Ads API Forum

Reply via email to