拡張入札者プロファイルの API ユース ケース

拡張入札者プロファイルの一般的なユース ケースを次に示します。

新しいプロファイルを作成する

このセクションでは、ID と JSON ファイルの例、および新しいプロファイルの作成に関連するさまざまなアクションの呼び出しを見つけます。

交換を対象とし、メンバーを含める/除外した新しいプロファイルを作成する

ID: 1

JSON ファイル:

cat np_4.json
{
"bidder_profile": {
"targeting": {
"exchanges": {
"targets": [{
"id": 1
}, {
"id": 3
}],
"action": "exclude",
"excluded_members": [{
"id": 389
}, {
"id": 1202
}],
"included_members": [{
"id": 101
}, {
"id": 1200
}]
},
"non_audited_url_action": "include"
}
}
}

POST 呼び出し:

curl -b cookies -c cookies -X POST -d '@np_4.json' "https://api.adnxs.com/bidder-profile?bidder_id=129" | json_reformat
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1318 100 913 100 405 947 420 --:--:-- --:--:-- --:--:-- 947
{
"response": {
"status": "OK",
"count": 1,
"start_element": 0,
"num_elements": 100,
"id": 12,
"bidder_profile": {
"id": 12,
"bidder_id": 129,
"code": null,
"description": null,
"targeting": {
"exchanges": {
"action": "exclude",
"targets": [
{
"id": 1,
"name": "Direct"
},
{
"id": 3,
"name": "Network"
}
],
"included_members": [
{
"id": 101,
"billing_name": "AdNexus (DW)"
},
{
"id": 1200,
"billing_name": "Performance Advertising GmbH"
}
],
"excluded_members": [
{
"id": 389,
"billing_name": "Admeld - KickApps"
},
{
"id": 1202,
"billing_name": "Agenda Media Ltd."
}
]
},
"ad_types": {
"banner": {
"action": "include"
},
"video": {
"action": "include"
},
"audio": {
"action": "include"
},
"native": {
"action": "include"
}
}
},
"last_activity": "2018-05-31 16:15:20",
"created_on": "2018-05-31 16:15:20",
"active": false
},
"dbg": {
"warnings": [
],
"version": "1.18.552",
"output_term": "bidder_profile"
}
}
}

ネイティブ インベントリのみを対象とする新しいプロファイルを作成する

ID: 2

JSON ファイル:

cat np_4.json
{
"bidder_profile": {
"targeting": {
"ad_types": {
"native": {
"action": "include"
}
}
}
}
}

POST 呼び出し:

curlpost bidder-profile?bidder_id=129 @np_4.json
Using: curl -b ./auth/apiprodcookie -c ./auth/apiprodcookie -X POST -d '@np_4.json' "https://api.adnxs.com/bidder-profile?bidder_id=129" | json_reformat
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 588 100 484 100 104 3123 671 --:--:-- --:--:-- --:--:-- 3142
{
"response": {
"status": "OK",
"count": 1,
"start_element": 0,
"num_elements": 100,
"id": 67,
"bidder_profile": {
"id": 67,
"bidder_id": 129,
"code": null,
"description": null,
"targeting": {
"ad_types": {
"banner": {
"action": "exclude"
},
"video": {
"action": "exclude"
},
"audio": {
"action": "exclude"
},
"native": {
"action": "include"
}
}
},
"last_activity": "2018-12-05 21:45:04",
"created_on": "2018-12-05 21:45:04",
"active": false
},
"dbg": {
"warnings": [
],
"version": "1.18.923",
"output_term": "bidder_profile"
}
}
}

メンバーを対象とする新しいプロファイルを作成する (id 958)

警告

予期されるエラー: Exchange 1 のメンバーは除外することしかできません。

ID: 3

JSON ファイル:

cat np_4.json
{
"bidder_profile": {
"targeting": {
"exchanges": {
"included_members": [{
"id": 958
}]
}
}
}
}

POST 呼び出し:

curl -b ./auth/apiprodcookie -c ./auth/apiprodcookie -X POST -d '@np_4.json' "https://api.adnxs.com/bidder-profile?bidder_id=129" | json_reformat
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 629 100 447 100 182 2066 841 --:--:-- --:--:-- --:--:-- 2069
{
"response": {
"status": "OK",
"count": 1,
"start_element": 0,
"num_elements": 100,
"id": 277,
"bidder_profile": {
"id": 277,
"bidder_id": 129,
"code": null,
"description": null,
"targeting": {
"exchanges": {
"included_members": [
{
"id": 958,
"billing_name": "AppNexus Services Network"
}
]
}
},
"last_activity": "2018-12-05 21:43:42",
"created_on": "2018-12-05 21:43:42",
"active": false
},
"dbg": {
"warnings": [
],
"version": "1.18.923",
"output_term": "bidder_profile"
}
}
}

