Returns all targeting rules for the specified advertiser as a JSON array.
Reference
GET https://YOUR-NETWORK-DOMAIN/rest-api/advertiser/{advertiserId}/targetings.do
Returns all targeting rules for the specified advertiser as a JSON array. Results can be filtered by targeting type and/or rule. Requires UPDATE permission on the advertiser and MANAGE_DEMAND_TARGETING user permission.
Path Params
advertiserIdintegerrequired
Unique numeric ID of the advertiser
1234
Query Params
targetTypestring
Optional targeting type filter — when specified, only rules of this type are returned
COUNTRY
rulestring
Optional rule filter (INCLUDE or EXCLUDE) — when specified, only rules with this rule type are returned
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://YOUR-NETWORK-DOMAIN/rest-api/advertiser/1234/targetings.do?targetType=COUNTRY&rule=INCLUDE");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());