Skip to content

Commit 685803e

Browse files
author
Ethan Kenny
committed
Add openrtb-xapi.proto, update README
1 parent 01a71fa commit 685803e

2 files changed

Lines changed: 341 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# xapi-proto
2-
ExchangeApi (xAPI) extensions for OpenRTB via protobuf
2+
Exchange API (xAPI) extensions for OpenRTB via protobuf. Extends the Interactive Adverstising Bureau (IAB) OpenRTB protobuf definitions found in [openrtb-proto-v2](https://github.com/InteractiveAdvertisingBureau/openrtb-proto-v2).
Lines changed: 340 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,340 @@
1+
//
2+
// File for XAPI AdEngine endpoint integration extensions
3+
//
4+
5+
// XAPI integration fields
6+
// Use extension IDs in 5010-5020 range for XAPI
7+
8+
syntax = "proto2";
9+
10+
import "v2/openrtb.proto";
11+
option java_outer_classname = "OpenRtbXapi";
12+
package com.magnite.openrtb.xapi;
13+
14+
message KeyValuePair {
15+
optional string key = 1;
16+
optional string value = 2;
17+
}
18+
19+
message Window {
20+
optional string url = 1;
21+
optional int32 depth = 2;
22+
optional uint32 w = 3;
23+
optional uint32 h = 4;
24+
}
25+
26+
// BidRequest
27+
message BidRequestExt {
28+
message Rp {
29+
optional int32 zone_id = 1;
30+
repeated int32 badvid = 2;
31+
repeated int32 baindid = 3;
32+
optional Transparency transparency = 4;
33+
}
34+
35+
optional Rp rp = 1;
36+
37+
extend com.iabtechlab.openrtb.v2.BidRequest {
38+
optional BidRequestExt ext = 5010;
39+
}
40+
}
41+
42+
// Imp
43+
message ImpExt {
44+
message ProxyBid {
45+
optional string id = 1;
46+
optional double price = 2;
47+
}
48+
49+
message ProxyDemand {
50+
optional double marketrate = 1;
51+
repeated ProxyBid bids = 2;
52+
}
53+
54+
message Floor {
55+
optional string id = 1;
56+
optional double price = 2;
57+
optional bool dpf = 3;
58+
optional int32 pmptier = 4;
59+
optional int32 pmppriority = 5;
60+
}
61+
62+
message Rp {
63+
optional int32 zone_id = 1;
64+
optional string enc = 2;
65+
optional string slot = 3;
66+
repeated KeyValuePair target = 4;
67+
repeated KeyValuePair track = 5;
68+
repeated KeyValuePair rtb = 6;
69+
repeated KeyValuePair nolog = 7;
70+
optional ProxyDemand proxydemand = 8;
71+
repeated Floor floors = 9;
72+
}
73+
74+
optional Rp rp = 1;
75+
optional Window window = 2;
76+
repeated string viewabilityvendors = 3;
77+
78+
extend com.iabtechlab.openrtb.v2.BidRequest.Imp {
79+
optional ImpExt ext = 5010;
80+
}
81+
};
82+
83+
// Video
84+
message VideoExt {
85+
message Rp {
86+
optional uint32 size_id = 1;
87+
}
88+
89+
message Ad {
90+
optional int32 w = 1;
91+
optional int32 h = 2;
92+
}
93+
94+
optional string orientation = 1;
95+
optional Rp rp = 2;
96+
optional Ad ad = 3;
97+
optional bool skip = 4;
98+
optional int32 skipdelay = 5;
99+
optional int32 placement = 6; // ortb enum VideoPlacementType
100+
101+
extend com.iabtechlab.openrtb.v2.BidRequest.Imp.Video {
102+
optional VideoExt ext = 5010;
103+
}
104+
};
105+
106+
// Banner
107+
message BannerExt {
108+
message Rp {
109+
optional uint32 size_id = 1;
110+
repeated uint32 alt_size_ids = 2;
111+
optional string mime = 3;
112+
optional bool usenurl = 4;
113+
optional bool useimptrackers = 5;
114+
}
115+
116+
optional Rp rp = 1;
117+
118+
extend com.iabtechlab.openrtb.v2.BidRequest.Imp.Banner {
119+
optional BannerExt ext = 5010;
120+
}
121+
};
122+
123+
message Transparency {
124+
optional int32 blind = 1;
125+
repeated int32 buyers = 2;
126+
repeated int32 blindbuyers = 3;
127+
}
128+
129+
message AdQuality {
130+
repeated string tags = 1;
131+
optional string sensitivity = 2;
132+
}
133+
134+
// App
135+
message AppExt {
136+
message Rp {
137+
optional uint32 site_id = 1;
138+
optional Transparency transparency = 2;
139+
optional AdQuality aq = 3;
140+
repeated string blocklists = 4;
141+
}
142+
143+
optional Rp rp = 1;
144+
145+
extend com.iabtechlab.openrtb.v2.BidRequest.App {
146+
optional AppExt ext = 5010;
147+
}
148+
};
149+
150+
// Site
151+
message SiteExt {
152+
message Rp {
153+
optional uint32 site_id = 1;
154+
optional Transparency transparency = 2;
155+
optional AdQuality aq = 3;
156+
repeated string blocklists = 4;
157+
}
158+
159+
optional Rp rp = 1;
160+
optional Window window = 2;
161+
162+
extend com.iabtechlab.openrtb.v2.BidRequest.Site {
163+
optional SiteExt ext = 5010;
164+
}
165+
};
166+
167+
// Publisher
168+
message PublisherExt {
169+
message Rp {
170+
optional int32 account_id = 1;
171+
}
172+
173+
optional Rp rp = 1;
174+
175+
extend com.iabtechlab.openrtb.v2.BidRequest.Publisher {
176+
optional PublisherExt ext = 5010;
177+
}
178+
};
179+
180+
// Device
181+
message DeviceExt {
182+
message Rp {
183+
optional string res = 1;
184+
optional double pixelratio = 2;
185+
optional string xff = 3;
186+
}
187+
188+
message Dooh {
189+
optional double impmultiply = 1;
190+
}
191+
192+
optional Rp rp = 1;
193+
optional bool ipmask = 2;
194+
optional Dooh dooh = 3;
195+
196+
extend com.iabtechlab.openrtb.v2.BidRequest.Device {
197+
optional DeviceExt ext = 5010;
198+
}
199+
};
200+
201+
// Geo
202+
message GeoExt {
203+
message Rp {
204+
optional int32 consent = 1;
205+
}
206+
207+
optional Rp rp = 1;
208+
209+
extend com.iabtechlab.openrtb.v2.BidRequest.Geo {
210+
optional GeoExt ext = 5010;
211+
}
212+
};
213+
214+
// User
215+
message UserExt {
216+
message Dt {
217+
optional string id = 1;
218+
optional uint64 pref = 2;
219+
optional uint32 keyv = 3;
220+
}
221+
222+
message Rp {
223+
repeated KeyValuePair target = 1;
224+
}
225+
226+
optional Dt dt = 1;
227+
optional string us_privacy = 2;
228+
optional Rp rp = 3;
229+
optional string liveramp_idl = 4;
230+
231+
extend com.iabtechlab.openrtb.v2.BidRequest.User {
232+
optional UserExt ext = 5010;
233+
}
234+
};
235+
236+
// Regs
237+
message RegsExt {
238+
optional bool s22580 = 1;
239+
optional string us_privacy = 2;
240+
241+
extend com.iabtechlab.openrtb.v2.BidRequest.Regs {
242+
optional RegsExt ext = 5010;
243+
}
244+
};
245+
246+
// Source
247+
message SourceExt {
248+
optional bool ssreq = 1;
249+
250+
extend com.iabtechlab.openrtb.v2.BidRequest.Source {
251+
optional SourceExt ext = 5010;
252+
}
253+
};
254+
255+
// Native
256+
message NativeExt {
257+
message Rp {
258+
optional uint32 size_id = 1;
259+
}
260+
261+
optional Rp rp = 1;
262+
263+
extend com.iabtechlab.openrtb.v2.BidRequest.Imp.Native {
264+
optional NativeExt ext = 5010;
265+
}
266+
};
267+
268+
// NativeRequest
269+
message NativeRequestExt {
270+
optional bool privacy = 1;
271+
272+
extend com.iabtechlab.openrtb.v2.NativeRequest {
273+
optional NativeRequestExt ext = 5010;
274+
}
275+
};
276+
277+
278+
// ===== Response =====
279+
280+
// BidResponseExt
281+
message BidResponseExt {
282+
message InventoryQuality {
283+
optional double cpm = 1;
284+
optional double score = 2;
285+
}
286+
287+
message Rp {
288+
optional int32 statuscode = 1;
289+
optional string statusmsg = 2;
290+
optional int32 time = 3;
291+
optional InventoryQuality iq = 4;
292+
}
293+
294+
optional Rp rp = 1;
295+
296+
extend com.iabtechlab.openrtb.v2.BidResponse {
297+
optional BidResponseExt ext = 5011;
298+
}
299+
};
300+
301+
// SeatBidExt
302+
message SeatBidExt {
303+
message Rp {
304+
optional string buyer = 1;
305+
}
306+
307+
optional Rp rp = 1;
308+
309+
extend com.iabtechlab.openrtb.v2.BidResponse.SeatBid {
310+
optional SeatBidExt ext = 5011;
311+
}
312+
}
313+
314+
// BidExt
315+
message BidExt {
316+
message Rp {
317+
optional int32 advid = 1;
318+
optional string mime = 2;
319+
optional string adtype = 3;
320+
optional uint32 size_id = 4;
321+
repeated KeyValuePair targeting = 5;
322+
optional uint32 creativeapi = 6;
323+
repeated string viewabilityvendors = 7;
324+
optional int32 estimated = 8;
325+
optional double adjustbid = 9;
326+
optional string pmptier = 10;
327+
optional string aqid = 11;
328+
repeated int32 aindid = 12;
329+
optional string burl = 13;
330+
repeated string imptrackers = 14;
331+
optional BidResponseExt.InventoryQuality iq = 15;
332+
}
333+
334+
optional Rp rp = 1;
335+
336+
extend com.iabtechlab.openrtb.v2.BidResponse.SeatBid.Bid {
337+
optional BidExt ext = 5011;
338+
}
339+
}
340+

0 commit comments

Comments
 (0)