Exchange 3 のメンバーである Pesto Harel Shemesh LTD (id 8495) を除外する新しいプロファイルを作成する

ID: 4

JSON ファイル:

cat np_4.json
{
"bidder_profile": {
"targeting": {
"exchanges": {
"excluded_members": [{
"id": 8945
}]
}
}
}
}

POST 呼び出し:

curl -b cookies -c cookies -X POST -d '@np_4.json' "https://api.adnxs.com/bidder-profile?bidder_id=129" | json_reformat
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 755 100 572 100 183 2003 640 --:--:-- --:--:-- --:--:-- 2000
{
"response": {
"status": "OK",
"count": 1,
"start_element": 0,
"num_elements": 100,
"id": 14,
"bidder_profile": {
"id": 14,
"bidder_id": 129,
"code": null,
"description": null,
"targeting": {
"exchanges": {
"excluded_members": [
{
"id": 8945,
"billing_name": "Pesto Harel Shemesh LTD"
}
]
},
"ad_types": {
"banner": {
"action": "include"
},
"video": {
"action": "include"
},
"audio": {
"action": "include"
},
"native": {
"action": "include"
}
}
},
"last_activity": "2018-06-15 20:16:00",
"created_on": "2018-06-15 20:16:00",
"active": false
},
"dbg": {
"warnings": [
],
"version": "1.18.594",
"output_term": "bidder_profile"
}
}
}

200 x 100 サイズのバナー インベントリとドメイン リストのみを対象とする新しいアクティブ なプロファイルを作成する

ID: 5

JSON ファイル:

cat np_4.json
{
"bidder_profile": {
"targeting": {
"ad_types": {
"banner": {
"action": "include",
"sizes": [{
"width": 200,
"height": 100
}]
},
"video": {
"action": "exclude"
},
"audio": {
"action": "exclude"
},
"native": {
"action": "exclude"
}
},
"domain_lists": {
"targets": [{
"id": 100675
}],
"action": "include"
}
},
"active": true
}
}

POST 呼び出し:

curl -b cookies -c cookies -X POST -d '@np_4.json' "https://api.adnxs.com/bidder-profile?bidder_id=129" | json_reformat
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1065 100 660 100 405 1872 1149 --:--:-- --:--:-- --:--:-- 1875
{
"response": {
"status": "OK",
"count": 1,
"start_element": 0,
"num_elements": 100,
"id": 16,
"bidder_profile": {
"id": 16,
"bidder_id": 129,
"code": null,
"description": null,
"targeting": {
"domain_lists": {
"action": "include",
"targets": [
{
"id": 100675,
"name": "Domains to exclude",
"description": "block facebook.com",
"type": "black"
}
]
},
"ad_types": {
"banner": {
"action": "include",
"sizes": [
{
"width": 200,
"height": 100
}
]
},
"video": {
"action": "exclude"
},
"audio": {
"action": "exclude"
},
"native": {
"action": "exclude"
}
}
},
"last_activity": "2018-06-15 20:31:03",
"created_on": "2018-06-15 20:31:03",
"active": true
},
"dbg": {
"warnings": [
],
"version": "1.18.594",
"output_term": "bidder_profile"
}
}
}

100 x 100 サイズのビデオ インベントリを除外し、英語以外の言語 (インベントリ属性 ID 17) を持つインベントリを除外し、フランスをターゲットとする新しい非アクティブなプロファイルを作成します

ID: 6

JSON ファイル:

cat np_4.json
{
"bidder_profile": {
"targeting": {
"ad_types": {
"banner": {
"action": "include"
},
"video": {
"action": "exclude",
"sizes": [{
"width": 200,
"height": 100
}]
},
"audio": {
"action": "include"
},
"native": {
"action": "include"
}
},
"inventory_attributes": {
"action": "include",
"targets": [{
"id": 2
}, {
"id": 4
}, {
"id": 6
}, {
"id": 8
}, {
"id": 10
}, {
"id": 12
}, {
"id": 16
}, {
"id": 17
}, {
"id": 29
}]
},
"countries": {
"action": "include",
"targets": [{
"id": 78
}]
}
}
}
}

POST 呼び出し:

