diff --git a/adapters/bizzclick/bizzclick.go b/adapters/bizzclick/bizzclick.go index a7db3e139fd..4f16268cd05 100644 --- a/adapters/bizzclick/bizzclick.go +++ b/adapters/bizzclick/bizzclick.go @@ -108,7 +108,11 @@ func (a *adapter) buildEndpointURL(params *openrtb_ext.ExtBizzclick) (string, er if params.Host != "" { host = params.Host } - endpointParams := macros.EndpointTemplateParams{AccountID: params.AccountID, SourceId: params.SourceID, Host: host} + sourceId := params.SourceID + if params.SourceID == "" { + sourceId = params.PlacementID + } + endpointParams := macros.EndpointTemplateParams{AccountID: params.AccountID, SourceId: sourceId, Host: host} return macros.ResolveMacros(a.endpoint, endpointParams) } diff --git a/adapters/bizzclick/bizzclicktest/exemplary/default-host-param.json b/adapters/bizzclick/bizzclicktest/exemplary/default-host-param.json new file mode 100644 index 00000000000..d11883899b7 --- /dev/null +++ b/adapters/bizzclick/bizzclicktest/exemplary/default-host-param.json @@ -0,0 +1,150 @@ +{ + "mockBidRequest": { + "id": "some-request-id", + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "tmax": 1000, + "user": { + "buyeruid": "awesome-user" + }, + "app": { + "publisher": { + "id": "123456789" + }, + "cat": [ + "IAB22-1" + ], + "bundle": "com.app.awesome", + "name": "Awesome App", + "domain": "awesomeapp.com", + "id": "123456789" + }, + "imp": [ + { + "id": "some-impression-id", + "tagid": "ogTAGID", + "banner": { + "w": 320, + "h": 50 + }, + "ext": { + "bidder": { + "accountId": "accountId", + "placementId": "placementId" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "headers": { + "Content-Type": [ + "application/json;charset=utf-8" + ], + "Accept": [ + "application/json" + ], + "X-Openrtb-Version": [ + "2.5" + ], + "User-Agent": [ + "test-user-agent" + ], + "X-Forwarded-For": [ + "123.123.123.123" + ] + }, + "uri": "http://us-e-node1.bizzclick.com/bid?rtb_seat_id=placementId&secret_key=accountId", + "body": { + "id": "some-request-id", + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "imp": [ + { + "id": "some-impression-id", + "banner": { + "w": 320, + "h": 50 + }, + "tagid": "ogTAGID" + } + ], + "app": { + "id": "123456789", + "name": "Awesome App", + "bundle": "com.app.awesome", + "domain": "awesomeapp.com", + "cat": [ + "IAB22-1" + ], + "publisher": { + "id": "123456789" + } + }, + "user": { + "buyeruid": "awesome-user" + }, + "tmax": 1000 + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "awesome-resp-id", + "seatbid": [ + { + "bid": [ + { + "id": "a3ae1b4e2fc24a4fb45540082e98e161", + "impid": "1", + "price": 3.5, + "adm": "awesome-markup", + "adomain": [ + "awesome.com" + ], + "crid": "20", + "w": 320, + "h": 50 + } + ], + "type": "banner", + "seat": "bizzclick" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "a3ae1b4e2fc24a4fb45540082e98e161", + "impid": "1", + "price": 3.5, + "adm": "awesome-markup", + "adomain": [ + "awesome.com" + ], + "crid": "20", + "w": 320, + "h": 50 + }, + "type": "banner" + } + ] + } + ] +} \ No newline at end of file diff --git a/openrtb_ext/imp_bizzclick.go b/openrtb_ext/imp_bizzclick.go index 3d55ba039a6..15a8c2d0d46 100644 --- a/openrtb_ext/imp_bizzclick.go +++ b/openrtb_ext/imp_bizzclick.go @@ -1,7 +1,8 @@ package openrtb_ext type ExtBizzclick struct { - AccountID string `json:"accountId"` - SourceID string `json:"sourceId"` - Host string `json:"host"` + AccountID string `json:"accountId"` + SourceID string `json:"sourceId"` + Host string `json:"host"` + PlacementID string `json:"placementId"` } diff --git a/static/bidder-params/bizzclick.json b/static/bidder-params/bizzclick.json index 937f3356367..3f16e990be1 100644 --- a/static/bidder-params/bizzclick.json +++ b/static/bidder-params/bizzclick.json @@ -18,10 +18,25 @@ "type": "string", "description": "Server region", "minLength": 1 + }, + "placementId": { + "type": "string", + "description": "Deprecated, use sourceId instead", + "minLength": 1 } }, - "required": [ - "accountId", - "sourceId" + "oneOf": [ + { + "required": [ + "accountId", + "placementId" + ] + }, + { + "required": [ + "accountId", + "sourceId" + ] + } ] } \ No newline at end of file