---
title: "List what an entity's rules and links match"
type: reference
method: GET
path: /rest-api/matched/{entityType}/{entityId}.do
tag: "Targeting Rules"
---

# List what an entity's rules and links match

`GET https://YOUR-NETWORK-DOMAIN/rest-api/matched/{entityType}/{entityId}.do`

Lists the entities on the other side of the auction that the entity is matched with, as the console's Matched Placements card (on an advertiser, campaign or banner) and Matched Ads card (on a site, zone or placement) do. A demand-side entity (ADVERTISER, CAMPAIGN, BANNER) is matched with SITE, ZONE or PLACEMENT; a supply-side one with ADVERTISER, CAMPAIGN or BANNER — pick which with returnType (PLACEMENT or BANNER when omitted). matchByRules lists what the rules of the entity and of its parents match; matchLinked lists what is linked to it; with both, either counts. Only entities the caller may see are listed. Needs view rights on the entity, view rights on campaigns and inventory, and the Matched Inventory permission (for returnType SITE, ZONE or PLACEMENT) or the Matched Advertisers permission (for ADVERTISER, CAMPAIGN or BANNER).

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `entityType` | string | yes | `CAMPAIGN` | Type of the entity whose matches are listed |
| `entityId` | integer | yes | `2001` | Id of the entity whose matches are listed |

## Query params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `categories` | array<integer> | no | `12` | Category ids; only entities in one of them are listed |
| `hideInactive` | boolean | no | `false` | Leave inactive entities out |
| `labels` | array<string> | no | `premium` | Label names; only entities carrying one of them are listed |
| `limit` | integer | no | `50` | Page size, 1 to 500 |
| `matchByRules` | boolean | no | `true` | List what the rules of the entity and its parents match |
| `matchLinked` | boolean | no | `true` | List what is linked to the entity |
| `name` | string | no | `Sports` | Substring of the name |
| `parentId` | integer | no | `3001` | Only the children of this entity, e.g. the zones of site 3001 (with parentType SITE) |
| `parentType` | string | no | `SITE` | Type of parentId |
| `returnType` | string | no | `PLACEMENT` | 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 |
| `start` | integer | no | `0` | 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}]}
- `400` — returnType is on the entity's own side, or start/limit is out of range
- `401` — Authentication error
- `403` — No view rights on the entity, or the matched-inventory/matched-advertisers permission is off
- `404` — The entity does not exist or is deleted

## Example request

```bash
curl --request GET \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/matched/CAMPAIGN/2001.do?name=Sports&categories=12&hideInactive=false' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

Source: https://epom.com/ad-server/docs/api/targeting-rules/get-matched