curl -b cookies -c cookies -X POST -d '@np_4.json' "https://api.adnxs.com/bidder-profile?bidder_id=129" | json_reformat
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1656 100 1018 100 638 2241 1405 --:--:-- --:--:-- --:--:-- 2237
{
"response": {
"status": "OK",
"count": 1,
"start_element": 0,
"num_elements": 100,
"id": 19,
"bidder_profile": {
"id": 19,
"bidder_id": 129,
"code": null,
"description": null,
"targeting": {
"countries": {
"action": "include",
"targets": [
{
"id": 78,
"name": "France",
"code": "FR",
"active": true
}
]
},
"inventory_attributes": {
"action": "include",
"targets": [
{
"id": 2,
"name": "Political"
},
{
"id": 4,
"name": "Social media"
},
{
"id": 6,
"name": "Photo & video sharing"
},
{
"id": 8,
"name": "Forums (moderated)"
},
{
"id": 10,
"name": "Forums (unmoderated)"
},
{
"id": 12,
"name": "Incentivized clicks"
},
{
"id": 16,
"name": "Streaming media"
},
{
"id": 17,
"name": "Toolbars, plugins, or extensions"
},
{
"id": 29,
"name": "Contextual Nudity"
}
]
},
"ad_types": {
"banner": {
"action": "include"
},
"video": {
"action": "exclude",
"sizes": [
{
"width": 200,
"height": 100
}
]
},
"audio": {
"action": "include"
},
"native": {
"action": "include"
}
}
},
"last_activity": "2018-06-15 20:52:43",
"created_on": "2018-06-15 20:52:43",
"active": false
},
"dbg": {
"warnings": [
],
"version": "1.18.594",
"output_term": "bidder_profile"
}
}
}

1x1 サイズのビデオ インベントリを対象とする新しいプロファイルを作成する

警告

予期されるエラー: ユーザーはサイズ 1x1 または0x0をターゲットにできません。

ID: 7

JSON ファイル:

cat np_4.json
{
"bidder_profile": {
"targeting": {
"ad_types": {
"video": {
"action": "include",
"sizes": [{
"width": 1,
"height": 1
}]
}
}
}
}
}

POST 呼び出し:

curl -b cookies -c cookies -X POST -d '@np_4.json' "https://api.adnxs.com/bidder-profile?bidder_id=129" | json_reformat
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 897 100 263 100 634 2322 5599 --:--:-- --:--:-- --:--:-- 5610
{
"response": {
"error_id": "SYNTAX",
"error": "1x1 and 0x0 sizes aren't valid for video size",
"error_description": null,
"error_code": "INVALID_VIDEO_SIZE",
"service": "bidder-profile",
"method": "POST",
"dbg": {
"warnings": [
],
"version": "1.18.594",
"output_term": "not_found"
}
}
}

既存のプロファイルを変更する

このセクションでは、ID と JSON ファイルの例、および既存のプロファイルの変更に関連するさまざまなアクションの呼び出しを見つけます。

既存のプロファイルからすべての取引所のターゲット設定を削除する

ID: 1

既存のプロファイル:

{
"response": {
"status": "OK",
"count": 1,
"start_element": 0,
"num_elements": 100,
"id": "11",
"bidder_profile": {
"id": 11,
"bidder_id": 129,
"code": null,
"description": null,
"targeting": {
"exchanges": {
"action": "include",
"targets": [
{
"id": 1,
"name": "Direct"
}
]
},
"ad_types": {
"banner": {
"action": "include"
},
"video": {
"action": "include"
},
"audio": {
"action": "include"
},
"native": {
"action": "include"
}
}
},
"last_activity": "2018-05-30 21:59:47",
"created_on": "2018-05-30 21:58:53",
"active": false
},
"dbg": {
"warnings": [
],
"version": "1.18.552",
"output_term": "bidder_profile"
}
}
}

JSON ファイル:

cat np_3
{
"bidder_profile":{
"targeting":{
"exchanges":{"targets":[]}
}
}
}

PUT 呼び出し:

curl -b cookies -c cookies -X PUT -d '@np_3' "https://api.adnxs.com/bidder-profile/129/11" | json_reformat
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 725 100 585 100 140 1811 433 --:--:-- --:--:-- --:--:-- 1811
{
"response": {
"status": "OK",
"count": 1,
"start_element": 0,
"num_elements": 100,
"id": "11",
"bidder_profile": {
"id": 11,
"bidder_id": 129,
"code": null,
"description": null,
"targeting": {
"ad_types": {
"banner": {
"action": "include"
},
"video": {
"action": "include"
},
"audio": {
"action": "include"
},
"native": {
"action": "include"
}
}
},
"last_activity": "2018-05-30 22:00:25",
"created_on": "2018-05-30 21:58:53",
"active": false
},
"dbg": {
"warnings": [
],
"version": "1.18.552",
"output_term": "bidder_profile"
}
}
}

既存のプロファイルをアクティブ化する

注:

