New Adapter: Start.io#4324
Conversation
| var bidExt openrtb_ext.ExtBid | ||
| err := jsonutil.Unmarshal(bid.Ext, &bidExt) | ||
| if err == nil && bidExt.Prebid != nil { | ||
| switch bidExt.Prebid.Type { |
There was a problem hiding this comment.
Consider this as a suggestion. The current implementation follows an anti-pattern, assumes that if there is a multi-format request, the media type defaults to openrtb_ext.BidTypeBanner. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, we strongly recommend implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.
| var bidExt openrtb_ext.ExtBid | ||
| err := jsonutil.Unmarshal(bid.Ext, &bidExt) | ||
| if err == nil && bidExt.Prebid != nil { | ||
| switch bidExt.Prebid.Type { |
There was a problem hiding this comment.
Consider this as a suggestion. The current implementation follows an anti-pattern, assumes that if there is a multi-format request, the media type defaults to openrtb_ext.BidTypeNative. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, we strongly recommend implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.
| var bidExt openrtb_ext.ExtBid | ||
| err := jsonutil.Unmarshal(bid.Ext, &bidExt) | ||
| if err == nil && bidExt.Prebid != nil { | ||
| switch bidExt.Prebid.Type { |
There was a problem hiding this comment.
Consider this as a suggestion. The current implementation follows an anti-pattern, assumes that if there is a multi-format request, the media type defaults to openrtb_ext.BidTypeVideo. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, we strongly recommend implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.
Code coverage summaryNote:
startioRefer here for heat map coverage report |
| endpoint: "http://pbs-rtb.startappnetwork.com/1.3/2.5/getbid?account=pbs" | ||
| maintainer: | ||
| email: prebid@start.io | ||
| gvlVendorID: 1216 |
bsardo
left a comment
There was a problem hiding this comment.
@przemkaczmarek and I reviewed together. Please see comments.
| @@ -0,0 +1,15 @@ | |||
| endpoint: "http://pbs-rtb.startappnetwork.com/1.3/2.5/getbid?account=pbs" | |||
There was a problem hiding this comment.
Verified endpoint is reachable
curl -i --location --request POST http://pbs-rtb.startappnetwork.com/1.3/2.5/getbid?account=pbs
HTTP/1.1 200 OK
Date: Thu, 01 May 2025 13:31:53 GMT
Content-Length: 0
Connection: keep-alive
Server: Golang net/http
| @@ -0,0 +1,15 @@ | |||
| endpoint: "http://pbs-rtb.startappnetwork.com/1.3/2.5/getbid?account=pbs" | |||
| maintainer: | |||
| email: prebid@start.io | |||
There was a problem hiding this comment.
We've sent an email to this address. Please reply with "confirmed" to verify that this address is reachable.
There was a problem hiding this comment.
Confirmed received response.
| endpoint: "http://pbs-rtb.startappnetwork.com/1.3/2.5/getbid?account=pbs" | ||
| maintainer: | ||
| email: prebid@start.io | ||
| gvlVendorID: 1216 |
There was a problem hiding this comment.
Verified GVL is correct
curl https://vendor-list.consensu.org/v3/vendor-list.json | jq '.vendors."1216"'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 749k 100 749k 0 0 4788k 0 --:--:-- --:--:-- --:--:-- 4805k
{
"id": 1216,
"name": "Start.io Inc",
"purposes": [
1,
3,
4
],
"legIntPurposes": [
2,
7,
10
],
"flexiblePurposes": [
2,
7,
10
],
"specialPurposes": [
1,
2
],
"features": [
1
],
"specialFeatures": [
1
],
"overflow": {
"httpGetLimit": 128
},
"cookieMaxAgeSeconds": null,
"usesCookies": false,
"cookieRefresh": false,
"urls": [
{
"langId": "en",
"privacy": "https://www.start.io/policy/privacy-policy-site/",
"legIntClaim": "https://www.start.io/policy/privacy-policy-site/"
},
{
"langId": "fr",
"privacy": "https://www.start.io/policy/privacy-policy-site/",
"legIntClaim": "https://www.start.io/policy/privacy-policy-site/"
},
{
"langId": "es",
"privacy": "https://www.start.io/policy/privacy-policy-site/",
"legIntClaim": "https://www.start.io/policy/privacy-policy-site/"
},
{
"langId": "de",
"privacy": "https://www.start.io/policy/privacy-policy-site/",
"legIntClaim": "https://www.start.io/policy/privacy-policy-site/"
}
],
"usesNonCookieAccess": true,
"dataRetention": {
"stdRetention": 365,
"purposes": {},
"specialPurposes": {}
},
"dataDeclaration": [
1,
2,
3,
6,
7,
8,
9,
10,
11
],
"deviceStorageDisclosureUrl": "https://info.startappservice.com/tcf/start.io_domains.json"
}
| "github.com/prebid/prebid-server/v3/util/jsonutil" | ||
| ) | ||
|
|
||
| type StartioAdapter struct { |
There was a problem hiding this comment.
Nitpick: let's call this adapter
| uri, err := url.ParseRequestURI(config.Endpoint) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
|
|
||
| bidder := &StartioAdapter{ | ||
| endpoint: uri.String(), | ||
| } | ||
|
|
||
| return bidder, nil |
There was a problem hiding this comment.
It looks like you're trying to validate your endpoint URL. This can be simplified to
bidder := &adapter{
endpoint: config.Endpoint,
}
return bidder, nil
Endpoint validation occurs upstream when the YAML files are loaded.
There was a problem hiding this comment.
Thanks, done.
| } | ||
|
|
||
| var errs []error | ||
| bidderResponse := adapters.NewBidderResponseWithBidsCapacity(len(bidResponse.SeatBid)) |
There was a problem hiding this comment.
Is it better to start with a capacity derived from SeatBid[i].Bid instead?
There was a problem hiding this comment.
Thanks, adjusted.
| return "", &errortypes.BadServerResponse{ | ||
| Message: fmt.Sprintf("Failed to parse bid media type for impression %s.", bid.ImpID), | ||
| } |
There was a problem hiding this comment.
Please add a supplemental JSON test called invalid-resp-media-type.json to cover this case. Since you don't support audio I suggest returning that in your response.
| } | ||
|
|
||
| func getMediaTypeForBid(bid openrtb2.Bid) (openrtb_ext.BidType, error) { | ||
|
|
There was a problem hiding this comment.
Super nitpick: delete blank line
|
|
||
| func validateRequest(request openrtb2.BidRequest) error { | ||
| if !isSupportedCurrency(request.Cur) { | ||
| return wrapReqError("unsupported currency: only USD is accepted") |
There was a problem hiding this comment.
Please add a supplemental JSON test called req-invalid-unsupported-cur.json to cover this case.
| } | ||
|
|
||
| if !hasSiteOrAppID(request) { | ||
| return wrapReqError("request must contain either site.id or app.id") |
There was a problem hiding this comment.
Please add supplemental JSON tests called req-invalid-missing-site-id.json and req-invalid-missing-app-id.json to cover this case.
There was a problem hiding this comment.
hasSiteOrAppID has been removed. Please, correct me if I am wrong, but these tests are not needed anymore.
Code coverage summaryNote:
startioRefer here for heat map coverage report |
Code coverage summaryNote:
startioRefer here for heat map coverage report |
|
LGTM now. in MakeBids func. |
Code coverage summaryNote:
startioRefer here for heat map coverage report |
Thanks. Added requested conditional checks. |
@przemkaczmarek just FYI, we shouldn't need to add these checks. PBS core will handle these cases appropriately keeping the bidder out of the final bid response sent back to the publisher. |

Docs PR - prebid/prebid.github.io#6018
Related Changes