广告主对接文档
法律声明
我方签订合同后,我方提供对接协议作为指引文档。未经我方书面许可,不得以任何形式向第三方披露、泄露有关本文档的任何内容。
文档说明
本文档用于消耗方对接我方系统。我方发送流量给消耗方。
修订历史
| 文档版本 | 修订日期 | 修订描述 |
|---|---|---|
| 1.0.0 | 2023-12-01 | 初版 |
| 1.1.0 | 2024-08-01 | 支持protobuf |
| 1.2.0 | 2025-01-16 | 支持loss notice |
| 1.2.1 | 2025-12-10 | 更新Protobuf |
| 1.2.2 | 2026-06-01 | 更新Protobuf, 支持DP失败回传 |
[TOC]
参数定义
HTTP 请求方法
设置HTTP Method 为 POST。
HTTP 请求头
已升级为protobuf,请使用protobuf对接,请到资源页下载
设置Content-type为application/x-protobuf
要求系统支持长链接keepalive
支持gzip,请求头 Content-Encoding:gzip Accept-Encoding:gzip
示例:
POST /bid path HTTP/1.1
HOST: host
Content-Type: application/x-protobuf
Content-Length: length
Connection: Keep-Alive
1 请求
1.1 请求参数
请求参数详见下表:
| 字段 | 必须 | 类型 | 描述 |
|---|---|---|---|
| id | Y | string | 请求唯一标识 |
| imp | Y | [Imp](#1.1.2 Imp) | 广告位信息 |
| device | Y | [Device](#1.1.1 Device) | 设备信息 |
| app | Y | [App](#1.1.3 APP) | 应用信息 |
| user | N | [User](#1.1.4 User) | 用户信息 |
| site | N | [Site](#1.1.2.2 Size) | 站点信息 |
| timeout | N | int | 超时时间(毫秒) |
| debug | N | bool | 测试模式,默认false |
| secure | N | int | 是否只支持https:0-无要求,http和https都支持;1-只支持https |
1.1.1 Device
| 字段 |
|---|