# 네이티브 광고 리포트

{% hint style="info" %}
SSP :arrow\_right: DSP
{% endhint %}

본 문서는 TARGETPICK DSP(Demand Side Platform)와 연동한 SSP(Supply Side Platform) 파트너에게 리포트를 제공하기 위한 API 가이드 입니다. \
TARGETPICK 으로 DSP 리포트를 제공받기 위해서는 CJ 메조미디어 담당자에게 Token을 발급 받아야 사용이 가능합니다. \
API 사용을 위한 Token 발행은 지정 담당자에게 문의해주시기 바랍니다.

## **리포트 데이터 요청**

<table><thead><tr><th width="217">기본 정보</th><th>설명</th></tr></thead><tbody><tr><td>서비스 API명</td><td>SSP 제공 리포트 데이터</td></tr><tr><td>API 호출 결과 타입</td><td>XML or JSON</td></tr><tr><td>인증 방법</td><td>Token</td></tr><tr><td>호출 방법</td><td>HTTPS</td></tr><tr><td>API 설명</td><td>SSP에 광고를 집행한 결과 리포트를 전달합니다.</td></tr></tbody></table>

### **URL**

<table><thead><tr><th width="129">구분</th><th width="487">URL</th><th>Method</th></tr></thead><tbody><tr><td>테스트</td><td>http://211.62.152.212:9000/api/report</td><td>Get</td></tr><tr><td>상용</td><td>https://dsp-report.meba.kr:9000/api/report</td><td>Get</td></tr></tbody></table>

### **Parameters**

<table><thead><tr><th width="137">Field</th><th width="101">타입</th><th width="77">필수</th><th width="136">코드 예시</th><th>설명</th></tr></thead><tbody><tr><td>sDate</td><td>String</td><td>Y</td><td>20160101</td><td>리포트 조회 시작일</td></tr><tr><td>eDate</td><td>String</td><td>Y</td><td>20160131</td><td>리포트 조회 종료일</td></tr><tr><td>PartnerID</td><td>String</td><td>Y</td><td>userpartnerid</td><td>메조미디어에서 발급한 파트너 고유 ID</td></tr><tr><td>Token</td><td>String</td><td>Y</td><td>F379C8K9P0</td><td>API 사용을 위한 파트너 고유 Token 값</td></tr><tr><td>ADType</td><td>Integer</td><td>Y</td><td>10</td><td>0 - ALL : 전체<br>10 - native : 네이티브</td></tr><tr><td>ReportType</td><td>Integer</td><td>Y</td><td>1</td><td>1 - 일자별 리포트<br>2 - 미디어별(PubID) 리포트<br>3 - 광고 타입별 리포트<br></td></tr><tr><td>format</td><td>String</td><td>Y</td><td>json</td><td>json , xml</td></tr></tbody></table>

### **Sample**

| Sample URL                                                                                                                                                          |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <http://211.62.152.212:9000/api/report?PartnerID=abcde12345\\&token=C150KPTR39F0277A743B6\\&format=xml\\&ReportType=1\\&ADType=0\\&sDate=20190101\\&eDate=20190131> |

## **리포트 데이터 응답**

기본 정보 - 리포트 API로 Request 시 아래의 양식으로 리포트 데이터가 반환됩니다.

<table><thead><tr><th width="133">이름</th><th width="92">타입</th><th width="126">전달 값 예시</th><th>설명</th></tr></thead><tbody><tr><td>ListCount</td><td>Integer</td><td>100</td><td>반환되는 리스트 행 수</td></tr><tr><td>ReportType</td><td>Integer</td><td>1</td><td>1 - 일자별 리포트<br>2 - 미디어별(PubID) 리포트<br>3 - 광고 타입별 리포트</td></tr><tr><td>Date</td><td>String</td><td>20160101</td><td>리포팅 일자</td></tr><tr><td>Imp</td><td>Integer</td><td>1000</td><td>노출 횟수</td></tr><tr><td>Click</td><td>Integer</td><td>100</td><td>클릭 횟수</td></tr><tr><td>CTR</td><td>Double</td><td>10.00</td><td>노출 대비 클릭율</td></tr><tr><td>PubID</td><td>String</td><td>publisher123</td><td>미디어를 식별할 수 있는 ID로 AppID 또는 SiteID<br>(난수 또는 암호화된 ID 가능)</td></tr><tr><td>Revenue</td><td>Double</td><td>100000</td><td>메조미디어에서 지급해야 할 인벤토리 구매 비용</td></tr></tbody></table>

### **Sample**

#### **일자별 리포트 (ReportType=1)**

{% code lineNumbers="true" %}

