diff --git a/adapters/nativery/nativery.go b/adapters/nativery/nativery.go
new file mode 100644
index 00000000000..1cd05aac121
--- /dev/null
+++ b/adapters/nativery/nativery.go
@@ -0,0 +1,267 @@
+package nativery
+
+import (
+ "fmt"
+ "maps"
+ "net/http"
+
+ "github.com/prebid/openrtb/v20/openrtb2"
+ "github.com/prebid/prebid-server/v3/adapters"
+ "github.com/prebid/prebid-server/v3/config"
+ "github.com/prebid/prebid-server/v3/errortypes"
+ "github.com/prebid/prebid-server/v3/metrics"
+ "github.com/prebid/prebid-server/v3/openrtb_ext"
+ "github.com/prebid/prebid-server/v3/util/jsonutil"
+)
+
+type adapter struct {
+ endpoint string
+}
+
+type bidReqExtNativery struct {
+ IsAMP bool `json:"isAmp"`
+ WidgetId string `json:"widgetId"`
+}
+
+type bidExtNativery struct {
+ BidType string `json:"bid_ad_media_type"`
+ BidAdvDomains []string `json:"bid_adv_domains"`
+
+ AdvertiserId string `json:"adv_id,omitempty"`
+ BrandCategory int `json:"brand_category_id,omitempty"`
+}
+
+type bidExt struct {
+ Nativery bidExtNativery `json:"nativery"`
+}
+
+func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) {
+ bidder := &adapter{
+ endpoint: config.Endpoint,
+ }
+ return bidder, nil
+}
+
+func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) {
+ reqCopy := *request
+ var errs []error
+
+ // check if the request come from AMP
+ var isAMP int
+ if reqInfo.PbsEntryPoint == metrics.ReqTypeAMP {
+ isAMP = 1
+ }
+
+ var widgetId string
+
+ // attach body request for all the impressions
+ validImps := make([]openrtb2.Imp, 0, len(request.Imp))
+ for i, imp := range request.Imp {
+ nativeryExt, err := buildNativeryExt(&imp)
+
+ if err != nil {
+ errs = append(errs, err)
+ continue
+ }
+
+ if i == 0 {
+ widgetId = nativeryExt.WidgetId
+ }
+
+ validImps = append(validImps, imp)
+ }
+
+ reqCopy.Imp = validImps
+ if len(reqCopy.Imp) == 0 {
+ return nil, errs
+ }
+
+ reqExt, err := getRequestExt(reqCopy.Ext)
+ if err != nil {
+ return nil, append(errs, err)
+ }
+
+ reqExtNativery, err := getNativeryExt(reqExt, isAMP, widgetId)
+ if err != nil {
+ return nil, append(errs, err)
+ }
+ adapterRequests, splitErrors := splitRequests(reqCopy.Imp, &reqCopy, reqExt, reqExtNativery, a.endpoint)
+
+ return adapterRequests, append(errs, splitErrors...)
+}
+
+func buildNativeryExt(imp *openrtb2.Imp) (openrtb_ext.ImpExtNativery, error) {
+ var bidderExt adapters.ExtImpBidder
+ if err := jsonutil.Unmarshal(imp.Ext, &bidderExt); err != nil {
+ return openrtb_ext.ImpExtNativery{}, err
+ }
+
+ var nativeryExt openrtb_ext.ImpExtNativery
+ if err := jsonutil.Unmarshal(bidderExt.Bidder, &nativeryExt); err != nil {
+ return openrtb_ext.ImpExtNativery{}, err
+ }
+
+ return nativeryExt, nil
+}
+
+func (a *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest *adapters.RequestData, response *adapters.ResponseData) (*adapters.BidderResponse, []error) {
+ if adapters.IsResponseStatusCodeNoContent(response) {
+ nativeryError := response.Headers.Get("X-Nativery-Error")
+ if nativeryError != "" {
+ return nil, []error{&errortypes.BadInput{
+ Message: fmt.Sprintf("Nativery Error: %s.", nativeryError),
+ }}
+ }
+
+ return nil, []error{&errortypes.BadServerResponse{
+ Message: "No Content",
+ }}
+ }
+
+ if err := adapters.CheckResponseStatusCodeForErrors(response); err != nil {
+ return nil, []error{err}
+ }
+
+ var nativeryResponse openrtb2.BidResponse
+ if err := jsonutil.Unmarshal(response.Body, &nativeryResponse); err != nil {
+ return nil, []error{err}
+ }
+
+ var errs []error
+ bidderResponse := adapters.NewBidderResponseWithBidsCapacity(len(internalRequest.Imp))
+ for _, sb := range nativeryResponse.SeatBid {
+ for i := range sb.Bid {
+ bid := sb.Bid[i]
+
+ var bidExt bidExt
+ if err := jsonutil.Unmarshal(bid.Ext, &bidExt); err != nil {
+ errs = append(errs, err)
+ continue
+ }
+
+ bidType, err := getMediaTypeForBid(&bidExt)
+ if err != nil {
+ errs = append(errs, err)
+ continue
+ }
+ bidMeta := buildBidMeta(string(bidType), bidExt.Nativery.BidAdvDomains)
+
+ bidderResponse.Bids = append(bidderResponse.Bids, &adapters.TypedBid{
+ Bid: &bid,
+ BidType: bidType,
+ BidMeta: bidMeta,
+ })
+ }
+
+ }
+
+ if nativeryResponse.Cur != "" {
+ bidderResponse.Currency = nativeryResponse.Cur
+ } else {
+ bidderResponse.Currency = "EUR"
+ }
+ return bidderResponse, errs
+
+}
+
+func getMediaTypeForBid(bid *bidExt) (openrtb_ext.BidType, error) {
+ switch bid.Nativery.BidType {
+ case "native":
+ return openrtb_ext.BidTypeNative, nil
+ case "display", "banner", "rich_media":
+ return openrtb_ext.BidTypeBanner, nil
+ case "video":
+ return openrtb_ext.BidTypeVideo, nil
+ default:
+ return "", fmt.Errorf("unrecognized bid_ad_media_type in response from nativery: %s", bid.Nativery.BidType)
+ }
+}
+
+func buildBidMeta(mediaType string, advDomain []string) *openrtb_ext.ExtBidPrebidMeta {
+
+ return &openrtb_ext.ExtBidPrebidMeta{
+ MediaType: mediaType,
+ AdvertiserDomains: advDomain,
+ }
+}
+
+func splitRequests(
+ imps []openrtb2.Imp,
+ request *openrtb2.BidRequest,
+ requestExt map[string]jsonutil.RawMessage,
+ requestExtNativery bidReqExtNativery,
+ uri string,
+) ([]*adapters.RequestData, []error) {
+ var errs []error
+
+ resArr := make([]*adapters.RequestData, 0, len(imps))
+
+ headers := http.Header{}
+ headers.Add("Content-Type", "application/json;charset=utf-8")
+ headers.Add("Accept", "application/json")
+
+ nativeryExtJson, err := jsonutil.Marshal(requestExtNativery)
+ if err != nil {
+ errs = append(errs, err)
+ }
+
+ baseReq := *request
+
+ for _, imp := range imps {
+ extClone := maps.Clone(requestExt)
+ extClone["nativery"] = nativeryExtJson
+
+ reqCopy := baseReq
+
+ reqCopy.Ext, err = jsonutil.Marshal(extClone)
+ if err != nil {
+ errs = append(errs, err)
+ continue
+ }
+
+ reqCopy.Imp = []openrtb2.Imp{imp}
+
+ reqJSON, err := jsonutil.Marshal(&reqCopy)
+ if err != nil {
+ errs = append(errs, err)
+ continue
+ }
+
+ resArr = append(resArr, &adapters.RequestData{
+ Method: "POST",
+ Uri: uri,
+ Body: reqJSON,
+ Headers: headers,
+ ImpIDs: openrtb_ext.GetImpIDs(reqCopy.Imp),
+ })
+ }
+
+ return resArr, errs
+}
+
+func getRequestExt(ext jsonutil.RawMessage) (map[string]jsonutil.RawMessage, error) {
+ extMap := make(map[string]jsonutil.RawMessage)
+
+ if len(ext) > 0 {
+ if err := jsonutil.Unmarshal(ext, &extMap); err != nil {
+ return nil, err
+ }
+ }
+
+ return extMap, nil
+}
+
+func getNativeryExt(extMap map[string]jsonutil.RawMessage, isAMP int, widgetId string) (bidReqExtNativery, error) {
+ var nativeryExt bidReqExtNativery
+
+ if nativeryExtJson, exists := extMap["nativery"]; exists && len(nativeryExtJson) > 0 {
+ if err := jsonutil.Unmarshal(nativeryExtJson, &nativeryExt); err != nil {
+ return nativeryExt, err
+ }
+ }
+
+ nativeryExt.IsAMP = isAMP == 1
+ nativeryExt.WidgetId = widgetId
+
+ return nativeryExt, nil
+}
diff --git a/adapters/nativery/nativery_test.go b/adapters/nativery/nativery_test.go
new file mode 100644
index 00000000000..4875089fea4
--- /dev/null
+++ b/adapters/nativery/nativery_test.go
@@ -0,0 +1,20 @@
+package nativery
+
+import (
+ "testing"
+
+ "github.com/prebid/prebid-server/v3/adapters/adapterstest"
+ "github.com/prebid/prebid-server/v3/config"
+ "github.com/prebid/prebid-server/v3/openrtb_ext"
+)
+
+func TestJsonSamples(t *testing.T) {
+ bidder, buildErr := Builder(openrtb_ext.BidderNativery, config.Adapter{
+ Endpoint: "http://example.com/hb"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"})
+
+ if buildErr != nil {
+ t.Fatalf("Builder returned unexpected error %v", buildErr)
+ }
+
+ adapterstest.RunJSONBidderTest(t, "nativerytest", bidder)
+}
diff --git a/adapters/nativery/nativerytest/amp/banner.json b/adapters/nativery/nativerytest/amp/banner.json
new file mode 100644
index 00000000000..254655da040
--- /dev/null
+++ b/adapters/nativery/nativerytest/amp/banner.json
@@ -0,0 +1,140 @@
+{
+ "mockBidRequest": {
+ "id": "test-request-id",
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "banner": {
+ "format": [
+ {
+ "w": 300,
+ "h": 250
+ }
+ ]
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "http://example.com/hb",
+ "body": {
+ "id": "test-request-id",
+ "ext": {
+ "nativery": {
+ "isAmp": true,
+ "widgetId": "1"
+ }
+ },
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "banner": {
+ "format": [
+ {
+ "w": 300,
+ "h": 250
+ }
+ ]
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "impIDs": ["test-imp-id"]
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "id": "test-request-id",
+ "seatbid": [
+ {
+ "bid": [
+ {
+ "id": "test-request-id",
+ "impid": "test-imp-id",
+ "price": 1000,
+ "adm": "
ad
",
+ "adomain": ["example.com"],
+ "cid": "test-cid",
+ "crid": "test-crid",
+ "cat": ["IAB13-4"],
+ "w": 300,
+ "h": 250,
+ "mtype": 1,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "display"
+ }
+ }
+ }
+ ],
+ "seat": "nat-123"
+ }
+ ],
+ "cur": "EUR"
+ }
+ }
+ }
+ ],
+ "expectedBidResponses": [
+ {
+ "currency": "EUR",
+ "bids": [
+ {
+ "bid": {
+ "id": "test-request-id",
+ "impid": "test-imp-id",
+ "price": 1000,
+ "adm": "ad
",
+ "adomain": ["example.com"],
+ "cid": "test-cid",
+ "crid": "test-crid",
+ "cat": ["IAB13-4"],
+ "w": 300,
+ "h": 250,
+ "mtype": 1,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "display"
+ }
+ }
+ },
+ "type": "banner"
+ }
+ ]
+ }
+ ]
+}
diff --git a/adapters/nativery/nativerytest/amp/multi-format-multi-imp-type.json b/adapters/nativery/nativerytest/amp/multi-format-multi-imp-type.json
new file mode 100644
index 00000000000..55328243307
--- /dev/null
+++ b/adapters/nativery/nativerytest/amp/multi-format-multi-imp-type.json
@@ -0,0 +1,372 @@
+{
+ "mockBidRequest": {
+ "id": "test-multi-request-id",
+ "imp": [
+ {
+ "id": "imp-banner",
+ "banner": {
+ "format": [{ "w": 300, "h": 250 }]
+ },
+ "ext": {
+ "bidder": { "widgetId": "1" }
+ }
+ },
+ {
+ "id": "imp-native",
+ "native": {
+ "request": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":25}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":100,\"hmin\":100}}],\"context\":1,\"plcmttype\":1}"
+ },
+ "ext": {
+ "bidder": { "widgetId": "1" }
+ }
+ },
+ {
+ "id": "imp-hybrid",
+ "banner": {
+ "format": [{ "w": 728, "h": 90 }]
+ },
+ "native": {
+ "request": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":50}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":200,\"hmin\":200}}],\"context\":1,\"plcmttype\":1}"
+ },
+ "ext": {
+ "bidder": { "widgetId": "1" }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "http://example.com/hb",
+ "body": {
+ "id": "test-multi-request-id",
+ "ext": {
+ "nativery": { "isAmp": true, "widgetId": "1" }
+ },
+ "imp": [
+ {
+ "id": "imp-banner",
+ "banner": { "format": [{ "w": 300, "h": 250 }] },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "impIDs": ["imp-banner"]
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "id": "test-multi-request-id",
+ "seatbid": [
+ {
+ "seat": "nat-123",
+ "bid": [
+ {
+ "id": "bid-banner",
+ "impid": "imp-banner",
+ "price": 800,
+ "adm": "banner ad
",
+ "adomain": ["example.com"],
+ "cid": "cid-banner",
+ "crid": "crid-banner",
+ "cat": ["IAB13-4"],
+ "w": 300,
+ "h": 250,
+ "mtype": 1,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "display"
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "cur": "EUR"
+ }
+ }
+ },
+ {
+ "expectedRequest": {
+ "uri": "http://example.com/hb",
+ "body": {
+ "id": "test-multi-request-id",
+ "ext": {
+ "nativery": { "isAmp": true, "widgetId": "1" }
+ },
+ "imp": [
+ {
+ "id": "imp-native",
+ "native": {
+ "request": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":25}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":100,\"hmin\":100}}],\"context\":1,\"plcmttype\":1}"
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "impIDs": ["imp-native"]
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "id": "test-multi-request-id",
+ "seatbid": [
+ {
+ "seat": "nat-123",
+ "bid": [
+ {
+ "id": "bid-native",
+ "impid": "imp-native",
+ "price": 600,
+ "adm": "{\"native\":{\"assets\":[…],\"link\":{\"url\":\"http://example.com/click\"}}}",
+ "adomain": ["example.com"],
+ "cid": "cid-native",
+ "crid": "crid-native",
+ "cat": ["IAB15-1"],
+ "mtype": 3,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "native"
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "cur": "EUR"
+ }
+ }
+ },
+ {
+ "expectedRequest": {
+ "uri": "http://example.com/hb",
+ "body": {
+ "id": "test-multi-request-id",
+ "ext": {
+ "nativery": { "isAmp": true, "widgetId": "1" }
+ },
+ "imp": [
+ {
+ "id": "imp-hybrid",
+ "banner": { "format": [{ "w": 728, "h": 90 }] },
+ "native": {
+ "request": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":50}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":200,\"hmin\":200}}],\"context\":1,\"plcmttype\":1}"
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "impIDs": ["imp-hybrid"]
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "id": "test-multi-request-id",
+ "seatbid": [
+ {
+ "seat": "nat-123",
+ "bid": [
+ {
+ "id": "bid-hybrid-banner",
+ "impid": "imp-hybrid",
+ "price": 1000,
+ "adm": "hybrid banner
",
+ "adomain": ["example.com"],
+ "cid": "cid-hybrid-banner",
+ "crid": "crid-hybrid-banner",
+ "cat": ["IAB13-4"],
+ "w": 728,
+ "h": 90,
+ "mtype": 1,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "display"
+ }
+ }
+ },
+ {
+ "id": "bid-hybrid-native",
+ "impid": "imp-hybrid",
+ "price": 500,
+ "adm": "{\"native\":{\"assets\":[…],\"link\":{\"url\":\"http://example.com/click2\"}}}",
+ "adomain": ["example.com"],
+ "cid": "cid-hybrid-native",
+ "crid": "crid-hybrid-native",
+ "cat": ["IAB15-1"],
+ "mtype": 3,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "native"
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "cur": "EUR"
+ }
+ }
+ }
+ ],
+ "expectedBidResponses": [
+ {
+ "currency": "EUR",
+ "bids": [
+ {
+ "bid": {
+ "id": "bid-banner",
+ "impid": "imp-banner",
+ "price": 800,
+ "adm": "banner ad
",
+ "adomain": ["example.com"],
+ "cid": "cid-banner",
+ "crid": "crid-banner",
+ "cat": ["IAB13-4"],
+ "w": 300,
+ "h": 250,
+ "mtype": 1,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "display"
+ }
+ }
+ },
+ "type": "banner"
+ }
+ ]
+ },
+ {
+ "currency": "EUR",
+ "bids": [
+ {
+ "bid": {
+ "id": "bid-native",
+ "impid": "imp-native",
+ "price": 600,
+ "adm": "{\"native\":{\"assets\":[…],\"link\":{\"url\":\"http://example.com/click\"}}}",
+ "adomain": ["example.com"],
+ "cid": "cid-native",
+ "crid": "crid-native",
+ "cat": ["IAB15-1"],
+ "mtype": 3,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "native"
+ }
+ }
+ },
+ "type": "native"
+ }
+ ]
+ },
+ {
+ "currency": "EUR",
+ "bids": [
+ {
+ "bid": {
+ "id": "bid-hybrid-banner",
+ "impid": "imp-hybrid",
+ "price": 1000,
+ "adm": "hybrid banner
",
+ "adomain": ["example.com"],
+ "cid": "cid-hybrid-banner",
+ "crid": "crid-hybrid-banner",
+ "cat": ["IAB13-4"],
+ "w": 728,
+ "h": 90,
+ "mtype": 1,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "display"
+ }
+ }
+ },
+ "type": "banner"
+ },
+ {
+ "bid": {
+ "id": "bid-hybrid-native",
+ "impid": "imp-hybrid",
+ "price": 500,
+ "adm": "{\"native\":{\"assets\":[…],\"link\":{\"url\":\"http://example.com/click2\"}}}",
+ "adomain": ["example.com"],
+ "cid": "cid-hybrid-native",
+ "crid": "crid-hybrid-native",
+ "cat": ["IAB15-1"],
+ "mtype": 3,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "native"
+ }
+ }
+ },
+ "type": "native"
+ }
+ ]
+ }
+ ]
+}
diff --git a/adapters/nativery/nativerytest/amp/native.json b/adapters/nativery/nativerytest/amp/native.json
new file mode 100644
index 00000000000..7d5b86aee44
--- /dev/null
+++ b/adapters/nativery/nativerytest/amp/native.json
@@ -0,0 +1,130 @@
+{
+ "mockBidRequest": {
+ "id": "test-request-id",
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "native": {
+ "request": "{\"context\":1,\"plcmttype\":1,\"assets\":[{\"id\":0,\"required\":1,\"img\":{\"type\":3,\"w\":120,\"h\":100}},{\"id\":1,\"required\":1,\"title\":{\"len\":140}},{\"id\":2,\"data\":{\"type\":1}}],\"eventtrackers\":[{\"event\":1,\"methods\":[1]}]}",
+ "ver": "1.2"
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "http://example.com/hb",
+ "body": {
+ "id": "test-request-id",
+ "ext": {
+ "nativery": {
+ "isAmp": true,
+ "widgetId": "1"
+ }
+ },
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "native": {
+ "request": "{\"context\":1,\"plcmttype\":1,\"assets\":[{\"id\":0,\"required\":1,\"img\":{\"type\":3,\"w\":120,\"h\":100}},{\"id\":1,\"required\":1,\"title\":{\"len\":140}},{\"id\":2,\"data\":{\"type\":1}}],\"eventtrackers\":[{\"event\":1,\"methods\":[1]}]}",
+ "ver": "1.2"
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "impIDs": ["test-imp-id"]
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "id": "test-request-id",
+ "seatbid": [
+ {
+ "bid": [
+ {
+ "id": "test-request-id",
+ "impid": "test-imp-id",
+ "price": 1000,
+ "nurl": "http://example.com/win/1000",
+ "adm": "{\"ver\":\"1.2\",\"assets\":[{\"id\":3,\"required\":1,\"img\":{\"url\":\"http://example.com/img/url\",\"w\":120,\"h\":100}},{\"id\":0,\"required\":1,\"title\":{\"text\":\"Test title\"}},{\"id\":5,\"data\":{\"value\":\"Test sponsor\"}}],\"link\":{\"url\":\"http://example.com/click/url\"},\"imptrackers\":[\"http://example.com/impression\"],\"jstracker\":\"\\u003cscript src=\\\"http://example.com/impression\\\"\\u003e\\u003c/script\\u003e\"}",
+ "adomain": ["example.com"],
+ "cid": "test-cid",
+ "crid": "test-crid",
+ "cat": ["IAB13-4"],
+ "mtype": 4,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "native"
+ }
+ }
+ }
+ ],
+ "seat": "nat-123"
+ }
+ ],
+ "cur": "EUR"
+ }
+ }
+ }
+ ],
+ "expectedBidResponses": [
+ {
+ "currency": "EUR",
+ "bids": [
+ {
+ "bid": {
+ "id": "test-request-id",
+ "impid": "test-imp-id",
+ "price": 1000,
+ "nurl": "http://example.com/win/1000",
+ "adm": "{\"ver\":\"1.2\",\"assets\":[{\"id\":3,\"required\":1,\"img\":{\"url\":\"http://example.com/img/url\",\"w\":120,\"h\":100}},{\"id\":0,\"required\":1,\"title\":{\"text\":\"Test title\"}},{\"id\":5,\"data\":{\"value\":\"Test sponsor\"}}],\"link\":{\"url\":\"http://example.com/click/url\"},\"imptrackers\":[\"http://example.com/impression\"],\"jstracker\":\"\\u003cscript src=\\\"http://example.com/impression\\\"\\u003e\\u003c/script\\u003e\"}",
+ "adomain": ["example.com"],
+ "cid": "test-cid",
+ "crid": "test-crid",
+ "cat": ["IAB13-4"],
+ "mtype": 4,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "native"
+ }
+ }
+ },
+ "type": "native"
+ }
+ ]
+ }
+ ]
+}
diff --git a/adapters/nativery/nativerytest/amp/video.json b/adapters/nativery/nativerytest/amp/video.json
new file mode 100644
index 00000000000..e988e3f1d71
--- /dev/null
+++ b/adapters/nativery/nativerytest/amp/video.json
@@ -0,0 +1,138 @@
+{
+ "mockBidRequest": {
+ "id": "test-request-id",
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "video": {
+ "mimes": ["video/mp4"],
+ "minduration": 15,
+ "maxduration": 30,
+ "protocols": [2, 3, 5, 6, 7, 8],
+ "w": 940,
+ "h": 560
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "http://example.com/hb",
+ "body": {
+ "id": "test-request-id",
+ "ext": {
+ "nativery": {
+ "isAmp": true,
+ "widgetId": "1"
+ }
+ },
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "video": {
+ "mimes": ["video/mp4"],
+ "minduration": 15,
+ "maxduration": 30,
+ "protocols": [2, 3, 5, 6, 7, 8],
+ "w": 940,
+ "h": 560
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "impIDs": ["test-imp-id"]
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "id": "test-request-id",
+ "seatbid": [
+ {
+ "bid": [
+ {
+ "id": "test-request-id",
+ "impid": "test-imp-id",
+ "price": 1000,
+ "nurl": "http://example.com/win/1000",
+ "adm": " ...",
+ "adomain": ["example.com"],
+ "cid": "test-cid",
+ "crid": "test-crid",
+ "cat": ["IAB13-4"],
+ "mtype": 2,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "video"
+ }
+ }
+ }
+ ],
+ "seat": "nat-123"
+ }
+ ],
+ "cur": "EUR"
+ }
+ }
+ }
+ ],
+ "expectedBidResponses": [
+ {
+ "currency": "EUR",
+ "bids": [
+ {
+ "bid": {
+ "id": "test-request-id",
+ "impid": "test-imp-id",
+ "price": 1000,
+ "nurl": "http://example.com/win/1000",
+ "adm": " ...",
+ "adomain": ["example.com"],
+ "cid": "test-cid",
+ "crid": "test-crid",
+ "cat": ["IAB13-4"],
+ "mtype": 2,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "video"
+ }
+ }
+ },
+ "type": "video"
+ }
+ ]
+ }
+ ]
+}
diff --git a/adapters/nativery/nativerytest/exemplary/banner-app.json b/adapters/nativery/nativerytest/exemplary/banner-app.json
new file mode 100644
index 00000000000..45dfe824b24
--- /dev/null
+++ b/adapters/nativery/nativerytest/exemplary/banner-app.json
@@ -0,0 +1,154 @@
+{
+ "mockBidRequest": {
+ "id": "test-request-id",
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "banner": {
+ "format": [
+ {
+ "w": 300,
+ "h": 250
+ }
+ ]
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "app": {
+ "bundle": "com.app.awesome",
+ "name": "Amesome App",
+ "domain": "awesomeapp.com",
+ "id": "1"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "http://example.com/hb",
+ "body": {
+ "id": "test-request-id",
+ "ext": {
+ "nativery": {
+ "isAmp": false,
+ "widgetId": "1"
+ }
+ },
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "banner": {
+ "format": [
+ {
+ "w": 300,
+ "h": 250
+ }
+ ]
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "app": {
+ "bundle": "com.app.awesome",
+ "name": "Amesome App",
+ "domain": "awesomeapp.com",
+ "id": "1"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "impIDs": [
+ "test-imp-id"
+ ]
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "id": "test-request-id",
+ "seatbid": [
+ {
+ "bid": [
+ {
+ "id": "test-request-id",
+ "impid": "test-imp-id",
+ "price": 1000,
+ "adm": "ad
",
+ "adomain": [
+ "awesomeapp.com"
+ ],
+ "cid": "test-cid",
+ "crid": "test-crid",
+ "cat": [
+ "IAB13-4"
+ ],
+ "w": 300,
+ "h": 250,
+ "mtype": 1,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "display"
+ }
+ }
+ }
+ ],
+ "seat": "nat-123"
+ }
+ ],
+ "cur": "EUR"
+ }
+ }
+ }
+ ],
+ "expectedBidResponses": [
+ {
+ "currency": "EUR",
+ "bids": [
+ {
+ "bid": {
+ "id": "test-request-id",
+ "impid": "test-imp-id",
+ "price": 1000,
+ "adm": "ad
",
+ "adomain": [
+ "awesomeapp.com"
+ ],
+ "cid": "test-cid",
+ "crid": "test-crid",
+ "cat": [
+ "IAB13-4"
+ ],
+ "w": 300,
+ "h": 250,
+ "mtype": 1,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "display"
+ }
+ }
+ },
+ "type": "banner"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/adapters/nativery/nativerytest/exemplary/banner-no-currency.json b/adapters/nativery/nativerytest/exemplary/banner-no-currency.json
new file mode 100644
index 00000000000..974e3e3ad56
--- /dev/null
+++ b/adapters/nativery/nativerytest/exemplary/banner-no-currency.json
@@ -0,0 +1,139 @@
+{
+ "mockBidRequest": {
+ "id": "test-request-id",
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "banner": {
+ "format": [
+ {
+ "w": 300,
+ "h": 250
+ }
+ ]
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "http://example.com/hb",
+ "body": {
+ "id": "test-request-id",
+ "ext": {
+ "nativery": {
+ "isAmp": false,
+ "widgetId": "1"
+ }
+ },
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "banner": {
+ "format": [
+ {
+ "w": 300,
+ "h": 250
+ }
+ ]
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "impIDs": ["test-imp-id"]
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "id": "test-request-id",
+ "seatbid": [
+ {
+ "bid": [
+ {
+ "id": "test-request-id",
+ "impid": "test-imp-id",
+ "price": 1000,
+ "adm": "ad
",
+ "adomain": ["example.com"],
+ "cid": "test-cid",
+ "crid": "test-crid",
+ "cat": ["IAB13-4"],
+ "w": 300,
+ "h": 250,
+ "mtype": 1,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "display"
+ }
+ }
+ }
+ ],
+ "seat": "nat-123"
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "expectedBidResponses": [
+ {
+ "currency": "EUR",
+ "bids": [
+ {
+ "bid": {
+ "id": "test-request-id",
+ "impid": "test-imp-id",
+ "price": 1000,
+ "adm": "ad
",
+ "adomain": ["example.com"],
+ "cid": "test-cid",
+ "crid": "test-crid",
+ "cat": ["IAB13-4"],
+ "w": 300,
+ "h": 250,
+ "mtype": 1,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "display"
+ }
+ }
+ },
+ "type": "banner"
+ }
+ ]
+ }
+ ]
+}
diff --git a/adapters/nativery/nativerytest/exemplary/banner.json b/adapters/nativery/nativerytest/exemplary/banner.json
new file mode 100644
index 00000000000..8a59fe9a68c
--- /dev/null
+++ b/adapters/nativery/nativerytest/exemplary/banner.json
@@ -0,0 +1,140 @@
+{
+ "mockBidRequest": {
+ "id": "test-request-id",
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "banner": {
+ "format": [
+ {
+ "w": 300,
+ "h": 250
+ }
+ ]
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "http://example.com/hb",
+ "body": {
+ "id": "test-request-id",
+ "ext": {
+ "nativery": {
+ "isAmp": false,
+ "widgetId": "1"
+ }
+ },
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "banner": {
+ "format": [
+ {
+ "w": 300,
+ "h": 250
+ }
+ ]
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "impIDs": ["test-imp-id"]
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "id": "test-request-id",
+ "seatbid": [
+ {
+ "bid": [
+ {
+ "id": "test-request-id",
+ "impid": "test-imp-id",
+ "price": 1000,
+ "adm": "ad
",
+ "adomain": ["example.com"],
+ "cid": "test-cid",
+ "crid": "test-crid",
+ "cat": ["IAB13-4"],
+ "w": 300,
+ "h": 250,
+ "mtype": 1,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "display"
+ }
+ }
+ }
+ ],
+ "seat": "nat-123"
+ }
+ ],
+ "cur": "EUR"
+ }
+ }
+ }
+ ],
+ "expectedBidResponses": [
+ {
+ "currency": "EUR",
+ "bids": [
+ {
+ "bid": {
+ "id": "test-request-id",
+ "impid": "test-imp-id",
+ "price": 1000,
+ "adm": "ad
",
+ "adomain": ["example.com"],
+ "cid": "test-cid",
+ "crid": "test-crid",
+ "cat": ["IAB13-4"],
+ "w": 300,
+ "h": 250,
+ "mtype": 1,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "display"
+ }
+ }
+ },
+ "type": "banner"
+ }
+ ]
+ }
+ ]
+}
diff --git a/adapters/nativery/nativerytest/exemplary/multi-format-multi-imp-type.json b/adapters/nativery/nativerytest/exemplary/multi-format-multi-imp-type.json
new file mode 100644
index 00000000000..0fad5510dca
--- /dev/null
+++ b/adapters/nativery/nativerytest/exemplary/multi-format-multi-imp-type.json
@@ -0,0 +1,372 @@
+{
+ "mockBidRequest": {
+ "id": "test-multi-request-id",
+ "imp": [
+ {
+ "id": "imp-banner",
+ "banner": {
+ "format": [{ "w": 300, "h": 250 }]
+ },
+ "ext": {
+ "bidder": { "widgetId": "1" }
+ }
+ },
+ {
+ "id": "imp-native",
+ "native": {
+ "request": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":25}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":100,\"hmin\":100}}],\"context\":1,\"plcmttype\":1}"
+ },
+ "ext": {
+ "bidder": { "widgetId": "1" }
+ }
+ },
+ {
+ "id": "imp-hybrid",
+ "banner": {
+ "format": [{ "w": 728, "h": 90 }]
+ },
+ "native": {
+ "request": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":50}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":200,\"hmin\":200}}],\"context\":1,\"plcmttype\":1}"
+ },
+ "ext": {
+ "bidder": { "widgetId": "1" }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "http://example.com/hb",
+ "body": {
+ "id": "test-multi-request-id",
+ "ext": {
+ "nativery": { "isAmp": false, "widgetId": "1" }
+ },
+ "imp": [
+ {
+ "id": "imp-banner",
+ "banner": { "format": [{ "w": 300, "h": 250 }] },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "impIDs": ["imp-banner"]
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "id": "test-multi-request-id",
+ "seatbid": [
+ {
+ "seat": "nat-123",
+ "bid": [
+ {
+ "id": "bid-banner",
+ "impid": "imp-banner",
+ "price": 800,
+ "adm": "banner ad
",
+ "adomain": ["example.com"],
+ "cid": "cid-banner",
+ "crid": "crid-banner",
+ "cat": ["IAB13-4"],
+ "w": 300,
+ "h": 250,
+ "mtype": 1,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "display"
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "cur": "EUR"
+ }
+ }
+ },
+ {
+ "expectedRequest": {
+ "uri": "http://example.com/hb",
+ "body": {
+ "id": "test-multi-request-id",
+ "ext": {
+ "nativery": { "isAmp": false, "widgetId": "1" }
+ },
+ "imp": [
+ {
+ "id": "imp-native",
+ "native": {
+ "request": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":25}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":100,\"hmin\":100}}],\"context\":1,\"plcmttype\":1}"
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "impIDs": ["imp-native"]
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "id": "test-multi-request-id",
+ "seatbid": [
+ {
+ "seat": "nat-123",
+ "bid": [
+ {
+ "id": "bid-native",
+ "impid": "imp-native",
+ "price": 600,
+ "adm": "{\"native\":{\"assets\":[…],\"link\":{\"url\":\"http://example.com/click\"}}}",
+ "adomain": ["example.com"],
+ "cid": "cid-native",
+ "crid": "crid-native",
+ "cat": ["IAB15-1"],
+ "mtype": 3,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "native"
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "cur": "EUR"
+ }
+ }
+ },
+ {
+ "expectedRequest": {
+ "uri": "http://example.com/hb",
+ "body": {
+ "id": "test-multi-request-id",
+ "ext": {
+ "nativery": { "isAmp": false, "widgetId": "1" }
+ },
+ "imp": [
+ {
+ "id": "imp-hybrid",
+ "banner": { "format": [{ "w": 728, "h": 90 }] },
+ "native": {
+ "request": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":50}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":200,\"hmin\":200}}],\"context\":1,\"plcmttype\":1}"
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "impIDs": ["imp-hybrid"]
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "id": "test-multi-request-id",
+ "seatbid": [
+ {
+ "seat": "nat-123",
+ "bid": [
+ {
+ "id": "bid-hybrid-banner",
+ "impid": "imp-hybrid",
+ "price": 1000,
+ "adm": "hybrid banner
",
+ "adomain": ["example.com"],
+ "cid": "cid-hybrid-banner",
+ "crid": "crid-hybrid-banner",
+ "cat": ["IAB13-4"],
+ "w": 728,
+ "h": 90,
+ "mtype": 1,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "display"
+ }
+ }
+ },
+ {
+ "id": "bid-hybrid-native",
+ "impid": "imp-hybrid",
+ "price": 500,
+ "adm": "{\"native\":{\"assets\":[…],\"link\":{\"url\":\"http://example.com/click2\"}}}",
+ "adomain": ["example.com"],
+ "cid": "cid-hybrid-native",
+ "crid": "crid-hybrid-native",
+ "cat": ["IAB15-1"],
+ "mtype": 3,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "native"
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "cur": "EUR"
+ }
+ }
+ }
+ ],
+ "expectedBidResponses": [
+ {
+ "currency": "EUR",
+ "bids": [
+ {
+ "bid": {
+ "id": "bid-banner",
+ "impid": "imp-banner",
+ "price": 800,
+ "adm": "banner ad
",
+ "adomain": ["example.com"],
+ "cid": "cid-banner",
+ "crid": "crid-banner",
+ "cat": ["IAB13-4"],
+ "w": 300,
+ "h": 250,
+ "mtype": 1,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "display"
+ }
+ }
+ },
+ "type": "banner"
+ }
+ ]
+ },
+ {
+ "currency": "EUR",
+ "bids": [
+ {
+ "bid": {
+ "id": "bid-native",
+ "impid": "imp-native",
+ "price": 600,
+ "adm": "{\"native\":{\"assets\":[…],\"link\":{\"url\":\"http://example.com/click\"}}}",
+ "adomain": ["example.com"],
+ "cid": "cid-native",
+ "crid": "crid-native",
+ "cat": ["IAB15-1"],
+ "mtype": 3,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "native"
+ }
+ }
+ },
+ "type": "native"
+ }
+ ]
+ },
+ {
+ "currency": "EUR",
+ "bids": [
+ {
+ "bid": {
+ "id": "bid-hybrid-banner",
+ "impid": "imp-hybrid",
+ "price": 1000,
+ "adm": "hybrid banner
",
+ "adomain": ["example.com"],
+ "cid": "cid-hybrid-banner",
+ "crid": "crid-hybrid-banner",
+ "cat": ["IAB13-4"],
+ "w": 728,
+ "h": 90,
+ "mtype": 1,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "display"
+ }
+ }
+ },
+ "type": "banner"
+ },
+ {
+ "bid": {
+ "id": "bid-hybrid-native",
+ "impid": "imp-hybrid",
+ "price": 500,
+ "adm": "{\"native\":{\"assets\":[…],\"link\":{\"url\":\"http://example.com/click2\"}}}",
+ "adomain": ["example.com"],
+ "cid": "cid-hybrid-native",
+ "crid": "crid-hybrid-native",
+ "cat": ["IAB15-1"],
+ "mtype": 3,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "native"
+ }
+ }
+ },
+ "type": "native"
+ }
+ ]
+ }
+ ]
+}
diff --git a/adapters/nativery/nativerytest/exemplary/native-no-currency.json b/adapters/nativery/nativerytest/exemplary/native-no-currency.json
new file mode 100644
index 00000000000..63a30c9c3e5
--- /dev/null
+++ b/adapters/nativery/nativerytest/exemplary/native-no-currency.json
@@ -0,0 +1,129 @@
+{
+ "mockBidRequest": {
+ "id": "test-request-id",
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "native": {
+ "request": "{\"context\":1,\"plcmttype\":1,\"assets\":[{\"id\":0,\"required\":1,\"img\":{\"type\":3,\"w\":120,\"h\":100}},{\"id\":1,\"required\":1,\"title\":{\"len\":140}},{\"id\":2,\"data\":{\"type\":1}}],\"eventtrackers\":[{\"event\":1,\"methods\":[1]}]}",
+ "ver": "1.2"
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "http://example.com/hb",
+ "body": {
+ "id": "test-request-id",
+ "ext": {
+ "nativery": {
+ "isAmp": false,
+ "widgetId": "1"
+ }
+ },
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "native": {
+ "request": "{\"context\":1,\"plcmttype\":1,\"assets\":[{\"id\":0,\"required\":1,\"img\":{\"type\":3,\"w\":120,\"h\":100}},{\"id\":1,\"required\":1,\"title\":{\"len\":140}},{\"id\":2,\"data\":{\"type\":1}}],\"eventtrackers\":[{\"event\":1,\"methods\":[1]}]}",
+ "ver": "1.2"
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "impIDs": ["test-imp-id"]
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "id": "test-request-id",
+ "seatbid": [
+ {
+ "bid": [
+ {
+ "id": "test-request-id",
+ "impid": "test-imp-id",
+ "price": 1000,
+ "nurl": "http://example.com/win/1000",
+ "adm": "{\"ver\":\"1.2\",\"assets\":[{\"id\":3,\"required\":1,\"img\":{\"url\":\"http://example.com/img/url\",\"w\":120,\"h\":100}},{\"id\":0,\"required\":1,\"title\":{\"text\":\"Test title\"}},{\"id\":5,\"data\":{\"value\":\"Test sponsor\"}}],\"link\":{\"url\":\"http://example.com/click/url\"},\"imptrackers\":[\"http://example.com/impression\"],\"jstracker\":\"\\u003cscript src=\\\"http://example.com/impression\\\"\\u003e\\u003c/script\\u003e\"}",
+ "adomain": ["example.com"],
+ "cid": "test-cid",
+ "crid": "test-crid",
+ "cat": ["IAB13-4"],
+ "mtype": 4,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "native"
+ }
+ }
+ }
+ ],
+ "seat": "nat-123"
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "expectedBidResponses": [
+ {
+ "currency": "EUR",
+ "bids": [
+ {
+ "bid": {
+ "id": "test-request-id",
+ "impid": "test-imp-id",
+ "price": 1000,
+ "nurl": "http://example.com/win/1000",
+ "adm": "{\"ver\":\"1.2\",\"assets\":[{\"id\":3,\"required\":1,\"img\":{\"url\":\"http://example.com/img/url\",\"w\":120,\"h\":100}},{\"id\":0,\"required\":1,\"title\":{\"text\":\"Test title\"}},{\"id\":5,\"data\":{\"value\":\"Test sponsor\"}}],\"link\":{\"url\":\"http://example.com/click/url\"},\"imptrackers\":[\"http://example.com/impression\"],\"jstracker\":\"\\u003cscript src=\\\"http://example.com/impression\\\"\\u003e\\u003c/script\\u003e\"}",
+ "adomain": ["example.com"],
+ "cid": "test-cid",
+ "crid": "test-crid",
+ "cat": ["IAB13-4"],
+ "mtype": 4,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "native"
+ }
+ }
+ },
+ "type": "native"
+ }
+ ]
+ }
+ ]
+}
diff --git a/adapters/nativery/nativerytest/exemplary/native.json b/adapters/nativery/nativerytest/exemplary/native.json
new file mode 100644
index 00000000000..0ba6ef33178
--- /dev/null
+++ b/adapters/nativery/nativerytest/exemplary/native.json
@@ -0,0 +1,130 @@
+{
+ "mockBidRequest": {
+ "id": "test-request-id",
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "native": {
+ "request": "{\"context\":1,\"plcmttype\":1,\"assets\":[{\"id\":0,\"required\":1,\"img\":{\"type\":3,\"w\":120,\"h\":100}},{\"id\":1,\"required\":1,\"title\":{\"len\":140}},{\"id\":2,\"data\":{\"type\":1}}],\"eventtrackers\":[{\"event\":1,\"methods\":[1]}]}",
+ "ver": "1.2"
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "http://example.com/hb",
+ "body": {
+ "id": "test-request-id",
+ "ext": {
+ "nativery": {
+ "isAmp": false,
+ "widgetId": "1"
+ }
+ },
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "native": {
+ "request": "{\"context\":1,\"plcmttype\":1,\"assets\":[{\"id\":0,\"required\":1,\"img\":{\"type\":3,\"w\":120,\"h\":100}},{\"id\":1,\"required\":1,\"title\":{\"len\":140}},{\"id\":2,\"data\":{\"type\":1}}],\"eventtrackers\":[{\"event\":1,\"methods\":[1]}]}",
+ "ver": "1.2"
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "impIDs": ["test-imp-id"]
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "id": "test-request-id",
+ "seatbid": [
+ {
+ "bid": [
+ {
+ "id": "test-request-id",
+ "impid": "test-imp-id",
+ "price": 1000,
+ "nurl": "http://example.com/win/1000",
+ "adm": "{\"ver\":\"1.2\",\"assets\":[{\"id\":3,\"required\":1,\"img\":{\"url\":\"http://example.com/img/url\",\"w\":120,\"h\":100}},{\"id\":0,\"required\":1,\"title\":{\"text\":\"Test title\"}},{\"id\":5,\"data\":{\"value\":\"Test sponsor\"}}],\"link\":{\"url\":\"http://example.com/click/url\"},\"imptrackers\":[\"http://example.com/impression\"],\"jstracker\":\"\\u003cscript src=\\\"http://example.com/impression\\\"\\u003e\\u003c/script\\u003e\"}",
+ "adomain": ["example.com"],
+ "cid": "test-cid",
+ "crid": "test-crid",
+ "cat": ["IAB13-4"],
+ "mtype": 4,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "native"
+ }
+ }
+ }
+ ],
+ "seat": "nat-123"
+ }
+ ],
+ "cur": "EUR"
+ }
+ }
+ }
+ ],
+ "expectedBidResponses": [
+ {
+ "currency": "EUR",
+ "bids": [
+ {
+ "bid": {
+ "id": "test-request-id",
+ "impid": "test-imp-id",
+ "price": 1000,
+ "nurl": "http://example.com/win/1000",
+ "adm": "{\"ver\":\"1.2\",\"assets\":[{\"id\":3,\"required\":1,\"img\":{\"url\":\"http://example.com/img/url\",\"w\":120,\"h\":100}},{\"id\":0,\"required\":1,\"title\":{\"text\":\"Test title\"}},{\"id\":5,\"data\":{\"value\":\"Test sponsor\"}}],\"link\":{\"url\":\"http://example.com/click/url\"},\"imptrackers\":[\"http://example.com/impression\"],\"jstracker\":\"\\u003cscript src=\\\"http://example.com/impression\\\"\\u003e\\u003c/script\\u003e\"}",
+ "adomain": ["example.com"],
+ "cid": "test-cid",
+ "crid": "test-crid",
+ "cat": ["IAB13-4"],
+ "mtype": 4,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "native"
+ }
+ }
+ },
+ "type": "native"
+ }
+ ]
+ }
+ ]
+}
diff --git a/adapters/nativery/nativerytest/exemplary/video-no-currency.json b/adapters/nativery/nativerytest/exemplary/video-no-currency.json
new file mode 100644
index 00000000000..599937ba09d
--- /dev/null
+++ b/adapters/nativery/nativerytest/exemplary/video-no-currency.json
@@ -0,0 +1,137 @@
+{
+ "mockBidRequest": {
+ "id": "test-request-id",
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "video": {
+ "mimes": ["video/mp4"],
+ "minduration": 15,
+ "maxduration": 30,
+ "protocols": [2, 3, 5, 6, 7, 8],
+ "w": 940,
+ "h": 560
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "http://example.com/hb",
+ "body": {
+ "id": "test-request-id",
+ "ext": {
+ "nativery": {
+ "isAmp": false,
+ "widgetId": "1"
+ }
+ },
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "video": {
+ "mimes": ["video/mp4"],
+ "minduration": 15,
+ "maxduration": 30,
+ "protocols": [2, 3, 5, 6, 7, 8],
+ "w": 940,
+ "h": 560
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "impIDs": ["test-imp-id"]
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "id": "test-request-id",
+ "seatbid": [
+ {
+ "bid": [
+ {
+ "id": "test-request-id",
+ "impid": "test-imp-id",
+ "price": 1000,
+ "nurl": "http://example.com/win/1000",
+ "adm": " ...",
+ "adomain": ["example.com"],
+ "cid": "test-cid",
+ "crid": "test-crid",
+ "cat": ["IAB13-4"],
+ "mtype": 2,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "video"
+ }
+ }
+ }
+ ],
+ "seat": "nat-123"
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "expectedBidResponses": [
+ {
+ "currency": "EUR",
+ "bids": [
+ {
+ "bid": {
+ "id": "test-request-id",
+ "impid": "test-imp-id",
+ "price": 1000,
+ "nurl": "http://example.com/win/1000",
+ "adm": " ...",
+ "adomain": ["example.com"],
+ "cid": "test-cid",
+ "crid": "test-crid",
+ "cat": ["IAB13-4"],
+ "mtype": 2,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "video"
+ }
+ }
+ },
+ "type": "video"
+ }
+ ]
+ }
+ ]
+}
diff --git a/adapters/nativery/nativerytest/exemplary/video.json b/adapters/nativery/nativerytest/exemplary/video.json
new file mode 100644
index 00000000000..61ed00e95b8
--- /dev/null
+++ b/adapters/nativery/nativerytest/exemplary/video.json
@@ -0,0 +1,138 @@
+{
+ "mockBidRequest": {
+ "id": "test-request-id",
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "video": {
+ "mimes": ["video/mp4"],
+ "minduration": 15,
+ "maxduration": 30,
+ "protocols": [2, 3, 5, 6, 7, 8],
+ "w": 940,
+ "h": 560
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "http://example.com/hb",
+ "body": {
+ "id": "test-request-id",
+ "ext": {
+ "nativery": {
+ "isAmp": false,
+ "widgetId": "1"
+ }
+ },
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "video": {
+ "mimes": ["video/mp4"],
+ "minduration": 15,
+ "maxduration": 30,
+ "protocols": [2, 3, 5, 6, 7, 8],
+ "w": 940,
+ "h": 560
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "impIDs": ["test-imp-id"]
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "id": "test-request-id",
+ "seatbid": [
+ {
+ "bid": [
+ {
+ "id": "test-request-id",
+ "impid": "test-imp-id",
+ "price": 1000,
+ "nurl": "http://example.com/win/1000",
+ "adm": " ...",
+ "adomain": ["example.com"],
+ "cid": "test-cid",
+ "crid": "test-crid",
+ "cat": ["IAB13-4"],
+ "mtype": 2,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "video"
+ }
+ }
+ }
+ ],
+ "seat": "nat-123"
+ }
+ ],
+ "cur": "EUR"
+ }
+ }
+ }
+ ],
+ "expectedBidResponses": [
+ {
+ "currency": "EUR",
+ "bids": [
+ {
+ "bid": {
+ "id": "test-request-id",
+ "impid": "test-imp-id",
+ "price": 1000,
+ "nurl": "http://example.com/win/1000",
+ "adm": " ...",
+ "adomain": ["example.com"],
+ "cid": "test-cid",
+ "crid": "test-crid",
+ "cat": ["IAB13-4"],
+ "mtype": 2,
+ "ext": {
+ "nativery": {
+ "adv_id": "1",
+ "brand_category_id": 1,
+ "bid_ad_media_type": "video"
+ }
+ }
+ },
+ "type": "video"
+ }
+ ]
+ }
+ ]
+}
diff --git a/adapters/nativery/nativerytest/supplemental/bad_bid_response.json b/adapters/nativery/nativerytest/supplemental/bad_bid_response.json
new file mode 100644
index 00000000000..6003e6e82ed
--- /dev/null
+++ b/adapters/nativery/nativerytest/supplemental/bad_bid_response.json
@@ -0,0 +1,74 @@
+{
+ "mockBidRequest": {
+ "id": "bad-bid-ext",
+ "imp": [
+ {
+ "id": "1",
+ "banner": { "format": [{ "w": 300, "h": 250 }] },
+ "ext": { "bidder": { "widgetId": "123" } }
+ }
+ ],
+ "site": { "page": "http://example.com", "ref": "http://example.com" },
+ "device": { "ua": "ua", "h": 100, "w": 200 }
+ },
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "method": "POST",
+ "uri": "http://example.com/hb",
+ "body": {
+ "id": "bad-bid-ext",
+ "imp": [
+ {
+ "id": "1",
+ "banner": { "format": [{ "w": 300, "h": 250 }] },
+ "ext": { "bidder": { "widgetId": "123" } }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": { "ua": "ua", "h": 100, "w": 200 },
+ "ext": {
+ "nativery": {
+ "isAmp": false,
+ "widgetId": "123"
+ }
+ }
+ },
+ "impIDs": ["1"]
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "id": "r",
+ "seatbid": [
+ {
+ "bid": [
+ {
+ "id": "b1",
+ "impid": "1",
+ "price": 1.2,
+ "adm": "",
+ "ext": 123
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "expectedRequestCount": 1,
+ "expectedMakeRequestsErrors": [],
+ "expectedMakeBidsErrors": [
+ { "value": "expect { or n, but found", "comparison": "startswith" }
+ ],
+ "expectedBidResponses": [
+ {
+ "currency": "EUR",
+ "bids": []
+ }
+ ]
+}
diff --git a/adapters/nativery/nativerytest/supplemental/invalid_bid_media_type.json b/adapters/nativery/nativerytest/supplemental/invalid_bid_media_type.json
new file mode 100644
index 00000000000..e3944109b1d
--- /dev/null
+++ b/adapters/nativery/nativerytest/supplemental/invalid_bid_media_type.json
@@ -0,0 +1,113 @@
+{
+ "mockBidRequest": {
+ "id": "err-unknown-type",
+ "imp": [
+ {
+ "id": "imp-1",
+ "banner": {
+ "format": [{ "w": 300, "h": 250 }]
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "ua",
+ "h": 100,
+ "w": 200
+ }
+ },
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "http://example.com/hb",
+ "impIDs": ["imp-1"],
+ "body": {
+ "id": "err-unknown-type",
+ "imp": [
+ {
+ "id": "imp-1",
+ "banner": {
+ "format": [{ "w": 300, "h": 250 }]
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "ua",
+ "h": 100,
+ "w": 200
+ },
+ "ext": {
+ "nativery": {
+ "isAmp": false,
+ "widgetId": "1"
+ }
+ }
+ }
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "id": "err-unknown-type",
+ "seatbid": [
+ {
+ "bid": [
+ {
+ "id": "bid-1",
+ "impid": "imp-1",
+ "price": 1.23,
+ "adm": "",
+ "adomain": ["example.com"],
+ "cid": "cid",
+ "crid": "crid",
+ "cat": ["IAB1"],
+ "w": 300,
+ "h": 250,
+ "mtype": 3,
+ "ext": {
+ "nativery": {
+ "bid_ad_media_type": "UNKNOWN_TYPE",
+ "adv_id": "1",
+ "brand_category_id": 1
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "cur": "EUR"
+ }
+ }
+ }
+ ],
+ "expectedRequestCount": 1,
+ "expectedMakeRequestsErrors": [],
+ "expectedMakeBidsErrors": [
+ {
+ "value": "unrecognized bid_ad_media_type",
+ "comparison": "startswith"
+ }
+ ],
+ "expectedBidResponses": [
+ {
+ "currency": "EUR",
+ "bids": []
+ }
+ ]
+}
diff --git a/adapters/nativery/nativerytest/supplemental/invalid_imp.json b/adapters/nativery/nativerytest/supplemental/invalid_imp.json
new file mode 100644
index 00000000000..622ace50aae
--- /dev/null
+++ b/adapters/nativery/nativerytest/supplemental/invalid_imp.json
@@ -0,0 +1,64 @@
+{
+ "mockBidRequest": {
+ "id": "err-imp-banner-nosize",
+ "imp": [
+ {
+ "id": "bad-imp-1",
+ "banner": {},
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": { "page": "http://example.com", "ref": "http://example.com" },
+ "device": { "ua": "ua", "h": 100, "w": 200 }
+ },
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "http://example.com/hb",
+ "body": {
+ "id": "err-imp-banner-nosize",
+ "ext": {
+ "nativery": {
+ "isAmp": false,
+ "widgetId": "1"
+ }
+ },
+ "imp": [
+ {
+ "id": "bad-imp-1",
+ "banner": {},
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": { "ua": "ua", "h": 100, "w": 200 }
+ },
+ "impIDs": ["bad-imp-1"]
+ },
+ "mockResponse": {
+ "status": 400,
+ "body": {}
+ }
+ }
+ ],
+ "expectedRequestCount": 1,
+ "expectedMakeRequestsErrors": [],
+ "expectedMakeBidsErrors": [
+ {
+ "value": "Unexpected status code: 400. Run with request.debug = 1 for more info",
+ "comparison": "literal"
+ }
+ ],
+ "expectedBidResponses": []
+}
diff --git a/adapters/nativery/nativerytest/supplemental/invalid_imp_ext.json b/adapters/nativery/nativerytest/supplemental/invalid_imp_ext.json
new file mode 100644
index 00000000000..b55780f4fee
--- /dev/null
+++ b/adapters/nativery/nativerytest/supplemental/invalid_imp_ext.json
@@ -0,0 +1,34 @@
+{
+ "mockBidRequest": {
+ "id": "err-imp-ext",
+ "imp": [
+ {
+ "id": "imp-1",
+ "banner": {
+ "format": [{ "w": 300, "h": 250 }]
+ },
+ "ext": {
+ "bidder": "THIS_IS_NOT_VALID_JSON"
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "ua",
+ "h": 100,
+ "w": 200
+ }
+ },
+ "expectedRequestCount": 0,
+ "expectedMakeRequestsErrors": [
+ {
+ "value": "expect { or n, but found",
+ "comparison": "startswith"
+ }
+ ],
+ "expectedMakeBidsErrors": [],
+ "expectedBidResponses": []
+}
diff --git a/adapters/nativery/nativerytest/supplemental/invalid_response.json b/adapters/nativery/nativerytest/supplemental/invalid_response.json
new file mode 100644
index 00000000000..a29d799df82
--- /dev/null
+++ b/adapters/nativery/nativerytest/supplemental/invalid_response.json
@@ -0,0 +1,79 @@
+{
+ "mockBidRequest": {
+ "id": "err-invalid-resp",
+ "imp": [
+ {
+ "id": "imp-1",
+ "banner": {
+ "format": [{ "w": 300, "h": 250 }]
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "ua",
+ "h": 100,
+ "w": 200
+ }
+ },
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "http://example.com/hb",
+ "impIDs": ["imp-1"],
+ "body": {
+ "id": "err-invalid-resp",
+ "imp": [
+ {
+ "id": "imp-1",
+ "banner": {
+ "format": [{ "w": 300, "h": 250 }]
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "ua",
+ "h": 100,
+ "w": 200
+ },
+ "ext": {
+ "nativery": {
+ "isAmp": false,
+ "widgetId": "1"
+ }
+ }
+ }
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": "NOT A JSON!"
+ }
+ }
+ ],
+ "expectedRequestCount": 1,
+ "expectedMakeRequestsErrors": [],
+ "expectedMakeBidsErrors": [
+ {
+ "value": "expect { or n, but found",
+ "comparison": "startswith"
+ }
+ ],
+ "expectedBidResponses": []
+}
diff --git a/adapters/nativery/nativerytest/supplemental/invalid_widget_id.json b/adapters/nativery/nativerytest/supplemental/invalid_widget_id.json
new file mode 100644
index 00000000000..1d08bb40b62
--- /dev/null
+++ b/adapters/nativery/nativerytest/supplemental/invalid_widget_id.json
@@ -0,0 +1,29 @@
+{
+ "mockBidRequest": {
+ "id": "err-nativeryext-widgetid-number",
+ "imp": [
+ {
+ "id": "1",
+ "banner": { "format": [{ "w": 300, "h": 250 }] },
+ "ext": { "bidder": { "widgetId": "1" } }
+ }
+ ],
+ "site": { "page": "http://example.com", "ref": "http://example.com" },
+ "device": { "ua": "ua", "h": 100, "w": 200 },
+ "ext": {
+ "nativery": {
+ "isAmp": false,
+ "widgetId": 123
+ }
+ }
+ },
+ "expectedRequestCount": 0,
+ "expectedMakeRequestsErrors": [
+ {
+ "comparison": "regex",
+ "value": ".*cannot unmarshal nativery.*WidgetId.*"
+ }
+ ],
+ "expectedMakeBidsErrors": [],
+ "expectedBidResponses": []
+}
diff --git a/adapters/nativery/nativerytest/supplemental/missing_widget_id.json b/adapters/nativery/nativerytest/supplemental/missing_widget_id.json
new file mode 100644
index 00000000000..324cce094e8
--- /dev/null
+++ b/adapters/nativery/nativerytest/supplemental/missing_widget_id.json
@@ -0,0 +1,57 @@
+{
+ "mockBidRequest": {
+ "id": "missing-widgetid-400",
+ "imp": [
+ {
+ "id": "1",
+ "banner": { "format": [{ "w": 300, "h": 250 }] },
+ "ext": { "bidder": {} }
+ }
+ ],
+ "site": { "page": "http://example.com", "ref": "http://example.com" },
+ "device": { "ua": "ua", "h": 100, "w": 200 }
+ },
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "method": "POST",
+ "uri": "http://example.com/hb",
+ "body": {
+ "id": "missing-widgetid-400",
+ "imp": [
+ {
+ "id": "1",
+ "banner": { "format": [{ "w": 300, "h": 250 }] },
+ "ext": { "bidder": {} }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": { "ua": "ua", "h": 100, "w": 200 },
+ "ext": {
+ "nativery": {
+ "isAmp": false,
+ "widgetId": ""
+ }
+ }
+ },
+ "impIDs": ["1"]
+ },
+ "mockResponse": {
+ "status": 400,
+ "body": ""
+ }
+ }
+ ],
+ "expectedRequestCount": 1,
+ "expectedMakeRequestsErrors": [],
+ "expectedMakeBidsErrors": [
+ {
+ "value": "Unexpected status code: 400",
+ "comparison": "startswith"
+ }
+ ],
+ "expectedBidResponses": []
+}
diff --git a/adapters/nativery/nativerytest/supplemental/status_204.json b/adapters/nativery/nativerytest/supplemental/status_204.json
new file mode 100644
index 00000000000..f56b2832b06
--- /dev/null
+++ b/adapters/nativery/nativerytest/supplemental/status_204.json
@@ -0,0 +1,90 @@
+{
+ "mockBidRequest": {
+ "id": "test-request-id",
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "banner": {
+ "format": [
+ {
+ "w": 300,
+ "h": 250
+ }
+ ]
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "http://example.com/hb",
+ "body": {
+ "id": "test-request-id",
+ "ext": {
+ "nativery": {
+ "isAmp": false,
+ "widgetId": "1"
+ }
+ },
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "banner": {
+ "format": [
+ {
+ "w": 300,
+ "h": 250
+ }
+ ]
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "impIDs": ["test-imp-id"]
+ },
+ "mockResponse": {
+ "status": 204,
+ "body": {},
+ "error": ["No Content"]
+ }
+ }
+ ],
+
+ "expectedBidResponses": [],
+
+ "expectedMakeBidsErrors": [
+ {
+ "value": "No Content",
+ "comparison": "literal"
+ }
+ ]
+}
diff --git a/adapters/nativery/nativerytest/supplemental/status_204_nativery_error.json b/adapters/nativery/nativerytest/supplemental/status_204_nativery_error.json
new file mode 100644
index 00000000000..8cec9dda357
--- /dev/null
+++ b/adapters/nativery/nativerytest/supplemental/status_204_nativery_error.json
@@ -0,0 +1,88 @@
+{
+ "mockBidRequest": {
+ "id": "test-request-id",
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "banner": {
+ "format": [
+ {
+ "w": 300,
+ "h": 250
+ }
+ ]
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "http://example.com/hb",
+ "body": {
+ "id": "test-request-id",
+ "ext": {
+ "nativery": {
+ "isAmp": false,
+ "widgetId": "1"
+ }
+ },
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "banner": {
+ "format": [
+ {
+ "w": 300,
+ "h": 250
+ }
+ ]
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "impIDs": ["test-imp-id"]
+ },
+ "mockResponse": {
+ "status": 204,
+ "body": {},
+ "headers": { "X-Nativery-Error": ["some error"] },
+ "error": ["No Content"]
+ }
+ }
+ ],
+
+ "expectedBidResponses": [],
+
+ "expectedMakeBidsErrors": [
+ { "value": "Nativery Error: some error.", "comparison": "startswith" }
+ ]
+}
diff --git a/adapters/nativery/nativerytest/supplemental/status_400.json b/adapters/nativery/nativerytest/supplemental/status_400.json
new file mode 100644
index 00000000000..f75a26a3ebc
--- /dev/null
+++ b/adapters/nativery/nativerytest/supplemental/status_400.json
@@ -0,0 +1,87 @@
+{
+ "mockBidRequest": {
+ "id": "test-request-id",
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "banner": {
+ "format": [
+ {
+ "w": 300,
+ "h": 250
+ }
+ ]
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "http://example.com/hb",
+ "body": {
+ "id": "test-request-id",
+ "ext": {
+ "nativery": {
+ "isAmp": false,
+ "widgetId": "1"
+ }
+ },
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "banner": {
+ "format": [
+ {
+ "w": 300,
+ "h": 250
+ }
+ ]
+ },
+ "ext": {
+ "bidder": {
+ "widgetId": "1"
+ }
+ }
+ }
+ ],
+ "site": {
+ "page": "http://example.com",
+ "ref": "http://example.com"
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36",
+ "h": 500,
+ "w": 1000
+ }
+ },
+ "impIDs": ["test-imp-id"]
+ },
+ "mockResponse": {
+ "status": 400,
+ "body": {}
+ }
+ }
+ ],
+
+ "expectedMakeBidsErrors": [
+ {
+ "value": "Unexpected status code: 400. Run with request.debug = 1 for more info",
+ "comparison": "literal"
+ }
+ ]
+}
diff --git a/adapters/nativery/params_test.go b/adapters/nativery/params_test.go
new file mode 100644
index 00000000000..557c3e0bb99
--- /dev/null
+++ b/adapters/nativery/params_test.go
@@ -0,0 +1,49 @@
+package nativery
+
+import (
+ "encoding/json"
+ "testing"
+
+ "github.com/prebid/prebid-server/v3/openrtb_ext"
+)
+
+func TestValidParams(t *testing.T) {
+ validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params")
+ if err != nil {
+ t.Fatalf("Failed to fetch the json-schemas. %v", err)
+ }
+
+ for _, validParam := range validParams {
+ if err := validator.Validate(openrtb_ext.BidderNativery, json.RawMessage(validParam)); err != nil {
+ t.Errorf("Schema rejected nativery params: %s", validParam)
+ }
+ }
+}
+
+func TestInvalidParams(t *testing.T) {
+ validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params")
+ if err != nil {
+ t.Fatalf("Failed to fetch the json-schemas. %v", err)
+ }
+
+ for _, invalidParam := range invalidParams {
+ if err := validator.Validate(openrtb_ext.BidderNativery, json.RawMessage(invalidParam)); err == nil {
+ t.Errorf("Schema allowed unexpected params: %s", invalidParam)
+ }
+ }
+}
+
+var validParams = []string{
+ `{"widgetId":"1"}`,
+}
+
+var invalidParams = []string{
+ ``,
+ `null`,
+ `true`,
+ `5`,
+ `4.2`,
+ `[]`,
+ `{}`,
+ `{"placement_id":123}`,
+}
diff --git a/exchange/adapter_builders.go b/exchange/adapter_builders.go
index 87821fd0c75..7843e24a0b2 100755
--- a/exchange/adapter_builders.go
+++ b/exchange/adapter_builders.go
@@ -156,6 +156,7 @@ import (
"github.com/prebid/prebid-server/v3/adapters/mobilefuse"
"github.com/prebid/prebid-server/v3/adapters/mobkoi"
"github.com/prebid/prebid-server/v3/adapters/motorik"
+ "github.com/prebid/prebid-server/v3/adapters/nativery"
"github.com/prebid/prebid-server/v3/adapters/nativo"
"github.com/prebid/prebid-server/v3/adapters/nextmillennium"
"github.com/prebid/prebid-server/v3/adapters/nobid"
@@ -408,6 +409,7 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder {
openrtb_ext.BidderMobileFuse: mobilefuse.Builder,
openrtb_ext.BidderMobkoi: mobkoi.Builder,
openrtb_ext.BidderMotorik: motorik.Builder,
+ openrtb_ext.BidderNativery: nativery.Builder,
openrtb_ext.BidderNativo: nativo.Builder,
openrtb_ext.BidderNextMillennium: nextmillennium.Builder,
openrtb_ext.BidderNoBid: nobid.Builder,
diff --git a/openrtb_ext/bidders.go b/openrtb_ext/bidders.go
index 67cf8e7c15e..a4791d48219 100644
--- a/openrtb_ext/bidders.go
+++ b/openrtb_ext/bidders.go
@@ -174,6 +174,7 @@ var coreBidderNames []BidderName = []BidderName{
BidderMobileFuse,
BidderMobkoi,
BidderMotorik,
+ BidderNativery,
BidderNativo,
BidderNextMillennium,
BidderNoBid,
@@ -530,6 +531,7 @@ const (
BidderMobileFuse BidderName = "mobilefuse"
BidderMobkoi BidderName = "mobkoi"
BidderMotorik BidderName = "motorik"
+ BidderNativery BidderName = "nativery"
BidderNativo BidderName = "nativo"
BidderNextMillennium BidderName = "nextmillennium"
BidderNoBid BidderName = "nobid"
diff --git a/openrtb_ext/imp_nativery.go b/openrtb_ext/imp_nativery.go
new file mode 100644
index 00000000000..d63cf1e609c
--- /dev/null
+++ b/openrtb_ext/imp_nativery.go
@@ -0,0 +1,5 @@
+package openrtb_ext
+
+type ImpExtNativery struct {
+ WidgetId string `json:"widgetId"`
+}
diff --git a/static/bidder-info/nativery.yaml b/static/bidder-info/nativery.yaml
new file mode 100644
index 00000000000..47f05b7aaf9
--- /dev/null
+++ b/static/bidder-info/nativery.yaml
@@ -0,0 +1,12 @@
+endpoint: "https://hb.nativery.com/openrtb2/auction"
+openrtb:
+ version: 2.6
+maintainer:
+ email: "developer@nativery.com"
+gvlVendorID: 1133
+capabilities:
+ site:
+ mediaTypes:
+ - banner
+ - native
+ - video
diff --git a/static/bidder-params/nativery.json b/static/bidder-params/nativery.json
new file mode 100644
index 00000000000..f8d46933410
--- /dev/null
+++ b/static/bidder-params/nativery.json
@@ -0,0 +1,15 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Nativery Adapter Params",
+ "description": "A schema which validates params accepted by the Nativery adapter",
+
+ "type": "object",
+ "properties": {
+ "widgetId": {
+ "type": "string",
+ "description": "An ID which identifies this Nativery widget"
+ }
+ },
+
+ "required": ["widgetId"]
+ }
\ No newline at end of file