> For the complete documentation index, see [llms.txt](https://community.commandersact.com/mixcommander/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://community.commandersact.com/mixcommander/api/mixcommander-v1-api/untitled-1.md).

# GET Traffic Report (deprecated)

## GET Traffic Report Exports (deprecated, use live report builder API instead)

Returns data from the interface’s reports

**Resource URL:**\
GET /**{version}**/measure/reporttrafic/**{id\_type\_rapport}**?**site**=XXXX&**token**=YYYY&**date\_start**=YYYY-MM-DD&**date\_end**=YYYY-MM-DD&**attrib**=A,B,C&**kpis**=Q,S,D&**segment**=UUUU&**breakdown**=TTTT&**format**=ZZZZ

**Parameters:**

| URI PARAMETER     | TYPE     | MANDATORY | DESCRIPTION                                                                                                          |
| ----------------- | -------- | --------- | -------------------------------------------------------------------------------------------------------------------- |
| version           | Alphanum | Yes       | Call API version                                                                                                     |
| id\_type\_rapport | Integer  | Yes       | Report type identifier                                                                                               |
| URL PARAMETER     | TYPE     | MANDATORY | DESCRIPTION                                                                                                          |
| site              | Integer  | Yes       | Client site identifier                                                                                               |
| token             | Alphanum | Yes       | Caller security identifier                                                                                           |
| date\_start       | Date     | Yes       | Data recovery start date (YYYY-MM-DD format)                                                                         |
| date\_end         | Date     | Yes       | Data recovery end date (YYYY-MM-DD format)                                                                           |
| attrib            | Alphanum | Yes       | Attribution models identifier                                                                                        |
| kpis              | Alphanum | Yes       | KPIs identifier’s list                                                                                               |
| segment           | Alphanum | Yes       | Identifier of the segment that will be used to recover data                                                          |
| breakdown         | String   | No        | Desired breakdown of aggregated data (none, day, week, month) – “none” is selected by default, nothing will be split |
| format            | String   | No        | Response format (XML or JSON) – JSON is selected by default                                                          |

**Return codes:**

| HTTP CODE | MESSAGE               | DESCRIPTION                                                   |
| --------- | --------------------- | ------------------------------------------------------------- |
| 200       | OK                    | The request went through, the result is in the answer’s body  |
| 400       | Bad Request           | The parameters are not ok or mandatory parameters are missing |
| 401       | Unauthorized          | The security token does not match the site\_id                |
| 500       | Internal Server Error | Internal server erros                                         |

**Response Format**\
The response is in a JSON or XML format.

<table data-header-hidden><thead><tr><th width="226">FIELD</th><th>TYPE</th><th>IS ALWAYS PRESENT?</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td>FIELD</td><td>TYPE</td><td>IS ALWAYS PRESENT?</td><td>DESCRIPTION</td></tr><tr><td>site</td><td>Integer</td><td>Yes</td><td>Site identifier</td></tr><tr><td>idReport</td><td>Integer</td><td>Yes</td><td>Custom report identifier</td></tr><tr><td>dateStart</td><td>Date</td><td>Yes</td><td>Data recovery start date (YYYY-MM-DD format)</td></tr><tr><td>dateEnd</td><td>Date</td><td>Yes</td><td>Data recovery end date (YYYY-MM-DD format)</td></tr><tr><td>attrib</td><td>Alphanum</td><td>Yes</td><td>Attribution models list identifier</td></tr><tr><td>kpis</td><td>Alphanum</td><td>Yes</td><td>KPIs list identifier</td></tr><tr><td>segment</td><td>Integer</td><td>Yes</td><td>Identifier of the segment that will be used to recover data</td></tr><tr><td>breakdown</td><td>String</td><td>No</td><td>Desired breakdown for aggregated data</td></tr><tr><td>datas</td><td>Array</td><td>Yes</td><td>Table containing data</td></tr><tr><td>datas/date</td><td>String</td><td>No</td><td>Time and date of data according to selected breakdown</td></tr><tr><td>datas/level1</td><td>String</td><td>Yes</td><td>Level 1 – Channel (in general)</td></tr><tr><td>datas/level2</td><td>String</td><td>No</td><td>Level 2 – Source (in general)</td></tr><tr><td>datas/level3</td><td>String</td><td>No</td><td>Level 3</td></tr><tr><td>datas/kpis</td><td>Array</td><td>Yes</td><td>Table containing the KPIs</td></tr><tr><td>datas/kpis/id</td><td>Integer</td><td>Yes</td><td>KPIs technical identifier</td></tr><tr><td>datas/kpis/label</td><td>String</td><td>Yes</td><td>KPI Label</td></tr><tr><td>datas/kpis/value</td><td>Numeric</td><td>Yes</td><td>KPI Value</td></tr></tbody></table>

**Response example in JSON and XML formats:**

```
{
	"site": 26,
        "idReport": 0,
	"dateStart": "2016-01-01",
	"dateEnd": "2016-01-30",
	"attrib": "1,3,4",
	"kpis": "1,3,6,9",
	"segment": 2770,
	"breakdown": "day",
	"datas": [{
		"date": "2016-01-01",
		"level1": "SEO",
		"level2": "google",
		"kpis": [{
			"id": "1",
			"label": "Impressions",
			"value": "12"
		}, {
			"id": "3",
			"label": "Clicks",
			"value": "42"
		}, {
			"id": "6",
			"label": "Unique Clicks (by channel)",
			"value": "2"
		}, {
			"id": "9",
			"label": "Page views",
			"value": "1"
		}]
	}, {
		"date": "2016-01-02",
		"level1": "SEO",
		"level2": "google",
		"kpis": [{
			"id": "1",
			"label": "Impressions",
			"value": "12"
		}, {
			"id": "3",
			"label": "Clicks",
			"value": "42"
		}, {
			"id": "6",
			"label": "Unique Clicks (by channel)",
			"value": "2"
		}, {
			"id": "9",
			"label": "Page views",
			"value": "1"
		}]
	}]
}

XML

```

```
<?xml version="1.0" encoding="UTF-8"?>
<root>
   <attrib>1,3,4</attrib>
   <breakdown>day</breakdown>
   <dateEnd>2016-01-30</dateEnd>
   <dateStart>2016-01-01</dateStart>
   <kpis>1,3,6,9</kpis>
   <segment>2770</segment>
   <site>26</site>
   <idReport>0</idReport>
   <datas>
      <data>
	 <level1>SEO</level1>
         <level2>google</level2>
         <date>2016-01-01</date>
         <kpis>
            <kpi>
               <id>1</id>
               <label>Impressions</label>
               <value>12</value>
            </kpi>
            <kpi>
               <id>3</id>
               <label>Clicks</label>
               <value>42</value>
            </kpi>
            <kpi>
               <id>6</id>
               <label>Unique Clicks (by channel)</label>
               <value>2</value>
            </kpi>
            <kpi>
               <id>9</id>
               <label>Page views</label>
               <value>1</value>
            </kpi>
         </kpis>
      </data>
      <data>
         <date>2016-01-02</date>
	 <level1>SEO</level1>
         <level2>google</level2>
         <kpis>
            <kpi>
               <id>1</id>
               <label>Impressions</label>
               <value>12</value>
            </kpi>
            <kpi>
               <id>3</id>
               <label>Clicks</label>
               <value>42</value>
            </kpi>
            <kpi>
               <id>6</id>
               <label>Unique Clicks (by channel)</label>
               <value>2</value>
            </kpi>
            <kpi>
               <id>9</id>
               <label>Page views</label>
               <value>1</value>
            </kpi>
         </kpis>
      </data>
   </datas>
</root>
```


---

# 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://community.commandersact.com/mixcommander/api/mixcommander-v1-api/untitled-1.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.
