> 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/extra-guide/coupang/api/api.md).

# 쿠팡 일별 리포트 API

## URL

* <https://sspi-cps-report.adpopcorn.com/dailyreport?reportkey=xxxxxx1k0i1d4a6e2i5g0ajwyobrks\\&startdate=20210816\\&enddate=20210816\\&reporttype=1>

## Method

* GET

## Content-Type

* application/json

## Parameter

<table><thead><tr><th>파라미터</th><th width="309">설명</th><th width="101">필수</th><th>예시</th></tr></thead><tbody><tr><td>startdate</td><td>시작일</td><td><mark style="color:red;">Y</mark></td><td>20210815</td></tr><tr><td>enddate</td><td>종료일</td><td><mark style="color:red;">Y</mark></td><td>20210816</td></tr><tr><td>reportkey</td><td>인증을 위한 매체별 리포트 키(SSP 사업팀에 문의)</td><td><mark style="color:red;">Y</mark></td><td>xxxxxx1k0i1d4a6e2i5g0ajwyobrks</td></tr><tr><td>reporttype</td><td>리포트타입</td><td>N</td><td>1(default) or 2 or 3</td></tr></tbody></table>

<table><thead><tr><th width="139">reporttype</th><th>설명</th></tr></thead><tbody><tr><td>1</td><td>sub_id 별 리포트 (default)</td></tr><tr><td>2</td><td>sub_id 별 publisher_id를 구분한 리포트. 단, 클릭 데이터가 제공되지 않음</td></tr><tr><td>3</td><td>쿠팡 리포트 API를 통해 수집된 데이터. 전일 데이터는 익일 오후 12시 30분 이후 조회 가능</td></tr></tbody></table>

## 제약 사항

* 조회 기간은 <mark style="color:red;">최대 7일</mark> 입니다.

## Response

<table><thead><tr><th width="157">key</th><th width="192">Type</th><th>설명</th></tr></thead><tbody><tr><td>result</td><td>boolean</td><td>리포트 조회 결과</td></tr><tr><td>resultCode</td><td>int</td><td>리포트 조회 결과 코드</td></tr><tr><td>resultMessage</td><td>string</td><td>리포트 조회 결과 메시지</td></tr><tr><td>report</td><td>array of object</td><td>리포트 (아래 예시 참고)</td></tr></tbody></table>

{% tabs %}
{% tab title="200 : reportType=1" %}
{% code title="json" %}

```json
{
  "Result": true,
  "ResultCode": 1,
  "ResultMessage": "success",
  "Report": [
    {
      "report_date": "20210812",
      "sub_id": "CPSep1",
      "click": 22649,
      "conversion": 470,
      "conversion_revenue": 13065380,
      "cancel": 55,
      "cancel_revenue": 978080,
      "total_revenue": 12087300
    },
    {
      "report_date": "20210812",
      "sub_id": "CPSep2",
      "click": 17307,
      "conversion": 216,
      "conversion_revenue": 9608890,
      "cancel": 15,
      "cancel_revenue": 1564520,
      "total_revenue": 8044370
    }
  ]
}
```

{% endcode %}
{% endtab %}

{% tab title="200: reportType=2" %}
{% code title="json" %}

```json
{
  "result": true,
  "resultCode": 1,
  "resultMessage": "success",
  "report": [
    {
      "report_date": "20210816",
      "sub_id": "sub1",
      "publisher_id": "aaaa",
      "conversion": 860,
      "conversion_revenue": 27773960,
      "cancel": 80,
      "cancel_revenue": 3545950,
      "total_revenue": 24228010
    },
    {
      "report_date": "20210816",
      "sub_id": "sub1",
      "publisher_id": "bbbbb",
      "conversion": 433,
      "conversion_revenue": 12673080,
      "cancel": 42,
      "cancel_revenue": 1742390,
      "total_revenue": 10930690
    }
  ]
}
```

{% endcode %}
{% endtab %}

{% tab title="200: reportType=3" %}
{% code title="json" %}

```json
{
  "result": true,
  "resultCode": 1,
  "resultMessage": "success",
  "report": [
    {
      "report_date": "20220801",
      "sub_id": "sub1",
      "click": 15141,
      "conversion": 1044,
      "conversion_revenue": 37178699,
      "cancel": 126,
      "cancel_revenue": -2330357,
      "total_revenue": 34848342
    },
    {
      "report_date": "20220801",
      "sub_id": "sub2",
      "click": 8587,
      "conversion": 582,
      "conversion_revenue": 21559586,
      "cancel": 51,
      "cancel_revenue": -1174181,
      "total_revenue": 20385405
    }
	]
}
```

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

## 서버 응답 코드

<table><thead><tr><th width="160">Code</th><th>Message</th></tr></thead><tbody><tr><td>1</td><td>성공</td></tr><tr><td>100</td><td>에러</td></tr><tr><td>1001</td><td>필수 파라미터가 누락되었습니다</td></tr><tr><td>1002</td><td>요청 파라미터가 없습니다</td></tr><tr><td>1003</td><td>리포트키가 유효하지 않습니다</td></tr></tbody></table>
