Did city codes change from V13 to V2009?

This SOAP request fails:

POST /api/adwords/cm/v200909/CampaignTargetService HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related,
text/*
User-Agent: Axis/1.4
Host: adwords.google.com
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 2957

<?xml version="1.0" encoding="UTF-8"?><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
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next";
soapenv:mustUnderstand="0" xmlns:ns1="https://adwords.google.com/api/
adwords/cm/v200909"><ns1:applicationToken>XXXXXXXXX</
ns1:applicationToken><ns1:authToken>ZZZZZZZZZZ</
ns1:authToken><ns1:developerToken>SSSSSSSSS</
ns1:developerToken><ns1:userAgent>DDDDDDDDDDD</ns1:userAgent></
ns1:RequestHeader></soapenv:Header><soapenv:Body><mutate
xmlns="https://adwords.google.com/api/adwords/cm/
v200909"><operations><operator>SET</operator><operand
xsi:type="ns2:AdScheduleTargetList" xmlns:ns2="https://
adwords.google.com/api/adwords/cm/v200909"><ns2:campaignId>17048524</
ns2:campaignId></operand></operations><operations><operator>SET</
operator><operand xsi:type="ns3:GeoTargetList" xmlns:ns3="https://
adwords.google.com/api/adwords/cm/v200909"><ns3:campaignId>17048524</
ns3:campaignId><ns3:targets
xsi:type="ns3:CityTarget"><ns3:excluded>false</
ns3:excluded><ns3:cityName>Barling, AR US</
ns3:cityName><ns3:countryCode>US</ns3:countryCode></
ns3:targets><ns3:targets
xsi:type="ns3:CityTarget"><ns3:excluded>false</
ns3:excluded><ns3:cityName>Alma, AR US</
ns3:cityName><ns3:countryCode>US</ns3:countryCode></
ns3:targets><ns3:targets
xsi:type="ns3:MetroTarget"><ns3:excluded>false</
ns3:excluded><ns3:metroCode>789</ns3:metroCode></
ns3:targets><ns3:targets
xsi:type="ns3:MetroTarget"><ns3:excluded>false</
ns3:excluded><ns3:metroCode>753</ns3:metroCode></
ns3:targets><ns3:targets
xsi:type="ns3:ProvinceTarget"><ns3:excluded>false</
ns3:excluded><ns3:provinceCode>US-AL</ns3:provinceCode></
ns3:targets><ns3:targets
xsi:type="ns3:ProvinceTarget"><ns3:excluded>false</
ns3:excluded><ns3:provinceCode>US-AK</ns3:provinceCode></ns3:targets></
operand></operations><operations><operator>SET</operator><operand
xsi:type="ns4:NetworkTargetList" xmlns:ns4="https://adwords.google.com/
api/adwords/cm/v200909"><ns4:campaignId>17048524</
ns4:campaignId><ns4:targets><ns4:networkCoverageType>GOOGLE_SEARCH</
ns4:networkCoverageType></
ns4:targets><ns4:targets><ns4:networkCoverageType>SEARCH_NETWORK</
ns4:networkCoverageType></
ns4:targets><ns4:targets><ns4:networkCoverageType>CONTENT_NETWORK</
ns4:networkCoverageType></ns4:targets></operand></
operations><operations><operator>SET</operator><operand
xsi:type="ns5:LanguageTargetList" xmlns:ns5="https://
adwords.google.com/api/adwords/cm/v200909"><ns5:campaignId>17048524</
ns5:campaignId><ns5:targets><ns5:languageCode>en</ns5:languageCode></
ns5:targets></operand></operations></mutate></soapenv:Body></
soapenv:Envelope>

Response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/
envelope/"><soap:Header><ResponseHeader xmlns="https://
adwords.google.com/api/adwords/cm/
v200909"><requestId>bf1bc003e6b40f689eedddc06f183a47</
requestId><operations>1</operations><responseTime>407</
responseTime><units>1</units></ResponseHeader></
soap:Header><soap:Body><soap:Fault><faultcode>soap:Server</
faultcode><faultstring>[TargetError.INVALID_CITY_CODE @
operations[1].operand.targets[0], TargetError.INVALID_CITY_CODE @
operations[1].operand.targets[1]]</
faultstring><detail><ApiExceptionFault xmlns="https://
adwords.google.com/api/adwords/cm/
v200909"><message>[TargetError.INVALID_CITY_CODE @
operations[1].operand.targets[0], TargetError.INVALID_CITY_CODE @
operations[1].operand.targets[1]]</
message><ApplicationException.Type>ApiException</
ApplicationException.Type><errors xsi:type="TargetError"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"><fieldPath>operations[1].operand.targets[0]</
fieldPath><trigger/><ApiError.Type>TargetError</
ApiError.Type><reason>INVALID_CITY_CODE</reason></errors><errors
xsi:type="TargetError" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"><fieldPath>operations[1].operand.targets[1]</
fieldPath><trigger/><ApiError.Type>TargetError</
ApiError.Type><reason>INVALID_CITY_CODE</reason></errors></
ApiExceptionFault></detail></soap:Fault></soap:Body></soap:Envelope>

Also, it's not clear whether providing ProvinceCode for the
CityTargets makes any difference, or why countryCode is required for
the CityTarget.

-- 
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-...@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.

Reply via email to