```xml
<?xml version="1.0" encoding="utf-8" ?>
<data>
	<error>
		<code>000</error>
		<message>SUCCESS</message>
	</error>
	<result>
		<ListCount>10</ListCount> 
		<ReportType>1</ReportType> 
		<sDate>20190101</sDate> 
		<eDate>20190131</eDate> 
		<ADType>ALL</ADType> 
		<Reports>
			<Report>
				<Date>20190101</Date>
				<Imp>1000</Imp>
				<Click>100</Click>
				<CTR>10.00</CTR>
				<Revenue>5000</Revenue>
			</Report>
			<Report>
				……
			</Report>
		</Reports>
	</result>
</data>

```

{% endcode %}

#### **미디어별 리포트 (ReportType=2)**

{% code lineNumbers="true" %}

```xml
<?xml version="1.0" encoding="utf-8" ?>
<data>
	<error>
		<code>000</error>
		<message>SUCCESS</message>
	</error>
	<result>
		<ListCount>10</ListCount> 
		<ReportType>2</ReportType> 
		<sDate>20160101</sDate> 
		<eDate>20160131</eDate> 
		<ADType>banner</ADType> 
		<Reports>
			<Report>
				<Date>20160101</Date>
				<PubID>publisher123</PubID>
				<Imp>1000</Imp>
				<Click>100</Click>
				<CTR>10.00</CTR>
				<Revenue>5000</Revenue>
			</Report>
			<Report>
				<Date>20160101</Date>
				<PubID>publisher456</PubID>
				<Imp>1000</Imp>
				<Click>100</Click>
				<CTR>10.00</CTR>
				<Revenue>3000</Revenue>
			</Report>
			<Report>
				……
			</Report>
		</Reports>
	</result>
</data> xml version="1.0" encoding="utf-8" ?>
<data>
	<error>
		<code>000</error>
		<message>SUCCESS</message>
	</error>
	<result>
		<ListCount>10</ListCount> 
		<ReportType>1</ReportType> 
		<sDate>20160101</sDate> 
		<eDate>20160131</eDate> 
		<ADType>ALL</ADType> 
		<Reports>
			<Report>
				<Date>20160101</Date>
				<Imp>1000</Imp>
				<Click>100</Click>
				<CTR>10.00</CTR>
				<Revenue>5000</Revenue>
			</Report>
			<Report>
				……
			</Report>
		</Reports>
	</result>
</data>
```

{% endcode %}

#### **광고 타입별 리포트 (ReportType=3)**

{% code lineNumbers="true" %}

```xml
<?xml version="1.0" encoding="utf-8" ?>
<data>
	<error>
		<code>000</error>
		<message>SUCCESS</message>
	</error>
	<result>
		<ListCount>10</ListCount> 
		<ReportType>3</ReportType> 
		<sDate>20160101</sDate> 
		<eDate>20160131</eDate> 
		<ADType>ALL</ADType> 
		<Reports>
			<Report>
				<Date>20160101</Date>
				<ADType>banner</ADType>
				<Imp>1000</Imp>
				<Click>100</Click>
				<CTR> 10.00</CTR>
				<Revenue>5000</Revenue>
			</Report>
			<Report>
				<Date>20160101</Date>
				<ADType>interstitial</ADType> 
				<Imp>1000</Imp>
				<Click>100</Click>
				<CTR> 10.00</CTR>
				<Revenue>3000</Revenue>
			</Report>
			<Report>
				……
			</Report>
		</Reports>
	</result>
</data>
```

{% endcode %}

#### **Error Code**

<table><thead><tr><th width="180">Code</th><th>Descirption</th></tr></thead><tbody><tr><td>000</td><td>성공</td></tr><tr><td>001</td><td>시스템에 에러가 발생했습니다.</td></tr><tr><td>002</td><td>알 수 없는 오류가 발생했습니다.</td></tr><tr><td>003</td><td>조회 권한이 없습니다.</td></tr><tr><td>004</td><td>존재하지 않는 API 입니다.</td></tr><tr><td>005</td><td>Parameter 정보가 잘못되었습니다.</td></tr><tr><td>006</td><td>날짜는 반드시 입력해야 하며, 세 달을 초과 할 수 없습니다.</td></tr></tbody></table>

#### **Error Response Sample**

{% code lineNumbers="true" %}

```xml
<?xml version="1.0" encoding="utf-8" ?>
<data>
	<error>
		<code>000</code> 
		<message>SUCCESS</message> 
	</error>
</data>
```

{% endcode %}


---

# Agent Instructions: 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:

```
GET https://docs.targetpick.io/for-ssp/report-api/native.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
