> For the complete documentation index, see [llms.txt](https://docs.targetpick.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.targetpick.io/targetpick_eng/for-ssp/report-api/banner.md).

# Banner

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

This document is an API guide for providing reports to SSP (Supply Side Platform) partners integrated with TARGETPICK DSP (Demand Side Platform).&#x20;

To receive DSP reports from TARGETPICK, you must obtain a Token from the CJ MezzoMedia manager before use. Please contact the designated manager to issue a Token for API use.

## 1. Report Data Request

| Information           | Description                                        |
| --------------------- | -------------------------------------------------- |
| Service API Name      | SSP-provided report data                           |
| API response type     | XML or JSON                                        |
| Authentication method | Token                                              |
| Method                | HTTPS                                              |
| API description       | Delivers report results for ads served on the SSP. |

### **URL**

<table><thead><tr><th width="130">Environment</th><th width="500">URL</th><th>Method</th></tr></thead><tbody><tr><td>Test</td><td>http://211.62.152.212:9000/api/report</td><td>Get</td></tr><tr><td>Production</td><td>https://dsp-report.meba.kr:9000/api/report</td><td>Get</td></tr></tbody></table>

### **Parameters**

| Field      | Type    | Required | Description                                                                                 | Example       |
| ---------- | ------- | -------- | ------------------------------------------------------------------------------------------- | ------------- |
| sDate      | String  | Y        | Report start date                                                                           | 20160101      |
| eDate      | String  | Y        | Report end date                                                                             | 20160131      |
| PartnerID  | String  | Y        | Partner unique ID issued by MezzoMedia                                                      | userpartnerid |
| Token      | String  | Y        | Partner-specific Token value for API use                                                    | F379C8K9P0    |
| ADType     | Integer | Y        | <ul><li>0: ALL</li><li>1: banner</li></ul>                                                  | 1             |
| ReportType | Integer | Y        | <ul><li>1: daily report</li><li>2: media (PubID) report</li><li>3: ad type report</li></ul> | 1             |
| format     | String  | Y        | json , xml                                                                                  | json          |

### **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> |

## 2. Report Data Response

Basic information - When a request is sent to the report API, report data is returned in the following format.

| Field          | Type    | Description                                                                                 | Example      |
| -------------- | ------- | ------------------------------------------------------------------------------------------- | ------------ |
| ListCount      | Integer | Number of rows returned in the list                                                         | 100          |
| ReportType     | Integer | <ul><li>1: daily report</li><li>2: media (PubID) report</li><li>3: ad type report</li></ul> | 1            |
| ADType         | Integer | banner                                                                                      | banner       |
| Reports.Report | Array   |                                                                                             |              |
| Date           | String  | Reporting date                                                                              | 20160101     |
| Imp            | Integer | Impression count                                                                            | 1000         |
| Click          | Integer | Click countClick-through rate                                                               | 100          |
| CTR            | Double  | Click-through rate                                                                          | 10.00        |
| PubID          | String  | ID used to identify the media, such as AppID or SiteID (may be a random or encrypted ID)    | publisher123 |
| Revenue        | Double  | Inventory purchase cost payable by MezzoMedia                                               | 100000       |

### Example

{% tabs %}
{% tab title="Daily Report" %}
{% 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 %}
{% endtab %}

{% tab title="media-by-PubID report" %}
{% 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 %}
{% endtab %}

{% tab title="ad type report" %}
{% 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 %}
{% endtab %}
{% endtabs %}

## **3. Error Code**

<table><thead><tr><th width="150">Code</th><th>Descirption</th></tr></thead><tbody><tr><td>000</td><td>Success</td></tr><tr><td>001</td><td>A system error occurred.</td></tr><tr><td>002</td><td>An unknown error occurred.</td></tr><tr><td>003</td><td>You do not have permission to view this data.</td></tr><tr><td>004</td><td>This API does not exist.</td></tr><tr><td>005</td><td>Invalid parameter information.</td></tr><tr><td>006</td><td>A date must be provided and the range cannot exceed three months.</td></tr></tbody></table>

### **Example**

{% tabs %}
{% tab title="Error Response" %}
{% code lineNumbers="true" %}

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

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


---

# 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://docs.targetpick.io/targetpick_eng/for-ssp/report-api/banner.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.
