> For the complete documentation index, see [llms.txt](https://adpopcornssp.gitbook.io/ssp-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://adpopcornssp.gitbook.io/ssp-sdk/undefined-2/api/publisher-api-report.md).

# Publisher API (Report)

{% hint style="info" %}
매일 오후12시 00분에 <mark style="color:orange;">**2일 전**</mark> 데이터가 확정되고, 12시 05분 이후에 조회 가능합니다.
{% endhint %}

## URL

* <https://sspi-ext-report.adpopcorn.com/v1/analytics/data>

## Method

* GET

## Request Headers

<table><thead><tr><th width="154">Name</th><th width="81">Type</th><th width="153">Value</th><th width="69" align="center">필수</th><th>설명</th></tr></thead><tbody><tr><td>Authorization</td><td>string</td><td>Bearer ${access_token}</td><td align="center"><mark style="color:red;">Y</mark></td><td>생성된 액세스 토큰을 ${access_token} 자리에 넣어 인증에 사용하세요.</td></tr></tbody></table>

<pre class="language-bash" data-overflow="wrap" data-full-width="false"><code class="lang-bash"><strong>$ curl "https://sspi-ext-report.adpopcorn.com/v1/analytics/data?fromDate=20220101&#x26;toDate=20220101" -H "Authorization: Bearer test_access_token" -L
</strong></code></pre>

## Parameter

<table><thead><tr><th width="156">Parameter</th><th width="95">Type</th><th width="65" align="center">필수</th><th>설명</th></tr></thead><tbody><tr><td>fromDate</td><td>string</td><td align="center"><mark style="color:red;">Y</mark></td><td>시작일 (yyyyMMdd)</td></tr><tr><td>toDate</td><td>string</td><td align="center"><mark style="color:red;">Y</mark></td><td>종료일 (yyyyMMdd)</td></tr><tr><td>country</td><td>numeric</td><td align="center">N</td><td>0 or 1 (default: 0)</td></tr></tbody></table>

## Content-Type

* application/json

## Response Body

<table><thead><tr><th width="188">Body parameter</th><th width="142">Type</th><th>설명</th></tr></thead><tbody><tr><td>alert</td><td>string</td><td>서버에서 전송된 알림 메시지. 대부분의 경우 null일 것입니다. 예시: "alert": null</td></tr><tr><td>records</td><td>Array of object</td><td>리포트 데이터</td></tr></tbody></table>

<table><thead><tr><th width="201">ID</th><th width="130">Type</th><th>설명</th></tr></thead><tbody><tr><td>report_date</td><td>string</td><td>날짜</td></tr><tr><td>media_key</td><td>string</td><td>노출 요청이 발생한 미디어의 키</td></tr><tr><td>placement_id</td><td>string</td><td>노출 요청이 발생한 지면 ID</td></tr><tr><td>thirdparty_id</td><td>numeric</td><td><a href="#undefined-2">서드파티 리스트</a></td></tr><tr><td>report_type</td><td>numeric</td><td>1: 애드팝콘 SSP, 3: 헤더비딩, 4: 미디에이션</td></tr><tr><td>country</td><td>string</td><td>국가 코드 (<em><code>country=1</code> 일 경우</em>)</td></tr><tr><td>request_value</td><td>numeric</td><td>요청 수 (<em>서드파티가 데이터를 제공하지 않을 경우 0으로 표시</em>)</td></tr><tr><td>response_value</td><td>numeric</td><td>응답 수 (<em>앱 매체에 한함, 서드파티가 데이터를 제공하지 않을 경우 0으로 표시</em>)</td></tr><tr><td>impression_value</td><td>numeric</td><td>노출 수</td></tr><tr><td>click_value</td><td>numeric</td><td>클릭 수</td></tr><tr><td>media_cost</td><td>numeric</td><td>revenue (USD)</td></tr></tbody></table>

{% tabs %}
{% tab title="200" %}
{% code title="json" %}

```json
{
	"alert": null,
	"records": [
		{
			"report_date": "20220101",
			"media_key": "test_media",
			"placement_id": "test_placement",
			"thirdparty_id": 0,
			"report_type": 1,
			"request_value": 23456,
			"response_value": 20000,
			"impression_value": 12345,
			"click_value": 10,
			"media_cost": 123.123456
		}
	]
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

## 서버 응답 코드

아래 표는 Adpopcorn API 플랫폼에서 REST API 응답으로 전송되는 일반적인 HTTP 상태 코드를 나열한 것입니다.

<table><thead><tr><th width="126">Code</th><th width="173">메세지</th><th>설명</th></tr></thead><tbody><tr><td>200</td><td>성공</td><td>요청이 성공적으로 처리되었습니다.</td></tr><tr><td>400</td><td>client-side 에러</td><td>유효성 검사에 실패했습니다.</td></tr><tr><td>401</td><td>인증되지 않음</td><td>인증 또는 권한 부여 실패가 발생했습니다.</td></tr><tr><td>500</td><td>API-side 에러</td><td>Adpopcorn API 플랫폼에 문제가 발생했습니다.</td></tr></tbody></table>

## 서드파티 리스트

| ID   | Name                            | Type |
| ---- | ------------------------------- | ---- |
| 1    | AdMob                           | App  |
| 3    | MoPub                           | App  |
| 4    | Cauly                           | App  |
| 5    | Mezzomedia                      | App  |
| 6    | Mobon                           | App  |
| 7    | Unity                           | App  |
| 8    | Mintegral                       | App  |
| 9    | FAN (Facebook Audience Network) | App  |
| 10   | AdFit                           | App  |
| 12   | Criteo                          | App  |
| 14   | Vungle                          | App  |
| 16   | Fyber                           | App  |
| 17   | TapJoy                          | App  |
| 18   | Pangle                          | App  |
| 19   | GAM (Google Ad Manager)         | App  |
| 21   | AppLovin (Waterfall)            | App  |
| 22   | NAM (Naver Ad Manager)          | App  |
| 23   | AppLovin (Bidding)              | App  |
| 24   | ADOP                            | App  |
| 25   | Coupang (CPM)                   | App  |
| 26   | MobWith                         | App  |
| 27   | AyetStudios                     | App  |
| 28   | ADforus                         | App  |
| 29   | ADOP\_GAM                       | App  |
| 30   | ADforus\_GAM                    | App  |
| 32   | MAF                             | App  |
| 33   | Adjoe                           | App  |
| 34   | Fluct (Admob)                   | App  |
| 36   | Fluct (GAM)                     | App  |
| 37   | Inmobi                          | App  |
| 38   | H5                              | App  |
| 39   | Maio                            | App  |
| 80   | Rainbow8 (Reward Banner)        | App  |
| 81   | NHNAce (Reward Banner)          | App  |
| 82   | MobWith (Reward Banner)         | App  |
| 83   | Mezzomedia (Reward Banner)      | App  |
| 84   | Ebay (Reward Banner)            | App  |
| 85   | Coupang (Reward Banner)         | App  |
| 86   | ADOP (Reward Banner)            | App  |
| 87   | Mobon (Reward Banner)           | App  |
| 88   | Digital camp (Reward Banner)    | App  |
| 89   | Admixer (Reward Banner)         | App  |
| 90   | Appier (Reward Banner)          | App  |
| 1500 | Interworksmedia                 | Web  |
| 1501 | ADON                            | Web  |
| 1504 | Mobon                           | Web  |
| 1505 | Widerplanet                     | Web  |
| 1506 | MobWith                         | Web  |
| 1607 | Across adx                      | Web  |
| 1508 | NHNAceToast                     | Web  |
| 1509 | Mezzomedia Targetpick           | Web  |
| 1510 | Coupang                         | Web  |
| 1511 | Neo Interactive                 | Web  |
| 1512 | Digitalcamp                     | Web  |
| 1513 | NextPaper                       | Web  |
| 1514 | EDNPlus                         | Web  |
| 1515 | ADOP                            | Web  |
| 1516 | Adfit                           | Web  |
| 1517 | NAM                             | Web  |
