Skip to content

Commit f08035a

Browse files
authored
Support imp.ext.prebid.bidder.<bidder> as a new place for bidder parameters (prebid#976)
* Moved bidder parameters from imp.ext to imp.ext.prebid.bidder before proceeding with an auction * Merge bidder parameters instead of replacing whole object * Adjust bid request validation to look into new location of bidder parameters * Update core exchange logic to look for bidder parameters in new location * Update stored response processing to look for bidders in new location * Update Rubicon bidder to look for cpmoverride in new location * Do not pass empty prebid sub-ext to bidders * Fix integration tests after moving bidder parameters to a new place * Tidy up * Update references to imp.ext.<bidder> with a new location imp.ext.prebid.bidder.<bidder>
1 parent 05b7ea2 commit f08035a

52 files changed

Lines changed: 1286 additions & 696 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/bidders/appnexus.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,13 @@ that would match with the test creative.
3737
}]
3838
},
3939
"ext": {
40-
"appnexus": {
41-
"placementId": 13144370
42-
}
43-
}
40+
"prebid": {
41+
"bidder":{
42+
"appnexus": {
43+
"placementId": 13144370
44+
}
45+
}
46+
}
47+
}
4448
}]
4549
```

docs/bidders/openx.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,13 @@ If you have any questions regarding setting up, please reach out to your account
3434
]
3535
},
3636
"ext": {
37-
"openx": {
38-
"delDomain": "mobile-d.openx.net",
39-
"unit": "541028953"
37+
"prebid": {
38+
"bidder":{
39+
"openx": {
40+
"delDomain": "mobile-d.openx.net",
41+
"unit": "541028953"
42+
}
43+
}
4044
}
4145
}
4246
}
@@ -56,10 +60,14 @@ If you have any questions regarding setting up, please reach out to your account
5660
]
5761
},
5862
"ext": {
59-
"openx": {
60-
"unit": "540949380",
61-
"delDomain": "sademo-d.openx.net"
62-
},
63+
"prebid": {
64+
"bidder":{
65+
"openx": {
66+
"unit": "540949380",
67+
"delDomain": "sademo-d.openx.net"
68+
}
69+
}
70+
}
6371
}
6472
}
6573
```

docs/bidders/pubmatic.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@ and sizes that would match with the test creative.
2323
]
2424
},
2525
"ext":{
26-
"pubmatic":{
27-
"publisherId":“156276”,
28-
"adSlot":"pubmatic_test"
26+
"prebid": {
27+
"bidder"{
28+
"pubmatic":{
29+
"publisherId":“156276”,
30+
"adSlot":"pubmatic_test"
31+
}
32+
}
2933
}
3034
}
3135
}

docs/bidders/pubnative.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Please see [documentation](https://developers.pubnative.net/docs/prebid-adding-p
1010

1111
## Configuration
1212

13-
- bidder should be always set to "pubnative" (`imp.ext.pubnative`)
14-
- zone_id (int) should be always set to 1, unless special use case agreed with our account manager. (`imp.ext.pubnative.zone_id`)
15-
- app_auth_token (string) is unique per publisher app. Please contact our account manager to obtain yours. (`imp.ext.pubnative.app_auth_token`)
13+
- bidder should be always set to "pubnative" (`imp.ext.prebid.bidder.pubnative`)
14+
- zone_id (int) should be always set to 1, unless special use case agreed with our account manager. (`imp.ext.prebid.bidder.pubnative.zone_id`)
15+
- app_auth_token (string) is unique per publisher app. Please contact our account manager to obtain yours. (`imp.ext.prebid.bidder.pubnative.app_auth_token`)
1616

1717
An example is illustrated in a section below.
1818

@@ -44,9 +44,13 @@ The following json can be used to do a request to prebid server for verifying it
4444
]
4545
},
4646
"ext": {
47-
"pubnative": {
48-
"zone_id": 1,
49-
"app_auth_token": "b620e282f3c74787beedda34336a4821"
47+
"prebid": {
48+
"bidder": {
49+
"pubnative": {
50+
"zone_id": 1,
51+
"app_auth_token": "b620e282f3c74787beedda34336a4821"
52+
}
53+
}
5054
}
5155
}
5256
}

docs/developers/add-new-bidder.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Throughout the rest of this document, substitute `{bidder}` with the name you've
1616
Bidders may define their own APIs for Publishers pass custom values. It is _strongly encouraged_ that these not
1717
duplicate values already present in the [OpenRTB 2.5 spec](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf).
1818

19-
Publishers will send values for these parameters in `request.imp[i].ext.{bidder}` of
19+
Publishers will send values for these parameters in `request.imp[i].ext.prebid.bidder.{bidder}` of
2020
[the Auction endpoint](../endpoints/openrtb2/auction.md). Prebid Server will preprocess these so that
2121
your bidder will access them at `request.imp[i].ext.bidder`--regardless of what your `{bidder}` name is.
2222

@@ -134,7 +134,7 @@ We expect to see at least 90% code coverage on each bidder.
134134

135135
Then `POST` an OpenRTB Request to `http://localhost:8080/openrtb2/auction`.
136136

137-
If at least one `request.imp[i].ext.{bidder}` is defined in your Request, then your bidder should be called.
137+
If at least one `request.imp[i].ext.prebid.bidder.{bidder}` is defined in your Request, then your bidder should be called.
138138

139139
To test user syncs, [save a UID](../endpoints/setuid.md) using the FamilyName of your Bidder.
140140
The next time you use `/openrtb2/auction`, the OpenRTB request sent to your Bidder should have

