> For the complete documentation index, see [llms.txt](https://help.citrusad.com/retail-media-interface/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.citrusad.com/retail-media-interface/integration/ko/data-api/api-overview/ad-generation-filtering-1.md).

# 광고 생성 필터링

광고를 요청할 때 고객이 브랜드, 카테고리, 식이 제한 등으로 필터링하는 기능을 지원하는 것을 목표로 해야 합니다. 이커머스 사이트에서 및/또는 기능을 사용하는 필터링을 지원하는 경우, Epsilon Retail Media 요청에 추가적인 `filterMode` 매개변수를 사용하여 이를 지원할 수 있습니다.

아래 설명된 바와 같이 두 가지 유형의 필터링이 있습니다.

## `andOr` 필터링(권장)

`andOr` 필터링은 사용자가 검색에서 깊이 필터링한 컨텍스트에 유용합니다. 더 심층적인 필터링을 지원하면서도 더 단순한 컨텍스트 포맷팅을 가능하게 합니다. 이 방법은 아래에 설명된 구조를 따릅니다.

```json
"productFilters": [
     [ "" OR "" ] AND [ "" OR "" ] AND [ "" OR "" ]
    ],
    "options": {
     "filterMode": "AndOr"
    },
```

요청 예시는 다음과 같습니다.

```http
POST $BASE_URL/v1/ads/generate HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic <API_KEY>
{
    "customerId": "wertg5432a",
    "sessionId": "ec9-4e07-881d-3e9",
    "placement": "category",
    "catalogId": "628dbe95-2ec9-4e07-881d-3e9f92ab2e0b",
    "productFilters": [
     	 ["category:bread"],
    	 ["brand:brandA","brand:brandB"],
    	 ["price:below $10"],
    	 ["nutrition:organic","nutrition:vegan"]
    ],
    "options": {
   							 "filterMode": "AndOr"
 							 },
    "maxNumberOfAds": 3
}
```

이 방식은 일반적으로 고객이 검색을 깊게 필터링할 때 리테일러가 유형별로 요청을 연결하기 더 쉽습니다.

{% hint style="warning" %}
이 기능이 올바르게 작동하려면 다음을 지정해야 합니다: `filterMode` of `andOr` .
{% endhint %}

## `orAnd` 필터링(기본 모드)

상품 필터를 필터링하는 기본 방법은 아래에 설명된 구조를 따릅니다.

```json
"productFilters": [
     [ "" AND "" ], OR [ "" AND "" ], OR [ "" AND "" ]
    ],
    "options": {
     "filterMode": "OrAnd"
    },
```

위에서 제시된 동일한 예시는 다음과 같은 요청으로 전송됩니다.

```http
POST $BASE_URL/v1/ads/generate HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic <API_KEY>
{
    "customerId": "wertg5432a",
    "sessionId": "ec9-4e07-881d-3e9",
    "placement": "category",
    "catalogId": "628dbe95-2ec9-4e07-881d-3e9f92ab2e0b",
    "productFilters": [
     	 ["category:bread","brand:brandA","price:below $10","nutrition:organic"],
     	 ["category:bread","brand:brandB","price:below $10","nutrition:organic"],
     	 ["category:bread","brand:brandA","price:below $10","nutrition:vegan"],
     	 ["category:bread","brand:brandB","price:below $10","nutrition:vegan"],
    ],
    "options": {
   							 "filterMode": "OrAnd"
 							 },
    "maxNumberOfAds": 3
}
```

{% hint style="info" %}
이 기능은 기본 동작이므로 지정할 필요가 없습니다: `filterMode` of `orAnd` .
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.citrusad.com/retail-media-interface/integration/ko/data-api/api-overview/ad-generation-filtering-1.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
