1. Get Specify All Adsources Under Segment Group
1.1 Request URL
https://openapi.toponad.com/v3/waterfall/:mediation_group_id/segment_id/:segment_id/units
1.2 Request method
GET
1.3 Request params
params | type | required | notes |
---|---|---|---|
ecpm_currency | String | N | eCPM currency unit, default USD when not transmitting, optional CNY |
1.4 Return data
fields | type | required | notes |
---|---|---|---|
offer_list_switch | Int | Y | |
ecpm_currency | String | Y | eCPM currency unit, corresponding to the parameter ecpm_currency when requesting, Returns the ecpm and auto_ecpm prices in the ad_source_list parameter based on the corresponding unit value of this field |
parallel_request_number | Int | Y | Parallel request number |
offer_list | Array[Object] | Y | My offer list in used |
offer_list.offer_id | String | Y | Offer id |
offer_list.offer_name | String | Y | Offer name |
ad_source_list | Array[Object] | Y | Adsources list in used |
ad_source_list.ad_source_id | Int | Y | Adsource ID |
ad_source_list.name | String | Y | Adsource name |
ad_source_list.header_bidding_switch | Int | Y | If support Header Bidding, The unit was identified when it was created 1: not support, 2: support |
ad_source_list.ecpm | String | Y | eCPM |
ad_source_list.auto_ecpm_switch | Int | Y | Automatically optimize the ECPM 1: not open auto eCPM sort switch, 2: open auto eCPM sort switch |
ad_source_list.auto_ecpm | String | Y | Auto eCPM |
ad_source_list.hour_cap | Int | Y | -1 : close |
ad_source_list.day_cap | Int | Y | -1 : close |
ad_source_list.pacing | Int | Y | -1 : close |
free_ad_source_list | Array[Object] | Y | Adsource list not in used |
free_ad_source_list.ad_source_id | Int | Y | Adsource ID |
free_ad_source_list.name | String | Y | Adsource name |
free_ad_source_list.header_bidding_switch | Int | Y | If support Header Bidding, The unit was identified when it was created 1: Not support 2: Support |
free_ad_source_list.ecpm | String | Y | eCPM |
free_ad_source_list.auto_ecpm_switch | Int | Y | Automatically optimize the ECPM 1: not open auto eCPM sort switch, 2: open auto eCPM sort switch |
free_ad_source_list.auto_ecpm | String | Y | Auto eCPM |
1.5 Sample
Request address sample:
https://openapi.toponad.com/v3/waterfall/116112/segment_id/600262/units
Sample request parameter:
{
"ecpm_currency" : "USD"
}
Return sample:
{
"offer_list_switch": 2,
"ecpm_currency": "USD",
"parallel_request_number": 2,
"offer_list": [],
"ad_source_list": [
{
"ad_source_id": 681853,
"name": "Chartboost_int_2",
"header_bidding_switch": 1,
"ecpm": "66",
"auto_ecpm_switch": 1,
"auto_ecpm": "0",
"hour_cap": -1,
"day_cap": -1,
"pacing": -1
},
{
"ad_source_id": 681852,
"name": "Sigmob_int_2",
"header_bidding_switch": 1,
"ecpm": "20",
"auto_ecpm_switch": 1,
"auto_ecpm": "0",
"hour_cap": 4,
"day_cap": 5,
"pacing": 6
}
],
"free_ad_source_list": [
{
"ad_source_id": 681851,
"name": "Kuaishou Ads_int_2",
"header_bidding_switch": 1,
"ecpm": "50",
"auto_ecpm_switch": 1,
"auto_ecpm": "0"
},
{
"ad_source_id": 681850,
"name": "Mintegral_int_1",
"header_bidding_switch": 1,
"ecpm": "100",
"auto_ecpm_switch": 1,
"auto_ecpm": "0"
},
{
"ad_source_id": 681854,
"name": "Facebook_int_2",
"header_bidding_switch": 1,
"ecpm": "22",
"auto_ecpm_switch": 1,
"auto_ecpm": "0"
}
]
}
2. Set Waterfall's Adsources
2.1 Request URL
https://openapi.toponad.com/v3/waterfall/:mediation_group_id/segment_id/:segment_id/units
2.2 Request method
PUT
2.3 Request params
params | type | required | notes |
---|---|---|---|
parallel_request_number | Int | Y | Parallel request number |
offer_switch | Int | N | Offer switch |
ad_source_list | Array[Object] | Y | Adsources need to binding |
ad_source_list.ad_source_id | Int | Y | Adsource ID |
ad_source_list.header_bidding_switch | Int | N | If support Header Bidding, The unit was identified when it was created 1: not support, 2: support |
ad_source_list.ecpm | String | Y | eCPM |
ad_source_list.auto_ecpm_switch | Int | Y | 1: not open auto eCPM sort switch 2: open auto eCPM sort switch |
ad_source_list.hour_cap | Int | N | Do not pass or pass -1 means unlimited |
ad_source_list.day_cap | Int | N | Do not pass or pass -1 means unlimited |
ad_source_list.pacing | Int | N | Do not pass or pass -1 means unlimited |
unbind_ad_source_list | Array[Int] | N | Unbind the adsource and send only the adsource id |
ecpm_currency | String | N | eCPM currency unit, corresponding to the parameter ecpm_currency when requesting, Returns the ecpm and auto_ecpm prices in the ad_source_list parameter based on the corresponding unit value of this field |
2.4 Return data
fields | type | required | notes |
---|---|---|---|
mediation_group_id | Int | Y | Mediation Group ID |
segment_id | Int | Y | Segment ID |
2.5 Sample
Request address sample:
https://openapi.toponad.com/v3/waterfall/116112/segment_id/600262/units
Sample request parameter:
{
"parallel_request_number" : 1,
"offer_switch" : 1,
"ad_source_list": [
{
"ad_source_id": 681853,
"name": "Chartboost_int_2",
"header_bidding_switch": 1,
"ecpm": "66",
"auto_ecpm_switch": 1,
"auto_ecpm": "0",
"hour_cap": -1,
"day_cap": -1,
"pacing": -1
},
{
"ad_source_id": 681852,
"name": "Sigmob_int_2",
"header_bidding_switch": 1,
"ecpm": "20",
"auto_ecpm_switch": 1,
"auto_ecpm": "0",
"hour_cap": 4,
"day_cap": 5,
"pacing": 6
}
],
"unbind_adsource_list" : [
681851,
681850,
681854
]
}
Return sample:
{
"mediation_group_id": 116112,
"segment_id": 600262
}