Home > Uncategorized > Sample Request/Response for v201003 AdGroupService of AdWords API

Sample Request/Response for v201003 AdGroupService of AdWords API

June 18th, 2010

Below are sample SOAP request and SOAP responses for a mutate operation against the v201003 AdGroupService through the Google AdWords API. The request was generated using the built-in PHP SOAP extension.

REQUEST

<?xml version=”1.0″ encoding=”UTF-8″?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:ns1=”https://adwords.google.com/api/adwords/cm/v201003″ xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>

<SOAP-ENV:Header>

<ns1:RequestHeader>

<ns1:authToken>..AUTH_TOKEN…</ns1:authToken>

<ns1:developerToken>…DEVELOPER_TOKEN…</ns1:developerToken>

<ns1:userAgent>..USER_AGENT…</ns1:userAgent>

<ns1:clientEmail>…CLIENT_EMAIL…</ns1:clientEmail>

</ns1:RequestHeader>

</SOAP-ENV:Header>

<SOAP-ENV:Body>

<ns1:mutate>

<ns1:operations>

<ns1:operator>ADD</ns1:operator>

<ns1:operand>

<ns1:campaignId>…CAMPAIGN_ID…</ns1:campaignId>

<ns1:name>..ADGROUP_NAME…</ns1:name>

<ns1:status>ENABLED</ns1:status>

<ns1:bids xsi:type=”ns1:ManualCPCAdGroupBids”>

<ns1:keywordMaxCpc>

<ns1:amount>

<ns1:microAmount>1000000</ns1:microAmount>

</ns1:amount>

</ns1:keywordMaxCpc>

<ns1:keywordContentMaxCpc>

<ns1:amount>

<ns1:microAmount>0</ns1:microAmount>

</ns1:amount>

</ns1:keywordContentMaxCpc>

<ns1:siteMaxCpc>

<ns1:amount>

<ns1:microAmount>0</ns1:microAmount>

</ns1:amount>

</ns1:siteMaxCpc>

</ns1:bids>

</ns1:operand>

</ns1:operations>

</ns1:mutate>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

RESPONSE

<soap:Envelope xmlns:soap=”http://schemas.xmlsoap.org/soap/envelope/”>

<soap:Header>

<ResponseHeader xmlns=”https://adwords.google.com/api/adwords/cm/v201003″>

<requestId>…REQUEST_ID…</requestId>

<operations>1</operations>

<responseTime>557</responseTime>

<units>1</units>

</ResponseHeader>

</soap:Header>

<soap:Body>

<mutateResponse xmlns=”https://adwords.google.com/api/adwords/cm/v201003″>

<rval>

<ListReturnValue.Type>AdGroupReturnValue</ListReturnValue.Type>

<value>

<id>…ADGROUP_ID…</id>

<campaignId>…CAMPAIGN_ID….</campaignId>

<campaignName>…CAMPAIGN_NAME…</campaignName>

<name>…ADGROUP_NAME…</name>

<status>ENABLED</status>

<bids xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:type=”ManualCPCAdGroupBids”><AdGroupBids.Type>ManualCPCAdGroupBids</AdGroupBids.Type>

<keywordMaxCpc>

<amount>

<ComparableValue.Type>Money</ComparableValue.Type>

<microAmount>1000000</microAmount>

</amount>

</keywordMaxCpc>

<enhancedCpcEnabled>false</enhancedCpcEnabled>

</bids>

</value>

</rval>

</mutateResponse>

</soap:Body>

</soap:Envelope>

Categories: Uncategorized Tags:
Comments are closed.