Home > AdWords API > AdWords API Sandbox v2009 CampaignService->mutate() SOAP request

AdWords API Sandbox v2009 CampaignService->mutate() SOAP request

May 20th, 2009

Here is an example of a successful, raw SOAP request to the mutate() operation of the AdWords API v2009 CampaignService that was made on May 20, 2009:

POST /api/adwords/cm/v200902/CampaignService HTTP/1.0
Host: adwords-sandbox.google.com
User-Agent: NuSOAP/0.7.3 (1.114)
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 1965

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns6275="http://tempuri.org">
<SOAP-ENV:Header>
<RequestHeader xmlns="https://adwords.google.com/api/adwords/cm/v200902">
<authToken>XXXXXXXXXXXXXXX</authToken>
<clientEmail>XXXXXXXXXXXXXXX</clientEmail>
</RequestHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<mutate xmlns="https://adwords.google.com/api/adwords/cm/v200902">
<operations>
<operator>SET</operator>
<operand>
<id><id>XXXXXXXXXXXXXXX</id></id>
<status>PAUSED</status>
</operand>
</operations>
<operations>
<operator>SET</operator>
<operand>
<id><id>XXXXXXXXXXXXXXX</id></id>
<status>PAUSED</status>
</operand>
</operations>
<operations>
<operator>SET</operator>
<operand>
<id><id>XXXXXXXXXXXXXXX/id></id>
<status>PAUSED</status>
</operand>
</operations>
<operations>
<operator>SET</operator>
<operand>
<id><id>XXXXXXXXXXXXXXX</id></id>
<status>PAUSED</status>
</operand>
</operations>
</mutate>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

And what follows, the SOAP response, should look something similar to:

HTTP/1.1 200 OK
Content-Type: text/xml; charset=UTF-8
SOAPAction: ""
Transfer-Encoding: chunked
Date: Wed, 20 May 2009 19:17:45 GMT
Expires: Wed, 20 May 2009 19:17:45 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
Server: GFE/2.0

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v200902">
<operations>0</operations>
<responseTime>6394</responseTime>
</ResponseHeader>
</soap:Header>
<soap:Body>
<mutateResponse xmlns="https://adwords.google.com/api/adwords/cm/v200902">
<rval>
<ListReturnValue.Type>CampaignReturnValue</ListReturnValue.Type>
<value>
	<id>
	<id>XXXXXXXXXXXXXXX</id>
	<CampaignId.Type>CampaignId</CampaignId.Type>
	</id>
	<name>Campaign #1</name>
	<status>PAUSED</status>
	<servingStatus>SERVING</servingStatus>
	<startDate><year>2009</year><month>5</month><day>18</day></startDate>
	<endDate><year>2037</year><month>12</month><day>30</day></endDate>
	<budget>
	<period>DAILY</period>
	<amount>
	<currencyCode>USD</currencyCode>
	<microAmount>1000000000</microAmount>
	</amount>
	<deliveryMethod>STANDARD</deliveryMethod>
	</budget>
	<biddingStrategy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ManualCPC">
	<BiddingStrategy.Type>ManualCPC</BiddingStrategy.Type>
	</biddingStrategy>
	<autoKeywordMatchingStatus>OPT_OUT</autoKeywordMatchingStatus>
	<adServingOptimizationStatus>OPTIMIZE</adServingOptimizationStatus>
</value>
<value>
	<id>
	<id>XXXXXXXXXXXXXXX</id>
	<CampaignId.Type>CampaignId</CampaignId.Type>
	</id>
	<name>Campaign #2</name>
	<status>PAUSED</status>
	<servingStatus>SERVING</servingStatus>
	<startDate><year>2009</year><month>5</month><day>18</day></startDate>
	<endDate><year>2037</year><month>12</month><day>30</day></endDate>
	<budget>
	<period>DAILY</period>
	<amount><currencyCode>USD</currencyCode>
	<microAmount>1000000000</microAmount>
	</amount>
	<deliveryMethod>STANDARD</deliveryMethod>
	</budget>
	<biddingStrategy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ManualCPC">
	<BiddingStrategy.Type>ManualCPC</BiddingStrategy.Type>
	</biddingStrategy>
	<autoKeywordMatchingStatus>OPT_OUT</autoKeywordMatchingStatus>
	<adServingOptimizationStatus>OPTIMIZE</adServingOptimizationStatus>
</value>
<value>
	<id>
	<id>XXXXXXXXXXXXXXX</id>
	<CampaignId.Type>CampaignId</CampaignId.Type>
	</id>
	<name>Campaign #3</name>
	<status>PAUSED</status>
	<servingStatus>SERVING</servingStatus>
	<startDate><year>2009</year><month>5</month><day>18</day></startDate>
	<endDate><year>2037</year><month>12</month><day>30</day></endDate>
	<budget>
	<period>DAILY</period>
	<amount>
	<currencyCode>USD</currencyCode>
	<microAmount>1000000000</microAmount>
	</amount>
	<deliveryMethod>STANDARD</deliveryMethod>
	</budget>
	<biddingStrategy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ManualCPC">
	<BiddingStrategy.Type>ManualCPC</BiddingStrategy.Type>
	</biddingStrategy>
	<autoKeywordMatchingStatus>OPT_OUT</autoKeywordMatchingStatus>
	<adServingOptimizationStatus>OPTIMIZE</adServingOptimizationStatus>
</value>
<value>
	<id>
	<id>XXXXXXXXXXXXXXX</id>
	<CampaignId.Type>CampaignId</CampaignId.Type>
	</id>
	<name>Campaign #4</name>
	<status>PAUSED</status>
	<servingStatus>SERVING</servingStatus>
	<startDate><year>2009</year><month>5</month><day>18</day></startDate>
	<endDate><year>2037</year><month>12</month><day>30</day></endDate>
	<budget>
	<period>DAILY</period>
	<amount>
	<currencyCode>USD</currencyCode>
	<microAmount>1000000000</microAmount>
	</amount><deliveryMethod>STANDARD</deliveryMethod>
	</budget>
	<biddingStrategy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ManualCPC">
	<BiddingStrategy.Type>ManualCPC</BiddingStrategy.Type>
	</biddingStrategy>
	<autoKeywordMatchingStatus>OPT_OUT</autoKeywordMatchingStatus>
	<adServingOptimizationStatus>OPTIMIZE</adServingOptimizationStatus></value>

</rval>
</mutateResponse>
</soap:Body>
</soap:Envelope>
  1. October 18th, 2010 at 12:35 | #1

    Very nice post!

Comments are closed.