---
title: "Get banner rules"
type: reference
method: GET
path: /rest-api/rules/banner/{bannerId}/get.do
tag: "Targeting Rules"
---

# Get banner rules

`GET https://YOUR-NETWORK-DOMAIN/rest-api/rules/banner/{bannerId}/get.do`

Retrieves all targeting rules groups currently assigned to the specified banner. The response JSON contains 'success: true', a 'ruleGroups' array with each group's ID, rules, operator, and include/exclude flag, and 'rulesEnabled'. The groups are listed whether or not rules are switched on for the banner; they take effect only while rulesEnabled is true.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `bannerId` | integer | yes | `7890` | The unique numeric identifier of the banner whose rules groups should be retrieved |

## Responses

- `200` — Successfully retrieved rules
- `400` — Bad request — invalid or missing parameters
- `401` — Unauthorized - authentication error
- `403` — Forbidden - insufficient permissions
- `404` — Banner not found

## Example request

```bash
curl --request GET \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/rules/banner/7890/get.do' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

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