Hi Sohair,

You may refer to the below example SOAP request and response to get the 
targeted location and proximity:

<?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/v201609"; 
soapenv:mustUnderstand="0">
            
<ns1:clientCustomerId>YOUR_CLIENT_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>
        <get xmlns="https://adwords.google.com/api/adwords/cm/v201609";>
            <serviceSelector>
                <fields>CampaignId</fields>
                <fields>Id</fields>
                <fields>CriteriaType</fields>
                <fields>LocationName</fields>
                <fields>RadiusDistanceUnits</fields>
                <fields>RadiusInUnits</fields>
                <predicates>
                    <field>CriteriaType</field>
                    <operator>IN</operator>
                    <values>LOCATION</values>
                    <values>PROXIMITY</values>
                </predicates>
                <predicates>
                    <field>CampaignId</field>
                    <operator>EQUALS</operator>
                    <values>YOUR_CAMPAIGN_ID</values>
                </predicates>
                <paging>
                    <startIndex>0</startIndex>
                    <numberResults>100</numberResults>
                </paging>
            </serviceSelector>
        </get>
    </soapenv:Body>
</soapenv:Envelope>


[main] INFO 
com.google.api.ads.adwords.lib.client.AdWordsServiceClient.soapXmlLogger - 
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/v201609";>
            <requestId>REQUEST_ID</requestId>
            <serviceName>CampaignCriterionService</serviceName>
            <methodName>get</methodName>
            <operations>1</operations>
            <responseTime>303</responseTime>
        </ResponseHeader>
    </soap:Header>
    <soap:Body>
        <getResponse 
xmlns="https://adwords.google.com/api/adwords/cm/v201609";>
            <rval>
                <totalNumEntries>2</totalNumEntries>
                <Page.Type>CampaignCriterionPage</Page.Type>
                <entries>
                    <campaignId>YOUR_CAMPAIGN_ID</campaignId>
                    <isNegative>false</isNegative>
                    <criterion 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:type="Location">
                        <id>LOCATION_ID</id>
                        <type>LOCATION</type>
                        <Criterion.Type>Location</Criterion.Type>
                        <locationName>Mexico</locationName>
                        <displayType>Country</displayType>
                        <targetingStatus>ACTIVE</targetingStatus>
                    </criterion>
                    
<CampaignCriterion.Type>CampaignCriterion</CampaignCriterion.Type>
                </entries>
                <entries>
                    <campaignId>YOUR_CAMPAIGN_ID</campaignId>
                    <isNegative>false</isNegative>
                    <criterion 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:type="Proximity">
                        <id>ID</id>
                        <type>PROXIMITY</type>
                        <Criterion.Type>Proximity</Criterion.Type>
                        <radiusDistanceUnits>MILES</radiusDistanceUnits>
                        <radiusInUnits>20.0</radiusInUnits>
                        <address>
                            <cityName>Dublin</cityName>
                            <provinceName>OH</provinceName>
                            <countryCode>US</countryCode>
                        </address>
                    </criterion>
                    
<CampaignCriterion.Type>CampaignCriterion</CampaignCriterion.Type>
                </entries>
            </rval>
        </getResponse>
    </soap:Body>
</soap:Envelope>


If you still encounter zero results on your end with your campaignId, 
please send me (*reply privately to author*) the complete SOAP request and 
response so I could better check. 

Best,
Joyce, 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/d0e0d565-2435-40f4-8acc-1c0516ca44f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to