Returns all targeting rules currently configured for the specified banner.
Reference
GET https://YOUR-NETWORK-DOMAIN/rest-api/banner/{bannerId}/targetings.do
Returns all targeting rules currently configured for the specified banner. Results can be filtered by targeting type (e.g., COUNTRY, BROWSER, DEVICE_FORMAT) and by rule (INCLUDE or EXCLUDE). Each targeting rule in the response includes its ID, type, rule, and value details. Requires UPDATE permission on the banner's campaign and MANAGE_DEMAND_TARGETING permission.
Path Params
bannerIdintegerrequired
Unique numeric ID of the banner whose targeting rules to retrieve
7890
Query Params
targetTypestring
Optional targeting type filter — when specified, only rules of this type are returned (e.g., COUNTRY, BROWSER, DEVICE_FORMAT)
COUNTRY
rulestring
Optional rule filter — INCLUDE to return only whitelist rules, EXCLUDE to return only blacklist rules
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://YOUR-NETWORK-DOMAIN/rest-api/banner/7890/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());