# DSP Report API

## URL

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

## Method

* GET

## Request Headers

<table><thead><tr><th width="154">Name</th><th width="79">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>

{% code overflow="wrap" %}

```bash
$ curl "https://sspi-ext-report.adpopcorn.com/v1/analytics/data?fromDate=20220101&toDate=20220101" -H "Authorization: Bearer test_access_token" -L
```

{% endcode %}

## Parameter

<table><thead><tr><th width="156">Parameter</th><th width="83">Type</th><th width="65">필수</th><th>설명</th></tr></thead><tbody><tr><td>fromDate</td><td>string</td><td><mark style="color:red;">Y</mark></td><td>시작일</td></tr><tr><td>toDate</td><td>string</td><td><mark style="color:red;">Y</mark></td><td>종료일</td></tr></tbody></table>

## Content-Type

* application/json

## Response parameter

<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>impression_value</td><td>string</td><td>노출 수</td></tr><tr><td>advertise_cost</td><td>string</td><td>revenue</td></tr></tbody></table>

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

```json
{
	"alert": null,
	"records": [
		{
			"report_date": "20220101",
			"impression_value": 12345,
			"advertise_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>


---

# 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://adpopcornssp.gitbook.io/ssp-sdk/undefined-2/api/dsp-report-api.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.
