---
# System prepended metadata

title: Adverting platform

---

# Adverting platform

## API docs v1.1.1

### Login

- POST `api/admin/login/`
- paras:

| 字段       | 类型     | 说明  |
|----------|--------|-----|
| username | String |     |
| password | String |     |

- response:

```json
{
  "token": "ad7adc3d24bc4bd1a9cc24111e2f46d8"
}
```

### Report Channel

- GET `api/report/channels/`
- headers:`X-AUTH-TOKEN`
- response

```json
{
  "status": 0,
  "msg": "OK",
  "timestamp": "2023-01-13 11:37:17",
  "data": [
    "",
    "view_is_zero",
    "click_is_zero"
  ]
}
```

### Report

- GET `api/report/`
- headers:`X-AUTH-TOKEN`
- paras:

| 字段        | 类型       | 说明                                                                        |
|-----------|----------|---------------------------------------------------------------------------|
| begin     | String   | Date(YYYY-MM-DD), Optional                                                |
| end       | String   | Date(YYYY-MM-DD), Optional                                                |
| channels  | String   | channel list split by comma, e.g "channelA,channelB",Optional             |
| order_by  | String   | `date`,`-date`,`views`,`-views`,`clicks`,`-clicks`,`installs`,`-installs`, `CTR`, `-CTR`, `CRV`, `-CRV` |
| page_no   | Integer  | default: 1, Optional                                                      |
| page_size | Interger | default: 10, Optional                                                     |

- response:

`GET http://{{HOST}}/api/report/?begin=2022-10-01&end=2022-10-30`

```json
{
  "status": 0,
  "msg": "OK",
  "timestamp": "2023-01-13 10:08:12",
  "data": {
    "summary": {
      "views_total": 2253,
      "clicks_total": 7515,
      "installs_total": 12452
    },
    "total": 102,
    "num_pages": 34,
    "items": [
      {
        "date": "2023-01-10",
        "channel": "click_is_zero",
        "views": 1,
        "clicks": 0,
        "installs": 1,
        "CTR": 0.0,
        "CVR": null
      },
      {
        "date": "2023-01-10",
        "channel": "view_is_zero",
        "views": 0,
        "clicks": 1,
        "installs": 1,
        "CTR": null,
        "CVR": 1.0
      },
      {
        "date": "2023-01-09",
        "channel": "",
        "views": 20,
        "clicks": 64,
        "installs": 137,
        "CTR": 3.2,
        "CVR": 2.1406
      }
    ]
  }
}
```
