Returns a JSON array of available city names for the specified country and region combination.
Reference
GET https://YOUR-NETWORK-DOMAIN/rest-api/site/{siteId}/targeting/country/region/city/values.do
Returns a JSON array of available city names for the specified country and region combination. The returned city names can be used with the location targeting creation endpoint. Requires UPDATE permission on the site and MANAGE_SUPPLY_PRE_TARGETING user permission.
Path Params
siteIdintegerrequired
Unique numeric ID of the site
3001
Query Params
countryCodestringrequired
ISO alpha-2 country code (e.g. US, GB, DE)
US
regionNamestringrequired
Region name within the specified country, as returned by the country regions endpoint
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://YOUR-NETWORK-DOMAIN/rest-api/site/3001/targeting/country/region/city/values.do?countryCode=US®ionName=California");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());