Targeting Rules API endpoints
Endpoint reference for the Targeting Rules tag (91 shared endpoints): Targeting rules for advertisers, campaigns, banners, placements, sites, and zones
Targeting rules for advertisers, campaigns, banners, placements, sites, and zones. 91 shared endpoints, generated from the OpenAPI spec. Authentication, the response envelope, pagination and error codes are shared by all endpoints — see REST API overview. Parameters marked form go in an application/x-www-form-urlencoded request body.
The per-entity endpoints are on their own pages:
This page holds the endpoints shared by every level.
GET /rest-api/matched/{entityType}/{entityId}.do
List what an entity’s rules and links match.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
entityType | path | string | yes | Type of the entity whose matches are listed Values: SITE, ZONE, PLACEMENT, ADVERTISER, CAMPAIGN, BANNER. |
entityId | path | integer | yes | Id of the entity whose matches are listed |
categories | query | array<integer> | no | Category ids; only entities in one of them are listed |
hideInactive | query | boolean | no | Leave inactive entities out |
labels | query | array<string> | no | Label names; only entities carrying one of them are listed |
limit | query | integer | no | Page size, 1 to 500 |
matchByRules | query | boolean | no | List what the rules of the entity and its parents match |
matchLinked | query | boolean | no | List what is linked to the entity |
name | query | string | no | Substring of the name |
parentId | query | integer | no | Only the children of this entity, e.g. the zones of site 3001 (with parentType SITE) |
parentType | query | string | no | Type of parentId Values: ROOT, SITE, ZONE, PLACEMENT, ADVERTISER, CAMPAIGN, BANNER, UNKNOWN. |
returnType | query | string | no | Type of the matched entities to list: SITE, ZONE or PLACEMENT for a demand-side entity, ADVERTISER, CAMPAIGN or BANNER for a supply-side one. Omitted, it is PLACEMENT for a demand-side entity and BANNER for a supply-side one, the rows of the console’s Matched Placements and Matched Ads cards Values: SITE, ZONE, PLACEMENT, ADVERTISER, CAMPAIGN, BANNER. |
start | query | integer | no | 0-based offset of the first row |
Responses: 200 — {total, data:[{id, name, and the ids of the row’s parents: siteId/zoneId/placementId or advertiserId/campaignId/bannerId, parentId}]} · 404 — The entity does not exist or is deleted. Errors follow the shared conventions.
POST /rest-api/preset-app-package/add.do
Add preset app package to group.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
groupId | form | integer | yes | Unique numeric ID of the preset application package group to add the package to |
applicationPackage | form | string | yes | Application package identifier to add (e.g., com.example.app) |
Responses: 200 — Success · 404 — Preset group not found · 500 — Internal server error. Errors follow the shared conventions.
GET /rest-api/preset-app-package/all-by-group.do
Get preset app packages by group.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
groupId | query | integer | yes | Unique numeric ID of the preset application package group to retrieve packages for |
Responses: 200 — Success · 404 — Preset group not found · 500 — Internal server error. Errors follow the shared conventions.
DELETE /rest-api/preset-app-package/delete.do
Delete preset app package.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
applicationPackageId | form | integer | yes | Unique numeric ID of the preset application package entry to delete |
Responses: 200 — Success · 404 — Preset group not found · 500 — Internal server error. Errors follow the shared conventions.
DELETE /rest-api/preset-app-package/group/clear.do
Clear preset app package group.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
groupId | form | integer | yes | Unique numeric ID of the preset application package group to clear |
Responses: 200 — Success · 404 — Preset group not found · 500 — Internal server error. Errors follow the shared conventions.
DELETE /rest-api/preset-app-package/group/delete.do
Delete preset app package group.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
groupId | form | integer | yes | Unique numeric ID of the preset application package group to delete |
Responses: 200 — Success · 404 — Preset group not found · 500 — Internal server error. Errors follow the shared conventions.
GET /rest-api/preset-app-package/group/list.do
List all preset app package groups.
No parameters beyond authentication.
Responses: 200 — Success · 500 — Internal server error. Errors follow the shared conventions.
POST /rest-api/preset-app-package/group/save.do
Save preset app package group.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
title | form | string | yes | Display title for the preset application package group |
groupId | form | integer | no | Unique numeric ID of an existing group to update; omit to create a new group |
Responses: 200 — Success · 404 — Preset group not found · 500 — Internal server error. Errors follow the shared conventions.
POST /rest-api/preset-app-package/upload-packages.do
Upload preset app packages.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
groupId | form | integer | yes | Unique numeric ID of the preset application package group to import packages into |
Request body (multipart/form-data, required): form with field file — File containing application package identifiers to import (one per line).
Responses: 200 — Success · 404 — Preset group not found · 500 — Internal server error. Errors follow the shared conventions.
POST /rest-api/preset-domain/domain/add.do
Add preset domain to group.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
groupId | form | integer | yes | Unique numeric ID of the preset domain group to add the domain to |
domain | form | string | yes | Domain name to add (must be a valid domain, e.g., example.com) |
Responses: 200 — Success · 404 — Preset group not found · 500 — Internal server error. Errors follow the shared conventions.
GET /rest-api/preset-domain/domain/all-by-group.do
Get preset domains by group.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
groupId | query | integer | yes | Unique numeric ID of the preset domain group to retrieve domains for |
Responses: 200 — Success · 404 — Preset group not found · 500 — Internal server error. Errors follow the shared conventions.
DELETE /rest-api/preset-domain/domain/delete.do
Delete preset domain.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
domainId | form | integer | yes | Unique numeric ID of the preset domain entry to delete |
Responses: 200 — Success · 404 — Preset group not found · 500 — Internal server error. Errors follow the shared conventions.
DELETE /rest-api/preset-domain/group/clear.do
Clear preset domain group.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
groupId | form | integer | yes | Unique numeric ID of the preset domain group to clear |
Responses: 200 — Success · 404 — Preset group not found · 500 — Internal server error. Errors follow the shared conventions.
DELETE /rest-api/preset-domain/group/delete.do
Delete preset domain group.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
groupId | form | integer | yes | Unique numeric ID of the preset domain group to delete |
Responses: 200 — Success · 404 — Preset group not found · 500 — Internal server error. Errors follow the shared conventions.
GET /rest-api/preset-domain/group/list.do
List all preset domain groups.
No parameters beyond authentication.
Responses: 200 — Success · 500 — Internal server error. Errors follow the shared conventions.
POST /rest-api/preset-domain/group/save.do
Save preset domain group.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
title | form | string | yes | Display title for the preset domain group |
groupId | form | integer | no | Unique numeric ID of an existing group to update; omit to create a new group |
Responses: 200 — Success · 404 — Preset group not found · 500 — Internal server error. Errors follow the shared conventions.
POST /rest-api/preset-domain/group/upload-domains.do
Upload preset domains.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
groupId | form | integer | yes | Unique numeric ID of the preset domain group to import domains into |
Request body (multipart/form-data, required): form with field file — File containing domains to import (one domain per line, or DMCA zip format).
Responses: 200 — Success · 404 — Preset group not found · 500 — Internal server error. Errors follow the shared conventions.
DELETE /rest-api/preset-ip-ranges/group/clear.do
Clear preset IP ranges group.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
groupId | form | integer | yes | Unique numeric ID of the preset IP ranges group to clear |
Responses: 200 — Success · 404 — Preset group not found · 500 — Internal server error. Errors follow the shared conventions.
DELETE /rest-api/preset-ip-ranges/group/delete.do
Delete preset IP ranges group.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
groupId | form | integer | yes | Unique numeric ID of the preset IP ranges group to delete |
Responses: 200 — Success · 404 — Preset group not found · 500 — Internal server error. Errors follow the shared conventions.
POST /rest-api/preset-ip-ranges/group/save.do
Save preset IP ranges group.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
title | form | string | yes | Display title for the preset IP ranges group |
groupId | form | integer | no | Unique numeric ID of an existing group to update; omit to create a new group |
Responses: 200 — Success · 404 — Preset group not found · 500 — Internal server error. Errors follow the shared conventions.
POST /rest-api/preset-ip-ranges/group/upload-ip-ranges.do
Upload preset IP ranges.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
groupId | form | integer | yes | Unique numeric ID of the preset IP ranges group to import ranges into |
Request body (multipart/form-data, required): form with field file — File containing IP ranges to import (one range per line).
Responses: 200 — Success · 404 — Preset group not found · 500 — Internal server error. Errors follow the shared conventions.
POST /rest-api/preset-ip-ranges/ip-range/add.do
Add preset IP range to group.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
groupId | form | integer | yes | Unique numeric ID of the preset IP ranges group to add the range to |
from | form | string | yes | Start IPv4 address of the range (e.g., 192.168.1.0) |
to | form | string | yes | End IPv4 address of the range (e.g., 192.168.1.255) |
Responses: 200 — Success · 404 — Preset group not found · 500 — Internal server error. Errors follow the shared conventions.
GET /rest-api/preset-ip-ranges/ip-range/all-by-group.do
Get preset IP ranges by group.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
groupId | query | integer | yes | Unique numeric ID of the preset IP ranges group to retrieve IP ranges for |
Responses: 200 — Success · 404 — Preset group not found · 500 — Internal server error. Errors follow the shared conventions.
DELETE /rest-api/preset-ip-ranges/ip-range/delete.do
Delete preset IP range.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ipRangeId | form | integer | yes | Unique numeric ID of the preset IP range entry to delete |
Responses: 200 — Success · 404 — Preset group not found · 500 — Internal server error. Errors follow the shared conventions.
GET /rest-api/preset-ip-ranges/ip-ranges/list.do
List all preset IP ranges groups.
No parameters beyond authentication.
Responses: 200 — Success · 404 — Preset group not found · 500 — Internal server error. Errors follow the shared conventions.
GET /rest-api/rule/{ruleId}.do
Get rule by ID.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ruleId | path | integer | yes | The unique numeric identifier of the rule to retrieve |
Responses: 200 — Successfully retrieved rule · 404 — Rule not found. Errors follow the shared conventions.
POST /rest-api/rule/{ruleId}/delete.do
Delete a rule.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ruleId | path | integer | yes | The unique numeric identifier of the rule to delete |
Responses: 200 — Rule deleted successfully · 404 — Rule not found · 500 — Internal server error. Errors follow the shared conventions.
POST /rest-api/rule/{ruleId}/matches/add.do
Add rule matches to rule.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ruleId | path | integer | yes | The unique numeric identifier of the rule to add matches to |
Request body (application/json, required): JSON array; each element a JSON object with fields categories, id, include, labels, operator.
Responses: 200 — Rule matches added successfully · 404 — Rule not found · 500 — Internal server error. Errors follow the shared conventions.
POST /rest-api/rule/{ruleId}/matches/remove.do
Remove all rule matches.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ruleId | path | integer | yes | The unique numeric identifier of the rule whose matches should all be removed |
Responses: 200 — All rule matches removed successfully · 404 — Rule not found · 500 — Internal server error. Errors follow the shared conventions.
POST /rest-api/rule/{ruleId}/update.do
Update an existing rule.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ruleId | path | integer | yes | The unique numeric identifier of the rule to update |
Request body (application/json, required): JSON object with fields active, defaultForAdvertiser, defaultForBanner, defaultForCampaign, defaultForPlacement, defaultForSite, defaultForZone, id, name, ruleMatches, type.
Responses: 200 — Rule updated successfully · 404 — Rule not found · 500 — Internal server error. Errors follow the shared conventions.
POST /rest-api/rule/create.do
Create a new rule.
Request body (application/json, required): JSON object with fields active, defaultForAdvertiser, defaultForBanner, defaultForCampaign, defaultForPlacement, defaultForSite, defaultForZone, id, name, ruleMatches, type.
Responses: 200 — Rule created successfully · 500 — Internal server error. Errors follow the shared conventions.
GET /rest-api/rules.do
List all rules.
No parameters beyond authentication.
Responses: 200 — Successfully retrieved rules list · 500 — Internal server error. Errors follow the shared conventions.
POST /rest-api/rules/advertiser/{advertiserId}/add.do
Add rules group to advertiser.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
advertiserId | path | integer | yes | The unique numeric identifier of the advertiser to add the rules group to |
ruleIds | form | array<integer> | yes | Array of rule IDs to include in the new rules group (at least one required) |
include | form | boolean | yes | Whether the rules group is an inclusion (true) or exclusion (false) filter |
operator | form | string | yes | Logical operator for combining rules within the group: AND (all must match) or OR (any must match) Values: AND, OR. |
Responses: 200 — Rules group added successfully · 404 — Advertiser not found. Errors follow the shared conventions.
POST /rest-api/rules/advertiser/{advertiserId}/disable.do
Disable advertiser rules.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
advertiserId | path | integer | yes | The unique numeric identifier of the advertiser whose targeting rules should be disabled |
Responses: 200 — Rules disabled successfully · 404 — Advertiser not found. Errors follow the shared conventions.
POST /rest-api/rules/advertiser/{advertiserId}/enable.do
Enable advertiser rules.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
advertiserId | path | integer | yes | The unique numeric identifier of the advertiser whose targeting rules should be enabled |
Responses: 200 — Rules enabled successfully · 404 — Advertiser not found. Errors follow the shared conventions.
GET /rest-api/rules/advertiser/{advertiserId}/get.do
Get advertiser rules.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
advertiserId | path | integer | yes | The unique numeric identifier of the advertiser whose rules groups should be retrieved |
Responses: 200 — Successfully retrieved rules · 404 — Advertiser not found. Errors follow the shared conventions.
POST /rest-api/rules/advertiser/{advertiserId}/remove.do
Remove rules group from advertiser.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
advertiserId | path | integer | yes | The unique numeric identifier of the advertiser to remove the rules group from |
ruleGroupId | form | integer | yes | The unique numeric identifier of the rules group to remove |
Responses: 200 — Rules group removed successfully · 404 — Advertiser not found, or the rules group is not one of its groups. Errors follow the shared conventions.
GET /rest-api/rules/advertiser/available-rules.do
Get available rules by type.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
type | query | string | yes | The targeting rule type to filter by (e.g. CAMPAIGN or INVENTORY) Values: CAMPAIGN, INVENTORY. |
Responses: 200 — Success. Errors follow the shared conventions.
GET /rest-api/rules/advertiser/available-types.do
Get available rule types.
No parameters beyond authentication.
Responses: 200 — Success. Errors follow the shared conventions.
GET /rest-api/rules/advertiser/show-details.do
Get rule group details.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ruleGroupId | query | integer | yes | The unique numeric identifier of the rule group to retrieve |
Responses: 200 — Success · 404 — No such rule group on an entity of this type that the caller may view. Errors follow the shared conventions.
POST /rest-api/rules/banner/{bannerId}/add.do
Add rules group to banner.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
bannerId | path | integer | yes | The unique numeric identifier of the banner to add the rules group to |
ruleIds | form | array<integer> | yes | Array of rule IDs to include in the new rules group (at least one required) |
include | form | boolean | yes | Whether the rules group is an inclusion (true) or exclusion (false) filter |
operator | form | string | yes | Logical operator for combining rules within the group: AND (all must match) or OR (any must match) Values: AND, OR. |
Responses: 200 — Rules group added successfully · 404 — Banner not found. Errors follow the shared conventions.
POST /rest-api/rules/banner/{bannerId}/disable.do
Disable banner rules.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
bannerId | path | integer | yes | The unique numeric identifier of the banner whose targeting rules should be disabled |
Responses: 200 — Rules disabled successfully · 404 — Banner not found. Errors follow the shared conventions.
POST /rest-api/rules/banner/{bannerId}/enable.do
Enable banner rules.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
bannerId | path | integer | yes | The unique numeric identifier of the banner whose targeting rules should be enabled |
Responses: 200 — Rules enabled successfully · 404 — Banner not found. Errors follow the shared conventions.
GET /rest-api/rules/banner/{bannerId}/get.do
Get banner rules.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
bannerId | path | integer | yes | The unique numeric identifier of the banner whose rules groups should be retrieved |
Responses: 200 — Successfully retrieved rules · 404 — Banner not found. Errors follow the shared conventions.
POST /rest-api/rules/banner/{bannerId}/remove.do
Remove rules group from banner.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
bannerId | path | integer | yes | The unique numeric identifier of the banner to remove the rules group from |
ruleGroupId | form | integer | yes | The unique numeric identifier of the rules group to remove |
Responses: 200 — Rules group removed successfully · 404 — Banner not found, or the rules group is not one of its groups. Errors follow the shared conventions.
GET /rest-api/rules/banner/available-rules.do
Get available rules by type.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
type | query | string | yes | The targeting rule type to filter by (e.g. CAMPAIGN or INVENTORY) Values: CAMPAIGN, INVENTORY. |
Responses: 200 — Success. Errors follow the shared conventions.
GET /rest-api/rules/banner/available-types.do
Get available rule types.
No parameters beyond authentication.
Responses: 200 — Success. Errors follow the shared conventions.
GET /rest-api/rules/banner/show-details.do
Get rule group details.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ruleGroupId | query | integer | yes | The unique numeric identifier of the rule group to retrieve |
Responses: 200 — Success · 404 — No such rule group on an entity of this type that the caller may view. Errors follow the shared conventions.
POST /rest-api/rules/campaign/{campaignId}/add.do
Add rules group to campaign.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
campaignId | path | integer | yes | The unique numeric identifier of the campaign to add the rules group to |
ruleIds | form | array<integer> | yes | Array of rule IDs to include in the new rules group (at least one required) |
include | form | boolean | yes | Whether the rules group is an inclusion (true) or exclusion (false) filter |
operator | form | string | yes | Logical operator for combining rules within the group: AND (all must match) or OR (any must match) Values: AND, OR. |
Responses: 200 — Rules group added successfully · 404 — Campaign not found. Errors follow the shared conventions.
POST /rest-api/rules/campaign/{campaignId}/disable.do
Disable campaign rules.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
campaignId | path | integer | yes | The unique numeric identifier of the campaign whose targeting rules should be disabled |
Responses: 200 — Rules disabled successfully · 404 — Campaign not found. Errors follow the shared conventions.
POST /rest-api/rules/campaign/{campaignId}/enable.do
Enable campaign rules.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
campaignId | path | integer | yes | The unique numeric identifier of the campaign whose targeting rules should be enabled |
Responses: 200 — Rules enabled successfully · 404 — Campaign not found. Errors follow the shared conventions.
GET /rest-api/rules/campaign/{campaignId}/get.do
Get campaign rules.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
campaignId | path | integer | yes | The unique numeric identifier of the campaign whose rules groups should be retrieved |
Responses: 200 — Successfully retrieved rules · 404 — Campaign not found. Errors follow the shared conventions.
POST /rest-api/rules/campaign/{campaignId}/remove.do
Remove rules group from campaign.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
campaignId | path | integer | yes | The unique numeric identifier of the campaign to remove the rules group from |
ruleGroupId | form | integer | yes | The unique numeric identifier of the rules group to remove |
Responses: 200 — Rules group removed successfully · 404 — Campaign not found, or the rules group is not one of its groups. Errors follow the shared conventions.
GET /rest-api/rules/campaign/available-rules.do
Get available rules by type.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
type | query | string | yes | The targeting rule type to filter by (e.g. CAMPAIGN or INVENTORY) Values: CAMPAIGN, INVENTORY. |
Responses: 200 — Success. Errors follow the shared conventions.
GET /rest-api/rules/campaign/available-types.do
Get available rule types.
No parameters beyond authentication.
Responses: 200 — Success. Errors follow the shared conventions.
GET /rest-api/rules/campaign/show-details.do
Get rule group details.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ruleGroupId | query | integer | yes | The unique numeric identifier of the rule group to retrieve |
Responses: 200 — Success · 404 — No such rule group on an entity of this type that the caller may view. Errors follow the shared conventions.
POST /rest-api/rules/placement/{placementId}/add.do
Add rules group to placement.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
placementId | path | integer | yes | The unique numeric identifier of the placement to add the rules group to |
ruleIds | form | array<integer> | yes | Array of rule IDs to include in the new rules group (at least one required) |
include | form | boolean | yes | Whether the rules group is an inclusion (true) or exclusion (false) filter |
operator | form | string | yes | Logical operator for combining rules within the group: AND (all must match) or OR (any must match) Values: AND, OR. |
Responses: 200 — Rules group added successfully · 404 — Placement not found. Errors follow the shared conventions.
POST /rest-api/rules/placement/{placementId}/disable.do
Disable placement rules.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
placementId | path | integer | yes | The unique numeric identifier of the placement whose targeting rules should be disabled |
Responses: 200 — Rules disabled successfully · 404 — Placement not found. Errors follow the shared conventions.
POST /rest-api/rules/placement/{placementId}/enable.do
Enable placement rules.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
placementId | path | integer | yes | The unique numeric identifier of the placement whose targeting rules should be enabled |
Responses: 200 — Rules enabled successfully · 404 — Placement not found. Errors follow the shared conventions.
GET /rest-api/rules/placement/{placementId}/get.do
Get placement rules.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
placementId | path | integer | yes | The unique numeric identifier of the placement whose rules groups should be retrieved |
Responses: 200 — Successfully retrieved rules · 404 — Placement not found. Errors follow the shared conventions.
POST /rest-api/rules/placement/{placementId}/remove.do
Remove rules group from placement.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
placementId | path | integer | yes | The unique numeric identifier of the placement to remove the rules group from |
ruleGroupId | form | integer | yes | The unique numeric identifier of the rules group to remove |
Responses: 200 — Rules group removed successfully · 404 — Placement not found, or the rules group is not one of its groups. Errors follow the shared conventions.
GET /rest-api/rules/placement/available-rules.do
Get available rules by type.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
type | query | string | yes | The targeting rule type to filter by (e.g. CAMPAIGN or INVENTORY) Values: CAMPAIGN, INVENTORY. |
Responses: 200 — Success. Errors follow the shared conventions.
GET /rest-api/rules/placement/available-types.do
Get available rule types.
No parameters beyond authentication.
Responses: 200 — Success. Errors follow the shared conventions.
GET /rest-api/rules/placement/show-details.do
Get rule group details.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ruleGroupId | query | integer | yes | The unique numeric identifier of the rule group to retrieve |
Responses: 200 — Success · 404 — No such rule group on an entity of this type that the caller may view. Errors follow the shared conventions.
POST /rest-api/rules/site/{siteId}/add.do
Add rules group to site.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | The unique numeric identifier of the site to add the rules group to |
ruleIds | form | array<integer> | yes | Array of rule IDs to include in the new rules group (at least one required) |
include | form | boolean | yes | Whether the rules group is an inclusion (true) or exclusion (false) filter |
operator | form | string | yes | Logical operator for combining rules within the group: AND (all must match) or OR (any must match) Values: AND, OR. |
Responses: 200 — Rules group added successfully · 404 — Site not found. Errors follow the shared conventions.
POST /rest-api/rules/site/{siteId}/disable.do
Disable site rules.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | The unique numeric identifier of the site whose targeting rules should be disabled |
Responses: 200 — Rules disabled successfully · 404 — Site not found. Errors follow the shared conventions.
POST /rest-api/rules/site/{siteId}/enable.do
Enable site rules.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | The unique numeric identifier of the site whose targeting rules should be enabled |
Responses: 200 — Rules enabled successfully · 404 — Site not found. Errors follow the shared conventions.
GET /rest-api/rules/site/{siteId}/get.do
Get site rules.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | The unique numeric identifier of the site whose rules groups should be retrieved |
Responses: 200 — Successfully retrieved rules · 404 — Site not found. Errors follow the shared conventions.
POST /rest-api/rules/site/{siteId}/remove.do
Remove rules group from site.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | The unique numeric identifier of the site to remove the rules group from |
ruleGroupId | form | integer | yes | The unique numeric identifier of the rules group to remove |
Responses: 200 — Rules group removed successfully · 404 — Site not found, or the rules group is not one of its groups. Errors follow the shared conventions.
GET /rest-api/rules/site/available-rules.do
Get available rules by type.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
type | query | string | yes | The targeting rule type to filter by (e.g. CAMPAIGN or INVENTORY) Values: CAMPAIGN, INVENTORY. |
Responses: 200 — Success. Errors follow the shared conventions.
GET /rest-api/rules/site/available-types.do
Get available rule types.
No parameters beyond authentication.
Responses: 200 — Success. Errors follow the shared conventions.
GET /rest-api/rules/site/show-details.do
Get rule group details.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ruleGroupId | query | integer | yes | The unique numeric identifier of the rule group to retrieve |
Responses: 200 — Success · 404 — No such rule group on an entity of this type that the caller may view. Errors follow the shared conventions.
POST /rest-api/rules/zone/{zoneId}/add.do
Add rules group to zone.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
zoneId | path | integer | yes | The unique numeric identifier of the zone to add the rules group to |
ruleIds | form | array<integer> | yes | Array of rule IDs to include in the new rules group (at least one required) |
include | form | boolean | yes | Whether the rules group is an inclusion (true) or exclusion (false) filter |
operator | form | string | yes | Logical operator for combining rules within the group: AND (all must match) or OR (any must match) Values: AND, OR. |
Responses: 200 — Rules group added successfully · 404 — Zone not found. Errors follow the shared conventions.
POST /rest-api/rules/zone/{zoneId}/disable.do
Disable zone rules.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
zoneId | path | integer | yes | The unique numeric identifier of the zone whose targeting rules should be disabled |
Responses: 200 — Rules disabled successfully · 404 — Zone not found. Errors follow the shared conventions.
POST /rest-api/rules/zone/{zoneId}/enable.do
Enable zone rules.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
zoneId | path | integer | yes | The unique numeric identifier of the zone whose targeting rules should be enabled |
Responses: 200 — Rules enabled successfully · 404 — Zone not found. Errors follow the shared conventions.
GET /rest-api/rules/zone/{zoneId}/get.do
Get zone rules.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
zoneId | path | integer | yes | The unique numeric identifier of the zone whose rules groups should be retrieved |
Responses: 200 — Successfully retrieved rules · 404 — Zone not found. Errors follow the shared conventions.
POST /rest-api/rules/zone/{zoneId}/remove.do
Remove rules group from zone.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
zoneId | path | integer | yes | The unique numeric identifier of the zone to remove the rules group from |
ruleGroupId | form | integer | yes | The unique numeric identifier of the rules group to remove |
Responses: 200 — Rules group removed successfully · 404 — Zone not found, or the rules group is not one of its groups. Errors follow the shared conventions.
GET /rest-api/rules/zone/available-rules.do
Get available rules by type.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
type | query | string | yes | The targeting rule type to filter by (e.g. CAMPAIGN or INVENTORY) Values: CAMPAIGN, INVENTORY. |
Responses: 200 — Success. Errors follow the shared conventions.
GET /rest-api/rules/zone/available-types.do
Get available rule types.
No parameters beyond authentication.
Responses: 200 — Success. Errors follow the shared conventions.
GET /rest-api/rules/zone/show-details.do
Get rule group details.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ruleGroupId | query | integer | yes | The unique numeric identifier of the rule group to retrieve |
Responses: 200 — Success · 404 — No such rule group on an entity of this type that the caller may view. Errors follow the shared conventions.
GET /rest-api/target/advertiser/{advertiserId}/blocked-placements.do
Get blocked placements targetings.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
advertiserId | path | integer | yes | Unique numeric ID of the advertiser |
Responses: 200 — Success · 404 — Advertiser not found · 500 — Internal server error. Errors follow the shared conventions.
GET /rest-api/target/advertiser/{advertiserId}/blocked-sites.do
Get blocked sites targetings.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
advertiserId | path | integer | yes | Unique numeric ID of the advertiser |
Responses: 200 — Success · 404 — Advertiser not found · 500 — Internal server error. Errors follow the shared conventions.
GET /rest-api/targeting/country/region/city/values.do
Get city values.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
countryCode | query | string | yes | ISO country code |
regionName | query | string | yes | Region name as returned by the region values endpoint |
Responses: 200 — Success · 500 — Internal server error · 503 — The geo service did not answer; retry later. Errors follow the shared conventions.
GET /rest-api/targeting/country/region/values.do
Get region values.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
countryCode | query | string | yes | ISO country code |
Responses: 200 — Success · 500 — Internal server error · 503 — The geo service did not answer; retry later. Errors follow the shared conventions.
GET /rest-api/targeting/country/values.do
Get country values.
No parameters beyond authentication.
Responses: 200 — Success · 500 — Internal server error · 503 — The geo service holding the country list did not answer; retry later. Errors follow the shared conventions.
GET /rest-api/targeting/dmp/{dmp}/segments.do
Get DMP segments.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
dmp | path | string | yes | DMP — enum name or numeric ID Values: FIRST_PARTY, DTSCOUT, AIDATA, LOTAME, SITEMATH, MEDIAQUARK, JOTTIX. |
parentId | query | integer | no | Optional parent segment ID; omit for the top level |
Responses: 200 — Success; empty when parentId is not a segment of this DMP · 404 — Not found — resource does not exist · 500 — Internal server error. Errors follow the shared conventions.
GET /rest-api/targeting/dmp/values.do
Get DMP values.
No parameters beyond authentication.
Responses: 200 — Success · 500 — Internal server error. Errors follow the shared conventions.
GET /rest-api/targeting/language/values.do
Get language values.
No parameters beyond authentication.
Responses: 200 — Success · 500 — Internal server error. Errors follow the shared conventions.
GET /rest-api/targeting/mobile-carrier/bycountry/values.do
Get mobile carrier values by country.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
countryCode | query | string | no | Optional ISO country code to filter mobile carriers by country (e.g., US, GB, DE), under the name the other targeting value operations use |
country | query | string | no | The same filter under its older name; countryCode wins when both are sent |
Responses: 200 — Success · 500 — Internal server error · 503 — The geo service did not answer. Errors follow the shared conventions.
GET /rest-api/targeting/operating-system/{osName}/versions.do
Get OS versions.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
osName | path | string | yes | Operating system. Accepts enum name or integer ID for backward compatibility Values: UNSPECIFIED, WINDOWS, LINUX, MAC_OS_X, IOS, IPADOS, ANDROID, SYMBIAN, J2ME, BLACKBERRY, XMB, BADA, PALM_OS, SOLARIS, MEEGO, CHROME_OS, FREE_BSD, WINDOWS_PHONE, SAMSUNG_TIZEN, HISENSE_VIDAA, LG_WEB_OS, ROKU_TV_OS, AMAZON_FIRE_TV, APPLE_TV, ANDROID_TV. |
Responses: 200 — Success · 404 — Not found — resource does not exist · 500 — Internal server error. Errors follow the shared conventions.
GET /rest-api/targeting/operating-system/values.do
Get OS values.
No parameters beyond authentication.
Responses: 200 — Success · 500 — Internal server error. Errors follow the shared conventions.
Related
- REST API overview — authentication and conventions
- API endpoint reference by tag
- Targeting, capping and limits via API