既定では、プロファイルは非アクティブです。 有効にするには、アクティブフラグを true に設定する必要があります。

ID: 2

既存のプロファイル:

curl -b cookies -c cookies -X POST -d '@np_4.json' "https://api.adnxs.com/bidder-profile?bidder_id=129" | json_reformat
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 676 100 484 100 192 2364 937 --:--:-- --:--:-- --:--:-- 2372
{
"response": {
"status": "OK",
"count": 1,
"start_element": 0,
"num_elements": 100,
"id": 13,
"bidder_profile": {
"id": 13,
"bidder_id": 129,
"code": null,
"description": null,
"targeting": {
"ad_types": {
"banner": {
"action": "exclude"
},
"video": {
"action": "exclude"
},
"audio": {
"action": "exclude"
},
"native": {
"action": "include"
}
}
},
"last_activity": "2018-06-13 20:25:21",
"created_on": "2018-06-13 20:25:21",
"active": false
},
"dbg": {
"warnings": [
],
"version": "1.18.591",
"output_term": "bidder_profile"
}
}
}

JSON ファイル:

cat np_4.json
{
"bidder_profile": {
"active": true
}
}

PUT 呼び出し:

curl -b cookies -c cookies -X PUT -d '@np_4.json' "https://api.adnxs.com/bidder-profile/129/13" | json_reformat
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 522 100 485 100 37 1212 92 --:--:-- --:--:-- --:--:-- 1212
{
"response": {
"status": "OK",
"count": 1,
"start_element": 0,
"num_elements": 100,
"id": "13",
"bidder_profile": {
"id": 13,
"bidder_id": 129,
"code": null,
"description": null,
"targeting": {
"ad_types": {
"banner": {
"action": "exclude"
},
"video": {
"action": "exclude"
},
"audio": {
"action": "exclude"
},
"native": {
"action": "include"
}
}
},
"last_activity": "2018-06-13 20:47:01",
"created_on": "2018-06-13 20:25:21",
"active": true
},
"dbg": {
"warnings": [
],
"version": "1.18.591",
"output_term": "bidder_profile"
}
}
}

既存のプロファイルのバナー サイズのターゲットを削除する

ID: 3

既存のプロファイル:

curl -b cookies -c cookies -X PUT -d '@np_4.json' "https://api.adnxs.com/bidder-profile/129/16" | json_reformat
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 781 100 662 100 119 1999 359 --:--:-- --:--:-- --:--:-- 1993
{
"response": {
"status": "OK",
"count": 1,
"start_element": 0,
"num_elements": 100,
"id": "16",
"bidder_profile": {
"id": 16,
"bidder_id": 129,
"code": null,
"description": null,
"targeting": {
"domain_lists": {
"action": "include",
"targets": [
{
"id": 100675,
"name": "Domains to exclude",
"description": "block facebook.com",
"type": "black"
}
]
},
"ad_types": {
"banner": {
"action": "include",
"sizes": [
{
"width": 200,
"height": 100
}
]
},
"video": {
"action": "exclude"
},
"audio": {
"action": "exclude"
},
"native": {
"action": "exclude"
}
}
},
"last_activity": "2018-06-15 21:06:36",
"created_on": "2018-06-15 20:31:03",
"active": true
},
"dbg": {
"warnings": [
],
"version": "1.18.594",
"output_term": "bidder_profile"
}
}
}

JSON ファイル:

cat np_4.json
{
"bidder_profile": {
"targeting": {
"ad_types": {
"banner": {
"action": "include",
"sizes":[]
}
}
}
}
}

PUT 呼び出し:

curl -b cookies -c cookies -X PUT -d '@np_4.json' "https://api.adnxs.com/bidder-profile/129/16" | json_reformat
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 756 100 636 100 120 3211 606 --:--:-- --:--:-- --:--:-- 3228
{
"response": {
"status": "OK",
"count": 1,
"start_element": 0,
"num_elements": 100,
"id": "16",
"bidder_profile": {
"id": 16,
"bidder_id": 129,
"code": null,
"description": null,
"targeting": {
"domain_lists": {
"action": "include",
"targets": [
{
"id": 100675,
"name": "Domains to exclude",
"description": "block facebook.com",
"type": "black"
}
]
},
"ad_types": {
"banner": {
"action": "include",
"sizes": [
]
},
"video": {
"action": "exclude"
},
"audio": {
"action": "exclude"
},
"native": {
"action": "exclude"
}
}
},
"last_activity": "2018-06-15 21:06:50",
"created_on": "2018-06-15 20:31:03",
"active": true
},
"dbg": {
"warnings": [
],
"version": "1.18.594",
"output_term": "bidder_profile"
}
}
}