docs/developers/stored-requests.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ Add the file `stored_imps/{id}.json` and populate it with some [Imp](https://www
3636
]
3737
},
3838
"ext": {
39-
"appnexus": {
40-
"placement_id": 10433394
39+
"prebid": {
40+
"bidder": {
41+
"appnexus": {
42+
"placement_id": 10433394
43+
}
44+
}
4145
}
4246
}
4347
}
@@ -83,8 +87,12 @@ You can also store _part_ of the Imp on the server. For example:
8387
]
8488
},
8589
"ext": {
86-
"appnexus": {
87-
"placement_id": 10433394
90+
"prebid": {
91+
"bidder": {
92+
"appnexus": {
93+
"placement_id": 10433394
94+
}
95+
}
8896
}
8997
}
9098
}

docs/endpoints/info/bidders.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## `GET /info/bidders`
44

55
This endpoint returns a list of active Bidders supported by Prebid Server.
6-
These are the core values allowed to be used as `request.imp[i].ext.{bidder}`
6+
These are the core values allowed to be used as `request.imp[i].ext.prebid.bidder.{bidder}`
77
keys in [Auction](../openrtb2/auction.md) requests.
88

99
For detailed info about a specific Bidder, use [`/info/bidders/{bidderName}`](bidders/bidderName.md)

docs/endpoints/info/bidders/bidderName.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The fields hold the following information:
4040

4141
If `capabilities.app` or `capabilities.site` do not exist, then this Bidder does not support that platform.
4242
OpenRTB Requests which define a `request.app` or `request.site` property will fail if a
43-
`request.imp[i].ext.{bidderName}` exists for a Bidder which doesn't support them.
43+
`request.imp[i].ext.prebid.bidder.{bidderName}` exists for a Bidder which doesn't support them.
4444

4545

4646
## `GET /info/bidders/all`

docs/endpoints/openrtb2/amp.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,16 @@ An example Stored Request is given below:
5454
"id": "some-impression-id",
5555
"banner": {}, // The sizes are defined is set by your AMP tag query params
5656
"ext": {
57-
"appnexus": {
58-
// Insert parameters here
59-
},
60-
"rubicon": {
61-
// Insert parameters here
62-
}
57+
"prebid": {
58+
"bidder": {
59+
"appnexus": {
60+
// Insert parameters here
61+
},
62+
"rubicon": {
63+
// Insert parameters here
64+
}
65+
}
66+
}
6367
}
6468
}
6569
]

docs/endpoints/openrtb2/auction.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,12 @@ The following is a "hello world" request which fetches the [Prebid sample ad](ht
3939
]
4040
},
4141
"ext": {
42-
"appnexus": {
43-
"placement_id": 10433394
42+
"prebid": {
43+
"bidder": {
44+
"appnexus": {
45+
"placement_id": 10433394
46+
}
47+
}
4448
}
4549
}
4650
}
@@ -107,11 +111,11 @@ These fall under the `ext` property of JSON objects.
107111

108112
If `ext` is defined on an object, Prebid Server uses the following conventions:
109113

110-
1. `ext` in "Request objects" uses `ext.prebid` and/or `ext.{anyBidderCode}`.
114+
1. `ext` in "Request objects" uses `ext.prebid` and/or `ext.prebid.bidder.{anyBidderCode}`.
111115
2. `ext` on "Response objects" uses `ext.prebid` and/or `ext.bidder`.
112116
The only exception here is the top-level `BidResponse`, because it's bidder-independent.
113117

114-
`ext.{anyBidderCode}` and `ext.bidder` extensions are defined by bidders.
118+
`ext.prebid.bidder.{anyBidderCode}` and `ext.bidder` extensions are defined by bidders.
115119
`ext.prebid` extensions are defined by Prebid Server.
116120

117121
Exceptions are made for extensions with "standard" recommendations:
@@ -289,11 +293,15 @@ This can be used to request bids from the same Bidder with different params. For
289293
"mimes": ["video/mp4"]
290294
},
291295
"ext": {
292-
"appnexus: {
293-
"placement_id": 123
294-
},
295-
"districtm": {
296-
"placement_id": 456
296+
"prebid": {
297+
"bidder": {
298+
"appnexus: {
299+
"placement_id": 123
300+
},
301+
"districtm": {
302+
"placement_id": 456
303+
}
304+
}
297305
}
298306
}
299307
}
@@ -324,7 +332,7 @@ For example, if the Request defines an alias like this:
324332
}
325333
```
326334

327-
then any `imp.ext.appnexus` params will actually go to the **rubicon** adapter.
335+
then any `imp.ext.prebid.bidder.appnexus` params will actually go to the **rubicon** adapter.
328336
It will become impossible to fetch bids from Appnexus within that Request.
329337

330338
#### Bidder Response Times
@@ -757,7 +765,7 @@ This section describes the ways in which Prebid Server **breaks** the OpenRTB sp
757765
Prebid Server returns a 400 on requests which define `wseat` or `bseat`.
758766
We may add support for these in the future, if there's compelling need.
759767

760-
Instead, an impression is only offered to a bidder if `bidrequest.imp[i].ext.{bidderName}` exists.
768+
Instead, an impression is only offered to a bidder if `bidrequest.imp[i].ext.prebid.bidder.{bidderName}` exists.
761769

762770
This supports publishers who want to sell different impressions to different bidders.
763771

0 commit comments

Comments
 (0)