---
title: "Set how banner targeting rule types combine"
type: reference
method: POST
path: /rest-api/banner/{bannerId}/targeting/operation-between-rule-types.do
tag: "Targeting Rules"
---

# Set how banner targeting rule types combine

`POST https://YOUR-NETWORK-DOMAIN/rest-api/banner/{bannerId}/targeting/operation-between-rule-types.do`

Sets whether the banner's rule types must all match (AND) or any one of them is enough (OR). Rules of the same type always combine with OR. Requires UPDATE permission on the banner's campaign, MANAGE_DEMAND_TARGETING and MANAGE_OPERATION_BETWEEN_TARGETING_RULE_TYPES user permissions.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `bannerId` | integer | yes | `7890` | Unique numeric ID of the banner |

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `operator` | string | yes | `AND` | AND — every rule type must match; OR — any one rule type is enough |

## Responses

- `200` — Success — the response carries the saved operationBetweenRuleTypes
- `400` — Missing or unknown operator
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Banner not found
- `500` — Internal server error

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/banner/7890/targeting/operation-between-rule-types.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'operator=AND'
```

Source: https://epom.com/ad-server/docs/api/targeting-rules/post-banner-targeting-operation-between-rule-types