Skip to content

Commit 74f390a

Browse files
authored
Add open rtb 2.6 features in Bid Response (seatbid.bid) (bsm#102)
1 parent 7dda58d commit 74f390a

File tree

2 files changed

+42
-5
lines changed

2 files changed

+42
-5
lines changed

bid.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type Bid struct {
3636
Tactic string `json:"tactic,omitempty"` // Tactic ID to enable buyers to label bids for reporting to the exchange the tactic through which their bid was submitted.
3737
Categories []ContentCategory `json:"cat,omitempty"` // IAB content categories of the creative. Refer to List 5.1
3838
Attrs []CreativeAttribute `json:"attr,omitempty"` // Array of creative attributes.
39-
API APIFramework `json:"api,omitempty"` // API required by the markup if applicable
39+
API APIFramework `json:"api,omitempty"` // API required by the markup if applicable, NOTE: for ORTB ver <= 2.5 APIFramework supported is 1 to 6.
4040
Protocol Protocol `json:"protocol,omitempty"` // Video response protocol of the markup if applicable
4141
MediaRating IQGRating `json:"qagmediarating,omitempty"` // Creative media rating per IQG guidelines.
4242
Language string `json:"language,omitempty"` // Language of the creative using ISO-639-1-alpha-2.
@@ -45,8 +45,16 @@ type Bid struct {
4545
Height int `json:"h,omitempty"` // Height of the ad in pixels.
4646
WidthRatio int `json:"wratio,omitempty"` // Relative width of the creative when expressing size as a ratio.
4747
HeightRatio int `json:"hratio,omitempty"` // Relative height of the creative when expressing size as a ratio.
48-
Exp int `json:"exp,omitempty"` // Advisory as to the number of seconds the bidder is willing to wait between the auction and the actual impression.
49-
Ext json.RawMessage `json:"ext,omitempty"`
48+
49+
APIS APIFramework `json:"apis,omitempty"` // APIS required by the markup if applicable.
50+
LangB string `json:"langb,omitempty"` // Language of the creative using IETF BCP 47. Only one of language or langb should be present.
51+
Duration int `json:"dur,omitempty"` // Duration of the video or audio creative in seconds.
52+
MarkupType MarkupType `json:"mtype,omitempty"` // Creative markup so that it can properly be associated.
53+
SlotInPod SlotPositionInPod `json:"slotinpod,omitempty"` // Indicates that the bid response is only eligible for a specific position.
54+
CategoryTaxonomy CategoryTaxonomy `json:"cattax,omitempty"` // Defines the taxonomy in use.
55+
56+
Exp int `json:"exp,omitempty"` // Advisory as to the number of seconds the bidder is willing to wait between the auction and the actual impression.
57+
Ext json.RawMessage `json:"ext,omitempty"`
5058
}
5159

5260
// Validate required attributes

openrtb.go

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,17 +488,21 @@ const (
488488
ExpDirFullScreen ExpDir = 5
489489
)
490490

491-
// APIFramework as defined in section 5.6.
491+
// APIFramework as defined in Adcom1.0.
492492
type APIFramework int
493493

494-
// 5.6 API Frameworks
494+
// API Frameworks options as defined in Adcom1.0.
495495
const (
496496
APIFrameworkUnknown APIFramework = 0
497497
APIFrameworkVPAID1 APIFramework = 1
498498
APIFrameworkVPAID2 APIFramework = 2
499499
APIFrameworkMRAID1 APIFramework = 3
500500
APIFrameworkORMMA APIFramework = 4
501501
APIFrameworkMRAID2 APIFramework = 5
502+
APIFrameworkMRAID3 APIFramework = 6
503+
APIFrameworkOMID APIFramework = 7
504+
APIFrameworkSIMID1 APIFramework = 8
505+
APIFrameworkSIMID11 APIFramework = 9
502506
)
503507

504508
// VideoLinearity as defined in section 5.7.
@@ -863,3 +867,28 @@ const (
863867
SlotPosFirst SlotPositionInPod = 1 // First ad in the pod.
864868
SlotPosFirstOrLast SlotPositionInPod = 2 // First or Last ad in the pod.
865869
)
870+
871+
// Type of the creative markup so that it can properly be associated with the right sub-object of the BidRequest.Imp.
872+
type MarkupType int
873+
874+
// MarkupType available options
875+
const (
876+
MarkupUnknown MarkupType = 0
877+
MarkupBanner MarkupType = 1
878+
MarkupVideo MarkupType = 2
879+
MarkupAudio MarkupType = 3
880+
MarkupNative MarkupType = 4
881+
)
882+
883+
// CategoryTaxonomy identifies the taxonomy in effect when content categories as defined in Adcom1.0.
884+
type CategoryTaxonomy int
885+
886+
// CategoryTaxonomy options as defined in Adcom1.0
887+
const (
888+
CategoryTaxonomyIABContent1 CategoryTaxonomy = 1 // 1 IAB Content Category Taxonomy 1.0.
889+
CategoryTaxonomyIABContent2 CategoryTaxonomy = 2 // 2 IAB Content Category Taxonomy 2: www.iab.com/guidelines/taxonomy
890+
CategoryTaxonomyIABProduct1 CategoryTaxonomy = 3 // 3 IAB Ad Product Taxonomy 1.0.
891+
CategoryTaxonomyIABAudience11 CategoryTaxonomy = 4 // 4 IAB Audience Taxonomy 1.1.
892+
CategoryTaxonomyIABContent21 CategoryTaxonomy = 5 // 5 IAB Content Category Taxonomy 2.1.
893+
CategoryTaxonomyIABContent22 CategoryTaxonomy = 6 // 6 IAB Content Category Taxonomy 2.2
894+
)

0 commit comments

Comments
 (0)