https://openapi.toponad.com/v3/units/list
GET
字段 | 类型 | 是否必传 | 备注 |
---|---|---|---|
app_ids | Array[String] | N | Taku应用ID列表,数量最大限制为100 |
placement_ids | Array[String] | N | Taku广告位ID列表,数量最大限制为100 |
network_ids | Array[Int] | N | Taku三方平台账号ID列表,数量最大限制为100 |
start | Int | N | 起始偏移量,默认0 |
limit | Int | N | 获取个数,,最大限制为1000,默认1000, |
字段 | 类型 | 是否必传 | 备注 |
---|---|---|---|
total | Int | Y | 搜索条件下的总数 |
items | Array[Object] | Y | 广告源信息列表 |
items.id | Int | Y | 广告源ID |
items.name | String | Y | 广告源名称 |
items.app_id | String | Y | Taku的应用ID |
items.placement_id | String | Y | Taku的广告位ID |
items.network_id | Int | Y | Taku广告平台账号ID |
items.nw_firm_id | Int | Y | 广告平台ID |
请求样例:
curl --location --request GET 'https://openapi.toponad.com/v3/units/list?app_ids=a63f5cced466da&placement_ids=b1ehgn65hup6v0,b640ae1464e7e9&network_ids=4779,4780&start=0&limit=200 ' \
--header 'X-Up-Key: 877f8ae9c6e9ca82c0===b5fff594c373axxx' \
--header 'X-Up-Signature: CE12B506DBCD868C2C6F09E08C139CBC' \
--header 'X-Up-Timestamp: 1626056011000' \
--header 'Content-Type: application/json' \
--data-raw ''
返回样例:
{
"total": 10,
"items": [
{
"app_id": "a6392a1c24510e",
"placement_id": "b6392a1d36f73f",
"network_id": 5117,
"id": 2279787,
"name": "ADX",
"nw_firm_id":15
},
{
"app_id": "a6392a1c24510e",
"placement_id": "b6392a1d59c06f",
"network_id": 5117,
"id": 2279797,
"name": "ADX",
"nw_firm_id":15
}
]
}
https://openapi.toponad.com/v3/units
GET
字段 | 类型 | 是否必传 | 备注 |
---|---|---|---|
ids | Array[Int] | Y | 广告源ID列表,数量最大限制为100,最小限制为1 |
字段 | 类型 | 是否必传 | 备注 |
---|---|---|---|
- | Array[Object] | Y | 广告源信息列表 |
_.id | Int | Y | 广告源ID |
_.name | String | Y | 广告源名称 |
_.network_id | Int | Y | Taku广告平台账号ID |
_.placement_id | String | Y | Taku的广告位ID |
_.type | Int | Y | 广告源类型,枚举值说明如下: 2:普通广告源 4:adx广告源 10:兜底广告源 12:客户端竞价广告源 13:服务端竞价广告源 |
_.mix_format | Int | N | 混合样式,注意:只有某些平台才有该属性,枚举说明: -1或和广告位format值一样:非混合类型 0:混合native类型 1:混合rewarded_video类型 2:混合banner类型 3:混合interstitial类型 4:混合splash类型 |
_.adsource_token | Object | Y | 广告源配置参数,三方广告平台或自定义关联三方平台详见【新附录三方广告平台详细参数】规范的属性列<adsource_token>,自定义广告平台时需满足json object格式,该属性暂不支持adx广告源(流量分组相关) |
_.auto_unit_sw | Int | Y | 自动广告源开关,某些平台才有:1开,2关 |
_.nw_firm_id | Int | Y | 广告平台ID |
请求样例:
curl --location --request GET 'https://openapi.toponad.com/v3/units?ids=417018,374133' \
--header 'X-Up-Key: 877f8ae9c6e9ca82c0===b5fff594c373axxx' \
--header 'X-Up-Signature: CE12B506DBCD868C2C6F09E08C139CBC' \
--header 'X-Up-Timestamp: 1626056011000' \
--header 'Content-Type: application/json' \
--data-raw ''
返回样例:
[
{
"id": 374133,
"placement_id": "b6049c640e6ad1",
"network_id": 4779,
"name": "穿山甲_rv_3",
"type": 2,
"mix_format": -1,
"adsource_token": {
"app_id": "5343323",
"personalized_template": "1",
"slot_id": "4566363563"
},
"auto_unit_sw": 2,
"nw_firm_id":15
},
{
"id": 417018,
"placement_id": "b6049c640e6ad1",
"network_id": 4779,
"name": "穿山甲_rv_6",
"type": 2,
"mix_format": -1,
"adsource_token": {
"app_id": "5343323",
"personalized_template": "0",
"slot_id": "324ewrwe"
},
"auto_unit_sw": 2,
"nw_firm_id":15
}
]
注意:创建广告源成功后默认是解绑+关闭状态(因为这些属性是流量分组相关的,即在不同流量分组会不一样),需要再次调用聚合管理的广告源管理Api2或Api5来根据需要在指定流量分组绑定和开启
https://openapi.toponad.com/v3/units
POST
字段 | 类型 | 是否必传 | 备注 |
---|---|---|---|
placement_id | String | Y | Taku的广告位ID |
items | Array[Object] | Y | 广告源信息列表 |
items.name | String | Y | 广告源名称 |
items.network_id | Int | Y | Taku广告平台账号ID |
items.type | Int | Y | 广告源类型,注意:某些平台才支持竞价广告源,并且同一个平台可能有些广告位样式支持竞价,有些样式又不支持,具体请参考【新附录三方广告平台详细参数】的属性列<支持的竞价类型>, 枚举值说明如下: 2:常规广告源 10:兜底广告源 12:客户端竞价广告源 13:服务端竞价广告源 |
items.mix_format | Int | Y | 混合样式,非混合类型传-1即可,注意:只有某些平台才支持该属性,-1或者和广告位format值一样都代表非混合类型 ,混合类型需要申请权限(联系运营同学),不同三方平台参数文档请联系运营同学获取权限文档 枚举说明: -1: 非混合类型 0:混合native类型 1:混合rewarded_video类型 2:混合banner类型 3:混合interstitial类型 4:混合splash类型 |
items.adsource_token | Object | Y | 广告源配置参数,混合类型时的三方平台参数文档请联系运营同学,非混合类型的三方广告平台或自定义关联三方平台详见【新附录三方广告平台详细参数】规范的属性列<adsource_token>,自定义广告平台时需满足json object格式,该属性暂不支持adx广告源(流量分组相关) |
字段 | 类型 | 是否必传 | 备注 |
---|---|---|---|
items | Array[Object] | N | 成功的广告源信息列表,索引位置和请求参数items索引位置一一对应 |
items.id | Int | Y | 添加成功后的广告源ID |
errs | Array[Object] | N | 错误广告源信息列表,注意: 1. 列表为空,则标识操作成功 2. 列表不为空,则列表标识哪些广告源校验不通过,所有广告源(包括校验通过)操作失败 |
errs.index | Int | N | 错误item在请求参数items中的索引位置,从0开始,0的时候可能不返回字段 |
errs.code | Int | N | 错误码 |
errs.msg | String | N | 错误信息 |
请求样例:
curl --location --request POST 'https://openapi.toponad.com/v3/units' \
--header 'X-Up-Key: 877f8ae9c6e9ca82c0==5b5fff594c373axxx' \
--header 'X-Up-Signature: CE12B506DBCD868C2C6F09E08C139CBC' \
--header 'X-Up-Timestamp: 1626161553000' \
--header 'Content-Type: application/json' \
--data-raw '{
"placement_id": "b64993cxxxx",
"items": [
{
"network_id": 4778,
"name": "xcj_admob_openapi1",
"adsource_token": {
"unit_id":"123456790000",
"orientation":"1"
},
"mix_format":-1,
"type": 2
}
]
}'
返回样例:
{
"errs": [
{
"index": 0,
"code": 4000,
"msg": "the unit type is invalid"
}
]
}
https://openapi.toponad.com/v3/units
PUT
字段 | 类型 | 是否必传 | 备注 |
---|---|---|---|
placement_id | String | Y | Taku的广告位ID |
items | Array[Object] | Y | 广告源信息列表 |
items.id | Int | Y | 广告源ID |
items.name | String | Y | 广告源名称 |
items.adsource_token | Object | Y | 广告源配置参数,三方广告平台或自定义关联三方平台详见【新附录三方广告平台详细参数】规范的属性列<adsource_token>,纯自定义广告平台时需满足json object格式,该属性暂不支持adx广告源(流量分组相关) |
字段 | 类型 | 是否必传 | 备注 |
---|---|---|---|
items | Array[Object] | N | 错误广告源信息列表,注意: 1. 列表为空,则标识操作成功 2. 列表不为空,则列表标识哪些item校验不通过,所有item(包括校验通过)操作失败 |
items.index | Int | Y | 错误item所在的索引,从0开始 |
items.err_code | Int | Y | 错误码 |
items.err_msg | String | Y | 错误信息 |
请求样例:
curl --location --request PUT 'https://openapi.toponad.com/v3/units' \
--header 'X-Up-Key: 877f8ae9c6e9ca82c0==5b5fff594c373axxx' \
--header 'X-Up-Signature: CE12B506DBCD868C2C6F09E08C139CBC' \
--header 'X-Up-Timestamp: 1626161553000' \
--header 'Content-Type: application/json' \
--data-raw '{
"placement_id": "b64993cxxxx",
"items": [
{
"id": 4778,
"name": "xcj_admob_openapi1",
"adsource_token": {
"unit_id":"123456790000",
"orientation":"1"
}
}
]
}'
返回样例:
{
}
注意:暂时还是v1, 待后续升级v3
https://openapi.toponad.com/v1/del_units
POST
字段 | 类型 | 是否必传 | 备注 |
---|---|---|---|
adsource_ids | Array[Int] | Y | 广告源ID列表,数量最大限制为10,广告源id列表可通过【Api3】创建广告源后获取 |
字段 | 类型 | 是否必传 | 备注 |
---|---|---|---|
msg | String | N | 结果描述,比如"suc"代表删除成功 |
请求样例:
curl --location --request PUT 'https://openapi.toponad.com/v1/del_units' \
--header 'X-Up-Key: 877f8ae9c6e9ca82c0==5b5fff594c373axxx' \
--header 'X-Up-Signature: CE12B506DBCD868C2C6F09E08C139CBC' \
--header 'X-Up-Timestamp: 1626161553000' \
--header 'Content-Type: application/json' \
--data-raw '{
"adsource_ids":[19683]
}'
返回样例:
{
"msg": "suc"
}