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

# Set how site targeting rule types combine

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

Sets whether the site'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 site, MANAGE_SUPPLY_PRE_TARGETING and MANAGE_OPERATION_BETWEEN_TARGETING_RULE_TYPES user permissions.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `siteId` | integer | yes | `3001` | Unique numeric ID of the site |

## 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` — Site not found
- `500` — Internal server error

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/site/3001/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-site-targeting-operation-between-rule-types