diff --git a/README.md b/README.md
index da4980d..aac01ef 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,8 @@
-# openrtb [![Go Reference](https://pkg.go.dev/badge/github.com/mxmCherry/openrtb/v15.svg)](https://pkg.go.dev/github.com/mxmCherry/openrtb/v15) [![Test](https://github.com/mxmCherry/openrtb/actions/workflows/test.yml/badge.svg)](https://github.com/mxmCherry/openrtb/actions/workflows/test.yml)
+# openrtb [![Go Reference](https://pkg.go.dev/badge/github.com/mxmCherry/openrtb/v16.svg)](https://pkg.go.dev/github.com/mxmCherry/openrtb/v16) [![Test](https://github.com/mxmCherry/openrtb/actions/workflows/test.yml/badge.svg)](https://github.com/mxmCherry/openrtb/actions/workflows/test.yml)
[OpenRTB](https://iabtechlab.com/standards/openrtb/), [AdCOM](https://iabtechlab.com/standards/openmedia) and [OpenRTB Dynamic Native Ads](https://iabtechlab.com/standards/openrtb-native/) types for [Go programming language](https://golang.org/)
-- [openrtb2](openrtb2/) - [OpenRTB](https://iabtechlab.com/standards/openrtb/) [2.5](https://iabtechlab.com/wp-content/uploads/2016/07/OpenRTB-API-Specification-Version-2-5-FINAL.pdf)
+- [openrtb2](openrtb2/) - [OpenRTB](https://iabtechlab.com/standards/openrtb/) [2.6](https://iabtechlab.com/wp-content/uploads/2022/04/OpenRTB-2-6_FINAL.pdf)
- [openrtb3](openrtb3/) - [OpenRTB](https://iabtechlab.com/standards/openrtb/) [3.0](https://github.com/InteractiveAdvertisingBureau/openrtb)
- [adcom1](adcom1/) - [AdCOM](https://iabtechlab.com/standards/openmedia/) [1.0](https://github.com/InteractiveAdvertisingBureau/AdCOM)
- [native1](native1/) - [OpenRTB Dynamic Native Ads API](https://iabtechlab.com/standards/openrtb-native/) [1.2](https://iabtechlab.com/wp-content/uploads/2016/07/OpenRTB-Native-Ads-Specification-Final-1.2.pdf)
@@ -16,19 +16,19 @@ Also, [test/matcher library](https://github.com/onsi/gomega) relies on newer Go
# Using
```bash
-go get -u "github.com/mxmCherry/openrtb/v15/..."
+go get -u "github.com/mxmCherry/openrtb/v16/..."
```
```go
import (
- openrtb2 "github.com/mxmCherry/openrtb/v15/openrtb2"
+ openrtb2 "github.com/mxmCherry/openrtb/v16/openrtb2"
- openrtb3 "github.com/mxmCherry/openrtb/v15/openrtb3"
- adcom1 "github.com/mxmCherry/openrtb/v15/adcom1"
+ openrtb3 "github.com/mxmCherry/openrtb/v16/openrtb3"
+ adcom1 "github.com/mxmCherry/openrtb/v16/adcom1"
- native1 "github.com/mxmCherry/openrtb/v15/native1"
- nreq "github.com/mxmCherry/openrtb/v15/native1/request"
- nres "github.com/mxmCherry/openrtb/v15/native1/response"
+ native1 "github.com/mxmCherry/openrtb/v16/native1"
+ nreq "github.com/mxmCherry/openrtb/v16/native1/request"
+ nres "github.com/mxmCherry/openrtb/v16/native1/response"
)
```
@@ -41,6 +41,7 @@ Master always contains latest code, so better use some package manager to vendor
- [UpperCamelCase](http://en.wikipedia.org/wiki/CamelCase)
- Capitalized abbreviations (e.g., `AT`, `COPPA`, `PMP` etc.)
- Capitalized `ID` keys
+- Enum items with versions should include minor/patch zeros, i.e. "Foo 1.0" -> `Foo10` (and not just `Foo1`), "Foo 1.1" -> `Foo11` etc
## Types
- Key types should be chosen according to OpenRTB specification (attribute types)
@@ -64,7 +65,7 @@ Pointer | Omitempty | When to use
Using both pointer and `omitempty` is mostly just to save traffic / generate more "canonical" (strict) JSON.
-## Documentation ([pkg.go.dev](https://pkg.go.dev/github.com/mxmCherry/openrtb/v15))
+## Documentation ([pkg.go.dev](https://pkg.go.dev/github.com/mxmCherry/openrtb/v16))
- [Godoc: documenting Go code](http://blog.golang.org/godoc-documenting-go-code)
- Each entity (type, struct key or constant) should be documented
- Comments for entities should be copy-pasted "as-is" from OpenRTB specification (except section 5 - replace "table" with "list" there; ideally, each sentence must be on a new line)
diff --git a/adcom1/README.md b/adcom1/README.md
index 2ab0f13..d45ad77 100644
--- a/adcom1/README.md
+++ b/adcom1/README.md
@@ -1,3 +1,3 @@
-# adcom1 [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/adcom1?status.svg)](https://pkg.go.dev/github.com/mxmCherry/openrtb/v15/adcom1)
+# adcom1 [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/adcom1?status.svg)](https://pkg.go.dev/github.com/mxmCherry/openrtb/v16/adcom1)
[AdCOM](https://iabtechlab.com/standards/openmedia/) [1.0](https://github.com/InteractiveAdvertisingBureau/AdCOM) types for [Go programming language](https://golang.org/)
diff --git a/adcom1/adcom1_test.go b/adcom1/adcom1_test.go
index 110c564..0896bb6 100644
--- a/adcom1/adcom1_test.go
+++ b/adcom1/adcom1_test.go
@@ -8,7 +8,7 @@ import (
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/gomega"
- . "github.com/mxmCherry/openrtb/v15/adcom1"
+ . "github.com/mxmCherry/openrtb/v16/adcom1"
)
var _ = DescribeTable(
diff --git a/adcom1/agent_type.go b/adcom1/agent_type.go
new file mode 100644
index 0000000..284d48a
--- /dev/null
+++ b/adcom1/agent_type.go
@@ -0,0 +1,13 @@
+package adcom1
+
+// AgentType identifies the user agent types a user identifier is from.
+type AgentType int64
+
+// Agent types describing where the user agent is from.
+//
+// Values of 500+ hold vendor-specific codes.
+const (
+ AgentTypeWeb AgentType = 1 // An ID which is tied to a specific web browser or device (cookie-based, probabilistic, or other).
+ AgentTypeApp AgentType = 2 // In-app impressions, which will typically contain a type of device ID (or rather, the privacy-compliant versions of device IDs).
+ AgentTypePerson AgentType = 3 // A person-based ID, i.e., that is the same across devices.
+)
diff --git a/adcom1/api_framework.go b/adcom1/api_framework.go
index 1ed2caa..eebf295 100644
--- a/adcom1/api_framework.go
+++ b/adcom1/api_framework.go
@@ -1,17 +1,19 @@
package adcom1
// APIFramework represents API frameworks either supported by a placement or required by an ad.
-type APIFramework int
+type APIFramework int64
// API frameworks either supported by a placement or required by an ad.
//
// Values of 500+ hold vendor-specific codes.
const (
- APIVPAID1 APIFramework = 1 // VPAID 1.0
- APIVPAID2 APIFramework = 2 // VPAID 2.0
- APIMRAID1 APIFramework = 3 // MRAID 1.0
- APIORMMA APIFramework = 4 // ORMMA
- APIMRAID2 APIFramework = 5 // MRAID 2.0
- APIMRAID3 APIFramework = 6 // MRAID 3.0
- APIOMID1 APIFramework = 7 // OMID 1.0
+ APIVPAID10 APIFramework = 1 // VPAID 1.0
+ APIVPAID20 APIFramework = 2 // VPAID 2.0
+ APIMRAID10 APIFramework = 3 // MRAID 1.0
+ APIORMMA APIFramework = 4 // ORMMA
+ APIMRAID20 APIFramework = 5 // MRAID 2.0
+ APIMRAID30 APIFramework = 6 // MRAID 3.0
+ APIOMID10 APIFramework = 7 // OMID 1.0
+ APISIMID10 APIFramework = 8 // SIMID 1.0
+ APISIMID11 APIFramework = 9 // SIMID 1.1
)
diff --git a/adcom1/app.go b/adcom1/app.go
index 90409a0..57d2ac3 100644
--- a/adcom1/app.go
+++ b/adcom1/app.go
@@ -59,11 +59,21 @@ type App struct {
// Attribute:
// keywords
// Type:
- // string
+ // string; DEPRECATED
// Definition:
- // Comma separated list of keywords about the app.
+ // Comma-separated list of keywords about the app.
+ // Only one of 'keywords' or 'kwarray' may be present.
+ // NOTE: this field is deprecated, use 'kwarray' instead.
Keywords string `json:"keywords,omitempty"`
+ // Attribute:
+ // kwarray
+ // Type:
+ // string array
+ // Definition:
+ // Array of keywords about the site. Only one of 'keywords' or 'kwarray' may be present.
+ KwArray []string `json:"kwarray,omitempty"`
+
// Attribute:
// bundle
// Type:
diff --git a/adcom1/audio_placement.go b/adcom1/audio_placement.go
index e8ec4bc..85ee02d 100644
--- a/adcom1/audio_placement.go
+++ b/adcom1/audio_placement.go
@@ -11,7 +11,7 @@ type AudioPlacement struct {
// Definition:
// Indicates the start delay in seconds for pre-roll, mid-roll, or post-roll placements.
// For additional generic values, refer to List: Start Delay Modes.
- Delay int64 `json:"delay,omitempty"`
+ Delay StartDelay `json:"delay,omitempty"`
// Attribute:
// skip
@@ -117,6 +117,17 @@ type AudioPlacement struct {
// Maximum creative duration in seconds.
MaxDur int64 `json:"maxdur,omitempty"`
+ // Attribute:
+ // rqddurs
+ // Type:
+ // integer array
+ // Definition:
+ // Precise acceptable durations for video creatives in seconds. This field specifically
+ // targets the Live TV use case where non-exact ad durations would result in undesirable
+ // 'dead air'. This field is mutually exclusive with mindur and maxdur; if rqddurs is
+ // specified, mindur and maxdur must not be specified and vice versa.
+ RqdDurs []int64 `json:"rqddurs,omitempty"`
+
// Attribute:
// maxext
// Type:
@@ -162,6 +173,57 @@ type AudioPlacement struct {
// The maximum number of ads that can be played in an ad pod.
MaxSeq int64 `json:"maxseq,omitempty"`
+ // Attribute:
+ // poddur
+ // Type:
+ // integer
+ // Definition:
+ // Indicates the total amount of time in seconds that advertisers may fill
+ // for a “dynamic” video ad pod, or the dynamic portion of a “hybrid” ad pod.
+ // This field is required only for the dynamic portion(s) of video ad pods.
+ // This field refers to the length of the entire ad break, whereas
+ // mindur/maxdur/rqddurs are constraints relating to the slots that make up the pod.
+ PodDur int64 `json:"poddur,omitempty"`
+
+ // Attribute:
+ // podid
+ // Type:
+ // integer
+ // Definition:
+ // Unique identifier indicating that an impression opportunity belongs to a
+ // video ad pod. If multiple impression opportunities within a bid request
+ // share the same podid, this indicates that those impression opportunities
+ // belong to the same video ad pod.
+ PodID int64 `json:"podid,omitempty"`
+
+ // Attribute:
+ // podseq
+ // Type:
+ // integer; default 0
+ // Definition:
+ // The sequence (position) of the video ad pod within a content stream.
+ // Refer to List: Pod Sequence for guidance on the use of this field.
+ PodSeq PodSequence `json:"podseq,omitempty"`
+
+ // Attribute:
+ // slotinpod
+ // Type:
+ // integer; default 0
+ // Definition:
+ // For video ad pods, this value indicates that the seller can guarantee delivery
+ // against the indicated slot position in the pod.
+ // Refer to List: Slot Position in Pod for guidance on the use of this field.
+ SlotInPod SlotPositionInPod `json:"slotinpod,omitempty"`
+
+ // Attribute:
+ // mincpmpersec
+ // Type:
+ // float
+ // Definition:
+ // Minimum CPM per second. This is a price floor for the “dynamic” portion of a
+ // video ad pod, relative to the duration of bids an advertiser may submit.
+ MinCPMPerSec float64 `json:"mincpmpersec,omitempty"`
+
// Attribute:
// comp
// Type:
@@ -180,6 +242,16 @@ type AudioPlacement struct {
// Refer to List: Companion Types.
CompType []CompanionType `json:"comptype,omitempty"`
+ // Attribute:
+ // overlayexpdir
+ // Type:
+ // integer array
+ // Definition:
+ // Directions in which the creative (video overlay) is permitted to expand.
+ // This is primarily used for non-linear videos.
+ // Refer to List: Expandable Directions.
+ OverlayExpDir []ExpandableDirection `json:"overlayexpdir,omitempty"`
+
// Attribute:
// ext
// Type:
diff --git a/adcom1/brand_version.go b/adcom1/brand_version.go
new file mode 100644
index 0000000..c88beef
--- /dev/null
+++ b/adcom1/brand_version.go
@@ -0,0 +1,32 @@
+package adcom1
+
+import "encoding/json"
+
+// BrandVersion provides further identification based on User-Agent Client Hints.
+// The BrandVersion object is used to identify a device’s browser or similar software component, and the user agent’s execution platform or operating system.
+type BrandVersion struct {
+ // Attribute:
+ // brand
+ // Type:
+ // string; recommended
+ // Definition:
+ // A brand identifier, for example, “Chrome” or “Windows”.
+ // The value may be sourced from the User-Agent Client Hints headers, representing either the user agent brand (from the Sec-CH-UA-Full-Version header) or the platform brand (from the Sec-CH-UA-Platform header).
+ Brand string `json:"brand,omitempty"`
+
+ // Attribute:
+ // version
+ // Type:
+ // string array
+ // Definition:
+ // A sequence of version components, in descending hierarchical order (major, minor, micro, …).
+ Version []string `json:"version,omitempty"`
+
+ // Attribute:
+ // ext
+ // Type:
+ // object
+ // Definition:
+ // Optional vendor-specific extensions.
+ Ext json.RawMessage `json:"ext,omitempty"`
+}
diff --git a/adcom1/category_taxonomy.go b/adcom1/category_taxonomy.go
index a7a9f6d..02cac18 100644
--- a/adcom1/category_taxonomy.go
+++ b/adcom1/category_taxonomy.go
@@ -1,13 +1,16 @@
package adcom1
// CategoryTaxonomy identifies the taxonomy in effect when content categories are listed.
-type CategoryTaxonomy int
+type CategoryTaxonomy int64
// CategoryTaxonomy options.
//
// Values of 500+ hold vendor-specific codes.
const (
- CatTaxIABContent1 CategoryTaxonomy = 1 // 1 IAB Content Category Taxonomy 1.0.
- CatTaxIABContent2 CategoryTaxonomy = 2 // 2 IAB Content Category Taxonomy 2.0: www.iab.com/guidelines/taxonomy
- CatTaxIABProduct1 CategoryTaxonomy = 3 // 3 IAB Ad Product Taxonomy 1.0.
+ CatTaxIABContent10 CategoryTaxonomy = 1 // 1 IAB Content Category Taxonomy 1.0.
+ CatTaxIABContent20 CategoryTaxonomy = 2 // 2 IAB Content Category Taxonomy 2.0: www.iab.com/guidelines/taxonomy
+ CatTaxIABProduct10 CategoryTaxonomy = 3 // 3 IAB Ad Product Taxonomy 1.0.
+ CatTaxIABAudience11 CategoryTaxonomy = 4 // 4 IAB Audience Taxonomy 1.1.
+ CatTaxIABContent21 CategoryTaxonomy = 5 // 5 IAB Content Category Taxonomy 2.1.
+ CatTaxIABContent22 CategoryTaxonomy = 6 // 6 IAB Content Category Taxonomy 2.2
)
diff --git a/adcom1/channel.go b/adcom1/channel.go
new file mode 100644
index 0000000..05ac1b4
--- /dev/null
+++ b/adcom1/channel.go
@@ -0,0 +1,43 @@
+package adcom1
+
+import "encoding/json"
+
+// Channel describes the channel an ad will be displayed on.
+// A Channel is defined as the entity that curates a content library, or stream within a brand name for viewers.
+// Examples are specific view selectable ‘channels’ within linear and streaming television (MTV, HGTV, CNN, BBC One, etc) or a specific stream of audio content commonly called ‘stations.’
+// Name is human-readable field while domain and id can be used for reporting and targeting purposes.
+type Channel struct {
+ // Attribute:
+ // id
+ // Type:
+ // string
+ // Definition:
+ // A unique identifier assigned by the publisher.
+ // This may not be a unique identifier across all supply sources.
+ ID string `json:"id,omitempty"`
+
+ // Attribute:
+ // name
+ // Type:
+ // string
+ // Definition:
+ // Channel the content is on (e.g., a local channel like "WABC-TV").
+ Name string `json:"name,omitempty"`
+
+ // Attribute:
+ // domain
+ // Type:
+ // string
+ // Definition:
+ // The primary domain of the channel (e.g., “abc7ny.com” in the case of the local channel WABC-TV).
+ // It is recommended to include the top private domain (PSL+1) for DSP targeting normalization purposes.
+ Domain string `json:"domain,omitempty"`
+
+ // Attribute:
+ // ext
+ // Type:
+ // object
+ // Definition:
+ // Optional vendor-specific extensions.
+ Ext json.RawMessage `json:"ext,omitempty"`
+}
diff --git a/adcom1/content.go b/adcom1/content.go
index 701363b..a7ef9b3 100644
--- a/adcom1/content.go
+++ b/adcom1/content.go
@@ -153,11 +153,21 @@ type Content struct {
// Attribute:
// keywords
// Type:
- // string
+ // string; DEPRECATED
// Definition:
- // Comma separated list of keywords describing the content.
+ // Comma-separated list of keywords describing the content.
+ // Only one of 'keywords' or 'kwarray' may be present.
+ // NOTE: this field is deprecated, use 'kwarray' instead.
Keywords string `json:"keywords,omitempty"`
+ // Attribute:
+ // kwarray
+ // Type:
+ // string array
+ // Definition:
+ // Array of keywords about the site. Only one of 'keywords' or 'kwarray' may be present.
+ KwArray []string `json:"kwarray,omitempty"`
+
// Attribute:
// live
// Type:
@@ -207,6 +217,24 @@ type Content struct {
// Refer to Object: Producer.
Producer *Producer `json:"producer,omitempty"`
+ // Attribute:
+ // network
+ // Type:
+ // object
+ // Definition:
+ // Details about the network.
+ // Refer to Object: Network.
+ Network *Network `json:"network,omitempty"`
+
+ // Attribute:
+ // channel
+ // Type:
+ // object
+ // Definition:
+ // Details about the channel.
+ // Refer to Object: Channel.
+ Channel *Channel `json:"channel,omitempty"`
+
// Attribute:
// data
// Type:
diff --git a/adcom1/creative_attribute.go b/adcom1/creative_attribute.go
index e19bfa1..ca8237f 100644
--- a/adcom1/creative_attribute.go
+++ b/adcom1/creative_attribute.go
@@ -1,7 +1,7 @@
package adcom1
// CreativeAttribute specifies a standard list of creative attributes that can describe an actual ad or restrictions relative to a given placement.
-type CreativeAttribute int
+type CreativeAttribute int64
// Standard list of creative attributes that can describe an actual ad or restrictions relative to a given placement.
//
diff --git a/adcom1/device.go b/adcom1/device.go
index 58e09d3..9e84cc1 100644
--- a/adcom1/device.go
+++ b/adcom1/device.go
@@ -23,6 +23,16 @@ type Device struct {
// Browser user agent string.
UA string `json:"ua,omitempty"`
+ // Attribute:
+ // sua
+ // Type:
+ // string
+ // Definition:
+ // Structured user agent information defined by a Object: UserAgent.
+ // If both `ua` and `sua` are present in the bid request, `sua` should be considered the more accurate representation of the device attributes.
+ // This is because the `ua` may contain a frozen or reduced UserAgent string.
+ SUA *UserAgent `json:"sua,omitempty"`
+
// Attribute:
// ifa
// Type:
@@ -137,6 +147,15 @@ type Device struct {
// Browser language using ISO-639-1-alpha-2.
Lang string `json:"lang,omitempty"`
+ // Attribute:
+ // langb
+ // Type:
+ // string
+ // Definition:
+ // Browser language using IETF BCP 47.
+ // Only one of lang or langb should be present.
+ LangB string `json:"langb,omitempty"`
+
// Attribute:
// ip
// Type:
diff --git a/adcom1/device_type.go b/adcom1/device_type.go
index bca0e80..3402799 100644
--- a/adcom1/device_type.go
+++ b/adcom1/device_type.go
@@ -13,4 +13,5 @@ const (
DeviceTablet DeviceType = 5 // Tablet
DeviceConnected DeviceType = 6 // Connected Device
DeviceSetTopBox DeviceType = 7 // Set Top Box
+ DeviceOOH DeviceType = 8 // OOH Device
)
diff --git a/adcom1/expandable_direction.go b/adcom1/expandable_direction.go
index 1d8519c..48fc30b 100644
--- a/adcom1/expandable_direction.go
+++ b/adcom1/expandable_direction.go
@@ -10,4 +10,5 @@ const (
ExpandableUp ExpandableDirection = 3 // Up
ExpandableDown ExpandableDirection = 4 // Down
ExpandableFullScreen ExpandableDirection = 5 // Full Screen
+ ExpandableResize ExpandableDirection = 6 // Resize/Minimize (make smaller)
)
diff --git a/adcom1/extended_identifier.go b/adcom1/extended_identifier.go
new file mode 100644
index 0000000..717e90e
--- /dev/null
+++ b/adcom1/extended_identifier.go
@@ -0,0 +1,33 @@
+package adcom1
+
+import "encoding/json"
+
+// ExtendedIdentifier support in the OpenRTB specification allows buyers to use audience data in real-time bidding.
+// The exchange should ensure that business agreements allow for the sending of this data.
+// Note, it is assumed that exchanges and DSPs will collaborate with the appropriate regulatory agencies and ID vendor(s) to ensure compliance.
+type ExtendedIdentifier struct {
+ // Attribute:
+ // source
+ // Type:
+ // string
+ // Definition:
+ // Source or technology provider responsible for the set of included IDs.
+ // Expressed as a top-level domain.
+ Source string `json:"source,omitempty"`
+
+ // Attribute:
+ // uids
+ // Type:
+ // object array
+ // Definition:
+ // Array of extended ID UID objects from the given source. Refer to Object: Extended Identifier UIDs.
+ UIDs []ExtendedIdentifierUID `json:"uids,omitempty"`
+
+ // Attribute:
+ // ext
+ // Type:
+ // object
+ // Definition:
+ // Optional vendor-specific extensions.
+ Ext json.RawMessage `json:"ext,omitempty"`
+}
diff --git a/adcom1/extended_identifier_uid.go b/adcom1/extended_identifier_uid.go
new file mode 100644
index 0000000..6bd165a
--- /dev/null
+++ b/adcom1/extended_identifier_uid.go
@@ -0,0 +1,31 @@
+package adcom1
+
+import "encoding/json"
+
+type ExtendedIdentifierUID struct {
+ // Attribute:
+ // id
+ // Type:
+ // string
+ // Definition:
+ // Cookie or platform-native identifier.
+ ID string `json:"id,omitempty"`
+
+ // Attribute:
+ // atype
+ // Type:
+ // integer
+ // Definition:
+ // Type of user agent the match is from.
+ // It is highly recommended to set this, as many DSPs separate app-native IDs from browser-based IDs and require a type value for ID resolution.
+ // Refer to List: Agent Types.
+ AType AgentType `json:"atype,omitempty"`
+
+ // Attribute:
+ // ext
+ // Type:
+ // object
+ // Definition:
+ // Optional vendor-specific extensions.
+ Ext json.RawMessage `json:"ext,omitempty"`
+}
diff --git a/adcom1/media_creative_subtype.go b/adcom1/media_creative_subtype.go
index 5601462..e3b5d20 100644
--- a/adcom1/media_creative_subtype.go
+++ b/adcom1/media_creative_subtype.go
@@ -17,4 +17,6 @@ const (
CreativeDAAST10Wrapper MediaCreativeSubtype = 10 // DAAST 1.0 Wrapper
CreativeVAST41 MediaCreativeSubtype = 11 // VAST 4.1
CreativeVAST41Wrapper MediaCreativeSubtype = 12 // VAST 4.1 Wrapper
+ CreativeVAST42 MediaCreativeSubtype = 13 // VAST 4.2
+ CreativeVAST42Wrapper MediaCreativeSubtype = 14 // VAST 4.2 Wrapper
)
diff --git a/adcom1/network.go b/adcom1/network.go
new file mode 100644
index 0000000..a437d02
--- /dev/null
+++ b/adcom1/network.go
@@ -0,0 +1,43 @@
+package adcom1
+
+import "encoding/json"
+
+// Network describes the network an ad will be displayed on.
+// A Network is defined as the parent entity of the Channel object’s entity for the purposes of organizing Channels.
+// Examples are companies that own and/or license a collection of content channels (Viacom, Discovery, CBS, WarnerMedia, Turner and others), or studio that creates such content and self-distributes content.
+// Name is human-readable field while domain and id can be used for reporting and targeting purposes.
+type Network struct {
+ // Attribute:
+ // id
+ // Type:
+ // string
+ // Definition:
+ // A unique identifier assigned by the publisher.
+ // This may not be a unique identifier across all supply sources.
+ ID string `json:"id,omitempty"`
+
+ // Attribute:
+ // name
+ // Type:
+ // string
+ // Definition:
+ // Network the content is on (e.g., a TV network like "ABC").
+ Name string `json:"name,omitempty"`
+
+ // Attribute:
+ // domain
+ // Type:
+ // string
+ // Definition:
+ // The primary domain of the network (e.g., “abc.com” in the case of the network ABC).
+ // It is recommended to include the top private domain (PSL+1) for DSP targeting normalization purposes.
+ Domain string `json:"domain,omitempty"`
+
+ // Attribute:
+ // ext
+ // Type:
+ // object
+ // Definition:
+ // Optional vendor-specific extensions.
+ Ext json.RawMessage `json:"ext,omitempty"`
+}
diff --git a/adcom1/placement_position.go b/adcom1/placement_position.go
index 5cc6fc0..2939d43 100644
--- a/adcom1/placement_position.go
+++ b/adcom1/placement_position.go
@@ -6,6 +6,7 @@ type PlacementPosition int8
// Placement positions.
const (
+ PositionUnknown PlacementPosition = 0 // Unknown
PositionAboveFold PlacementPosition = 1 // Above The Fold
PositionLocked PlacementPosition = 2 // Locked (i.e., fixed position)
PositionBelowFold PlacementPosition = 3 // Below The Fold
@@ -14,3 +15,16 @@ const (
PositionSideBar PlacementPosition = 6 // Sidebar
PositionFullScreen PlacementPosition = 7 // Fullscreen
)
+
+// Ptr returns pointer to own value.
+func (p PlacementPosition) Ptr() *PlacementPosition {
+ return &p
+}
+
+// Val safely dereferences pointer, returning default value (AdPositionUnknown) for nil.
+func (p *PlacementPosition) Val() PlacementPosition {
+ if p == nil {
+ return PositionUnknown
+ }
+ return *p
+}
diff --git a/adcom1/playback_method.go b/adcom1/playback_method.go
index 76f4928..ffbed69 100644
--- a/adcom1/playback_method.go
+++ b/adcom1/playback_method.go
@@ -11,4 +11,5 @@ const (
PlaybackMouseOverSoundOn PlaybackMethod = 4 // Initiates on Mouse-Over with Sound On
PlaybackViewportSoundOn PlaybackMethod = 5 // Initiates on Entering Viewport with Sound On
PlaybackViewportSoundOff PlaybackMethod = 6 // Initiates on Entering Viewport with Sound Off by Default
+ PlaybackContinuous PlaybackMethod = 7 // Continuous Playback - Media playback is set to play additional media automatically without user interaction. The media player will keep playing additional media (playlist or generated) for the user until the user actively stops this from happening.
)
diff --git a/adcom1/pod_sequence.go b/adcom1/pod_sequence.go
new file mode 100644
index 0000000..f1e9400
--- /dev/null
+++ b/adcom1/pod_sequence.go
@@ -0,0 +1,11 @@
+package adcom1
+
+// PodSequence identifies the pod sequence field, for use in audio and video content streams with one or more ad pods.
+type PodSequence int8
+
+// PodSequence options.
+const (
+ PodSeqLast PodSequence = -1 // Last pod in the content stream.
+ PodSeqAny PodSequence = 0 // Any pod in the content stream.
+ PodSeqFirst PodSequence = 1 // First pod in the content stream.
+)
diff --git a/adcom1/production_quality.go b/adcom1/production_quality.go
index 4be250a..565b38a 100644
--- a/adcom1/production_quality.go
+++ b/adcom1/production_quality.go
@@ -6,6 +6,7 @@ type ProductionQuality int8
// Options for content quality.
// These values are defined by the IAB; refer to www.iab.com/wp-content/uploads/2015/03/long-form-video-final.pdf for more information.
const (
+ ProductionUnknown ProductionQuality = 0 // Unknown
ProductionProfessional ProductionQuality = 1 // Professionally Produced
ProductionProsumer ProductionQuality = 2 // Prosumer
ProductionUser ProductionQuality = 3 // User Generated (UGC)
diff --git a/adcom1/site.go b/adcom1/site.go
index c690391..f7e5f62 100644
--- a/adcom1/site.go
+++ b/adcom1/site.go
@@ -59,11 +59,21 @@ type Site struct {
// Attribute:
// keywords
// Type:
- // string
+ // string; DEPRECATED
// Definition:
- // Comma separated list of keywords about the site.
+ // Comma-separated list of keywords about the app.
+ // Only one of 'keywords' or 'kwarray' may be present.
+ // NOTE: this field is deprecated, use 'kwarray' instead.
Keywords string `json:"keywords,omitempty"`
+ // Attribute:
+ // kwarray
+ // Type:
+ // string array
+ // Definition:
+ // Array of keywords about the site. Only one of 'keywords' or 'kwarray' may be present.
+ KwArray []string `json:"kwarray,omitempty"`
+
// Attribute:
// page
// Type:
diff --git a/adcom1/slot_position_in_pod.go b/adcom1/slot_position_in_pod.go
new file mode 100644
index 0000000..a1c0f4f
--- /dev/null
+++ b/adcom1/slot_position_in_pod.go
@@ -0,0 +1,12 @@
+package adcom1
+
+// SlotPositionInPod identifies the slot position in pod field, for use in audio and video ad pods.
+type SlotPositionInPod int8
+
+// SlotPositionInPod options.
+const (
+ SlotPosLast SlotPositionInPod = -1 // Last ad in the pod.
+ SlotPosAny SlotPositionInPod = 0 // Any ad in the pod.
+ SlotPosFirst SlotPositionInPod = 1 // First ad in the pod.
+ SlotPosFirstOrLast SlotPositionInPod = 2 // First or Last ad in the pod.
+)
diff --git a/openrtb2/start_delay.go b/adcom1/start_delay.go
similarity index 52%
rename from openrtb2/start_delay.go
rename to adcom1/start_delay.go
index dcde3e2..f8d08dd 100644
--- a/openrtb2/start_delay.go
+++ b/adcom1/start_delay.go
@@ -1,17 +1,14 @@
-package openrtb2
+package adcom1
-// 5.12 Start Delay
-//
-// Various options for the video or audio start delay.
-// If the start delay value is greater than 0, then the position is mid-roll and the value indicates the start delay.
+// StartDelay represents video or audio start delay.
type StartDelay int64
+// Options for the video or audio start delay.
+// If the start delay value is greater than 0, then the position is mid-roll and the value indicates the start delay.
const (
- // > 0 Mid-Roll (value indicates start delay in second)
-
- StartDelayPreRoll StartDelay = 0 // Pre-Roll
- StartDelayGenericMidRoll StartDelay = -1 // Generic Mid-Roll
- StartDelayGenericPostRoll StartDelay = -2 // Generic Post-Roll
+ StartPreRoll StartDelay = 0 // Pre-Roll
+ StartMidRoll StartDelay = -1 // Generic Mid-Roll
+ StartPostRoll StartDelay = -2 // Generic Post-Roll
)
// Ptr returns pointer to own value.
@@ -22,7 +19,7 @@ func (d StartDelay) Ptr() *StartDelay {
// Val safely dereferences pointer, returning default value (StartDelayPreRoll) for nil.
func (d *StartDelay) Val() StartDelay {
if d == nil {
- return StartDelayPreRoll
+ return StartPreRoll
}
return *d
}
diff --git a/adcom1/start_delay_mode.go b/adcom1/start_delay_mode.go
deleted file mode 100644
index 7287939..0000000
--- a/adcom1/start_delay_mode.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package adcom1
-
-// StartDelayMode represents video or audio start delay.
-type StartDelayMode int64
-
-// Options for the video or audio start delay.
-// If the start delay value is greater than 0, then the position is mid-roll and the value indicates the start delay.
-const (
- StartDelayPreRoll StartDelayMode = 0 // Pre-Roll
- StartDelayGenericMidRoll StartDelayMode = -1 // Generic Mid-Roll
- StartDelayGenericPostRoll StartDelayMode = -2 // Generic Post-Roll
-)
diff --git a/adcom1/user.go b/adcom1/user.go
index a12b096..38ab2ec 100644
--- a/adcom1/user.go
+++ b/adcom1/user.go
@@ -27,7 +27,7 @@ type User struct {
// Attribute:
// yob
// Type:
- // integer
+ // integer; DEPRECATED
// Definition:
// Year of birth as a 4-digit integer.
YOB int64 `json:"yob,omitempty"`
@@ -35,7 +35,7 @@ type User struct {
// Attribute:
// gender
// Type:
- // string
+ // string; DEPRECATED
// Definition:
// Gender, where “M” = male, “F” = female, “O” = known to be other (i.e., omitted is unknown).
Gender string `json:"gender,omitempty"`
@@ -43,11 +43,21 @@ type User struct {
// Attribute:
// keywords
// Type:
- // string
+ // string; DEPRECATED
// Definition:
- // Comma separated list of keywords, interests, or intent.
+ // Comma-separated list of keywords, interests, or intent.
+ // Only one of 'keywords' or 'kwarray' may be present.
+ // NOTE: this field is deprecated, use 'kwarray' instead.
Keywords string `json:"keywords,omitempty"`
+ // Attribute:
+ // kwarray
+ // Type:
+ // string array
+ // Definition:
+ // Array of keywords about the site. Only one of 'keywords' or 'kwarray' may be present.
+ KwArray []string `json:"kwarray,omitempty"`
+
// Attribute:
// consent
// Type:
@@ -75,6 +85,14 @@ type User struct {
// Refer to Object: Data.
Data []Data `json:"data,omitempty"`
+ // Attribute:
+ // eids
+ // Type:
+ // object array
+ // Definition:
+ // Extended (third-party) identifiers for this user. Refer to Object: Extended Identifiers.
+ EIDs []ExtendedIdentifier `json:"eids,omitempty"`
+
// Attribute:
// ext
// Type:
diff --git a/adcom1/user_agent.go b/adcom1/user_agent.go
new file mode 100644
index 0000000..dd8e62b
--- /dev/null
+++ b/adcom1/user_agent.go
@@ -0,0 +1,81 @@
+package adcom1
+
+import "encoding/json"
+
+// UserAgent represents Structured user agent information provided when client supports User-Agent Client Hints.
+// If both device.ua and device.sua are present in the bid request, device.sua should be considered the more accurate representation of the device attributes.
+// This is because the device.ua may contain a frozen or reduced UserAgent string.
+type UserAgent struct {
+ // Attribute:
+ // browsers
+ // Type:
+ // object array; recommended
+ // Definition:
+ // Each BrandVersion object identifies a browser or similar software component.
+ // Refer to Object: BrandVersion.
+ // Implementers should send brands and versions derived from the Sec-CH-UA-Full-Version-List header.
+ Browsers []BrandVersion `json:"browsers,omitempty"`
+
+ // Attribute:
+ // platform
+ // Type:
+ // object; recommended
+ // Definition:
+ // Refer to Object: BrandVersion that identifies the user agent’s execution platform / OS.
+ // Implementers should send a brand derived from the Sec-CH-UA-Platform header, and version derived from the Sec-CH-UA-Platform-Version header.
+ Platform *BrandVersion `json:"platform,omitempty"`
+
+ // Attribute:
+ // mobile
+ // Type:
+ // integer
+ // Definition:
+ // 1 if the agent prefers a “mobile” version of the content, if available, i.e. optimized for small screens or touch input.
+ // 0 if the agent prefers the “desktop” or “full” content.
+ // Implementers should derive this value from the Sec-CH-UA-Mobile header.
+ Mobile int8 `json:"mobile,omitempty"`
+
+ // Attribute:
+ // architecture
+ // Type:
+ // string
+ // Definition:
+ // Device’s major binary architecture, e.g. “x86” or “arm”.
+ // Implementers should retrieve this value from the Sec-CH-UA-Arch header.
+ Architecture string `json:"architecture,omitempty"`
+
+ // Attribute:
+ // bitness
+ // Type:
+ // string
+ // Definition:
+ // Device’s bitness, e.g. “64” for 64-bit architecture.
+ // Implementers should retrieve this value from the Sec-CH-UA-Bitness header.
+ Bitness string `json:"bitness,omitempty"`
+
+ // Attribute:
+ // model
+ // Type:
+ // string
+ // Definition:
+ // Device model.
+ // Implementers should retrieve this value from the Sec-CH-UA-Model header.
+ Model string `json:"model,omitempty"`
+
+ // Attribute:
+ // source
+ // Type:
+ // integer
+ // Definition:
+ // The source of data used to create this object.
+ // Refer to List: User-Agent Source
+ Source UserAgentSource `json:"source,omitempty"`
+
+ // Attribute:
+ // ext
+ // Type:
+ // object
+ // Definition:
+ // Optional vendor-specific extensions.
+ Ext json.RawMessage `json:"ext,omitempty"`
+}
diff --git a/adcom1/user_agent_source.go b/adcom1/user_agent_source.go
new file mode 100644
index 0000000..8ab6617
--- /dev/null
+++ b/adcom1/user_agent_source.go
@@ -0,0 +1,12 @@
+package adcom1
+
+// UserAgentSource represents the source of a user agent.
+type UserAgentSource int8
+
+// Options for the user agent source.
+const (
+ UASourceUnknown UserAgentSource = 0 // Unspecified/unknown
+ UASourceLowEntropy UserAgentSource = 1 // User-Agent Client Hints (only low-entropy headers were available)
+ UASourceHighEntropy UserAgentSource = 2 // User-Agent Client Hints (with high-entropy headers available)
+ UASourceParsed UserAgentSource = 3 // Parsed from User-Agent header (the same string carried by the ua field)
+)
diff --git a/adcom1/video_placement.go b/adcom1/video_placement.go
index c3c1200..e21bea7 100644
--- a/adcom1/video_placement.go
+++ b/adcom1/video_placement.go
@@ -1,6 +1,8 @@
package adcom1
-import "encoding/json"
+import (
+ "encoding/json"
+)
// VideoPlacement object signals that the placement may be a video placement and provides additional detail about permitted video ads (e.g., VAST).
type VideoPlacement struct {
@@ -29,7 +31,7 @@ type VideoPlacement struct {
// Definition:
// Indicates the start delay in seconds for pre-roll, mid-roll, or post-roll placements.
// For additional generic values, refer to List: Start Delay Modes.
- Delay int64 `json:"delay,omitempty"`
+ Delay StartDelay `json:"delay,omitempty"`
// Attribute:
// skip
@@ -151,6 +153,17 @@ type VideoPlacement struct {
// Maximum creative duration in seconds.
MaxDur int64 `json:"maxdur,omitempty"`
+ // Attribute:
+ // rqddurs
+ // Type:
+ // integer array
+ // Definition:
+ // Precise acceptable durations for video creatives in seconds. This field specifically
+ // targets the Live TV use case where non-exact ad durations would result in undesirable
+ // 'dead air'. This field is mutually exclusive with mindur and maxdur; if rqddurs is
+ // specified, mindur and maxdur must not be specified and vice versa.
+ RqdDurs []int64 `json:"rqddurs,omitempty"`
+
// Attribute:
// maxext
// Type:
@@ -196,6 +209,57 @@ type VideoPlacement struct {
// The maximum number of ads that can be played in an ad pod.
MaxSeq int64 `json:"maxseq,omitempty"`
+ // Attribute:
+ // poddur
+ // Type:
+ // integer
+ // Definition:
+ // Indicates the total amount of time in seconds that advertisers may fill
+ // for a “dynamic” video ad pod, or the dynamic portion of a “hybrid” ad pod.
+ // This field is required only for the dynamic portion(s) of video ad pods.
+ // This field refers to the length of the entire ad break, whereas
+ // mindur/maxdur/rqddurs are constraints relating to the slots that make up the pod.
+ PodDur int64 `json:"poddur,omitempty"`
+
+ // Attribute:
+ // podid
+ // Type:
+ // integer
+ // Definition:
+ // Unique identifier indicating that an impression opportunity belongs to a
+ // video ad pod. If multiple impression opportunities within a bid request
+ // share the same podid, this indicates that those impression opportunities
+ // belong to the same video ad pod.
+ PodID int64 `json:"podid,omitempty"`
+
+ // Attribute:
+ // podseq
+ // Type:
+ // integer; default 0
+ // Definition:
+ // The sequence (position) of the video ad pod within a content stream.
+ // Refer to List: Pod Sequence for guidance on the use of this field.
+ PodSeq PodSequence `json:"podseq,omitempty"`
+
+ // Attribute:
+ // slotinpod
+ // Type:
+ // integer; default 0
+ // Definition:
+ // For video ad pods, this value indicates that the seller can guarantee delivery
+ // against the indicated slot position in the pod.
+ // Refer to List: Slot Position in Pod for guidance on the use of this field.
+ SlotInPod SlotPositionInPod `json:"slotinpod,omitempty"`
+
+ // Attribute:
+ // mincpmpersec
+ // Type:
+ // float
+ // Definition:
+ // Minimum CPM per second. This is a price floor for the “dynamic” portion of a
+ // video ad pod, relative to the duration of bids an advertiser may submit.
+ MinCPMPerSec float64 `json:"mincpmpersec,omitempty"`
+
// Attribute:
// linear
// Type:
@@ -232,6 +296,25 @@ type VideoPlacement struct {
// Refer to List: Companion Types.
CompType []CompanionType `json:"comptype,omitempty"`
+ // Attribute:
+ // expdir
+ // Type:
+ // integer array
+ // Definition:
+ // Directions in which the creative (video placement) is permitted to expand.
+ // Refer to List: Expandable Directions.
+ ExpDir []ExpandableDirection `json:"expdir,omitempty"`
+
+ // Attribute:
+ // overlayexpdir
+ // Type:
+ // integer array
+ // Definition:
+ // Directions in which the creative (video overlay) is permitted to expand.
+ // This is primarily used for non-linear videos.
+ // Refer to List: Expandable Directions.
+ OverlayExpDir []ExpandableDirection `json:"overlayexpdir,omitempty"`
+
// Attribute:
// ext
// Type:
diff --git a/adcom1/volume_normalization_mode.go b/adcom1/volume_normalization_mode.go
index e3235cc..cb969b8 100644
--- a/adcom1/volume_normalization_mode.go
+++ b/adcom1/volume_normalization_mode.go
@@ -11,3 +11,16 @@ const (
VolumeNormLoudness VolumeNormalizationMode = 3 // Ad Loudness Normalized to Content
VolumeNormCustom VolumeNormalizationMode = 4 // Custom Volume Normalization
)
+
+// Ptr returns pointer to own value.
+func (v VolumeNormalizationMode) Ptr() *VolumeNormalizationMode {
+ return &v
+}
+
+// Val safely dereferences pointer, returning default value (VolumeNormNone) for nil.
+func (v *VolumeNormalizationMode) Val() VolumeNormalizationMode {
+ if v == nil {
+ return VolumeNormNone
+ }
+ return *v
+}
diff --git a/go.mod b/go.mod
index 402af62..0d7135e 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/mxmCherry/openrtb/v15
+module github.com/mxmCherry/openrtb/v16
go 1.16
diff --git a/native1/README.md b/native1/README.md
index 3e4a2fb..c75dcc7 100644
--- a/native1/README.md
+++ b/native1/README.md
@@ -1,4 +1,4 @@
-# native1 [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/native1?status.svg)](https://pkg.go.dev/github.com/mxmCherry/openrtb/v15/native1)
+# native1 [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/native1?status.svg)](https://pkg.go.dev/github.com/mxmCherry/openrtb/v16/native1)
[OpenRTB Dynamic Native Ads API](https://iabtechlab.com/standards/openrtb-native/) [1.2](https://iabtechlab.com/wp-content/uploads/2016/07/OpenRTB-Native-Ads-Specification-Final-1.2.pdf) section "7 Reference Lists/Enumerations" types for [Go programming language](https://golang.org/)
diff --git a/native1/protocol.go b/native1/protocol.go
index 23ab7ba..0f5ce4e 100644
--- a/native1/protocol.go
+++ b/native1/protocol.go
@@ -1,6 +1,6 @@
package native1
-// 5.8 Protocols (from OpenRTB spec 2.5)
+// Protocols (from AdCOM spec 1.0, List: Creative Subtypes - Audio/Video)
//
// Options for the various bid response protocols that could be supported by an exchange.
//
@@ -18,4 +18,8 @@ const (
ProtocolVAST40Wrapper Protocol = 8 // VAST 4.0 Wrapper
ProtocolDAAST10 Protocol = 9 // DAAST 1.0
ProtocolDAAST10Wrapper Protocol = 10 // DAAST 1.0 Wrapper
+ ProtocolVAST41 Protocol = 11 // VAST 4.1
+ ProtocolVAST41Wrapper Protocol = 12 // VAST 4.1 Wrapper
+ ProtocolVAST42 Protocol = 13 // VAST 4.2
+ ProtocolVAST42Wrapper Protocol = 14 // VAST 4.2 Wrapper
)
diff --git a/native1/request/README.md b/native1/request/README.md
index f560845..dde317e 100644
--- a/native1/request/README.md
+++ b/native1/request/README.md
@@ -1,3 +1,3 @@
-# native1/request [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/native1/request?status.svg)](https://pkg.go.dev/github.com/mxmCherry/openrtb/v15/native1/request)
+# native1/request [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/native1/request?status.svg)](https://pkg.go.dev/github.com/mxmCherry/openrtb/v16/native1/request)
[OpenRTB Dynamic Native Ads API](https://iabtechlab.com/standards/openrtb-native/) [1.2](https://iabtechlab.com/wp-content/uploads/2016/07/OpenRTB-Native-Ads-Specification-Final-1.2.pdf) section "4 Native Ad Request Markup Details" types for [Go programming language](https://golang.org/)
diff --git a/native1/request/data.go b/native1/request/data.go
index d37b57f..fc8ece2 100644
--- a/native1/request/data.go
+++ b/native1/request/data.go
@@ -3,7 +3,7 @@ package request
import (
"encoding/json"
- "github.com/mxmCherry/openrtb/v15/native1"
+ "github.com/mxmCherry/openrtb/v16/native1"
)
// 4.6 Data Object
diff --git a/native1/request/event_tracker.go b/native1/request/event_tracker.go
index 1af6c20..7b774be 100644
--- a/native1/request/event_tracker.go
+++ b/native1/request/event_tracker.go
@@ -3,7 +3,7 @@ package request
import (
"encoding/json"
- "github.com/mxmCherry/openrtb/v15/native1"
+ "github.com/mxmCherry/openrtb/v16/native1"
)
// 4.7 Event Trackers Request Object
diff --git a/native1/request/image.go b/native1/request/image.go
index ace9ea6..6b5bea8 100644
--- a/native1/request/image.go
+++ b/native1/request/image.go
@@ -3,7 +3,7 @@ package request
import (
"encoding/json"
- "github.com/mxmCherry/openrtb/v15/native1"
+ "github.com/mxmCherry/openrtb/v16/native1"
)
// 4.4 Image Object
diff --git a/native1/request/request.go b/native1/request/request.go
index f9bd9f5..c0aac62 100644
--- a/native1/request/request.go
+++ b/native1/request/request.go
@@ -8,7 +8,7 @@ package request
import (
"encoding/json"
- "github.com/mxmCherry/openrtb/v15/native1"
+ "github.com/mxmCherry/openrtb/v16/native1"
)
// 4.1 Native Markup Request Object
diff --git a/native1/request/request_test.go b/native1/request/request_test.go
index ab45772..32a2f39 100644
--- a/native1/request/request_test.go
+++ b/native1/request/request_test.go
@@ -5,7 +5,7 @@ import (
"io/ioutil"
"path/filepath"
- . "github.com/mxmCherry/openrtb/v15/native1/request"
+ . "github.com/mxmCherry/openrtb/v16/native1/request"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
diff --git a/native1/request/video.go b/native1/request/video.go
index ef67280..05fee3e 100644
--- a/native1/request/video.go
+++ b/native1/request/video.go
@@ -3,7 +3,7 @@ package request
import (
"encoding/json"
- "github.com/mxmCherry/openrtb/v15/native1"
+ "github.com/mxmCherry/openrtb/v16/native1"
)
// 4.5 Video Object
diff --git a/native1/response/README.md b/native1/response/README.md
index cc03b16..9cbf221 100644
--- a/native1/response/README.md
+++ b/native1/response/README.md
@@ -1,3 +1,3 @@
-# native1/response [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/native1/response?status.svg)](https://pkg.go.dev/github.com/mxmCherry/openrtb/v15/native1/response)
+# native1/response [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/native1/response?status.svg)](https://pkg.go.dev/github.com/mxmCherry/openrtb/v16/native1/response)
[OpenRTB Dynamic Native Ads API](https://iabtechlab.com/standards/openrtb-native/) [1.2](https://iabtechlab.com/wp-content/uploads/2016/07/OpenRTB-Native-Ads-Specification-Final-1.2.pdf) section "5 Native Ad Response Markup Details" types for [Go programming language](https://golang.org/)
diff --git a/native1/response/data.go b/native1/response/data.go
index e2de89c..f20842b 100644
--- a/native1/response/data.go
+++ b/native1/response/data.go
@@ -3,7 +3,7 @@ package response
import (
"encoding/json"
- "github.com/mxmCherry/openrtb/v15/native1"
+ "github.com/mxmCherry/openrtb/v16/native1"
)
// 5.5 Object: Data
diff --git a/native1/response/event_tracker.go b/native1/response/event_tracker.go
index 4b593e0..b58930a 100644
--- a/native1/response/event_tracker.go
+++ b/native1/response/event_tracker.go
@@ -3,7 +3,7 @@ package response
import (
"encoding/json"
- "github.com/mxmCherry/openrtb/v15/native1"
+ "github.com/mxmCherry/openrtb/v16/native1"
)
// 5.8 Event Tracker Response Object
diff --git a/native1/response/image.go b/native1/response/image.go
index 728cf8f..2c25cb1 100644
--- a/native1/response/image.go
+++ b/native1/response/image.go
@@ -3,7 +3,7 @@ package response
import (
"encoding/json"
- "github.com/mxmCherry/openrtb/v15/native1"
+ "github.com/mxmCherry/openrtb/v16/native1"
)
// 5.4 Object: Image
diff --git a/native1/response/response_test.go b/native1/response/response_test.go
index 50dac08..1341c57 100644
--- a/native1/response/response_test.go
+++ b/native1/response/response_test.go
@@ -5,7 +5,7 @@ import (
"io/ioutil"
"path/filepath"
- . "github.com/mxmCherry/openrtb/v15/native1/response"
+ . "github.com/mxmCherry/openrtb/v16/native1/response"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
diff --git a/openrtb2/README.md b/openrtb2/README.md
index 01b662f..78bec08 100644
--- a/openrtb2/README.md
+++ b/openrtb2/README.md
@@ -1,3 +1,3 @@
-# openrtb2 [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/openrtb2?status.svg)](https://pkg.go.dev/github.com/mxmCherry/openrtb/v15/openrtb2)
+# openrtb2 [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/openrtb2?status.svg)](https://pkg.go.dev/github.com/mxmCherry/openrtb/v16/openrtb2)
-[OpenRTB](https://iabtechlab.com/standards/openrtb/) [2.5](https://iabtechlab.com/wp-content/uploads/2016/07/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) types for [Go programming language](https://golang.org/)
+[OpenRTB](https://iabtechlab.com/standards/openrtb/) [2.6](https://iabtechlab.com/wp-content/uploads/2022/04/OpenRTB-2-6_FINAL.pdf) types for [Go programming language](https://golang.org/)
diff --git a/openrtb2/ad_insertion.go b/openrtb2/ad_insertion.go
new file mode 100644
index 0000000..6d11ebc
--- /dev/null
+++ b/openrtb2/ad_insertion.go
@@ -0,0 +1,15 @@
+package openrtb2
+
+// SSAI indicates if server-side ad insertion (e.g., stitching an ad into an
+// audio or video stream) is in use and the impact of this on asset
+// and tracker retrieval.
+//
+// Originates from Imp.ssai property, not a separately-defined enum.
+type AdInsertion int8
+
+const (
+ AdInsertUnknown AdInsertion = 0 // status unknown
+ AdInsertClient AdInsertion = 1 // all client-side (i.e., not server-side)
+ AdInsertServerStitchClientTrack AdInsertion = 2 // assets stitched server-side but tracking pixels fired client-side
+ AdInsertServer AdInsertion = 3 // all server-side
+)
diff --git a/openrtb2/ad_position.go b/openrtb2/ad_position.go
deleted file mode 100644
index 2f76994..0000000
--- a/openrtb2/ad_position.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package openrtb2
-
-// 5.4 Ad Position
-//
-// Position of the ad as a relative measure of visibility or prominence.
-// This OpenRTB list has values derived from the Inventory Quality Guidelines (IQG).
-// Practitioners should keep in sync with updates to the IQG values as published on IAB.com.
-// Values “4” - “7” apply to apps per the mobile addendum to IQG version 2.1.
-type AdPosition int8
-
-const (
- AdPositionUnknown AdPosition = 0 // Unknown
- AdPositionAboveTheFold AdPosition = 1 // Above the Fold
- AdPositionMayOrMayNotBeInitiallyVisible AdPosition = 2 // DEPRECATED - May or may not be initially visible depending on screen size/resolution.
- AdPositionBelowTheFold AdPosition = 3 // Below the Fold
- AdPositionHeader AdPosition = 4 // Header
- AdPositionFooter AdPosition = 5 // Footer
- AdPositionSidebar AdPosition = 6 // Sidebar
- AdPositionFullScreen AdPosition = 7 // Full Screen
-)
-
-// Ptr returns pointer to own value.
-func (p AdPosition) Ptr() *AdPosition {
- return &p
-}
-
-// Val safely dereferences pointer, returning default value (AdPositionUnknown) for nil.
-func (p *AdPosition) Val() AdPosition {
- if p == nil {
- return AdPositionUnknown
- }
- return *p
-}
diff --git a/openrtb2/api_framework.go b/openrtb2/api_framework.go
deleted file mode 100644
index f5403bd..0000000
--- a/openrtb2/api_framework.go
+++ /dev/null
@@ -1,15 +0,0 @@
-package openrtb2
-
-// 5.6 API Frameworks
-//
-// List of API frameworks supported by the publisher.
-type APIFramework int8
-
-const (
- APIFrameworkVPAID10 APIFramework = 1 // VPAID 1.0
- APIFrameworkVPAID20 APIFramework = 2 // VPAID 2.0
- APIFrameworkMRAID1 APIFramework = 3 // MRAID-1
- APIFrameworkORMMA APIFramework = 4 // ORMMA
- APIFrameworkMRAID2 APIFramework = 5 // MRAID-2
- APIFrameworkMRAID3 APIFramework = 6 // MRAID-3
-)
diff --git a/openrtb2/app.go b/openrtb2/app.go
index ce08d67..d2764d2 100644
--- a/openrtb2/app.go
+++ b/openrtb2/app.go
@@ -1,6 +1,10 @@
package openrtb2
-import "encoding/json"
+import (
+ "encoding/json"
+
+ "github.com/mxmCherry/openrtb/v16/adcom1"
+)
// 3.2.14 Object: App
//
@@ -30,10 +34,12 @@ type App struct {
// Type:
// string
// Description:
- // A platform-specific application identifier intended to be
- // unique to the app and independent of the exchange. On
- // Android, this should be a bundle or package name (e.g.,
- // com.foo.mygame). On iOS, it is typically a numeric ID.
+ // The store ID of the app in an app store. See OTT/CTV Store
+ // Assigned App Identification Guidelines for more details about
+ // expected strings for CTV app stores. For mobile apps in
+ // Google Play Store, these should be bundle or package names
+ // (e.g. com.foo.mygame). For apps in Apple App Store, these
+ // should be a numeric ID.
Bundle string `json:"bundle,omitempty"`
// Attribute:
@@ -52,12 +58,23 @@ type App struct {
// App store URL for an installed app; for IQG 2.1 compliance.
StoreURL string `json:"storeurl,omitempty"`
+ // Attribute:
+ // cattax
+ // Type:
+ // integer; default 1
+ // Description:
+ // The taxonomy in use. Refer to the AdCOM list List: Category
+ // Taxonomies for values.
+ CatTax adcom1.CategoryTaxonomy `json:"cattax,omitempty"`
+
// Attribute:
// cat
// Type:
// string array
// Description:
- // Array of IAB content categories of the app. Refer to List 5.1
+ // Array of IAB content categories of the app. The taxonomy to be
+ // used is defined by the cattax field. If no cattax field is supplied
+ // IAB Content Category Taxonomy 1.0 is assumed.
Cat []string `json:"cat,omitempty"`
// Attribute:
@@ -66,7 +83,8 @@ type App struct {
// string array
// Description:
// Array of IAB content categories that describe the current
- // section of the app. Refer to List 5.1.
+ // section of the app.
+ // The taxonomy to be used is defined by the cattax field.
SectionCat []string `json:"sectioncat,omitempty"`
// Attribute:
@@ -75,7 +93,8 @@ type App struct {
// string array
// Description:
// Array of IAB content categories that describe the current page
- // or view of the app. Refer to List 5.1.
+ // or view of the app.
+ // The taxonomy to be used is defined by the cattax field.
PageCat []string `json:"pagecat,omitempty"`
// Attribute:
@@ -123,9 +142,19 @@ type App struct {
// Type:
// string
// Description:
- // Comma separated list of keywords about the app.
+ // Comma separated list of keywords about the app. Only one of
+ // ‘keywords’ or ‘kwarray’ may be present.
Keywords string `json:"keywords,omitempty"`
+ // Attribute:
+ // kwarray
+ // Type:
+ // string
+ // Description:
+ // Array of keywords about the site. Only one of ‘keywords’ or
+ // ‘kwarray’ may be present.
+ KwArray []string `json:"kwarray,omitempty"`
+
// Attribute:
// ext
// Type:
diff --git a/openrtb2/audio.go b/openrtb2/audio.go
index 9b2ac5a..ba6681c 100644
--- a/openrtb2/audio.go
+++ b/openrtb2/audio.go
@@ -1,6 +1,10 @@
package openrtb2
-import "encoding/json"
+import (
+ "encoding/json"
+
+ "github.com/mxmCherry/openrtb/v16/adcom1"
+)
// 3.2.8 Object: Audio
//
@@ -25,7 +29,7 @@ type Audio struct {
// Attribute:
// minduration
// Type:
- // integer; recommended
+ // integer; default 0; recommended
// Description:
// Minimum audio ad duration in seconds.
MinDuration int64 `json:"minduration,omitempty"`
@@ -38,13 +42,29 @@ type Audio struct {
// Maximum audio ad duration in seconds.
MaxDuration int64 `json:"maxduration,omitempty"`
+ // Attribute:
+ // poddur
+ // Type:
+ // integer; recommended
+ // Description:
+ // Indicates the total amount of time that advertisers may fill for a
+ // "dynamic" audio ad pod, or the dynamic portion of a "hybrid"
+ // ad pod. This field is required only for the dynamic portion(s) of
+ // audio ad pods. This field refers to the length of the entire ad
+ // break, whereas minduration/maxduration/rqddurs are
+ // constraints relating to the slots that make up the pod.
+ PodDur int64 `json:"poddur,omitempty"`
+
// Attribute:
// protocols
// Type:
// integer array; recommended
// Description:
- // Array of supported audio protocols. Refer to List 5.8.
- Protocols []Protocol `json:"protocols,omitempty"`
+ // Array of supported audio protocols. Refer to List: Creative
+ // Subtypes - Audio/Video in AdCOM 1.0.
+ // Note:
+ // OpenRTB <=2.5 defined only protocols 1..10.
+ Protocols []adcom1.MediaCreativeSubtype `json:"protocols,omitempty"`
// Attribute:
// startdelay
@@ -52,26 +72,86 @@ type Audio struct {
// integer; recommended
// Description:
// Indicates the start delay in seconds for pre-roll, mid-roll, or
- // post-roll ad placements. Refer to List 5.12.
- StartDelay *StartDelay `json:"startdelay,omitempty"`
+ // post-roll ad placements. Refer to List: Start Delay Modes in
+ // AdCOM 1.0.
+ StartDelay *adcom1.StartDelay `json:"startdelay,omitempty"`
// Attribute:
- // sequence
+ // rqddurs
+ // Type:
+ // integer array
+ // Description:
+ // Precise acceptable durations for audio creatives in seconds. This
+ // field specifically targets the live audio/radio use case where
+ // non-exact ad durations would result in undesirable ‘dead air’.
+ // This field is mutually exclusive with minduration and
+ // maxduration; if rqddurs is specified, minduration and
+ // maxduration must not be specified and vice versa.
+ RqdDurs []int64 `json:"rqddurs,omitempty"`
+
+ // Attribute:
+ // podid
// Type:
// integer
// Description:
+ // Unique identifier indicating that an impression opportunity
+ // belongs to an audioad pod. If multiple impression opportunities
+ // within a bid request share the same podid, this indicates that
+ // those impression opportunities belong to the same audio ad
+ // pod.
+ PodID int64 `json:"podid,omitempty"`
+
+ // Attribute:
+ // podid
+ // Type:
+ // integer; default 0
+ // Description:
+ // The sequence (position) of the audio ad pod within a
+ // content stream. Refer to List: Pod Sequence in AdCOM 1.0
+ // for guidance on the use of this field.
+ PodSeq adcom1.PodSequence `json:"podseq,omitempty"`
+
+ // Attribute:
+ // sequence
+ // Type:
+ // integer; default 0; DEPRECATED
+ // Description:
// If multiple ad impressions are offered in the same bid request,
// the sequence number will allow for the coordinated delivery
// of multiple creatives.
Sequence int64 `json:"sequence,omitempty"`
+ // Attribute:
+ // slotinpod
+ // Type:
+ // integer; default 0
+ // Description:
+ // For audio ad pods, this value indicates that the seller can
+ // guarantee delivery against the indicated sequence. Refer to
+ // List: Slot Position in Pod in AdCOM 1.0 for guidance on the
+ // use of this field.
+ SlotInPod adcom1.SlotPositionInPod `json:"slotinpod,omitempty"`
+
+ // Attribute:
+ // mincpmpersec
+ // Type:
+ // float
+ // Description:
+ // Minimum CPM per second. This is a price floor for the
+ // "dynamic" portion of an audio ad pod, relative to the duration
+ // of bids an advertiser may submit.
+ MinCPMPerSec float64 `json:"mincpmpersec,omitempty"`
+
// Attribute:
// battr
// Type:
// integer array
// Description:
- // Blocked creative attributes. Refer to List 5.3.
- BAttr []CreativeAttribute `json:"battr,omitempty"`
+ // Blocked creative attributes. Refer to List: Creative Attributes in
+ // AdCOM 1.0.
+ // Note:
+ // OpenRTB <=2.5 defined only attributes with IDs 1..17.
+ BAttr []adcom1.CreativeAttribute `json:"battr,omitempty"`
// Attribute:
// maxextended
@@ -107,8 +187,9 @@ type Audio struct {
// integer array
// Description:
// Supported delivery methods (e.g., streaming, progressive). If
- // none specified, assume all are supported. Refer to List 5.15.
- Delivery []ContentDeliveryMethod `json:"delivery,omitempty"`
+ // none specified, assume all are supported. Refer to List: Delivery
+ // Methods in AdCOM 1.0.
+ Delivery []adcom1.DeliveryMethod `json:"delivery,omitempty"`
// Attribute:
// companionad
@@ -125,19 +206,21 @@ type Audio struct {
// integer array
// Description:
// List of supported API frameworks for this impression. Refer to
- // List 5.6. If an API is not explicitly listed, it is assumed not to be
- // supported.
- API []APIFramework `json:"api,omitempty"`
+ // List: API Frameworks in AdCOM 1.0. If an API is not explicitly
+ // listed, it is assumed not to be supported.
+ // Note:
+ // OpenRTB <=2.5 defined only frameworks 1..6.
+ API []adcom1.APIFramework `json:"api,omitempty"`
// Attribute:
// companiontype
// Type:
// integer array
// Description:
- // Supported DAAST companion ad types. Refer to List 5.14.
- // Recommended if companion Banner objects are included via
- // the companionad array.
- CompanionType []CompanionType `json:"companiontype,omitempty"`
+ // Supported companion ad types. Refer to List: Companion
+ // Types in AdCOM 1.0. Recommended if companion Banner
+ // objects are included via the companionad array.
+ CompanionType []adcom1.CompanionType `json:"companiontype,omitempty"`
// Attribute:
// maxseq
@@ -145,8 +228,6 @@ type Audio struct {
// integer
// Description:
// The maximum number of ads that can be played in an ad pod.
- // OpenRTB API Specification Version 2.5 IAB Technology Lab
- // www.iab.com/openrtb Page 18
MaxSeq int64 `json:"maxseq,omitempty"`
// Attribute:
@@ -154,8 +235,8 @@ type Audio struct {
// Type:
// integer
// Description:
- // Type of audio feed. Refer to List 5.16.
- Feed FeedType `json:"feed,omitempty"`
+ // Type of audio feed. Refer to List: Feed Types in AdCOM 1.0.
+ Feed adcom1.FeedType `json:"feed,omitempty"`
// Attribute:
// stitched
@@ -171,8 +252,9 @@ type Audio struct {
// Type:
// integer
// Description:
- // Volume normalization mode. Refer to List 5.17.
- NVol *VolumeNormalizationMode `json:"nvol,omitempty"`
+ // Volume normalization mode. Refer to List: Volume
+ // Normalization Modes in AdCOM 1.0.
+ NVol *adcom1.VolumeNormalizationMode `json:"nvol,omitempty"`
// Attribute:
// ext
diff --git a/openrtb2/banner.go b/openrtb2/banner.go
index 23fc078..7277cfd 100644
--- a/openrtb2/banner.go
+++ b/openrtb2/banner.go
@@ -1,6 +1,10 @@
package openrtb2
-import "encoding/json"
+import (
+ "encoding/json"
+
+ "github.com/mxmCherry/openrtb/v16/adcom1"
+)
// 3.2.6 Object: Banner
//
@@ -44,7 +48,7 @@ type Banner struct {
// Attribute:
// wmax
// Type:
- // integer; DEPRECATED
+ // integer; DEPRECATED; REMOVED in OpenRTB 2.6
// Description:
// NOTE: Deprecated in favor of the format array.
// Maximum width in device independent pixels (DIPS).
@@ -53,7 +57,7 @@ type Banner struct {
// Attribute:
// hmax
// Type:
- // integer; DEPRECATED
+ // integer; DEPRECATED; REMOVED in OpenRTB 2.6
// Description:
// NOTE: Deprecated in favor of the format array.
// Maximum height in device independent pixels (DIPS).
@@ -62,7 +66,7 @@ type Banner struct {
// Attribute:
// wmin
// Type:
- // integer; DEPRECATED
+ // integer; DEPRECATED; REMOVED in OpenRTB 2.6
// Description:
// NOTE: Deprecated in favor of the format array.
// Minimum width in device independent pixels (DIPS).
@@ -71,7 +75,7 @@ type Banner struct {
// Attribute:
// hmin
// Type:
- // integer; DEPRECATED
+ // integer; DEPRECATED; REMOVED in OpenRTB 2.6
// Description:
// NOTE: Deprecated in favor of the format array.
// Minimum height in device independent pixels (DIPS).
@@ -82,7 +86,8 @@ type Banner struct {
// Type:
// integer array
// Description:
- // Blocked banner ad types. Refer to List 5.2.
+ // Blocked banner ad types.
+ // Refer to BannerAdType constants.
BType []BannerAdType `json:"btype,omitempty"`
// Attribute:
@@ -90,25 +95,26 @@ type Banner struct {
// Type:
// integer array
// Description:
- // Blocked creative attributes. Refer to List 5.3.
- BAttr []CreativeAttribute `json:"battr,omitempty"`
+ // Blocked creative attributes. Refer to List: Creative Attributes in AdCOM 1.0.
+ // Note:
+ // OpenRTB <=2.5 defined only attributes with IDs 1..17.
+ BAttr []adcom1.CreativeAttribute `json:"battr,omitempty"`
// Attribute:
// pos
// Type:
// integer
// Description:
- // Ad position on screen. Refer to List 5.4.
- Pos *AdPosition `json:"pos,omitempty"`
+ // Ad position on screen. Refer to List: Placement Positions in AdCOM 1.0.
+ Pos *adcom1.PlacementPosition `json:"pos,omitempty"`
// Attribute:
// mimes
// Type:
// string array
// Description:
- // Content MIME types supported. Popular MIME types may
- // include “application/x-shockwave-flash”,
- // “image/jpg”, and “image/gif”.
+ // Content MIME types supported. Popular MIME types may include,
+ // "image/jpeg" and "image/gif".
MIMEs []string `json:"mimes,omitempty"`
// Attribute:
@@ -125,18 +131,23 @@ type Banner struct {
// Type:
// integer array
// Description:
- // Directions in which the banner may expand. Refer to List 5.5.
- ExpDir []ExpandableDirection `json:"expdir,omitempty"`
+ // Directions in which the banner may expand. Refer to List: Expandable
+ // Directions in AdCOM 1.0.
+ // Note:
+ // OpenRTB <=2.5 defined only directions 1..5.
+ ExpDir []adcom1.ExpandableDirection `json:"expdir,omitempty"`
// Attribute:
// api
// Type:
// integer array
// Description:
- // List of supported API frameworks for this impression. Refer to
- // List 5.6. If an API is not explicitly listed, it is assumed not to be
- // supported.
- API []APIFramework `json:"api,omitempty"`
+ // List of supported API frameworks for this impression. Refer to List: API
+ // Frameworks in AdCOM 1.0. If an API is not explicitly listed, it is assumed
+ // not to be supported.
+ // Note:
+ // OpenRTB <=2.5 defined only frameworks 1..6.
+ API []adcom1.APIFramework `json:"api,omitempty"`
// Attribute:
// id
diff --git a/openrtb2/banner_ad_type.go b/openrtb2/banner_ad_type.go
index f597250..35bef24 100644
--- a/openrtb2/banner_ad_type.go
+++ b/openrtb2/banner_ad_type.go
@@ -1,6 +1,6 @@
package openrtb2
-// 5.2 Banner Ad Types
+// BannerAdType
//
// Types of ads that can be accepted by the exchange unless restricted by publisher site settings.
type BannerAdType int8
diff --git a/openrtb2/bid.go b/openrtb2/bid.go
index d4e7b5c..17fd0a0 100644
--- a/openrtb2/bid.go
+++ b/openrtb2/bid.go
@@ -1,8 +1,12 @@
package openrtb2
-import "encoding/json"
+import (
+ "encoding/json"
-// 4.2.3 Object: Bid
+ "github.com/mxmCherry/openrtb/v16/adcom1"
+)
+
+// 4.3.3 Object: Bid
//
// A SeatBid object contains one or more Bid objects, each of which relates to a specific impression in the bid request via the impid attribute and constitutes an offer to buy that impression for a given price.
//
@@ -166,12 +170,23 @@ type Bid struct {
// communicated between buyer and exchanges a priori.
Tactic string `json:"tactic,omitempty"`
+ // Attribute:
+ // cattax
+ // Type:
+ // integer
+ // Description:
+ // The taxonomy in use. Refer to the AdCOM 1.0 list List: Category
+ // Taxonomies for values.
+ CatTax adcom1.CategoryTaxonomy `json:"cattax,omitempty"`
+
// Attribute:
// cat
// Type:
// string array
// Description:
- // IAB content categories of the creative. Refer to List 5.1.
+ // IAB content categories of the creative. The taxonomy to be
+ // used is defined by the cattax field. If no cattax field is supplied
+ // IAB Content Category Taxonomy 1.0 is assumed.
Cat []string `json:"cat,omitempty"`
// Attribute:
@@ -179,16 +194,33 @@ type Bid struct {
// Type:
// integer array
// Description:
- // Set of attributes describing the creative. Refer to List 5.3.
- Attr []CreativeAttribute `json:"attr,omitempty"`
+ // Set of attributes describing the creative. Refer to List: Creative
+ // Attributes in AdCOM 1.0.
+ // Note:
+ // OpenRTB <=2.5 defined only attributes with IDs 1..17.
+ Attr []adcom1.CreativeAttribute `json:"attr,omitempty"`
+
+ // Attribute:
+ // apis
+ // Type:
+ // integer array
+ // Description:
+ // List of supported APIs for the markup. If an API is not explicitly
+ // listed, it is assumed to be unsupported. Refer to List: API
+ // Frameworks in AdCOM 1.0.
+ APIs []adcom1.APIFramework `json:"apis,omitempty"`
// Attribute:
// api
// Type:
- // integer
+ // integer; DEPRECATED
// Description:
- // API required by the markup if applicable. Refer to List 5.6.
- API APIFramework `json:"api,omitempty"`
+ // NOTE: Deprecated in favor of the apis integer array.
+ // API required by the markup if applicable. Refer to List: API
+ // Frameworks in AdCOM 1.0.
+ // Note:
+ // OpenRTB <=2.5 defined only frameworks 1..6.
+ API adcom1.APIFramework `json:"api,omitempty"`
// Attribute:
// protocol
@@ -196,27 +228,37 @@ type Bid struct {
// integer
// Description:
// Video response protocol of the markup if applicable. Refer to
- // List 5.8.
- Protocol Protocol `json:"protocol,omitempty"`
+ // List: Creative Subtypes - Audio/Video in AdCOM 1.0.
+ Protocol adcom1.MediaCreativeSubtype `json:"protocol,omitempty"`
// Attribute:
// qagmediarating
// Type:
// integer
// Description:
- // Creative media rating per IQG guidelines. Refer to List 5.19.
- QAGMediaRating IQGMediaRating `json:"qagmediarating,omitempty"`
+ // Media rating per IQG guidelines. Refer to List: Media Ratings in
+ // AdCOM 1.0.
+ QAGMediaRating adcom1.MediaRating `json:"qagmediarating,omitempty"`
// Attribute:
// language
// Type:
// string
// Description:
- // Language of the creative using ISO-639-1-alpha-2. The nonstandard
- // code “xx” may also be used if the creative has no
+ // Language of the creative using ISO-639-1-alpha-2. The nonstandard code “xx” may also be used if the creative has no
// linguistic content (e.g., a banner with just a company logo).
+ // Only one of language or langb should be present.
Language string `json:"language,omitempty"`
+ // Attribute:
+ // langb
+ // Type:
+ // string
+ // Description:
+ // Language of the creative using IETF BCP 47. Only one of
+ // language or langb should be present
+ LangB string `json:"langb,omitempty"`
+
// Attribute:
// dealid
// Type:
@@ -269,6 +311,39 @@ type Bid struct {
// wait between the auction and the actual impression.
Exp int64 `json:"exp,omitempty"`
+ // Attribute:
+ // dur
+ // Type:
+ // integer
+ // Description:
+ // Duration of the video or audio creative in seconds.
+ Dur int64 `json:"dur,omitempty"`
+
+ // Attribute:
+ // mtype
+ // Type:
+ // integer
+ // Description:
+ // Type of the creative markup so that it can properly be
+ // associated with the right sub-object of the BidRequest.Imp.
+ // Values:
+ // 1 = Banner
+ // 2 = Video
+ // 3 = Audio
+ // 4 = Native
+ MType MarkupType `json:"mtype,omitempty"`
+
+ // Attribute:
+ // slotinpod
+ // Type:
+ // integer
+ // Description:
+ // Indicates that the bid response is only eligible for a specific
+ // position within a video or audio ad pod (e.g. first position,
+ // last position, or any). Refer to List: Slot Position in Pod in
+ // AdCOM 1.0 for guidance on the use of this field.
+ SlotInPod adcom1.SlotPositionInPod `json:"slotinpod,omitempty"`
+
// Attribute:
// ext
// Type:
diff --git a/openrtb2/bid_request.go b/openrtb2/bid_request.go
index 07ad36d..f4ae66b 100644
--- a/openrtb2/bid_request.go
+++ b/openrtb2/bid_request.go
@@ -1,6 +1,10 @@
package openrtb2
-import "encoding/json"
+import (
+ "encoding/json"
+
+ "github.com/mxmCherry/openrtb/v16/adcom1"
+)
// 3.2.1 Object: BidRequest
//
@@ -83,7 +87,7 @@ type BidRequest struct {
// Description:
// Auction type, where 1 = First Price, 2 = Second Price Plus.
// Exchange-specific auction types can be defined using values
- // greater than 500.
+ // 500 and greater.
AT int64 `json:"at,omitempty"`
// Attribute:
@@ -101,12 +105,12 @@ type BidRequest struct {
// Type:
// string array
// Description:
- // White list of buyer seats (e.g., advertisers, agencies) allowed
- // to bid on this impression. IDs of seats and knowledge of the
- // buyer’s customers to which they refer must be coordinated
- // between bidders and the exchange a priori. At most, only one
- // of wseat and bseat should be used in the same request.
- // Omission of both implies no seat restrictions.
+ // Allowed list of buyer seats (e.g., advertisers, agencies)
+ // allowed to bid on this impression. IDs of seats and knowledge
+ // of the buyer’s customers to which they refer must be
+ // coordinated between bidders and the exchange a priori. At
+ // most, only one of wseat and bseat should be used in the
+ // same request. Omission of both implies no seat restrictions.
WSeat []string `json:"wseat,omitempty"`
// Attribute:
@@ -149,21 +153,46 @@ type BidRequest struct {
// Type:
// string array
// Description:
- // White list of languages for creatives using ISO-639-1-alpha-2.
+ // Allowed list of languages for creatives using ISO-639-1-alpha-2.
// Omission implies no specific restrictions, but buyers would be
// advised to consider language attribute in the Device and/or
- // Content objects if available.
+ // Content objects if available. Only one of wlang or wlangb
+ // should be present.
WLang []string `json:"wlang,omitempty"`
+ // Attribute:
+ // wlangb
+ // Type:
+ // string array
+ // Description:
+ // Allowed list of languages for creatives using IETF BCP 47I.
+ // Omission implies no specific restrictions, but buyers would be
+ // advised to consider language attribute in the Device and/or
+ // Content objects if available. Only one of wlang or wlangb
+ // should be present.
+ WLangB []string `json:"wlangb,omitempty"`
+
// Attribute:
// bcat
// Type:
// string array
// Description:
- // Blocked advertiser categories using the IAB content
- // categories. Refer to List 5.1.
+ // Blocked advertiser categories using the specified
+ // category taxonomy.
+ // The taxonomy to be used is defined by the cattax field. If no
+ // cattax field is supplied IAB Content Category Taxonomy 1.0 is
+ // assumed.
BCat []string `json:"bcat,omitempty"`
+ // Attribute:
+ // cattax
+ // Type:
+ // integer; default 1
+ // Description:
+ // The taxonomy in use for bcat. Refer to the AdCOM
+ // 1.0 list List: Category Taxonomies for values
+ CatTax adcom1.CategoryTaxonomy `json:"cattax,omitempty"`
+
// Attribute:
// badv
// Type:
@@ -177,10 +206,12 @@ type BidRequest struct {
// Type:
// string array
// Description:
- // Block list of applications by their platform-specific exchangeindependent
- // application identifiers. On Android, these should
- // be bundle or package names (e.g., com.foo.mygame). On iOS,
- // these are numeric IDs.
+ // Block list of applications by their app store IDs. See OTT/CTV
+ // Store Assigned App Identification Guidelines for more details
+ // about expected strings for CTV app stores. For mobile apps in
+ // Google Play Store, these should be bundle or package names
+ // (e.g. com.foo.mygame). For apps in Apple App Store, these
+ // should be a numeric ID.
BApp []string `json:"bapp,omitempty"`
// Attribute:
diff --git a/openrtb2/bid_request_test.go b/openrtb2/bid_request_test.go
index 1ba280c..ca06f93 100644
--- a/openrtb2/bid_request_test.go
+++ b/openrtb2/bid_request_test.go
@@ -5,7 +5,7 @@ import (
"io/ioutil"
"path/filepath"
- . "github.com/mxmCherry/openrtb/v15/openrtb2"
+ . "github.com/mxmCherry/openrtb/v16/openrtb2"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
@@ -28,29 +28,52 @@ var _ = Describe("BidRequest", func() {
Expect(actual).To(MatchJSON(expected))
},
+ // 2.5
Entry(
- "Simple Banner",
- "bid-request/simple-banner.json",
+ "2.5 Simple Banner",
+ "bid-request/2.5/simple-banner.json",
new(BidRequest)),
Entry(
- "Expandable Creative",
- "bid-request/expandable-creative.json",
+ "2.5 Expandable Creative",
+ "bid-request/2.5/expandable-creative.json",
new(BidRequest)),
Entry(
- "Mobile",
- "bid-request/mobile.json",
+ "2.5 Mobile",
+ "bid-request/2.5/mobile.json",
new(BidRequest)),
Entry(
- "Video",
- "bid-request/video.json",
+ "2.5 Video",
+ "bid-request/2.5/video.json",
new(BidRequest)),
Entry(
- "PMP with Direct Deal",
- "bid-request/pmp-with-direct-deal.json",
+ "2.5 PMP with Direct Deal",
+ "bid-request/2.5/pmp-with-direct-deal.json",
new(BidRequest)),
Entry(
- "Native Ad",
- "bid-request/native-ad.json",
+ "2.5 Native Ad",
+ "bid-request/2.5/native-ad.json",
+ new(BidRequest)),
+
+ // 2.6
+ Entry(
+ "2.6 Simple Banner",
+ "bid-request/2.6/simple-banner.json",
+ new(BidRequest)),
+ Entry(
+ "2.6 Expandable Creative",
+ "bid-request/2.6/expandable-creative.json",
+ new(BidRequest)),
+ Entry(
+ "2.6 Mobile",
+ "bid-request/2.6/mobile.json",
+ new(BidRequest)),
+ Entry(
+ "2.6 Video",
+ "bid-request/2.6/video.json",
+ new(BidRequest)),
+ Entry(
+ "2.6 PMP with Direct Deal",
+ "bid-request/2.6/pmp-with-direct-deal.json",
new(BidRequest)),
)
})
diff --git a/openrtb2/bid_response.go b/openrtb2/bid_response.go
index acc2c9a..4c984cc 100644
--- a/openrtb2/bid_response.go
+++ b/openrtb2/bid_response.go
@@ -1,8 +1,12 @@
package openrtb2
-import "encoding/json"
+import (
+ "encoding/json"
-// 4.2.1 Object: BidResponse
+ "github.com/mxmCherry/openrtb/v16/openrtb3"
+)
+
+// 4.3.1 Object: BidResponse
//
// This object is the top-level bid response object (i.e., the unnamed outer JSON object).
// The id attribute is a reflection of the bid request ID for logging purposes.
@@ -63,8 +67,11 @@ type BidResponse struct {
// Type:
// integer
// Description:
- // Reason for not bidding. Refer to List 5.24.
- NBR *NoBidReasonCode `json:"nbr,omitempty"`
+ // Reason for not bidding. Refer to List: No-Bid Reason Codes in
+ // OpenRTB 3.0.
+ // Note:
+ // OpenRTB <=2.5 defined only reasons 0..10.
+ NBR *openrtb3.NoBidReason `json:"nbr,omitempty"`
// Attribute:
// ext
diff --git a/openrtb2/bid_response_test.go b/openrtb2/bid_response_test.go
index 0c5ca1b..98eba9d 100644
--- a/openrtb2/bid_response_test.go
+++ b/openrtb2/bid_response_test.go
@@ -5,7 +5,7 @@ import (
"io/ioutil"
"path/filepath"
- . "github.com/mxmCherry/openrtb/v15/openrtb2"
+ . "github.com/mxmCherry/openrtb/v16/openrtb2"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
@@ -28,21 +28,40 @@ var _ = Describe("BidResponse", func() {
Expect(actual).To(MatchJSON(expected))
},
+ // 2.5
Entry(
- "Ad Served on Win Notice",
- "bid-response/ad-served-on-win-notice.json",
+ "2.5 Ad Served on Win Notice",
+ "bid-response/2.5/ad-served-on-win-notice.json",
new(BidResponse)),
Entry(
- "VAST XML Document Returned Inline",
- "bid-response/vast-xml-document-returned-inline.json",
+ "2.5 VAST XML Document Returned Inline",
+ "bid-response/2.5/vast-xml-document-returned-inline.json",
new(BidResponse)),
Entry(
- "Direct Deal Ad Served on Win Notice",
- "bid-response/direct-deal-ad-served-on-win-notice.json",
+ "2.5 Direct Deal Ad Served on Win Notice",
+ "bid-response/2.5/direct-deal-ad-served-on-win-notice.json",
new(BidResponse)),
Entry(
- "Native Markup Returned Inline",
- "bid-response/native-markup-returned-inline.json",
+ "2.5 Native Markup Returned Inline",
+ "bid-response/2.5/native-markup-returned-inline.json",
+ new(BidResponse)),
+
+ // 2.6
+ Entry(
+ "2.6 Ad Served on Win Notice",
+ "bid-response/2.6/ad-served-on-win-notice.json",
+ new(BidResponse)),
+ Entry(
+ "2.6 VAST XML Document Returned Inline",
+ "bid-response/2.6/vast-xml-document-returned-inline.json",
+ new(BidResponse)),
+ Entry(
+ "2.6 Direct Deal Ad Served on Win Notice",
+ "bid-response/2.6/direct-deal-ad-served-on-win-notice.json",
+ new(BidResponse)),
+ Entry(
+ "2.6 Native Markup Returned Inline",
+ "bid-response/2.6/native-markup-returned-inline.json",
new(BidResponse)),
)
})
diff --git a/openrtb2/brand_version.go b/openrtb2/brand_version.go
new file mode 100644
index 0000000..8e6e939
--- /dev/null
+++ b/openrtb2/brand_version.go
@@ -0,0 +1,37 @@
+package openrtb2
+
+import "encoding/json"
+
+// 3.2.30 Object: BrandVersion
+//
+// Further identification based on User-Agent Client Hints, the BrandVersion object is used to identify a device’s browser or similar software component, and the user agent’s execution platform or operating system.
+type BrandVersion struct {
+
+ // Attribute:
+ // brand
+ // Type:
+ // string; required
+ // Description:
+ // A brand identifier, for example, "Chrome" or "Windows". The value may be
+ // sourced from the User-Agent Client Hints headers, representing either the
+ // user agent brand (from the Sec-CH-UA-Full-Version header) or the platform
+ // brand (from the Sec-CH-UA-Platform header).
+ Brand string `json:"brand"`
+
+ // Attribute:
+ // version
+ // Type:
+ // string array
+ // Description:
+ // A sequence of version components, in descending hierarchical order (major,
+ // minor, micro, …)
+ Version []string `json:"version,omitempty"`
+
+ // Attribute:
+ // ext
+ // Type:
+ // object
+ // Description:
+ // Placeholder for advertising-system specific extensions to this object.
+ Ext json.RawMessage `json:"ext,omitempty"`
+}
diff --git a/openrtb2/channel.go b/openrtb2/channel.go
new file mode 100644
index 0000000..df299d1
--- /dev/null
+++ b/openrtb2/channel.go
@@ -0,0 +1,49 @@
+package openrtb2
+
+import "encoding/json"
+
+// 3.2.24 Object: Channel
+//
+// This object describes the channel an ad will be displayed on.
+// A Channel is defined as the entity that curates a content library, or stream within a brand name for viewers.
+// Examples are specific view selectable ‘channels’ within linear and streaming television (MTV, HGTV, CNN, BBC One, etc) or a specific stream of audio content commonly called ‘stations.’
+// Name is a human-readable field while domain and id can be used for reporting and targeting purposes.
+// See 7.6 for further examples.
+type Channel struct {
+
+ // Attribute:
+ // id
+ // Type:
+ // string
+ // Description:
+ // A unique identifier assigned by the publisher. This may not be
+ // a unique identifier across all supply sources.
+ ID string `json:"id,omitempty"`
+
+ // Attribute:
+ // name
+ // Type:
+ // string
+ // Description:
+ // Channel the content is on (e.g., a local channel like “WABC-TV").
+ Name string `json:"name,omitempty"`
+
+ // Attribute:
+ // domain
+ // Type:
+ // string
+ // Description:
+ // The primary domain of the channel (e.g. "abc7ny.com" in the
+ // case of the local channel WABC-TV). It is recommended to
+ // include the top private domain (PSL+1) for DSP targeting
+ // normalization purposes.
+ Domain string `json:"domain,omitempty"`
+
+ // Attribute:
+ // ext
+ // Type:
+ // object
+ // Description:
+ // Placeholder for exchange-specific extensions to OpenRTB.
+ Ext json.RawMessage `json:"ext,omitempty"`
+}
diff --git a/openrtb2/companion_type.go b/openrtb2/companion_type.go
deleted file mode 100644
index 2c538db..0000000
--- a/openrtb2/companion_type.go
+++ /dev/null
@@ -1,14 +0,0 @@
-package openrtb2
-
-// 5.14 Companion Types
-//
-// Options to indicate markup types allowed for companion ads that apply to video and audio ads.
-// This table is derived from VAST 2.0+ and DAAST 1.0 specifications.
-// Refer to www.iab.com/guidelines/digital-video-suite for more information.
-type CompanionType int8
-
-const (
- CompanionTypeStatic CompanionType = 1 // Static Resource
- CompanionTypeHTML CompanionType = 2 // HTML Resource
- CompanionTypeIframe CompanionType = 3 // iframe Resource
-)
diff --git a/openrtb2/connection_type.go b/openrtb2/connection_type.go
deleted file mode 100644
index 215121b..0000000
--- a/openrtb2/connection_type.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package openrtb2
-
-// 5.22 Connection Type
-//
-// Various options for the type of device connectivity.
-type ConnectionType int8
-
-const (
- ConnectionTypeUnknown ConnectionType = 0 // Unknown
- ConnectionTypeEthernet ConnectionType = 1 // Ethernet
- ConnectionTypeWIFI ConnectionType = 2 // WIFI
- ConnectionTypeCellularNetworkUnknownGeneration ConnectionType = 3 // Cellular Network – Unknown Generation
- ConnectionTypeCellularNetwork2G ConnectionType = 4 // Cellular Network – 2G
- ConnectionTypeCellularNetwork3G ConnectionType = 5 // Cellular Network – 3G
- ConnectionTypeCellularNetwork4G ConnectionType = 6 // Cellular Network – 4G
-)
-
-// Ptr returns pointer to own value.
-func (t ConnectionType) Ptr() *ConnectionType {
- return &t
-}
-
-// Val safely dereferences pointer, returning default value (ConnectionTypeUnknown) for nil.
-func (t *ConnectionType) Val() ConnectionType {
- if t == nil {
- return ConnectionTypeUnknown
- }
- return *t
-}
diff --git a/openrtb2/content.go b/openrtb2/content.go
index 7e59c71..8a99af6 100644
--- a/openrtb2/content.go
+++ b/openrtb2/content.go
@@ -1,6 +1,10 @@
package openrtb2
-import "encoding/json"
+import (
+ "encoding/json"
+
+ "github.com/mxmCherry/openrtb/v16/adcom1"
+)
// 3.2.16 Object: Content
//
@@ -106,13 +110,24 @@ type Content struct {
// URL of the content, for buy-side contextualization or review.
URL string `json:"url,omitempty"`
+ // Attribute:
+ // cattax
+ // Type:
+ // integer
+ // Description:
+ // The taxonomy in use. Refer to the AdCOM list List: Category
+ // Taxonomies for values.
+ CatTax adcom1.CategoryTaxonomy `json:"cattax,omitempty"`
+
// Attribute:
// cat
// Type:
// string array
// Description:
- // Array of IAB content categories that describe the content
- // producer. Refer to List 5.1.
+ // Array of IAB content categories that describe the content.
+ // The taxonomy to be used is defined by the cattax field. If no
+ // cattax field is supplied IAB Content Category Taxonomy 1.0 is
+ // assumed.
Cat []string `json:"cat,omitempty"`
// Attribute:
@@ -120,25 +135,26 @@ type Content struct {
// Type:
// integer
// Description:
- // Production quality. Refer to List 5.13
- ProdQ *ProductionQuality `json:"prodq,omitempty"`
+ // Production quality. Refer to List: Production Qualities in AdCOM 1.0.
+ ProdQ *adcom1.ProductionQuality `json:"prodq,omitempty"`
// Attribute:
// videoquality
// Type:
- // integer; DEPRECATED
+ // integer; DEPRECATED; REMOVED in OpenRTB 2.6
// Description:
// Note: Deprecated in favor of prodq.
// Video quality. Refer to List 5.13.
- VideoQuality *ProductionQuality `json:"videoquality,omitempty"`
+ VideoQuality *adcom1.ProductionQuality `json:"videoquality,omitempty"`
// Attribute:
// context
// Type:
// integer
// Description:
- // Type of content (game, video, text, etc.). Refer to List 5.18.
- Context ContentContext `json:"context,omitempty"`
+ // Type of content (game, video, text, etc.). Refer to List: Content
+ // Contexts in AdCOM 1.0.
+ Context adcom1.ContentContext `json:"context,omitempty"`
// Attribute:
// contentrating
@@ -161,17 +177,28 @@ type Content struct {
// Type:
// integer
// Description:
- // Media rating per IQG guidelines. Refer to List 5.19.
- QAGMediaRating IQGMediaRating `json:"qagmediarating,omitempty"`
+ // Media rating per IQG guidelines. Refer to List: Media Ratings in
+ // AdCOM 1.0.
+ QAGMediaRating adcom1.MediaRating `json:"qagmediarating,omitempty"`
// Attribute:
// keywords
// Type:
// string
// Description:
- // Comma separated list of keywords describing the content.
+ // Comma separated list of keywords describing the content. Only
+ // one of ‘keywords’ or ‘kwarray’ may be present.
Keywords string `json:"keywords,omitempty"`
+ // Attribute:
+ // kwarray
+ // Type:
+ // string
+ // Description:
+ // Array of keywords about the site. Only one of ‘keywords’ or
+ // ‘kwarray’ may be present.
+ KwArray []string `json:"kwarray,omitempty"`
+
// Attribute:
// livestream
// Type:
@@ -201,9 +228,19 @@ type Content struct {
// Type:
// string
// Description:
- // Content language using ISO-639-1-alpha-2.
+ // Content language using ISO-639-1-alpha-2. Only one of
+ // language or langb should be present.
Language string `json:"language,omitempty"`
+ // Attribute:
+ // langb
+ // Type:
+ // string
+ // Description:
+ // Content language using IETF BCP 47. Only one of language or
+ // langb should be present.
+ LangB string `json:"langb,omitempty"`
+
// Attribute:
// embeddable
// Type:
@@ -222,6 +259,22 @@ type Content struct {
// represents a different data source.
Data []Data `json:"data,omitempty"`
+ // Attribute:
+ // network
+ // Type:
+ // object
+ // Description:
+ // Details about the network (Section 3.2.23) the content is on.
+ Network *Network `json:"network,omitempty"`
+
+ // Attribute:
+ // channel
+ // Type:
+ // object
+ // Description:
+ // Details about the channel (Section 3.2.24) the content is on.
+ Channel *Channel `json:"channel,omitempty"`
+
// Attribute:
// ext
// Type:
diff --git a/openrtb2/content_context.go b/openrtb2/content_context.go
deleted file mode 100644
index d3e89a1..0000000
--- a/openrtb2/content_context.go
+++ /dev/null
@@ -1,18 +0,0 @@
-package openrtb2
-
-// 5.18 Content Context
-//
-// Various options for indicating the type of content being used or consumed by the user in which the impression will appear.
-// This OpenRTB list has values derived from the Inventory Quality Guidelines (IQG).
-// Practitioners should keep in sync with updates to the IQG values.
-type ContentContext int8
-
-const (
- ContentContextVideo ContentContext = 1 // Video (i.e., video file or stream such as Internet TV broadcasts)
- ContentContextGame ContentContext = 2 // Game (i.e., an interactive software game)
- ContentContextMusic ContentContext = 3 // Music (i.e., audio file or stream such as Internet radio broadcasts)
- ContentContextApplication ContentContext = 4 // Application (i.e., an interactive software application)
- ContentContextText ContentContext = 5 // Text (i.e., primarily textual document such as a web page, eBook, or news article)
- ContentContextOther ContentContext = 6 // Other (i.e., none of the other categories applies)
- ContentContextUnknown ContentContext = 7 // Unknown
-)
diff --git a/openrtb2/content_delivery_method.go b/openrtb2/content_delivery_method.go
deleted file mode 100644
index d84b4bc..0000000
--- a/openrtb2/content_delivery_method.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package openrtb2
-
-// 5.15 Content Delivery Methods
-//
-// Various options for the delivery of video or audio content.
-type ContentDeliveryMethod int8
-
-const (
- ContentDeliveryMethodStreaming ContentDeliveryMethod = 1 // Streaming
- ContentDeliveryMethodProgressive ContentDeliveryMethod = 2 // Progressive
- ContentDeliveryMethodDownload ContentDeliveryMethod = 3 // Download
-)
diff --git a/openrtb2/creative_attribute.go b/openrtb2/creative_attribute.go
deleted file mode 100644
index 326340d..0000000
--- a/openrtb2/creative_attribute.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package openrtb2
-
-// 5.3 Creative Attributes
-//
-// Standard list of creative attributes that can describe an ad being served or serve as restrictions of thereof.
-type CreativeAttribute int8
-
-const (
- CreativeAttributeAudioAdAutoPlay CreativeAttribute = 1 // Audio Ad (Auto-Play)
- CreativeAttributeAudioAdUserInitiated CreativeAttribute = 2 // Audio Ad (User Initiated)
- CreativeAttributeExpandableAutomatic CreativeAttribute = 3 // Expandable (Automatic)
- CreativeAttributeExpandableUserInitiatedClick CreativeAttribute = 4 // Expandable (User Initiated - Click)
- CreativeAttributeExpandableUserInitiatedRollover CreativeAttribute = 5 // Expandable (User Initiated - Rollover)
- CreativeAttributeInBannerVideoAdAutoPlay CreativeAttribute = 6 // In-Banner Video Ad (Auto-Play)
- CreativeAttributeInBannerVideoAdUserInitiated CreativeAttribute = 7 // In-Banner Video Ad (User Initiated)
- CreativeAttributePop CreativeAttribute = 8 // Pop (e.g., Over, Under, or Upon Exit)
- CreativeAttributeProvocativeOrSuggestiveImagery CreativeAttribute = 9 // Provocative or Suggestive Imagery
- CreativeAttributeShakyFlashingFlickeringExtremeAnimationSmileys CreativeAttribute = 10 // Shaky, Flashing, Flickering, Extreme Animation, Smileys
- CreativeAttributeSurveys CreativeAttribute = 11 // Surveys
- CreativeAttributeTextOnly CreativeAttribute = 12 // Text Only
- CreativeAttributeUserInteractive CreativeAttribute = 13 // User Interactive (e.g., Embedded Games)
- CreativeAttributeWindowsDialogOrAlertStyle CreativeAttribute = 14 // Windows Dialog or Alert Style
- CreativeAttributeHasAudioOnOffButton CreativeAttribute = 15 // Has Audio On/Off Button
- CreativeAttributeAdProvidesSkipButton CreativeAttribute = 16 // Ad Provides Skip Button (e.g. VPAID-rendered skip button on pre-roll video)
- CreativeAttributeAdobeFlash CreativeAttribute = 17 // Adobe Flash
-)
diff --git a/openrtb2/device.go b/openrtb2/device.go
index a356976..bba3113 100644
--- a/openrtb2/device.go
+++ b/openrtb2/device.go
@@ -1,6 +1,10 @@
package openrtb2
-import "encoding/json"
+import (
+ "encoding/json"
+
+ "github.com/mxmCherry/openrtb/v16/adcom1"
+)
// 3.2.18 Object: Device
//
@@ -17,14 +21,6 @@ import "encoding/json"
// Exchanges are urged to research and implement this feature carefully when presenting device IP values to bidders.
type Device struct {
- // Attribute:
- // ua
- // Type:
- // string; recommended
- // Description:
- // Browser user agent string.
- UA string `json:"ua,omitempty"`
-
// Attribute:
// geo
// Type:
@@ -53,6 +49,38 @@ type Device struct {
// be limited per commercial guidelines.
Lmt *int8 `json:"lmt,omitempty"`
+ // Attribute:
+ // ua
+ // Type:
+ // string
+ // Description:
+ // Browser user agent string. This field represents a raw user
+ // agent string from the browser. For backwards compatibility,
+ // exchanges are recommended to always populate ‘ua’ with the
+ // User-Agent string, when available from the end user’s device,
+ // even if an alternative representation, such as the User-Agent
+ // Client-Hints, is available and is used to populate ‘sua’. No
+ // inferred or approximated user agents are expected in this field.
+ // If a client supports User-Agent Client Hints, and ‘sua’ field is
+ // present, bidders are recommended to rely on ‘sua’ for
+ // detecting device type, browser type and version and other
+ // purposes that rely on the user agent information, and ignore
+ // ‘ua’ field. This is because the ‘ua’ may contain a frozen or
+ // reduced user agent string.
+ UA string `json:"ua,omitempty"`
+
+ // Attribute:
+ // sua
+ // Type:
+ // object
+ // Description:
+ // Structured user agent information defined by a UserAgent
+ // object (see Section 3.2.29). If both ‘ua’ and ‘sua’ are present in
+ // the bid request, ‘sua’ should be considered the more accurate
+ // representation of the device attributes. This is because the ‘ua’
+ // may contain a frozen or reduced user agent string.
+ SUA *UserAgent `json:"sua,omitempty"`
+
// Attribute:
// ip
// Type:
@@ -74,8 +102,11 @@ type Device struct {
// Type:
// integer
// Description:
- // The general type of device. Refer to List 5.21.
- DeviceType DeviceType `json:"devicetype,omitempty"`
+ // The general type of device. Refer to List: Device Types in
+ // AdCOM 1.0.
+ // Note:
+ // OpenRTB <=2.5 defined only types 1..7.
+ DeviceType adcom1.DeviceType `json:"devicetype,omitempty"`
// Attribute:
// make
@@ -179,9 +210,19 @@ type Device struct {
// Type:
// string
// Description:
- // Browser language using ISO-639-1-alpha-2.
+ // Browser language using ISO-639-1-alpha-2. Only one of
+ // language or langb should be present.
Language string `json:"language,omitempty"`
+ // Attribute:
+ // langb
+ // Type:
+ // string
+ // Description:
+ // Content language using IETF BCP 47. Only one of language or
+ // langb should be present.
+ LangB string `json:"langb,omitempty"`
+
// Attribute:
// carrier
// Type:
@@ -196,11 +237,16 @@ type Device struct {
// Type:
// string
// Description:
- // Mobile carrier as the concatenated MCC-MNC code (e.g.,
- // “310-005” identifies Verizon Wireless CDMA in the USA).
+ // Mobile carrier as the concatenated MCC-MNC code
+ // (e.g., "310-005" identifies Verizon Wireless CDMA in the
+ // USA).
// Refer to https://en.wikipedia.org/wiki/Mobile_country_code
// for further examples. Note that the dash between the MCC
- // and MNC parts is required to remove parsing ambiguity.
+ // and MNC parts is required to remove parsing ambiguity. The
+ // MCC-MNC values represent the SIM installed on the device
+ // and do not change when a device is roaming. Roaming may
+ // be inferred by a combination of the MCC-MNC, geo, IP and
+ // other data signals.
MCCMNC string `json:"mccmnc,omitempty"`
// Attribute:
@@ -208,8 +254,11 @@ type Device struct {
// Type:
// integer
// Description:
- // Network connection type. Refer to List 5.22.
- ConnectionType *ConnectionType `json:"connectiontype,omitempty"`
+ // Network connection type. Refer to List: Connection Types in
+ // AdCOM 1.0.
+ // Note:
+ // OpenRTB <=2.5 defined only connection types 1..6.
+ ConnectionType adcom1.ConnectionType `json:"connectiontype,omitempty"`
// Attribute:
// ifa
@@ -222,7 +271,7 @@ type Device struct {
// Attribute:
// didsha1
// Type:
- // string
+ // string; DEPRECATED
// Description:
// Hardware device ID (e.g., IMEI); hashed via SHA1.
DIDSHA1 string `json:"didsha1,omitempty"`
@@ -230,7 +279,7 @@ type Device struct {
// Attribute:
// didmd5
// Type:
- // string
+ // string; DEPRECATED
// Description:
// Hardware device ID (e.g., IMEI); hashed via MD5.
DIDMD5 string `json:"didmd5,omitempty"`
@@ -238,7 +287,7 @@ type Device struct {
// Attribute:
// dpidsha1
// Type:
- // string
+ // string; DEPRECATED
// Description:
// Platform device ID (e.g., Android ID); hashed via SHA1.
DPIDSHA1 string `json:"dpidsha1,omitempty"`
@@ -246,7 +295,7 @@ type Device struct {
// Attribute:
// dpidmd5
// Type:
- // string
+ // string; DEPRECATED
// Description:
// Platform device ID (e.g., Android ID); hashed via MD5.
DPIDMD5 string `json:"dpidmd5,omitempty"`
@@ -254,7 +303,7 @@ type Device struct {
// Attribute:
// macsha1
// Type:
- // string
+ // string; DEPRECATED
// Description:
// MAC address of the device; hashed via SHA1.
MACSHA1 string `json:"macsha1,omitempty"`
@@ -262,7 +311,7 @@ type Device struct {
// Attribute:
// macmd5
// Type:
- // string
+ // string; DEPRECATED
// Description:
// MAC address of the device; hashed via MD5.
MACMD5 string `json:"macmd5,omitempty"`
diff --git a/openrtb2/device_type.go b/openrtb2/device_type.go
deleted file mode 100644
index 33dfa5a..0000000
--- a/openrtb2/device_type.go
+++ /dev/null
@@ -1,22 +0,0 @@
-package openrtb2
-
-// 5.21 Device Type
-//
-// Type of device from which the impression originated.
-//
-// OpenRTB version 2.2 of the specification added distinct values for Mobile and Tablet.
-// It is recommended that any bidder adding support for 2.2 treat a value of 1 as an acceptable alias of 4 & 5.
-//
-// This OpenRTB list has values derived from the Inventory Quality Guidelines (IQG).
-// Practitioners should keep in sync with updates to the IQG values.
-type DeviceType int8
-
-const (
- DeviceTypeMobileTablet DeviceType = 1 // Mobile/Tablet (Version 2.0)
- DeviceTypePersonalComputer DeviceType = 2 // Personal Computer (Version 2.0)
- DeviceTypeConnectedTV DeviceType = 3 // Connected TV (Version 2.0)
- DeviceTypePhone DeviceType = 4 // Phone (New for Version 2.2)
- DeviceTypeTablet DeviceType = 5 // Tablet (New for Version 2.2)
- DeviceTypeConnectedDevice DeviceType = 6 // Connected Device (New for Version 2.2)
- DeviceTypeSetTopBox DeviceType = 7 // Set Top Box (New for Version 2.2)
-)
diff --git a/openrtb2/eid.go b/openrtb2/eid.go
new file mode 100644
index 0000000..b05945e
--- /dev/null
+++ b/openrtb2/eid.go
@@ -0,0 +1,37 @@
+package openrtb2
+
+import "encoding/json"
+
+// 3.2.27 Object: EID
+//
+// Extended identifiers support in the OpenRTB specification allows buyers to use audience data in real-time bidding.
+// This object can contain one or more UIDs from a single source or a technology provider.
+// The exchange should ensure that business agreements allow for the sending of this data.
+type EID struct {
+
+ // Attribute:
+ // source
+ // Type:
+ // string
+ // Description:
+ // Source or technology provider responsible for the set of
+ // included IDs. Expressed as a top-level domain.
+ Source string `json:"source,omitempty"`
+
+ // Attribute:
+ // uids
+ // Type:
+ // object array
+ // Description:
+ // Array of extended ID UID objects from the given source. Refer
+ // to 3.2.28 Extended Identifier UIDs.
+ UIDs []UID `json:"uids,omitempty"`
+
+ // Attribute:
+ // ext
+ // Type:
+ // object
+ // Description:
+ // Placeholder for advertising-system specific extensions to this object.
+ Ext json.RawMessage `json:"ext,omitempty"`
+}
diff --git a/openrtb2/expandable_direction.go b/openrtb2/expandable_direction.go
deleted file mode 100644
index 3f90291..0000000
--- a/openrtb2/expandable_direction.go
+++ /dev/null
@@ -1,14 +0,0 @@
-package openrtb2
-
-// 5.5 Expandable Direction
-//
-// Directions in which an expandable ad may expand, given the positioning of the ad unit on the page and constraints imposed by the content.
-type ExpandableDirection int8
-
-const (
- ExpandableDirectionLeft ExpandableDirection = 1 // Left
- ExpandableDirectionRight ExpandableDirection = 2 // Right
- ExpandableDirectionUp ExpandableDirection = 3 // Up
- ExpandableDirectionDown ExpandableDirection = 4 // Down
- ExpandableDirectionFullScreen ExpandableDirection = 5 // Full Screen
-)
diff --git a/openrtb2/feed_type.go b/openrtb2/feed_type.go
deleted file mode 100644
index 5f62578..0000000
--- a/openrtb2/feed_type.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package openrtb2
-
-// 5.16 Feed Types
-//
-// Types of feeds, typically for audio.
-type FeedType int8
-
-const (
- FeedTypeMusicService FeedType = 1 // Music Service
- FeedTypeFMAMBroadcast FeedType = 2 // FM/AM Broadcast
- FeedTypePodcast FeedType = 3 // Podcast
-)
diff --git a/openrtb2/geo.go b/openrtb2/geo.go
index 0417f9d..65f02d7 100644
--- a/openrtb2/geo.go
+++ b/openrtb2/geo.go
@@ -1,6 +1,10 @@
package openrtb2
-import "encoding/json"
+import (
+ "encoding/json"
+
+ "github.com/mxmCherry/openrtb/v16/adcom1"
+)
// 3.2.19 Object: Geo
//
@@ -35,8 +39,8 @@ type Geo struct {
// integer
// Description:
// Source of location data; recommended when passing
- // lat/lon. Refer to List 5.20.
- Type LocationType `json:"type,omitempty"`
+ // lat/lon. Refer to List: Location Types in AdCOM 1.0.
+ Type adcom1.LocationType `json:"type,omitempty"`
// Attribute:
// accuracy
@@ -67,8 +71,9 @@ type Geo struct {
// integer
// Description:
// Service or provider used to determine geolocation from IP
- // address if applicable (i.e., type = 2). Refer to List 5.23.
- IPService IPLocationService `json:"ipservice,omitempty"`
+ // address if applicable (i.e., type = 2). Refer to List: IP
+ // Location Services in AdCOM 1.0.
+ IPService adcom1.IPLocationService `json:"ipservice,omitempty"`
// Attribute:
// country
diff --git a/openrtb2/imp.go b/openrtb2/imp.go
index d46411e..9e0f3d0 100644
--- a/openrtb2/imp.go
+++ b/openrtb2/imp.go
@@ -100,7 +100,7 @@ type Imp struct {
// Attribute:
// instl
// Type:
- // int; default 0
+ // integer; default 0
// Description:
// 1 = the ad is interstitial or full screen, 0 = not interstitial.
Instl int8 `json:"instl,omitempty"`
@@ -163,6 +163,33 @@ type Imp struct {
// Array of exchange-specific names of supported iframe busters.
IframeBuster []string `json:"iframebuster,omitempty"`
+ // Attribute:
+ // rwdd
+ // Type:
+ // integer; default 0
+ // Description:
+ // Indicates whether the user receives a reward for viewing the
+ // ad, where 0 = no, 1 = yes. Typically video ad implementations
+ // allow users to read an additional news article for free, receive
+ // an extra life in a game, or get a sponsored ad-free music
+ // session. The reward is typically distributed after the video ad is
+ // completed.
+ Rwdd int8 `json:"rwdd,omitempty"`
+
+ // Attribute:
+ // ssai
+ // Type:
+ // integer; default 0
+ // Description:
+ // Indicates if server-side ad insertion (e.g., stitching an ad into an
+ // audio or video stream) is in use and the impact of this on asset
+ // and tracker retrieval, where
+ // 0 = status unknown,
+ // 1 = all client-side (i.e., not server-side),
+ // 2 = assets stitched server-side but tracking pixels fired client-side,
+ // 3 = all server-side.
+ SSAI AdInsertion `json:"ssai,omitempty"`
+
// Attribute:
// exp
// Type:
diff --git a/openrtb2/ip_location_service.go b/openrtb2/ip_location_service.go
deleted file mode 100644
index 012ccf8..0000000
--- a/openrtb2/ip_location_service.go
+++ /dev/null
@@ -1,13 +0,0 @@
-package openrtb2
-
-// 5.23 IP Location Services
-//
-// Services and/or vendors used for resolving IP addresses to geolocations.
-type IPLocationService int8
-
-const (
- IPLocationServiceIP2location IPLocationService = 1 // ip2location
- IPLocationServiceNeustar IPLocationService = 2 // Neustar (Quova)
- IPLocationServiceMaxMind IPLocationService = 3 // MaxMind
- IPLocationServiceNetAcuity IPLocationService = 4 // NetAcuity (Digital Element)
-)
diff --git a/openrtb2/iqg_media_rating.go b/openrtb2/iqg_media_rating.go
deleted file mode 100644
index 5130d5f..0000000
--- a/openrtb2/iqg_media_rating.go
+++ /dev/null
@@ -1,13 +0,0 @@
-package openrtb2
-
-// 5.19 IQG Media Ratings
-//
-// Media ratings used in describing content based on the IQG 2.1 categorization.
-// Refer to www.iab.com/guidelines/digital-video-suite for more information.
-type IQGMediaRating int8
-
-const (
- IQGMediaRatingAll IQGMediaRating = 1 // All Audiences
- IQGMediaRatingOver12 IQGMediaRating = 2 // Everyone Over 12
- IQGMediaRatingMature IQGMediaRating = 3 // Mature Audiences
-)
diff --git a/openrtb2/location_type.go b/openrtb2/location_type.go
deleted file mode 100644
index 6799687..0000000
--- a/openrtb2/location_type.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package openrtb2
-
-// 5.20 Location Type
-//
-// Options to indicate how the geographic information was determined.
-type LocationType int8
-
-const (
- LocationTypeGPSLocationServices LocationType = 1 // GPS/Location Services
- LocationTypeIPAddress LocationType = 2 // IP Address
- LocationTypeUserProvided LocationType = 3 // User provided (e.g., registration data)
-)
diff --git a/openrtb2/loss_reason_code.go b/openrtb2/loss_reason_code.go
deleted file mode 100644
index c22ce12..0000000
--- a/openrtb2/loss_reason_code.go
+++ /dev/null
@@ -1,41 +0,0 @@
-package openrtb2
-
-// 5.25 Loss Reason Codes
-//
-// Options for an exchange to inform a bidder as to the reason why they did not win an impression.
-type LossReasonCode int64
-
-const (
- LossReasonCodeBidWon LossReasonCode = 0 // Bid Won
- LossReasonCodeInternalError LossReasonCode = 1 // Internal Error
- LossReasonCodeImpressionOpportunityExpired LossReasonCode = 2 // Impression Opportunity Expired
- LossReasonCodeInvalidBidResponse LossReasonCode = 3 // Invalid Bid Response
- LossReasonCodeInvalidDealID LossReasonCode = 4 // Invalid Deal ID
- LossReasonCodeInvalidAuctionID LossReasonCode = 5 // Invalid Auction ID
- LossReasonCodeInvalidAdvertiserDomain LossReasonCode = 6 // Invalid (i.e., malformed) Advertiser Domain
- LossReasonCodeMissingMarkup LossReasonCode = 7 // Missing Markup
- LossReasonCodeMissingCreativeID LossReasonCode = 8 // Missing Creative ID
- LossReasonCodeMissingBidPrice LossReasonCode = 9 // Missing Bid Price
- LossReasonCodeMissingMinimumCreativeApprovalData LossReasonCode = 10 // Missing Minimum Creative Approval Data
- LossReasonCodeBidBelowAuctionFloor LossReasonCode = 100 // Bid was Below Auction Floor
- LossReasonCodeBidBelowDealFloor LossReasonCode = 101 // Bid was Below Deal Floor
- LossReasonCodeLostToHigherBid LossReasonCode = 102 // Lost to Higher Bid
- LossReasonCodeLostToBidForPMPDeal LossReasonCode = 103 // Lost to a Bid for a PMP Deal
- LossReasonCodeBuyerSeatBlocked LossReasonCode = 104 // Buyer Seat Blocked
- LossReasonCodeCreativeFilteredGeneral LossReasonCode = 200 // Creative Filtered – General; reason unknown.
- LossReasonCodeCreativeFilteredPendingProcessingByExchange LossReasonCode = 201 // Creative Filtered – Pending processing by Exchange (e.g., approval, transcoding, etc.)
- LossReasonCodeCreativeFilteredDisapprovedByExchange LossReasonCode = 202 // Creative Filtered – Disapproved by Exchange
- LossReasonCodeCreativeFilteredSizeNotAllowed LossReasonCode = 203 // Creative Filtered – Size Not Allowed
- LossReasonCodeCreativeFilteredIncorrectCreativeFormat LossReasonCode = 204 // Creative Filtered – Incorrect Creative Format
- LossReasonCodeCreativeFilteredAdvertiserExclusions LossReasonCode = 205 // Creative Filtered – Advertiser Exclusions
- LossReasonCodeCreativeFilteredAppBundleExclusions LossReasonCode = 206 // Creative Filtered – App Bundle Exclusions
- LossReasonCodeCreativeFilteredNotSecure LossReasonCode = 207 // Creative Filtered – Not Secure
- LossReasonCodeCreativeFilteredLanguageExclusions LossReasonCode = 208 // Creative Filtered – Language Exclusions
- LossReasonCodeCreativeFilteredCategoryExclusions LossReasonCode = 209 // Creative Filtered – Category Exclusions
- LossReasonCodeCreativeFilteredCreativeAttributeExclusions LossReasonCode = 210 // Creative Filtered – Creative Attribute Exclusions
- LossReasonCodeCreativeFilteredAdTypeExclusions LossReasonCode = 211 // Creative Filtered – Ad Type Exclusions
- LossReasonCodeCreativeFilteredAnimationTooLong LossReasonCode = 212 // Creative Filtered – Animation Too Long
- LossReasonCodeCreativeFilteredNotAllowedInPMPDeal LossReasonCode = 213 // Creative Filtered – Not Allowed in PMP Deal
-
- // ≥ 1000 Exchange specific (should be communicated to bidders a priori)
-)
diff --git a/openrtb2/markup_type.go b/openrtb2/markup_type.go
new file mode 100644
index 0000000..77c89f8
--- /dev/null
+++ b/openrtb2/markup_type.go
@@ -0,0 +1,14 @@
+package openrtb2
+
+// MarkupType defines the type of the creative markup so that it can properly be
+// associated with the right sub-object of the BidRequest.Imp.
+//
+// Originates from Bid.mtype property, not a separately-defined enum.
+type MarkupType int8
+
+const (
+ MarkupBanner MarkupType = 1
+ MarkupVideo MarkupType = 2
+ MarkupAudio MarkupType = 3
+ MarkupNative MarkupType = 4
+)
diff --git a/openrtb2/metric.go b/openrtb2/metric.go
index 2d6f98b..444fcbd 100644
--- a/openrtb2/metric.go
+++ b/openrtb2/metric.go
@@ -15,7 +15,7 @@ type Metric struct {
// string; required
// Description:
// Type of metric being presented using exchange curated string
- // names which should be published to bidders a priori.\
+ // names which should be published to bidders a priori.
Type string `json:"type"`
// Attribute:
diff --git a/openrtb2/native.go b/openrtb2/native.go
index 0888e09..e7054cd 100644
--- a/openrtb2/native.go
+++ b/openrtb2/native.go
@@ -1,6 +1,10 @@
package openrtb2
-import "encoding/json"
+import (
+ "encoding/json"
+
+ "github.com/mxmCherry/openrtb/v16/adcom1"
+)
// 3.2.9 Object: Native
//
@@ -24,6 +28,17 @@ type Native struct {
// string; required
// Description:
// Request payload complying with the Native Ad Specification.
+ // The root node of the payload, “native”, was dropped in the
+ // Native Ad Specification 1.1.
+ //
+ // For Native 1.0, this is a JSON-encoded string consisting of a
+ // unnamed root object with a single subordinate object named
+ // 'native', which is the Native Markup Request object, section 4.1
+ // of OpenRTB Native 1.0 specification.
+ //
+ // For Native 1.1 and higher, this is a JSON-encoded string
+ // consisting of an unnamed root object which is itself the Native
+ // Markup Request Object, section 4.1 of OpenRTB Native 1.1+.
Request string `json:"request"`
// Attribute:
@@ -41,17 +56,22 @@ type Native struct {
// integer array
// Description:
// List of supported API frameworks for this impression. Refer to
- // List 5.6. If an API is not explicitly listed, it is assumed not to be
- // supported.
- API []APIFramework `json:"api,omitempty"`
+ // List: API Frameworks in AdCOM. If an API is not explicitly listed,
+ // it is assumed not to be supported.
+ // Note:
+ // OpenRTB <=2.5 defined only frameworks 1..6.
+ API []adcom1.APIFramework `json:"api,omitempty"`
// Attribute:
// sequence
// Type:
// integer array
// Description:
- // Blocked creative attributes. Refer to List 5.3.
- BAttr []CreativeAttribute `json:"battr,omitempty"`
+ // Blocked creative attributes. Refer to List: Creative Attributes in
+ // AdCOM.
+ // Note:
+ // OpenRTB <=2.5 defined only attributes with IDs 1..17.
+ BAttr []adcom1.CreativeAttribute `json:"battr,omitempty"`
// Attribute:
// ext
diff --git a/openrtb2/network.go b/openrtb2/network.go
new file mode 100644
index 0000000..30e4959
--- /dev/null
+++ b/openrtb2/network.go
@@ -0,0 +1,49 @@
+package openrtb2
+
+import "encoding/json"
+
+// 3.2.23 Object: Network
+//
+// This object describes the network an ad will be displayed on.
+// A Network is defined as the parent entity of the Channel object’s entity for the purposes of organizing Channels.
+// Examples are companies that own and/or license a collection of content channels (Viacom, Discovery, CBS, WarnerMedia, Turner and others), or studio that creates such content and self-distributes content.
+// Name is a human-readable field while domain and id can be used for reporting and targeting purposes.
+// See 7.6 for further examples.
+type Network struct {
+
+ // Attribute:
+ // id
+ // Type:
+ // string
+ // Description:
+ // A unique identifier assigned by the publisher. This may not be
+ // a unique identifier across all supply sources.
+ ID string `json:"id,omitempty"`
+
+ // Attribute:
+ // name
+ // Type:
+ // string
+ // Description:
+ // Network the content is on (e.g., a TV network like “ABC").
+ Name string `json:"name,omitempty"`
+
+ // Attribute:
+ // domain
+ // Type:
+ // string
+ // Description:
+ // The primary domain of the network (e.g. "abc.com" in the
+ // case of the network ABC). It is recommended to include the
+ // top private domain (PSL+1) for DSP targeting normalization
+ // purposes.
+ Domain string `json:"domain,omitempty"`
+
+ // Attribute:
+ // ext
+ // Type:
+ // object
+ // Description:
+ // Placeholder for exchange-specific extensions to OpenRTB.
+ Ext json.RawMessage `json:"ext,omitempty"`
+}
diff --git a/openrtb2/no_bid_reason_code.go b/openrtb2/no_bid_reason_code.go
deleted file mode 100644
index 785cfad..0000000
--- a/openrtb2/no_bid_reason_code.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package openrtb2
-
-// 5.24 No-Bid Reason Codes
-//
-// Options for a bidder to signal the exchange as to why it did not offer a bid for the impression.
-type NoBidReasonCode int8
-
-const (
- NoBidReasonCodeUnknownError NoBidReasonCode = 0 // Unknown Error
- NoBidReasonCodeTechnicalError NoBidReasonCode = 1 // Technical Error
- NoBidReasonCodeInvalidRequest NoBidReasonCode = 2 // Invalid Request
- NoBidReasonCodeKnownWebSpider NoBidReasonCode = 3 // Known Web Spider
- NoBidReasonCodeSuspectedNonHumanTraffic NoBidReasonCode = 4 // Suspected Non-Human Traffic
- NoBidReasonCodeCloudDataCenterProxyIP NoBidReasonCode = 5 // Cloud, Data center, or Proxy IP
- NoBidReasonCodeUnsupportedDevice NoBidReasonCode = 6 // Unsupported Device
- NoBidReasonCodeBlockedPublisherOrSite NoBidReasonCode = 7 // Blocked Publisher or Site
- NoBidReasonCodeUnmatchedUser NoBidReasonCode = 8 // Unmatched User
- NoBidReasonCodeDailyReaderCapMet NoBidReasonCode = 9 // Daily Reader Cap Met
- NoBidReasonCodeDailyDomainCapMet NoBidReasonCode = 10 // Daily Domain Cap Met
-)
-
-// Ptr returns pointer to own value.
-func (c NoBidReasonCode) Ptr() *NoBidReasonCode {
- return &c
-}
-
-// Val safely dereferences pointer, returning default value (NoBidReasonCodeUnknownError) for nil.
-func (c *NoBidReasonCode) Val() NoBidReasonCode {
- if c == nil {
- return NoBidReasonCodeUnknownError
- }
- return *c
-}
diff --git a/openrtb2/openrtb2.go b/openrtb2/openrtb2.go
index f15cba5..ed8365e 100644
--- a/openrtb2/openrtb2.go
+++ b/openrtb2/openrtb2.go
@@ -1,5 +1,5 @@
-// Package openrtb2 provides OpenRTB 2.5 types
+// Package openrtb2 provides OpenRTB 2.6 types
//
// https://iabtechlab.com/standards/openrtb/
-// https://iabtechlab.com/wp-content/uploads/2016/07/OpenRTB-API-Specification-Version-2-5-FINAL.pdf
+// https://iabtechlab.com/wp-content/uploads/2022/04/OpenRTB-2-6_FINAL.pdf
package openrtb2
diff --git a/openrtb2/playback_cessation_mode.go b/openrtb2/playback_cessation_mode.go
deleted file mode 100644
index 0d28218..0000000
--- a/openrtb2/playback_cessation_mode.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package openrtb2
-
-// 5.11 Playback Cessation Modes
-//
-// Various modes for when playback terminates.
-type PlaybackCessationMode int8
-
-const (
- PlaybackCessationModeVideoCompletionOrTerminatedByUser PlaybackCessationMode = 1 // On Video Completion or when Terminated by User
- PlaybackCessationModeLeavingViewportOrTerminatedByUser PlaybackCessationMode = 2 // On Leaving Viewport or when Terminated by User
- PlaybackCessationModeLeavingViewportUntilVideoCompletionOrTerminatedByUser PlaybackCessationMode = 3 // On Leaving Viewport Continues as a Floating/Slider Unit until Video Completion or when Terminated by User
-)
diff --git a/openrtb2/playback_method.go b/openrtb2/playback_method.go
deleted file mode 100644
index 4f01e6a..0000000
--- a/openrtb2/playback_method.go
+++ /dev/null
@@ -1,15 +0,0 @@
-package openrtb2
-
-// 5.10 Playback Methods
-//
-// Various playback methods.
-type PlaybackMethod int8
-
-const (
- PlaybackMethodPageLoadSoundOn PlaybackMethod = 1 // Initiates on Page Load with Sound On
- PlaybackMethodPageLoadSoundOff PlaybackMethod = 2 // Initiates on Page Load with Sound Off by Default
- PlaybackMethodClickSoundOn PlaybackMethod = 3 // Initiates on Click with Sound On
- PlaybackMethodMouseOverSoundOn PlaybackMethod = 4 // Initiates on Mouse-Over with Sound On
- PlaybackMethodEnteringViewportSoundOn PlaybackMethod = 5 // Initiates on Entering Viewport with Sound On
- PlaybackMethodEnteringViewportSoundOff PlaybackMethod = 6 // Initiates on Entering Viewport with Sound Off by Default
-)
diff --git a/openrtb2/producer.go b/openrtb2/producer.go
index 2acd6ee..de0e295 100644
--- a/openrtb2/producer.go
+++ b/openrtb2/producer.go
@@ -1,6 +1,10 @@
package openrtb2
-import "encoding/json"
+import (
+ "encoding/json"
+
+ "github.com/mxmCherry/openrtb/v16/adcom1"
+)
// 3.2.17 Object: Producer
//
@@ -25,13 +29,25 @@ type Producer struct {
// Content producer or originator name (e.g., “Warner Bros”).
Name string `json:"name,omitempty"`
+ // Attribute:
+ // cattax
+ // Type:
+ // integer
+ // Description:
+ // The taxonomy in use. Refer to the AdCOM 1.0 list List: Category
+ // Taxonomies for values.
+ CatTax adcom1.CategoryTaxonomy `json:"cattax,omitempty"`
+
// Attribute:
// cat
// Type:
// string array
// Description:
// Array of IAB content categories that describe the content
- // producer. Refer to List 5.1.
+ // producer.
+ // The taxonomy to be used is defined by the cattax field. If no
+ // cattax field is supplied IAB Content Category Taxonomy 1.0 is
+ // assumed.
Cat []string `json:"cat,omitempty"`
// Attribute:
diff --git a/openrtb2/production_quality.go b/openrtb2/production_quality.go
deleted file mode 100644
index 2403240..0000000
--- a/openrtb2/production_quality.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package openrtb2
-
-// 5.13 Production Quality
-//
-// Options for content quality.
-// These values are defined by the IAB; refer to www.iab.com/wp-content/uploads/2015/03/long-form-video-final.pdf for more information.
-type ProductionQuality int8
-
-const (
- ProductionQualityUnknown ProductionQuality = 0 // Unknown
- ProductionQualityProfessionallyProduced ProductionQuality = 1 // Professionally Produced
- ProductionQualityProsumer ProductionQuality = 2 // Prosumer
- ProductionQualityUserGenerated ProductionQuality = 3 // User Generated (UGC)
-)
-
-// Ptr returns pointer to own value.
-func (q ProductionQuality) Ptr() *ProductionQuality {
- return &q
-}
-
-// Val safely dereferences pointer, returning default value (ProductionQualityUnknown) for nil.
-func (q *ProductionQuality) Val() ProductionQuality {
- if q == nil {
- return ProductionQualityUnknown
- }
- return *q
-}
diff --git a/openrtb2/protocol.go b/openrtb2/protocol.go
deleted file mode 100644
index 2e12345..0000000
--- a/openrtb2/protocol.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package openrtb2
-
-// 5.8 Protocols
-//
-// Options for the various bid response protocols that could be supported by an exchange.
-type Protocol int8
-
-const (
- ProtocolVAST10 Protocol = 1 // VAST 1.0
- ProtocolVAST20 Protocol = 2 // VAST 2.0
- ProtocolVAST30 Protocol = 3 // VAST 3.0
- ProtocolVAST10Wrapper Protocol = 4 // VAST 1.0 Wrapper
- ProtocolVAST20Wrapper Protocol = 5 // VAST 2.0 Wrapper
- ProtocolVAST30Wrapper Protocol = 6 // VAST 3.0 Wrapper
- ProtocolVAST40 Protocol = 7 // VAST 4.0
- ProtocolVAST40Wrapper Protocol = 8 // VAST 4.0 Wrapper
- ProtocolDAAST10 Protocol = 9 // DAAST 1.0
- ProtocolDAAST10Wrapper Protocol = 10 // DAAST 1.0 Wrapper
-)
diff --git a/openrtb2/publisher.go b/openrtb2/publisher.go
index fdeeff1..576a326 100644
--- a/openrtb2/publisher.go
+++ b/openrtb2/publisher.go
@@ -1,6 +1,10 @@
package openrtb2
-import "encoding/json"
+import (
+ "encoding/json"
+
+ "github.com/mxmCherry/openrtb/v16/adcom1"
+)
// 3.2.15 Object: Publisher
//
@@ -24,13 +28,24 @@ type Publisher struct {
// Publisher name (may be aliased at the publisher’s request).
Name string `json:"name,omitempty"`
+ // Attribute:
+ // cattax
+ // Type:
+ // integer; default 1
+ // Description:
+ // The taxonomy in use. Refer to the AdCOM list List: Category
+ // Taxonomies for values.
+ CatTax adcom1.CategoryTaxonomy `json:"cattax,omitempty"`
+
// Attribute:
// cat
// Type:
// string array
// Description:
// Array of IAB content categories that describe the publisher.
- // Refer to List 5.1.
+ // The taxonomy to be used is defined by the cattax field. If no
+ // cattax field is supplied IAB Content Category Taxonomy 1.0 is
+ // assumed.
Cat []string `json:"cat,omitempty"`
// Attribute:
diff --git a/openrtb2/regs.go b/openrtb2/regs.go
index 84a9231..54c05d5 100644
--- a/openrtb2/regs.go
+++ b/openrtb2/regs.go
@@ -4,8 +4,8 @@ import "encoding/json"
// 3.2.3 Object: Regs
//
-// This object contains any legal, governmental, or industry regulations that apply to the request.
-// The coppa flag signals whether or not the request falls under the United States Federal Trade Commission’s regulations for the United States Children’s Online Privacy Protection Act (“COPPA”).
+// This object contains any legal, governmental, or industry regulations that the sender deems applicable to the request.
+// See Section 7.5 for more details on the flags supporting Coppa, GDPR and CCPA.
type Regs struct {
// Attribute:
@@ -18,6 +18,26 @@ type Regs struct {
// Refer to Section 7.5 for more information.
COPPA int8 `json:"coppa,omitempty"`
+ // Attribute:
+ // gdpr
+ // Type:
+ // integer
+ // Description:
+ // Flag that indicates whether or not the request is subject to
+ // GDPR regulations 0 = No, 1 = Yes, omission indicates
+ // Unknown. Refer to Section 7.5 for more information.
+ GDPR *int8 `json:"gdpr,omitempty"`
+
+ // Attribute:
+ // us_privacy
+ // Type:
+ // string
+ // Description:
+ // Communicates signals regarding consumer privacy under US
+ // privacy regulation. See US Privacy String specifications. Refer
+ // to Section 7.5 for more information.
+ USPrivacy string `json:"us_privacy,omitempty"`
+
// Attribute:
// ext
// Type:
diff --git a/openrtb2/seat_bid.go b/openrtb2/seat_bid.go
index 6ab7956..aaad621 100644
--- a/openrtb2/seat_bid.go
+++ b/openrtb2/seat_bid.go
@@ -2,7 +2,7 @@ package openrtb2
import "encoding/json"
-// 4.2.2 Object: SeatBid
+// 4.3.2 Object: SeatBid
//
// A bid response can contain multiple SeatBid objects, each on behalf of a different bidder seat and each containing one or more individual bids.
// If multiple impressions are presented in the request, the group attribute can be used to specify if a seat is willing to accept any impressions that it can win (default) or if it is only interested in winning any if it can win them all as a group.
diff --git a/openrtb2/site.go b/openrtb2/site.go
index e07a47b..f2878f4 100644
--- a/openrtb2/site.go
+++ b/openrtb2/site.go
@@ -1,6 +1,10 @@
package openrtb2
-import "encoding/json"
+import (
+ "encoding/json"
+
+ "github.com/mxmCherry/openrtb/v16/adcom1"
+)
// 3.2.13 Object: Site
//
@@ -33,12 +37,23 @@ type Site struct {
// Domain of the site (e.g., “mysite.foo.com”).
Domain string `json:"domain,omitempty"`
+ // Attribute:
+ // cattax
+ // Type:
+ // integer
+ // Description:
+ // The taxonomy in use. Refer to the AdCOM list List: Category
+ // Taxonomies for values. If no cattax field is supplied IAB Content
+ // Category Taxonomy 1.0 is assumed.
+ CatTax adcom1.CategoryTaxonomy `json:"cattax,omitempty"`
+
// Attribute:
// cat
// Type:
// string array
// Description:
- // Array of IAB content categories of the site. Refer to List 5.1.
+ // Array of IABTL content categories of the site.
+ // The taxonomy to be used is defined by the cattax field.
Cat []string `json:"cat,omitempty"`
// Attribute:
@@ -46,8 +61,9 @@ type Site struct {
// Type:
// string array
// Description:
- // Array of IAB content categories that describe the current
- // section of the site. Refer to List 5.1.
+ // Array of IABTL content categories that describe the current
+ // section of the site. The taxonomy to be used is defined by
+ // the cattax field.
SectionCat []string `json:"sectioncat,omitempty"`
// Attribute:
@@ -55,8 +71,9 @@ type Site struct {
// Type:
// string array
// Description:
- // Array of IAB content categories that describe the current page
- // or view of the site. Refer to List 5.1.
+ // Array of IABTL content categories that describe the current
+ // page or view of the site.
+ // The taxonomy to be used is defined by the cattax field.
PageCat []string `json:"pagecat,omitempty"`
// Attribute:
@@ -121,9 +138,19 @@ type Site struct {
// Type:
// string
// Description:
- // Comma separated list of keywords about the site.
+ // Comma separated list of keywords about the site. Only one of
+ // ‘keywords’ or ‘kwarray’ may be present.
Keywords string `json:"keywords,omitempty"`
+ // Attribute:
+ // kwarray
+ // Type:
+ // string
+ // Description:
+ // Array of keywords about the site. Only one of ‘keywords’ or
+ // ‘kwarray’ may be present.
+ KwArray []string `json:"kwarray,omitempty"`
+
// Attribute:
// ext
// Type:
diff --git a/openrtb2/source.go b/openrtb2/source.go
index d622121..9df3e6d 100644
--- a/openrtb2/source.go
+++ b/openrtb2/source.go
@@ -36,6 +36,17 @@ type Source struct {
// described in the TAG Payment ID Protocol v1.0.
PChain string `json:"pchain,omitempty"`
+ // Attribute:
+ // schain
+ // Type:
+ // object; recommended
+ // Description:
+ // This object represents both the links in the supply chain as
+ // well as an indicator whether or not the supply chain is
+ // complete. Details via the SupplyChain object (section
+ // 3.2.25)
+ SChain *SupplyChain `json:"schain,omitempty"`
+
// Attribute:
// ext
// Type:
diff --git a/openrtb2/supply_chain.go b/openrtb2/supply_chain.go
new file mode 100644
index 0000000..7baaddd
--- /dev/null
+++ b/openrtb2/supply_chain.go
@@ -0,0 +1,52 @@
+package openrtb2
+
+import "encoding/json"
+
+// 3.2.25 Object: SupplyChain
+//
+// This object is composed of a set of nodes where each node represents a specific entity that participates in the transacting of inventory.
+// The entire chain of nodes from beginning to end represents all entities who are involved in the direct flow of payment for inventory.
+// Detailed implementation examples can be found here: https://github.com/InteractiveAdvertisingBureau/openrtb/blob/master/supplychainobject.md.
+type SupplyChain struct {
+
+ // Attribute:
+ // complete
+ // Type:
+ // integer; required
+ // Description:
+ // Flag indicating whether the chain contains all nodes involved
+ // in the transaction leading back to the owner of the site, app
+ // or other medium of the inventory, where 0 = no, 1 = yes.
+ Complete int8 `json:"complete"`
+
+ // Attribute:
+ // nodes
+ // Type:
+ // object array; required
+ // Description:
+ // Array of SupplyChainNode objects in the order of the chain. In a
+ // complete supply chain, the first node represents the initial
+ // advertising system and seller ID involved in the transaction, i.e.
+ // the owner of the site, app, or other medium. In an incomplete
+ // supply chain, it represents the first known node. The last node
+ // epresents the entity sending this bid request.
+ Nodes []SupplyChainNode `json:"nodes"`
+
+ // Attribute:
+ // ver
+ // Type:
+ // string; required
+ // Description:
+ // Version of the supply chain specification in use, in the format
+ // of "major.minor". For example, for version 1.0 of the spec,
+ // use the string “1.0”.
+ Ver string `json:"ver"`
+
+ // Attribute:
+ // ext
+ // Type:
+ // object
+ // Description:
+ // Placeholder for advertising-system specific extensions to this object.
+ Ext json.RawMessage `json:"ext,omitempty"`
+}
diff --git a/openrtb2/supply_chain_node.go b/openrtb2/supply_chain_node.go
new file mode 100644
index 0000000..c643e74
--- /dev/null
+++ b/openrtb2/supply_chain_node.go
@@ -0,0 +1,92 @@
+package openrtb2
+
+import "encoding/json"
+
+// 3.2.26 Object: SupplyChainNode
+//
+// This object is associated with a SupplyChain object as an array of nodes.
+// These nodes define the identity of an entity participating in the supply chain of a bid request.
+// Detailed implementation examples can be found here: https://github.com/InteractiveAdvertisingBureau/openrtb/blob/master/supplychainobject.md.
+type SupplyChainNode struct {
+
+ // Attribute:
+ // asi
+ // Type:
+ // string; required
+ // Description:
+ // The canonical domain name of the SSP, Exchange, Header
+ // Wrapper, etc system that bidders connect to. This may be
+ // the operational domain of the system, if that is different than
+ // the parent corporate domain, to facilitate WHOIS and
+ // reverse IP lookups to establish clear ownership of the
+ // delegate system. This should be the same value as used to
+ // identify sellers in an ads.txt file if one exists
+ ASI string `json:"asi"`
+
+ // Attribute:
+ // sid
+ // Type:
+ // string; required
+ // Description:
+ // The identifier associated with the seller or reseller account
+ // within the advertising system. This must contain the same value
+ // used in transactions (i.e. OpenRTB bid requests) in the field
+ // specified by the SSP/exchange. Typically, in OpenRTB, this is
+ // publisher.id. For OpenDirect it is typically the publisher’s
+ // organization ID.Should be limited to 64 characters in length.
+ SID string `json:"sid"`
+
+ // Attribute:
+ // rid
+ // Type:
+ // string
+ // Description:
+ // The OpenRTB RequestId of the request as issued by this seller.
+ RID string `json:"rid,omitempty"`
+
+ // Attribute:
+ // name
+ // Type:
+ // string
+ // Description:
+ // The name of the company (the legal entity) that is paid for
+ // inventory transacted under the given seller_ID. This value is
+ // optional and should NOT be included if it exists in the
+ // advertising system’s sellers.json file.
+ Name string `json:"name,omitempty"`
+
+ // Attribute:
+ // domain
+ // Type:
+ // string
+ // Description:
+ // The business domain name of the entity represented by this
+ // node. This value is optional and should NOT be included if it
+ // exists in the advertising system’s sellers.json file.
+ Domain string `json:"domain,omitempty"`
+
+ // Attribute:
+ // hp
+ // Type:
+ // integer; default 1
+ // Description:
+ // Indicates whether this node will be involved in the flow of
+ // payment for the inventory. When set to 1, the advertising
+ // system in the asi field pays the seller in the sid field, who is
+ // responsible for paying the previous node in the chain. When
+ // set to 0, this node is not involved in the flow of payment for
+ // the inventory. For version 1.0 of SupplyChain, this property
+ // should always be 1. Implementers should ensure that they
+ // propagate this field onwards when constructing SupplyChain
+ // objects in bid requests sent to a downstream advertising
+ // system.
+ HP *int8 `json:"hp,omitempty"`
+
+ // Attribute:
+ // ext
+ // Type:
+ // object
+ // Description:
+ // Placeholder for advertising-system specific extensions to this object.
+ Ext json.RawMessage `json:"ext,omitempty"`
+}
diff --git a/openrtb2/testdata/README.md b/openrtb2/testdata/README.md
index 85b1e8e..0df06d6 100644
--- a/openrtb2/testdata/README.md
+++ b/openrtb2/testdata/README.md
@@ -1,5 +1,14 @@
# testdata
-JSON examples copied from [OpenRTB](https://iabtechlab.com/standards/openrtb/) [2.5](https://iabtechlab.com/wp-content/uploads/2016/07/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) spec - section 6. Bid Request/Response Samples.
+JSON examples copied from [OpenRTB](https://iabtechlab.com/standards/openrtb/) spec documents:
+- [2.5](https://iabtechlab.com/wp-content/uploads/2016/07/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) spec - section 6. Bid Request/Response Samples
+- [2.6](https://iabtechlab.com/wp-content/uploads/2022/04/OpenRTB-2-6_FINAL.pdf) spec - section 6. Bid Request/Response Samples
Some empty/zero attributes were omited (not copied) because of [encoding/json](https://golang.org/pkg/encoding/json/) `omitempty` and [gomega.MatchJSON(...)](http://onsi.github.io/gomega/#matchjsonjson-interface).
+
+For [2.6](https://iabtechlab.com/wp-content/uploads/2022/04/OpenRTB-2-6_FINAL.pdf) the following adjustments were applied:
+
+- [bid-request/2.6/simple-banner.json](bid-request/2.6/simple-banner.json) - spec example embedded `user` into `site`, moved `user` to top level
+- [bid-request/2.6/expandable-creative.json](bid-request/2.6/expandable-creative.json) - `data[2].value` added, moved to `data[2].segment[0].value`
+- [bid-request/2.6/mobile.json](bid-request/2.6/mobile.json) - `imp[0].instl = 0` removed (because of JSON/omitempty)
+- [bid-request/2.6/VIDEO.json](bid-request/2.6/VIDEO.json) - `imp[0].video.apis` renamed to `api` (it is singular in spec, but plural in example)
diff --git a/openrtb2/testdata/bid-request/2.5/expandable-creative.json b/openrtb2/testdata/bid-request/2.5/expandable-creative.json
new file mode 100644
index 0000000..8498312
--- /dev/null
+++ b/openrtb2/testdata/bid-request/2.5/expandable-creative.json
@@ -0,0 +1,73 @@
+{
+ "id": "123456789316e6ede735f123ef6e32361bfc7b22",
+ "at": 2,
+ "cur": [
+ "USD"
+ ],
+ "imp": [
+ {
+ "id": "1",
+ "bidfloor": 0.03,
+ "iframebuster": [
+ "vendor1.com",
+ "vendor2.com"
+ ],
+ "banner": {
+ "h": 250,
+ "w": 300,
+ "battr": [
+ 13
+ ],
+ "expdir": [
+ 2,
+ 4
+ ]
+ }
+ }
+ ],
+ "site": {
+ "id": "102855",
+ "cat": [
+ "IAB3-1"
+ ],
+ "domain": "www.foobar.com",
+ "page": "http://www.foobar.com/1234.html",
+ "publisher": {
+ "id": "8953",
+ "name": "foobar.com",
+ "cat": [
+ "IAB3-1"
+ ],
+ "domain": "foobar.com"
+ }
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2",
+ "ip": "123.145.167.10"
+ },
+ "user": {
+ "id": "55816b39711f9b5acf3b90e313ed29e51665623f",
+ "buyeruid": "545678765467876567898765678987654",
+ "data": [
+ {
+ "id": "6",
+ "name": "Data Provider 1",
+ "segment": [
+ {
+ "id": "12341318394918",
+ "name": "auto intenders"
+ },
+ {
+ "id": "1234131839491234",
+ "name": "auto enthusiasts"
+ },
+ {
+ "id": "23423424",
+ "name": "data-provider1-age",
+ "value": "30-40"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/openrtb2/testdata/bid-request/2.5/mobile.json b/openrtb2/testdata/bid-request/2.5/mobile.json
new file mode 100644
index 0000000..6f30ad8
--- /dev/null
+++ b/openrtb2/testdata/bid-request/2.5/mobile.json
@@ -0,0 +1,101 @@
+{
+ "id": "IxexyLDIIk",
+ "at": 2,
+ "bcat": [
+ "IAB25",
+ "IAB7-39",
+ "IAB8-18",
+ "IAB8-5",
+ "IAB9-9"
+ ],
+ "badv": [
+ "apple.com",
+ "go-text.me",
+ "heywire.com"
+ ],
+ "imp": [
+ {
+ "id": "1",
+ "bidfloor": 0.5,
+ "tagid": "agltb3B1Yi1pbmNyDQsSBFNpdGUY7fD0FAw",
+ "banner": {
+ "w": 728,
+ "h": 90,
+ "pos": 1,
+ "btype": [
+ 4
+ ],
+ "battr": [
+ 14
+ ],
+ "api": [
+ 3
+ ]
+ }
+ },
+ {
+ "id": "2",
+ "bidfloor": 0.5,
+ "tagid": "agltb3B1Yi1pbmNyDQsSBFNpdGUY7fD0FAwa",
+ "instl": 1,
+ "banner": {
+ "w": 0,
+ "h": 0,
+ "pos": 2,
+ "btype": [
+ 4
+ ],
+ "battr": [
+ 14
+ ],
+ "api": [
+ 3
+ ]
+ }
+ }
+ ],
+ "app": {
+ "id": "agltb3B1Yi1pbmNyDAsSA0FwcBiJkfIUDA",
+ "name": "Yahoo Weather",
+ "cat": [
+ "IAB15",
+ "IAB15-10"
+ ],
+ "ver": "1.0.2",
+ "bundle": "12345",
+ "storeurl": "https://itunes.apple.com/id628677149",
+ "publisher": {
+ "id": "agltb3B1Yi1pbmNyDAsSA0FwcBiJkfTUCV",
+ "name": "yahoo",
+ "domain": "www.yahoo.com"
+ }
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 6_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3",
+ "ip": "123.145.167.189",
+ "ifa": "AA000DFE74168477C70D291f574D344790E0BB11",
+ "carrier": "VERIZON",
+ "language": "en",
+ "make": "Apple",
+ "model": "iPhone",
+ "os": "iOS",
+ "osv": "6.1",
+ "js": 1,
+ "connectiontype": 3,
+ "devicetype": 1,
+ "geo": {
+ "lat": 35.012345,
+ "lon": -115.12345,
+ "country": "USA",
+ "metro": "803",
+ "region": "CA",
+ "city": "Los Angeles",
+ "zip": "90049"
+ }
+ },
+ "user": {
+ "id": "ffffffd5135596709273b3a1a07e466ea2bf4fff",
+ "yob": 1984,
+ "gender": "M"
+ }
+}
diff --git a/openrtb2/testdata/bid-request/2.5/native-ad.json b/openrtb2/testdata/bid-request/2.5/native-ad.json
new file mode 100644
index 0000000..c058fa1
--- /dev/null
+++ b/openrtb2/testdata/bid-request/2.5/native-ad.json
@@ -0,0 +1,47 @@
+{
+ "id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22",
+ "at": 1,
+ "cur": [
+ "USD"
+ ],
+ "imp": [
+ {
+ "id": "1",
+ "bidfloor": 0.03,
+ "native": {
+ "request": "{\"native\":{\"ver\":\"1.0\",\"assets\":[ ... ]}}",
+ "ver": "1.0",
+ "api": [
+ 3
+ ],
+ "battr": [
+ 13,
+ 14
+ ]
+ }
+ }
+ ],
+ "site": {
+ "id": "102855",
+ "cat": [
+ "IAB3-1"
+ ],
+ "domain": "www.foobar.com",
+ "page": "http://www.foobar.com/1234.html ",
+ "publisher": {
+ "id": "8953",
+ "name": "foobar.com",
+ "cat": [
+ "IAB3-1"
+ ],
+ "domain": "foobar.com"
+ }
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2",
+ "ip": "123.145.167.10"
+ },
+ "user": {
+ "id": "55816b39711f9b5acf3b90e313ed29e51665623f"
+ }
+}
diff --git a/openrtb2/testdata/bid-request/2.5/pmp-with-direct-deal.json b/openrtb2/testdata/bid-request/2.5/pmp-with-direct-deal.json
new file mode 100644
index 0000000..403c20f
--- /dev/null
+++ b/openrtb2/testdata/bid-request/2.5/pmp-with-direct-deal.json
@@ -0,0 +1,61 @@
+{
+ "id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22",
+ "at": 1,
+ "cur": [
+ "USD"
+ ],
+ "imp": [
+ {
+ "id": "1",
+ "bidfloor": 0.03,
+ "banner": {
+ "h": 250,
+ "w": 300
+ },
+ "pmp": {
+ "private_auction": 1,
+ "deals": [
+ {
+ "id": "AB-Agency1-0001",
+ "at": 1,
+ "bidfloor": 2.5,
+ "wseat": [
+ "Agency1"
+ ]
+ },
+ {
+ "id": "XY-Agency2-0001",
+ "at": 2,
+ "bidfloor": 2,
+ "wseat": [
+ "Agency2"
+ ]
+ }
+ ]
+ }
+ }
+ ],
+ "site": {
+ "id": "102855",
+ "domain": "www.foobar.com",
+ "cat": [
+ "IAB3-1"
+ ],
+ "page": "http://www.foobar.com/1234.html",
+ "publisher": {
+ "id": "8953",
+ "name": "foobar.com",
+ "cat": [
+ "IAB3-1"
+ ],
+ "domain": "foobar.com"
+ }
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2",
+ "ip": "123.145.167.10"
+ },
+ "user": {
+ "id": "55816b39711f9b5acf3b90e313ed29e51665623f"
+ }
+}
diff --git a/openrtb2/testdata/bid-request/2.5/simple-banner.json b/openrtb2/testdata/bid-request/2.5/simple-banner.json
new file mode 100644
index 0000000..a7dc7ba
--- /dev/null
+++ b/openrtb2/testdata/bid-request/2.5/simple-banner.json
@@ -0,0 +1,40 @@
+{
+ "id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22",
+ "at": 1,
+ "cur": [
+ "USD"
+ ],
+ "imp": [
+ {
+ "id": "1",
+ "bidfloor": 0.03,
+ "banner": {
+ "h": 250,
+ "w": 300
+ }
+ }
+ ],
+ "site": {
+ "id": "102855",
+ "cat": [
+ "IAB3-1"
+ ],
+ "domain": "www.foobar.com",
+ "page": "http://www.foobar.com/1234.html ",
+ "publisher": {
+ "id": "8953",
+ "name": "foobar.com",
+ "cat": [
+ "IAB3-1"
+ ],
+ "domain": "foobar.com"
+ }
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2",
+ "ip": "123.145.167.10"
+ },
+ "user": {
+ "id": "55816b39711f9b5acf3b90e313ed29e51665623f"
+ }
+}
diff --git a/openrtb2/testdata/bid-request/2.5/video.json b/openrtb2/testdata/bid-request/2.5/video.json
new file mode 100644
index 0000000..5664974
--- /dev/null
+++ b/openrtb2/testdata/bid-request/2.5/video.json
@@ -0,0 +1,132 @@
+{
+ "id": "1234567893",
+ "at": 2,
+ "tmax": 120,
+ "imp": [
+ {
+ "id": "1",
+ "bidfloor": 0.03,
+ "video": {
+ "w": 640,
+ "h": 480,
+ "pos": 1,
+ "minduration": 5,
+ "maxduration": 30,
+ "maxextended": 30,
+ "minbitrate": 300,
+ "maxbitrate": 1500,
+ "api": [
+ 1,
+ 2
+ ],
+ "protocols": [
+ 2,
+ 3
+ ],
+ "mimes": [
+ "video/x-flv",
+ "video/mp4",
+ "application/x-shockwave-flash",
+ "application/javascript"
+ ],
+ "linearity": 1,
+ "boxingallowed": 1,
+ "playbackmethod": [
+ 1,
+ 3
+ ],
+ "delivery": [
+ 2
+ ],
+ "battr": [
+ 13,
+ 14
+ ],
+ "companionad": [
+ {
+ "id": "1234567893-1",
+ "w": 300,
+ "h": 250,
+ "pos": 1,
+ "battr": [
+ 13,
+ 14
+ ],
+ "expdir": [
+ 2,
+ 4
+ ]
+ },
+ {
+ "id": "1234567893-2",
+ "w": 728,
+ "h": 90,
+ "pos": 1,
+ "battr": [
+ 13,
+ 14
+ ]
+ }
+ ],
+ "companiontype": [
+ 1,
+ 2
+ ]
+ }
+ }
+ ],
+ "site": {
+ "id": "1345135123",
+ "name": "Site ABCD",
+ "domain": "siteabcd.com",
+ "cat": [
+ "IAB2-1",
+ "IAB2-2"
+ ],
+ "page": "http://siteabcd.com/page.htm",
+ "ref": "http://referringsite.com/referringpage.htm",
+ "privacypolicy": 1,
+ "publisher": {
+ "id": "pub12345",
+ "name": "Publisher A"
+ },
+ "content": {
+ "id": "1234567",
+ "series": "All About Cars",
+ "season": "2",
+ "episode": 23,
+ "title": "Car Show",
+ "cat": [
+ "IAB2-2"
+ ],
+ "keywords": "keyword-a,keyword-b,keyword-c"
+ }
+ },
+ "device": {
+ "ip": "64.124.253.1",
+ "ua": "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16",
+ "os": "OS X",
+ "flashver": "10.1",
+ "js": 1
+ },
+ "user": {
+ "id": "456789876567897654678987656789",
+ "buyeruid": "545678765467876567898765678987654",
+ "data": [
+ {
+ "id": "6",
+ "name": "Data Provider 1",
+ "segment": [
+ {
+ "id": "12341318394918",
+ "name": "auto intenders"
+ },
+ {
+ "id": "1234131839491234",
+ "name": "auto enthusiasts"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/openrtb2/testdata/bid-request/2.6/expandable-creative.json b/openrtb2/testdata/bid-request/2.6/expandable-creative.json
new file mode 100644
index 0000000..87ed8ef
--- /dev/null
+++ b/openrtb2/testdata/bid-request/2.6/expandable-creative.json
@@ -0,0 +1,68 @@
+{
+ "id": "123456789316e6ede735f123ef6e32361bfc7b22",
+ "at": 2,
+ "cur": [
+ "USD"
+ ],
+ "imp": [
+ {
+ "id": "1",
+ "bidfloor": 0.03,
+ "iframebuster": [
+ "vendor1.com",
+ "vendor2.com"
+ ],
+ "banner": {
+ "h": 250,
+ "w": 300,
+ "pos": 0,
+ "battr": [
+ 13
+ ],
+ "expdir": [
+ 2,
+ 4
+ ]
+ }
+ }
+ ],
+ "site": {
+ "id": "102855",
+ "cat": [
+ "IAB3-1"
+ ],
+ "domain": "www.foobar.com",
+ "page": "http://www.foobar.com/1234.html",
+ "publisher": {
+ "id": "8953",
+ "name": "foobar.com",
+ "cat": [
+ "IAB3-1"
+ ],
+ "domain": "foobar.com"
+ }
+ },
+ "user": {
+ "id": "55816b39711f9b5acf3b90e313ed29e51665623f",
+ "buyeruid": "545678765467876567898765678987654",
+ "data": [
+ {
+ "id": "12341318394918",
+ "name": "auto intenders"
+ },
+ {
+ "id": "1234131839491234",
+ "name": "auto enthusiasts"
+ },
+ {
+ "id": "23423424",
+ "name": "data-provider1-age",
+ "segment": [
+ {
+ "value": "30-40"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/openrtb2/testdata/bid-request/2.6/mobile.json b/openrtb2/testdata/bid-request/2.6/mobile.json
new file mode 100644
index 0000000..c69572e
--- /dev/null
+++ b/openrtb2/testdata/bid-request/2.6/mobile.json
@@ -0,0 +1,70 @@
+{
+ "id": "IxexyLDIIk",
+ "at": 2,
+ "bcat": [
+ "IAB25",
+ "IAB7-39",
+ "IAB8-18",
+ "IAB8-5",
+ "IAB9-9"
+ ],
+ "badv": [
+ "apple.com",
+ "go-text.me",
+ "heywire.com"
+ ],
+ "imp": [
+ {
+ "id": "1",
+ "bidfloor": 0.5,
+ "tagid": "agltb3B1Yi1pbmNyDQsSBFNpdGUY7fD0FAw",
+ "banner": {
+ "w": 728,
+ "h": 90,
+ "pos": 1,
+ "btype": [
+ 4
+ ],
+ "battr": [
+ 14
+ ],
+ "api": [
+ 3
+ ]
+ }
+ }
+ ],
+ "app": {
+ "id": "agltb3B1Yi1pbmNyDAsSA0FwcBiJkfIUDA",
+ "name": "Yahoo Weather",
+ "cat": [
+ "IAB15",
+ "IAB15-10"
+ ],
+ "ver": "1.0.2",
+ "bundle": "12345",
+ "storeurl": "https://itunes.apple.com/id628677149",
+ "publisher": {
+ "id": "agltb3B1Yi1pbmNyDAsSA0FwcBiJkfTUCV",
+ "name": "yahoo",
+ "domain": "www.yahoo.com"
+ }
+ },
+ "device": {
+ "dnt": 0,
+ "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 6_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3",
+ "ifa": "AA000DFE74168477C70D291f574D344790E0BB11",
+ "carrier": "VERIZON",
+ "language": "en",
+ "make": "Apple",
+ "model": "iPhone",
+ "os": "iOS",
+ "osv": "6.1",
+ "js": 1,
+ "connectiontype": 3,
+ "devicetype": 1
+ },
+ "user": {
+ "id": "ffffffd5135596709273b3a1a07e466ea2bf4fff"
+ }
+}
diff --git a/openrtb2/testdata/bid-request/2.6/pmp-with-direct-deal.json b/openrtb2/testdata/bid-request/2.6/pmp-with-direct-deal.json
new file mode 100644
index 0000000..805bf9b
--- /dev/null
+++ b/openrtb2/testdata/bid-request/2.6/pmp-with-direct-deal.json
@@ -0,0 +1,61 @@
+{
+ "id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22",
+ "at": 1,
+ "cur": [
+ "USD"
+ ],
+ "imp": [
+ {
+ "id": "1",
+ "bidfloor": 0.03,
+ "banner": {
+ "h": 250,
+ "w": 300,
+ "pos": 0
+ },
+ "pmp": {
+ "private_auction": 1,
+ "deals": [
+ {
+ "id": "AB-Agency1-0001",
+ "at": 1,
+ "bidfloor": 2.5,
+ "wseat": [
+ "Agency1"
+ ]
+ },
+ {
+ "id": "XY-Agency2-0001",
+ "at": 2,
+ "bidfloor": 2,
+ "wseat": [
+ "Agency2"
+ ]
+ }
+ ]
+ }
+ }
+ ],
+ "site": {
+ "id": "102855",
+ "domain": "www.foobar.com",
+ "cat": [
+ "IAB3-1"
+ ],
+ "page": "http://www.foobar.com/1234.html",
+ "publisher": {
+ "id": "8953",
+ "name": "foobar.com",
+ "cat": [
+ "IAB3-1"
+ ],
+ "domain": "foobar.com"
+ }
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2"
+ },
+ "user": {
+ "id": "55816b39711f9b5acf3b90e313ed29e51665623f"
+ }
+}
diff --git a/openrtb2/testdata/bid-request/2.6/simple-banner.json b/openrtb2/testdata/bid-request/2.6/simple-banner.json
new file mode 100644
index 0000000..88f7508
--- /dev/null
+++ b/openrtb2/testdata/bid-request/2.6/simple-banner.json
@@ -0,0 +1,37 @@
+{
+ "id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22",
+ "at": 1,
+ "cur": [
+ "USD"
+ ],
+ "imp": [
+ {
+ "id": "1",
+ "bidfloor": 0.03,
+ "banner": {
+ "h": 250,
+ "w": 300,
+ "pos": 0
+ }
+ }
+ ],
+ "site": {
+ "id": "102855",
+ "cat": [
+ "IAB3-1"
+ ],
+ "domain": "www.foobar.com",
+ "page": "http://www.foobar.com/1234.html ",
+ "publisher": {
+ "id": "8953",
+ "name": "foobar.com",
+ "cat": [
+ "IAB3-1"
+ ],
+ "domain": "foobar.com"
+ }
+ },
+ "user": {
+ "id": "55816b39711f9b5acf3b90e313ed29e51665623f"
+ }
+}
diff --git a/openrtb2/testdata/bid-request/2.6/video.json b/openrtb2/testdata/bid-request/2.6/video.json
new file mode 100644
index 0000000..ba999c2
--- /dev/null
+++ b/openrtb2/testdata/bid-request/2.6/video.json
@@ -0,0 +1,130 @@
+{
+ "id": "1234567893",
+ "at": 2,
+ "tmax": 120,
+ "imp": [
+ {
+ "id": "1",
+ "bidfloor": 0.03,
+ "video": {
+ "w": 640,
+ "h": 480,
+ "pos": 1,
+ "startdelay": 0,
+ "minduration": 5,
+ "maxduration": 30,
+ "maxextended": 30,
+ "minbitrate": 300,
+ "maxbitrate": 1500,
+ "api": [
+ 1,
+ 2
+ ],
+ "protocols": [
+ 2,
+ 3
+ ],
+ "mimes": [
+ "video/x-flv",
+ "video/mp4",
+ "application/javascript"
+ ],
+ "linearity": 1,
+ "boxingallowed": 1,
+ "playbackmethod": [
+ 1,
+ 3
+ ],
+ "delivery": [
+ 2
+ ],
+ "battr": [
+ 13,
+ 14
+ ],
+ "companionad": [
+ {
+ "id": "1234567893-1",
+ "w": 300,
+ "h": 250,
+ "pos": 1,
+ "battr": [
+ 13,
+ 14
+ ],
+ "expdir": [
+ 2,
+ 4
+ ]
+ },
+ {
+ "id": "1234567893-2",
+ "w": 728,
+ "h": 90,
+ "pos": 1,
+ "battr": [
+ 13,
+ 14
+ ]
+ }
+ ],
+ "companiontype": [
+ 1,
+ 2
+ ]
+ }
+ }
+ ],
+ "site": {
+ "id": "1345135123",
+ "name": "Site ABCD",
+ "domain": "siteabcd.com",
+ "cat": [
+ "IAB2-1",
+ "IAB2-2"
+ ],
+ "page": "http://siteabcd.com/page.htm",
+ "ref": "http://referringsite.com/referringpage.htm",
+ "privacypolicy": 1,
+ "publisher": {
+ "id": "pub12345",
+ "name": "Publisher A"
+ },
+ "content": {
+ "id": "1234567",
+ "series": "All About Cars",
+ "season": "2",
+ "episode": 23,
+ "title": "Car Show",
+ "cat": [
+ "IAB2-2"
+ ],
+ "keywords": "keyword-a,keyword-b,keyword-c"
+ }
+ },
+ "device": {
+ "ua": "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16",
+ "os": "OS X",
+ "js": 1
+ },
+ "user": {
+ "id": "456789876567897654678987656789",
+ "buyeruid": "545678765467876567898765678987654",
+ "data": [
+ {
+ "id": "6",
+ "name": "Data Provider 1",
+ "segment": [
+ {
+ "id": "12341318394918",
+ "name": "auto intenders"
+ },
+ {
+ "id": "1234131839491234",
+ "name": "auto enthusiasts"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/openrtb2/testdata/bid-request/expandable-creative.json b/openrtb2/testdata/bid-request/expandable-creative.json
deleted file mode 100644
index 34bfa4e..0000000
--- a/openrtb2/testdata/bid-request/expandable-creative.json
+++ /dev/null
@@ -1,73 +0,0 @@
-{
- "id": "123456789316e6ede735f123ef6e32361bfc7b22",
- "at": 2,
- "cur": [
- "USD"
- ],
- "imp": [
- {
- "id": "1",
- "bidfloor": 0.03,
- "iframebuster": [
- "vendor1.com",
- "vendor2.com"
- ],
- "banner": {
- "h": 250,
- "w": 300,
- "battr": [
- 13
- ],
- "expdir": [
- 2,
- 4
- ]
- }
- }
- ],
- "site": {
- "id": "102855",
- "cat": [
- "IAB3-1"
- ],
- "domain": "www.foobar.com",
- "page": "http://www.foobar.com/1234.html",
- "publisher": {
- "id": "8953",
- "name": "foobar.com",
- "cat": [
- "IAB3-1"
- ],
- "domain": "foobar.com"
- }
- },
- "device": {
- "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2",
- "ip": "123.145.167.10"
- },
- "user": {
- "id": "55816b39711f9b5acf3b90e313ed29e51665623f",
- "buyeruid": "545678765467876567898765678987654",
- "data": [
- {
- "id": "6",
- "name": "Data Provider 1",
- "segment": [
- {
- "id": "12341318394918",
- "name": "auto intenders"
- },
- {
- "id": "1234131839491234",
- "name": "auto enthusiasts"
- },
- {
- "id": "23423424",
- "name": "data-provider1-age",
- "value": "30-40"
- }
- ]
- }
- ]
- }
-}
diff --git a/openrtb2/testdata/bid-request/mobile.json b/openrtb2/testdata/bid-request/mobile.json
deleted file mode 100644
index 725fe35..0000000
--- a/openrtb2/testdata/bid-request/mobile.json
+++ /dev/null
@@ -1,101 +0,0 @@
-{
- "id": "IxexyLDIIk",
- "at": 2,
- "bcat": [
- "IAB25",
- "IAB7-39",
- "IAB8-18",
- "IAB8-5",
- "IAB9-9"
- ],
- "badv": [
- "apple.com",
- "go-text.me",
- "heywire.com"
- ],
- "imp": [
- {
- "id": "1",
- "bidfloor": 0.5,
- "tagid": "agltb3B1Yi1pbmNyDQsSBFNpdGUY7fD0FAw",
- "banner": {
- "w": 728,
- "h": 90,
- "pos": 1,
- "btype": [
- 4
- ],
- "battr": [
- 14
- ],
- "api": [
- 3
- ]
- }
- },
- {
- "id": "2",
- "bidfloor": 0.5,
- "tagid": "agltb3B1Yi1pbmNyDQsSBFNpdGUY7fD0FAwa",
- "instl":1,
- "banner": {
- "w": 0,
- "h": 0,
- "pos": 2,
- "btype": [
- 4
- ],
- "battr": [
- 14
- ],
- "api": [
- 3
- ]
- }
- }
- ],
- "app": {
- "id": "agltb3B1Yi1pbmNyDAsSA0FwcBiJkfIUDA",
- "name": "Yahoo Weather",
- "cat": [
- "IAB15",
- "IAB15-10"
- ],
- "ver": "1.0.2",
- "bundle": "12345",
- "storeurl": "https://itunes.apple.com/id628677149",
- "publisher": {
- "id": "agltb3B1Yi1pbmNyDAsSA0FwcBiJkfTUCV",
- "name": "yahoo",
- "domain": "www.yahoo.com"
- }
- },
- "device": {
- "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 6_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3",
- "ip": "123.145.167.189",
- "ifa": "AA000DFE74168477C70D291f574D344790E0BB11",
- "carrier": "VERIZON",
- "language": "en",
- "make": "Apple",
- "model": "iPhone",
- "os": "iOS",
- "osv": "6.1",
- "js": 1,
- "connectiontype": 3,
- "devicetype": 1,
- "geo": {
- "lat": 35.012345,
- "lon": -115.12345,
- "country": "USA",
- "metro": "803",
- "region": "CA",
- "city": "Los Angeles",
- "zip": "90049"
- }
- },
- "user": {
- "id": "ffffffd5135596709273b3a1a07e466ea2bf4fff",
- "yob": 1984,
- "gender": "M"
- }
-}
diff --git a/openrtb2/testdata/bid-request/native-ad.json b/openrtb2/testdata/bid-request/native-ad.json
deleted file mode 100644
index b8f444d..0000000
--- a/openrtb2/testdata/bid-request/native-ad.json
+++ /dev/null
@@ -1,47 +0,0 @@
-{
- "id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22",
- "at": 1,
- "cur": [
- "USD"
- ],
- "imp": [
- {
- "id": "1",
- "bidfloor": 0.03,
- "native": {
- "request": "{\"native\":{\"ver\":\"1.0\",\"assets\":[ ... ]}}",
- "ver": "1.0",
- "api": [
- 3
- ],
- "battr": [
- 13,
- 14
- ]
- }
- }
- ],
- "site": {
- "id": "102855",
- "cat": [
- "IAB3-1"
- ],
- "domain": "www.foobar.com",
- "page": "http://www.foobar.com/1234.html ",
- "publisher": {
- "id": "8953",
- "name": "foobar.com",
- "cat": [
- "IAB3-1"
- ],
- "domain": "foobar.com"
- }
- },
- "device": {
- "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2",
- "ip": "123.145.167.10"
- },
- "user": {
- "id": "55816b39711f9b5acf3b90e313ed29e51665623f"
- }
-}
diff --git a/openrtb2/testdata/bid-request/pmp-with-direct-deal.json b/openrtb2/testdata/bid-request/pmp-with-direct-deal.json
deleted file mode 100644
index 51e8adb..0000000
--- a/openrtb2/testdata/bid-request/pmp-with-direct-deal.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22",
- "at": 1,
- "cur": [
- "USD"
- ],
- "imp": [
- {
- "id": "1",
- "bidfloor": 0.03,
- "banner": {
- "h": 250,
- "w": 300
- },
- "pmp": {
- "private_auction": 1,
- "deals": [
- {
- "id": "AB-Agency1-0001",
- "at": 1,
- "bidfloor": 2.5,
- "wseat": [
- "Agency1"
- ]
- },
- {
- "id": "XY-Agency2-0001",
- "at": 2,
- "bidfloor": 2,
- "wseat": [
- "Agency2"
- ]
- }
- ]
- }
- }
- ],
- "site": {
- "id": "102855",
- "domain": "www.foobar.com",
- "cat": [
- "IAB3-1"
- ],
- "page": "http://www.foobar.com/1234.html",
- "publisher": {
- "id": "8953",
- "name": "foobar.com",
- "cat": [
- "IAB3-1"
- ],
- "domain": "foobar.com"
- }
- },
- "device": {
- "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2",
- "ip": "123.145.167.10"
- },
- "user": {
- "id": "55816b39711f9b5acf3b90e313ed29e51665623f"
- }
-}
diff --git a/openrtb2/testdata/bid-request/simple-banner.json b/openrtb2/testdata/bid-request/simple-banner.json
deleted file mode 100644
index 490c4d0..0000000
--- a/openrtb2/testdata/bid-request/simple-banner.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22",
- "at": 1,
- "cur": [
- "USD"
- ],
- "imp": [
- {
- "id": "1",
- "bidfloor": 0.03,
- "banner": {
- "h": 250,
- "w": 300
- }
- }
- ],
- "site": {
- "id": "102855",
- "cat": [
- "IAB3-1"
- ],
- "domain": "www.foobar.com",
- "page": "http://www.foobar.com/1234.html ",
- "publisher": {
- "id": "8953",
- "name": "foobar.com",
- "cat": [
- "IAB3-1"
- ],
- "domain": "foobar.com"
- }
- },
- "device": {
- "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2",
- "ip": "123.145.167.10"
- },
- "user": {
- "id": "55816b39711f9b5acf3b90e313ed29e51665623f"
- }
-}
diff --git a/openrtb2/testdata/bid-request/video.json b/openrtb2/testdata/bid-request/video.json
deleted file mode 100644
index b61f04e..0000000
--- a/openrtb2/testdata/bid-request/video.json
+++ /dev/null
@@ -1,132 +0,0 @@
-{
- "id": "1234567893",
- "at": 2,
- "tmax": 120,
- "imp": [
- {
- "id": "1",
- "bidfloor": 0.03,
- "video": {
- "w": 640,
- "h": 480,
- "pos": 1,
- "minduration": 5,
- "maxduration": 30,
- "maxextended": 30,
- "minbitrate": 300,
- "maxbitrate": 1500,
- "api": [
- 1,
- 2
- ],
- "protocols": [
- 2,
- 3
- ],
- "mimes": [
- "video/x-flv",
- "video/mp4",
- "application/x-shockwave-flash",
- "application/javascript"
- ],
- "linearity": 1,
- "boxingallowed": 1,
- "playbackmethod": [
- 1,
- 3
- ],
- "delivery": [
- 2
- ],
- "battr": [
- 13,
- 14
- ],
- "companionad": [
- {
- "id": "1234567893-1",
- "w": 300,
- "h": 250,
- "pos": 1,
- "battr": [
- 13,
- 14
- ],
- "expdir": [
- 2,
- 4
- ]
- },
- {
- "id": "1234567893-2",
- "w": 728,
- "h": 90,
- "pos": 1,
- "battr": [
- 13,
- 14
- ]
- }
- ],
- "companiontype": [
- 1,
- 2
- ]
- }
- }
- ],
- "site": {
- "id": "1345135123",
- "name": "Site ABCD",
- "domain": "siteabcd.com",
- "cat": [
- "IAB2-1",
- "IAB2-2"
- ],
- "page": "http://siteabcd.com/page.htm",
- "ref": "http://referringsite.com/referringpage.htm",
- "privacypolicy": 1,
- "publisher": {
- "id": "pub12345",
- "name": "Publisher A"
- },
- "content": {
- "id": "1234567",
- "series": "All About Cars",
- "season": "2",
- "episode": 23,
- "title": "Car Show",
- "cat": [
- "IAB2-2"
- ],
- "keywords": "keyword-a,keyword-b,keyword-c"
- }
- },
- "device": {
- "ip": "64.124.253.1",
- "ua": "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16",
- "os": "OS X",
- "flashver": "10.1",
- "js": 1
- },
- "user": {
- "id": "456789876567897654678987656789",
- "buyeruid": "545678765467876567898765678987654",
- "data": [
- {
- "id": "6",
- "name": "Data Provider 1",
- "segment": [
- {
- "id": "12341318394918",
- "name": "auto intenders"
- },
- {
- "id": "1234131839491234",
- "name": "auto enthusiasts"
- }
- ]
- }
- ]
- }
-}
diff --git a/openrtb2/testdata/bid-response/2.5/ad-served-on-win-notice.json b/openrtb2/testdata/bid-response/2.5/ad-served-on-win-notice.json
new file mode 100644
index 0000000..621b4cb
--- /dev/null
+++ b/openrtb2/testdata/bid-response/2.5/ad-served-on-win-notice.json
@@ -0,0 +1,34 @@
+{
+ "id": "1234567890",
+ "bidid": "abc1123",
+ "cur": "USD",
+ "seatbid": [
+ {
+ "seat": "512",
+ "bid": [
+ {
+ "id": "1",
+ "impid": "102",
+ "price": 9.43,
+ "nurl": "http://adserver.com/winnotice?impid=102",
+ "iurl": "http://adserver.com/pathtosampleimage",
+ "adomain": [
+ "advertiserdomain.com"
+ ],
+ "cid": "campaign111",
+ "crid": "creative112",
+ "attr": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 12
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/openrtb2/testdata/bid-response/2.5/direct-deal-ad-served-on-win-notice.json b/openrtb2/testdata/bid-response/2.5/direct-deal-ad-served-on-win-notice.json
new file mode 100644
index 0000000..0aabb0d
--- /dev/null
+++ b/openrtb2/testdata/bid-response/2.5/direct-deal-ad-served-on-win-notice.json
@@ -0,0 +1,32 @@
+{
+ "id": "1234567890",
+ "bidid": "abc1123",
+ "cur": "USD",
+ "seatbid": [
+ {
+ "seat": "512",
+ "bid": [
+ {
+ "id": "1",
+ "impid": "102",
+ "price": 5,
+ "dealid": "ABC-1234-6789",
+ "nurl": "http: //adserver.com/winnotice?impid=102",
+ "adomain": [
+ "advertiserdomain.com"
+ ],
+ "iurl": "http: //adserver.com/pathtosampleimage",
+ "cid": "campaign111",
+ "crid": "creative112",
+ "adid": "314",
+ "attr": [
+ 1,
+ 2,
+ 3,
+ 4
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/openrtb2/testdata/bid-response/2.5/native-markup-returned-inline.json b/openrtb2/testdata/bid-response/2.5/native-markup-returned-inline.json
new file mode 100644
index 0000000..6ad0341
--- /dev/null
+++ b/openrtb2/testdata/bid-response/2.5/native-markup-returned-inline.json
@@ -0,0 +1,16 @@
+{
+ "id": "123",
+ "seatbid": [
+ {
+ "bid": [
+ {
+ "id": "12345",
+ "impid": "2",
+ "price": 3,
+ "nurl": "http://example.com/winnoticeurl",
+ "adm": "{\"native\":{\"ver\":\"1.0\",\"link\":{ ... },\"imptrackers\":[ ... ],\"assets\":[ ... ]}}"
+ }
+ ]
+ }
+ ]
+}
diff --git a/openrtb2/testdata/bid-response/2.5/vast-xml-document-returned-inline.json b/openrtb2/testdata/bid-response/2.5/vast-xml-document-returned-inline.json
new file mode 100644
index 0000000..781eeac
--- /dev/null
+++ b/openrtb2/testdata/bid-response/2.5/vast-xml-document-returned-inline.json
@@ -0,0 +1,16 @@
+{
+ "id": "123",
+ "seatbid": [
+ {
+ "bid": [
+ {
+ "id": "12345",
+ "impid": "2",
+ "price": 3,
+ "nurl": "http://example.com/winnoticeurl",
+ "adm": "\n\n\n\nSpotXchange\n\n \n\nhttp://sample.com\n\n\n\n \n\n\n00:00:30\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
+ }
+ ]
+ }
+ ]
+}
diff --git a/openrtb2/testdata/bid-response/2.6/ad-served-on-win-notice.json b/openrtb2/testdata/bid-response/2.6/ad-served-on-win-notice.json
new file mode 100644
index 0000000..621b4cb
--- /dev/null
+++ b/openrtb2/testdata/bid-response/2.6/ad-served-on-win-notice.json
@@ -0,0 +1,34 @@
+{
+ "id": "1234567890",
+ "bidid": "abc1123",
+ "cur": "USD",
+ "seatbid": [
+ {
+ "seat": "512",
+ "bid": [
+ {
+ "id": "1",
+ "impid": "102",
+ "price": 9.43,
+ "nurl": "http://adserver.com/winnotice?impid=102",
+ "iurl": "http://adserver.com/pathtosampleimage",
+ "adomain": [
+ "advertiserdomain.com"
+ ],
+ "cid": "campaign111",
+ "crid": "creative112",
+ "attr": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 12
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/openrtb2/testdata/bid-response/2.6/direct-deal-ad-served-on-win-notice.json b/openrtb2/testdata/bid-response/2.6/direct-deal-ad-served-on-win-notice.json
new file mode 100644
index 0000000..0aabb0d
--- /dev/null
+++ b/openrtb2/testdata/bid-response/2.6/direct-deal-ad-served-on-win-notice.json
@@ -0,0 +1,32 @@
+{
+ "id": "1234567890",
+ "bidid": "abc1123",
+ "cur": "USD",
+ "seatbid": [
+ {
+ "seat": "512",
+ "bid": [
+ {
+ "id": "1",
+ "impid": "102",
+ "price": 5,
+ "dealid": "ABC-1234-6789",
+ "nurl": "http: //adserver.com/winnotice?impid=102",
+ "adomain": [
+ "advertiserdomain.com"
+ ],
+ "iurl": "http: //adserver.com/pathtosampleimage",
+ "cid": "campaign111",
+ "crid": "creative112",
+ "adid": "314",
+ "attr": [
+ 1,
+ 2,
+ 3,
+ 4
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/openrtb2/testdata/bid-response/2.6/native-markup-returned-inline.json b/openrtb2/testdata/bid-response/2.6/native-markup-returned-inline.json
new file mode 100644
index 0000000..6ad0341
--- /dev/null
+++ b/openrtb2/testdata/bid-response/2.6/native-markup-returned-inline.json
@@ -0,0 +1,16 @@
+{
+ "id": "123",
+ "seatbid": [
+ {
+ "bid": [
+ {
+ "id": "12345",
+ "impid": "2",
+ "price": 3,
+ "nurl": "http://example.com/winnoticeurl",
+ "adm": "{\"native\":{\"ver\":\"1.0\",\"link\":{ ... },\"imptrackers\":[ ... ],\"assets\":[ ... ]}}"
+ }
+ ]
+ }
+ ]
+}
diff --git a/openrtb2/testdata/bid-response/2.6/vast-xml-document-returned-inline.json b/openrtb2/testdata/bid-response/2.6/vast-xml-document-returned-inline.json
new file mode 100644
index 0000000..b2f09f0
--- /dev/null
+++ b/openrtb2/testdata/bid-response/2.6/vast-xml-document-returned-inline.json
@@ -0,0 +1,16 @@
+{
+ "id": "123",
+ "seatbid": [
+ {
+ "bid": [
+ {
+ "id": "12345",
+ "impid": "2",
+ "price": 3,
+ "nurl": "http://example.com/winnoticeurl",
+ "adm": "\n\n\n\nSpotXchange\n\n\n\nhttp://sample.com\n\n\n\n \n\n\n00:00:30\n < /TrackingEvents>\n\n\n\n\n VideoClicks >\n< MediaFiles >\n < MediaFile delivery =\"progressive\" bitrate=\"256\" width=\"640\" height=\"480\" type=\"video/mp4\">\n\n< /MediaFile>\n\n < /Linear>\n< /Creative>\n\n < /InLine>\n\n < /VAST>"
+ }
+ ]
+ }
+ ]
+}
diff --git a/openrtb2/testdata/bid-response/ad-served-on-win-notice.json b/openrtb2/testdata/bid-response/ad-served-on-win-notice.json
deleted file mode 100644
index 8415659..0000000
--- a/openrtb2/testdata/bid-response/ad-served-on-win-notice.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "id": "1234567890",
- "bidid": "abc1123",
- "cur": "USD",
- "seatbid": [
- {
- "seat": "512",
- "bid": [
- {
- "id": "1",
- "impid": "102",
- "price": 9.43,
- "nurl": "http://adserver.com/winnotice?impid=102",
- "iurl": "http://adserver.com/pathtosampleimage",
- "adomain": [
- "advertiserdomain.com"
- ],
- "cid": "campaign111",
- "crid": "creative112",
- "attr": [
- 1,
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 12
- ]
- }
- ]
- }
- ]
-}
diff --git a/openrtb2/testdata/bid-response/direct-deal-ad-served-on-win-notice.json b/openrtb2/testdata/bid-response/direct-deal-ad-served-on-win-notice.json
deleted file mode 100644
index 423c3e9..0000000
--- a/openrtb2/testdata/bid-response/direct-deal-ad-served-on-win-notice.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "id": "1234567890",
- "bidid": "abc1123",
- "cur": "USD",
- "seatbid": [
- {
- "seat": "512",
- "bid": [
- {
- "id": "1",
- "impid": "102",
- "price": 5,
- "dealid": "ABC-1234-6789",
- "nurl": "http: //adserver.com/winnotice?impid=102",
- "adomain": [
- "advertiserdomain.com"
- ],
- "iurl": "http: //adserver.com/pathtosampleimage",
- "cid": "campaign111",
- "crid": "creative112",
- "adid": "314",
- "attr": [
- 1,
- 2,
- 3,
- 4
- ]
- }
- ]
- }
- ]
-}
diff --git a/openrtb2/testdata/bid-response/native-markup-returned-inline.json b/openrtb2/testdata/bid-response/native-markup-returned-inline.json
deleted file mode 100644
index bf4b292..0000000
--- a/openrtb2/testdata/bid-response/native-markup-returned-inline.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "id": "123",
- "seatbid": [
- {
- "bid": [
- {
- "id": "12345",
- "impid": "2",
- "price": 3,
- "nurl": "http://example.com/winnoticeurl",
- "adm": "{\"native\":{\"ver\":\"1.0\",\"link\":{ ... },\"imptrackers\":[ ... ],\"assets\":[ ... ]}}"
- }
- ]
- }
- ]
-}
diff --git a/openrtb2/testdata/bid-response/vast-xml-document-returned-inline.json b/openrtb2/testdata/bid-response/vast-xml-document-returned-inline.json
deleted file mode 100644
index 8529bd6..0000000
--- a/openrtb2/testdata/bid-response/vast-xml-document-returned-inline.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "id": "123",
- "seatbid": [
- {
- "bid": [
- {
- "id": "12345",
- "impid": "2",
- "price": 3,
- "nurl": "http://example.com/winnoticeurl",
- "adm": "\n\n\n\nSpotXchange\n\n \n\nhttp://sample.com\n\n\n\n \n\n\n00:00:30\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
- }
- ]
- }
- ]
-}
diff --git a/openrtb2/uid.go b/openrtb2/uid.go
new file mode 100644
index 0000000..44ed0fa
--- /dev/null
+++ b/openrtb2/uid.go
@@ -0,0 +1,40 @@
+package openrtb2
+
+import (
+ "encoding/json"
+
+ "github.com/mxmCherry/openrtb/v16/adcom1"
+)
+
+// 3.2.28 Object: UID
+//
+// This object contains a single user identifier provided as part of extended identifiers.
+// The exchange should ensure that business agreements allow for the sending of this data.
+type UID struct {
+
+ // Attribute:
+ // id
+ // Type:
+ // string
+ // Description:
+ // The identifier for the user.
+ ID string `json:"id,omitempty"`
+
+ // Attribute:
+ // atype
+ // Type:
+ // object array
+ // Description:
+ // Type of user agent the ID is from. It is highly recommended to set this, as
+ // many DSPs separate app-native IDs from browser-based IDs and require a type
+ // value for ID resolution. Refer to List: Agent Types in AdCOM 1.0
+ AType adcom1.AgentType `json:"atype,omitempty"`
+
+ // Attribute:
+ // ext
+ // Type:
+ // object
+ // Description:
+ // Placeholder for advertising-system specific extensions to this object.
+ Ext json.RawMessage `json:"ext,omitempty"`
+}
diff --git a/openrtb2/user.go b/openrtb2/user.go
index 271c3a8..a96702d 100644
--- a/openrtb2/user.go
+++ b/openrtb2/user.go
@@ -30,7 +30,7 @@ type User struct {
// Attribute:
// yob
// Type:
- // integer
+ // integer; DEPRECATED
// Description:
// Year of birth as a 4-digit integer.
Yob int64 `json:"yob,omitempty"`
@@ -38,7 +38,7 @@ type User struct {
// Attribute:
// gender
// Type:
- // string
+ // string; DEPRECATED
// Description:
// Gender, where “M” = male, “F” = female, “O” = known to be
// other (i.e., omitted is unknown).
@@ -49,9 +49,19 @@ type User struct {
// Type:
// string
// Description:
- // Comma separated list of keywords, interests, or intent.
+ // Comma separated list of keywords, interests, or intent. Only
+ // one of ‘keywords’ or ‘kwarray’ may be present.
Keywords string `json:"keywords,omitempty"`
+ // Attribute:
+ // kwarray
+ // Type:
+ // string
+ // Description:
+ // Array of keywords about the site. Only one of ‘keywords’ or
+ // ‘kwarray’ may be present.
+ KwArray []string `json:"kwarray,omitempty"`
+
// Attribute:
// customdata
// Type:
@@ -81,6 +91,25 @@ type User struct {
// represents a different data source.
Data []Data `json:"data,omitempty"`
+ // Attribute:
+ // consent
+ // Type:
+ // string
+ // Description:
+ // When GDPR regulations are in effect this attribute contains
+ // the Transparency and Consent Framework’s Consent String
+ // data structure.
+ Consent string `json:"consent,omitempty"`
+
+ // Attribute:
+ // eids
+ // Type:
+ // object array
+ // Description:
+ // Details for support of a standard protocol for multiple third
+ // party identity providers (Section 3.2.27)
+ EIDs []EID `json:"eids,omitempty"`
+
// Attribute:
// ext
// Type:
diff --git a/openrtb2/user_agent.go b/openrtb2/user_agent.go
new file mode 100644
index 0000000..e145ff8
--- /dev/null
+++ b/openrtb2/user_agent.go
@@ -0,0 +1,90 @@
+package openrtb2
+
+import (
+ "encoding/json"
+
+ "github.com/mxmCherry/openrtb/v16/adcom1"
+)
+
+// 3.2.29 Object: UserAgent
+//
+// This object contains a single user identifier provided as part of extended identifiers.
+// The exchange should ensure that business agreements allow for the sending of this data.
+type UserAgent struct {
+
+ // Attribute:
+ // browsers
+ // Type:
+ // object array; recommended
+ // Description:
+ // Each BrandVersion object (see Section 3.2.30) identifies a browser or similar
+ // software component. Implementers should send brands and versions
+ // derived from the Sec-CH-UA-Full-Version-List header.
+ Browsers []BrandVersion `json:"browsers,omitempty"`
+
+ // Attribute:
+ // platform
+ // Type:
+ // object; recommended
+ // Description:
+ // A BrandVersion object (see Section 3.2.30) that identifies the user agent’s
+ // execution platform / OS. Implementers should send a brand derived from the
+ // Sec-CH-UA-Platform header, and version derived from the Sec-CH-UA-
+ // Platform-Version header.
+ Platform *BrandVersion `json:"platform,omitempty"`
+
+ // Attribute:
+ // mobile
+ // Type:
+ // integer
+ // Description:
+ // 1 if the agent prefers a “mobile” version of the content, if available, i.e.
+ // optimized for small screens or touch input. 0 if the agent prefers the “desktop”
+ // or “full” content. Implementers should derive this value from the Sec-CH-UA-
+ // Mobile header.
+ Mobile *int8 `json:"mobile,omitempty"`
+
+ // Attribute:
+ // architecture
+ // Type:
+ // string
+ // Description:
+ // Device’s major binary architecture, e.g. “x86” or “arm”. Implementers should
+ // retrieve this value from the Sec-CH-UA-Arch header.
+ Architecture string `json:"architecture,omitempty"`
+
+ // Attribute:
+ // bitness
+ // Type:
+ // string
+ // Description:
+ // Device’s bitness, e.g. “64” for 64-bit architecture. Implementers should
+ // retrieve this value from the Sec-CH-UA-Bitness header.
+ Bitness string `json:"bitness,omitempty"`
+
+ // Attribute:
+ // model
+ // Type:
+ // string
+ // Description:
+ // Device model. Implementers should retrieve this value from the Sec-CH-UA-
+ // Model header.
+ Model string `json:"model,omitempty"`
+
+ // Attribute:
+ // source
+ // Type:
+ // integer; default 0
+ // Description:
+ // The source of data used to create this object, List: User-Agent Source in
+ // AdCOM 1.0.
+ Source adcom1.UserAgentSource `json:"source,omitempty"`
+
+ // Attribute:
+ // ext
+ // Type:
+ // object
+ // Description:
+ // Placeholder for advertising-system specific extensions to this object.
+ Ext json.RawMessage `json:"ext,omitempty"`
+}
diff --git a/openrtb2/video.go b/openrtb2/video.go
index 19702e0..113ac67 100644
--- a/openrtb2/video.go
+++ b/openrtb2/video.go
@@ -1,6 +1,10 @@
package openrtb2
-import "encoding/json"
+import (
+ "encoding/json"
+
+ "github.com/mxmCherry/openrtb/v16/adcom1"
+)
// 3.2.7 Object: Video
//
@@ -26,39 +30,81 @@ type Video struct {
// Attribute:
// minduration
// Type:
- // integer; recommended
- // Description:
- // Minimum video ad duration in seconds.
+ // integer; default 0; recommended
+ // Definition:
+ // Minimum video ad duration in seconds. This field is mutually
+ // exclusive with rqddurs; only one of minduration and rqddurs
+ // may be in a bid request.
MinDuration int64 `json:"minduration,omitempty"`
// Attribute:
// maxduration
// Type:
// integer; recommended
- // Description:
- // Maximum video ad duration in seconds.
+ // Definition:
+ // Maximum video ad duration in seconds. This field is mutually
+ // exclusive with rqddurs; only one of maxduration and rqddurs
+ // may be in a bid request.
MaxDuration int64 `json:"maxduration,omitempty"`
+ // Attribute:
+ // startdelay
+ // Type:
+ // integer; recommended
+ // Definition:
+ // Indicates the start delay in seconds for pre-roll, mid-roll, or
+ // post-roll ad placements. Refer to List: Start Delay Modes
+ // in AdCOM 1.0.
+ StartDelay *adcom1.StartDelay `json:"startdelay,omitempty"`
+
+ // Attribute:
+ // maxseq
+ // Type:
+ // integer; recommended
+ // Definition:
+ // Indicates the maximum number of ads that may be served into
+ // a “dynamic” video ad pod (where the precise number of ads is
+ // not predetermined by the seller). See Section 7.6 for more
+ // details.
+ MaxSeq int64 `json:"maxseq,omitempty"`
+
+ // Attribute:
+ // poddur
+ // Type:
+ // integer; recommended
+ // Definition:
+ // Indicates the total amount of time in seconds that advertisers
+ // may fill for a “dynamic” video ad pod (See Section 7.6 for more
+ // details), or the dynamic portion of a “hybrid” ad pod. This field
+ // is required only for the dynamic portion(s) of video ad pods.
+ // This field refers to the length of the entire ad break, whereas
+ // minduration/maxduration/rqddurs are constraints relating to
+ // the slots that make up the pod.
+ PodDur int64 `json:"poddur,omitempty"`
+
// Attribute:
// protocols
// Type:
// integer array; recommended
- // Description:
- // Array of supported video protocols. Refer to List 5.8. At least
- // one supported protocol must be specified in either the
- // protocol or protocols attribute.
- Protocols []Protocol `json:"protocols,omitempty"`
+ // Definition:
+ // Array of supported video protocols. Refer to List: Creative
+ // Subtypes - Audio/Video in AdCOM 1.0.
+ // Note:
+ // OpenRTB <=2.5 defined only protocols 1..10.
+ Protocols []adcom1.MediaCreativeSubtype `json:"protocols,omitempty"`
// Attribute:
// protocol
// Type:
- // integer; DEPRECATED
+ // integer; DEPRECATED; REMOVED in OpenRTB 2.6
// Description:
// NOTE: Deprecated in favor of protocols.
// Supported video protocol. Refer to List 5.8. At least one
// supported protocol must be specified in either the protocol
// or protocols attribute.
- Protocol Protocol `json:"protocol,omitempty"`
+ // Note:
+ // OpenRTB <=2.5 defined only protocols 1..10.
+ Protocol adcom1.MediaCreativeSubtype `json:"protocol,omitempty"`
// Attribute:
// w
@@ -77,22 +123,48 @@ type Video struct {
H int64 `json:"h,omitempty"`
// Attribute:
- // startdelay
+ // podid
// Type:
- // integer; recommended
- // Description:
- // Indicates the start delay in seconds for pre-roll, mid-roll, or
- // post-roll ad placements. Refer to List 5.12 for additional
- // generic values.
- StartDelay *StartDelay `json:"startdelay,omitempty"`
+ // integer
+ // Definition:
+ // Unique identifier indicating that an impression opportunity
+ // belongs to a video ad pod. If multiple impression opportunities
+ // within a bid request share the same podid, this indicates that
+ // those impression opportunities belong to the same video ad
+ // pod.
+ PodID int64 `json:"podid,omitempty"`
+
+ // Attribute:
+ // podseq
+ // Type:
+ // integer; default 0
+ // Definition:
+ // The sequence (position) of the video ad pod within a
+ // content stream. Refer to List: Pod Sequence in AdCOM 1.0
+ // for guidance on the use of this field.
+ PodSeq adcom1.PodSequence `json:"podseq,omitempty"`
+
+ // Attribute:
+ // rqddurs
+ // Type:
+ // integer array
+ // Definition:
+ // Precise acceptable durations for video creatives in
+ // seconds. This field specifically targets the Live TV use case
+ // where non-exact ad durations would result in undesirable
+ // ‘dead air’. This field is mutually exclusive with minduration
+ // and maxduration; if rqddurs is specified, minduration and
+ // maxduration must not be specified and vice versa.
+ RqdDurs []int64 `json:"rqddurs,omitempty"`
// Attribute:
// placement
// Type:
// integer
// Description:
- // Placement type for the impression. Refer to List 5.9.
- Placement VideoPlacementType `json:"placement,omitempty"`
+ // Video placement type for the impression. Refer to List:
+ // Placement Subtypes - Video in AdCOM 1.0.
+ Placement adcom1.VideoPlacementSubtype `json:"placement,omitempty"`
// Attribute:
// linearity
@@ -100,8 +172,11 @@ type Video struct {
// integer
// Description:
// Indicates if the impression must be linear, nonlinear, etc. If
- // none specified, assume all are allowed. Refer to List 5.7.
- Linearity VideoLinearity `json:"linearity,omitempty"`
+ // none specified, assume all are allowed. Refer to List: Linearity
+ // Modes in AdCOM 1.0. Note that this field describes the
+ // expected VAST response and not whether a placement is in-
+ // stream, out-stream, etc. For that, see placement.
+ Linearity adcom1.LinearityMode `json:"linearity,omitempty"`
// Attribute:
// skip
@@ -112,7 +187,8 @@ type Video struct {
// where 0 = no, 1 = yes.
// If a bidder sends markup/creative that is itself skippable, the
// Bid object should include the attr array with an element of
- // 16 indicating skippable video. Refer to List 5.3.
+ // 16 indicating skippable video. Refer to List: Creative
+ // Attributes in AdCOM 1.0.
Skip *int8 `json:"skip,omitempty"`
// Attribute:
@@ -136,20 +212,44 @@ type Video struct {
// Attribute:
// sequence
// Type:
- // integer
+ // integer; default 0; DEPRECATED
// Description:
// If multiple ad impressions are offered in the same bid request,
// the sequence number will allow for the coordinated delivery
// of multiple creatives.
Sequence int8 `json:"sequence,omitempty"`
+ // Attribute:
+ // slotinpod
+ // Type:
+ // integer; default 0
+ // Description:
+ // For video ad pods, this value indicates that the seller can
+ // guarantee delivery against the indicated slot position in the
+ // pod. Refer to List: Slot Position in Pod in AdCOM 1.0 guidance
+ // on the use of this field.
+ SlotInPod adcom1.SlotPositionInPod `json:"slotinpod,omitempty"`
+
+ // Attribute:
+ // mincpmpersec
+ // Type:
+ // float
+ // Description:
+ // Minimum CPM per second. This is a price floor for the
+ // "dynamic" portion of a video ad pod, relative to the duration
+ // of bids an advertiser may submit.
+ MinCPMPerSec float64 `json:"mincpmpersec,omitempty"`
+
// Attribute:
// battr
// Type:
// integer array
// Description:
- // Blocked creative attributes. Refer to List 5.3.
- BAttr []CreativeAttribute `json:"battr,omitempty"`
+ // Blocked creative attributes. Refer to List: Creative Attributes in
+ // AdCOM 1.0
+ // Note:
+ // OpenRTB <=2.5 defined only attributes 1..17.
+ BAttr []adcom1.CreativeAttribute `json:"battr,omitempty"`
// Attribute:
// maxextended
@@ -194,20 +294,24 @@ type Video struct {
// integer array
// Description:
// Playback methods that may be in use. If none are specified,
- // any method may be used. Refer to List 5.10. Only one
- // method is typically used in practice. As a result, this array may
- // be converted to an integer in a future version of the
- // specification. It is strongly advised to use only the first
- // element of this array in preparation for this change.
- PlaybackMethod []PlaybackMethod `json:"playbackmethod,omitempty"`
+ // any method may be used. Refer to List: Playback Methods
+ // in AdCOM 1.0. Only one method is typically used in practice.
+ // As a result, this array may be converted to an integer in a
+ // future version of the specification. It is strongly advised to use
+ // only the first element of this array in preparation for this
+ // change.
+ // Note:
+ // OpenRTB <=2.5 defined only methods 1..6.
+ PlaybackMethod []adcom1.PlaybackMethod `json:"playbackmethod,omitempty"`
// Attribute:
// playbackend
// Type:
// integer
// Description:
- // The event that causes playback to end. Refer to List 5.11.
- PlaybackEnd PlaybackCessationMode `json:"playbackend,omitempty"`
+ // The event that causes playback to end. Refer to List: Playback
+ // Cessation Modes in AdCOM 1.0.
+ PlaybackEnd adcom1.PlaybackCessationMode `json:"playbackend,omitempty"`
// Attribute:
// delivery
@@ -215,16 +319,18 @@ type Video struct {
// integer array
// Description:
// Supported delivery methods (e.g., streaming, progressive). If
- // none specified, assume all are supported. Refer to List 5.15.
- Delivery []ContentDeliveryMethod `json:"delivery,omitempty"`
+ // none specified, assume all are supported. Refer to List:
+ // Delivery Methods in AdCOM 1.0.
+ Delivery []adcom1.DeliveryMethod `json:"delivery,omitempty"`
// Attribute:
// pos
// Type:
// integer
// Description:
- // Ad position on screen. Refer to List 5.4.
- Pos *AdPosition `json:"pos,omitempty"`
+ // Ad position on screen. Refer to List: Placement Positions in
+ // AdCOM 1.0.
+ Pos adcom1.PlacementPosition `json:"pos,omitempty"`
// Attribute:
// companionad
@@ -241,21 +347,24 @@ type Video struct {
// integer array
// Description:
// List of supported API frameworks for this impression. Refer to
- // List 5.6. If an API is not explicitly listed, it is assumed not to be
- // supported.
- API []APIFramework `json:"api,omitempty"`
+ // List: API Frameworks in AdCOM 1.0. If an API is not explicitly
+ // listed, it is assumed not to be supported.
+ // Note:
+ // OpenRTB <=2.5 defined only frameworks 1..6.
+ API []adcom1.APIFramework `json:"api,omitempty"`
// Attribute:
// companiontype
// Type:
// integer array
// Description:
- // Supported VAST companion ad types. Refer to List 5.14.
- // Recommended if companion Banner objects are included via
- // the companionad array. If one of these banners will be
+ // Supported VAST companion ad types. Refer to List:
+ // Companion Types in AdCOM 1.0. Recommended if
+ // companion Banner objects are included via the
+ // companionad array. If one of these banners will be
// rendered as an end-card, this can be specified using the vcm
// attribute with the particular banner (Section 3.2.6).
- CompanionType []CompanionType `json:"companiontype,omitempty"`
+ CompanionType []adcom1.CompanionType `json:"companiontype,omitempty"`
// Attribute:
// ext
diff --git a/openrtb2/video_linearity.go b/openrtb2/video_linearity.go
deleted file mode 100644
index 07fc9bb..0000000
--- a/openrtb2/video_linearity.go
+++ /dev/null
@@ -1,16 +0,0 @@
-package openrtb2
-
-// 5.7 Video Linearity
-//
-// Options for video linearity.
-// “In-stream” or “linear” video refers to preroll, post-roll, or mid-roll video ads where the user is forced to watch ad in order to see the video content.
-// “Overlay” or “non-linear” refer to ads that are shown on top of the video content.
-//
-// This OpenRTB list has values derived from the Inventory Quality Guidelines (IQG).
-// Practitioners should keep in sync with updates to the IQG values.
-type VideoLinearity int8
-
-const (
- VideoLinearityLinearInStream VideoLinearity = 1 // Linear / In-Stream
- VideoLinearityNonLinearOverlay VideoLinearity = 2 // Non-Linear / Overlay
-)
diff --git a/openrtb2/video_placement_type.go b/openrtb2/video_placement_type.go
deleted file mode 100644
index 41b6042..0000000
--- a/openrtb2/video_placement_type.go
+++ /dev/null
@@ -1,14 +0,0 @@
-package openrtb2
-
-// 5.9 Video Placement Types
-//
-// Various types of video placements derived largely from the IAB Digital Video Guidelines.
-type VideoPlacementType int8
-
-const (
- VideoPlacementTypeInStream VideoPlacementType = 1 // In-Stream. Played before, during or after the streaming video content that the consumer has requested (e.g., Pre-roll, Mid-roll, Post-roll).
- VideoPlacementTypeInBanner VideoPlacementType = 2 // In-Banner. Exists within a web banner that leverages the banner space to deliver a video experience asopposed to another static or rich media format. The format relies on the existence of displayad inventory on the page for its delivery.
- VideoPlacementTypeInArticle VideoPlacementType = 3 // In-Article. Loads and plays dynamically between paragraphs of editorial content; existing as a standalonebranded message.
- VideoPlacementTypeInFeed VideoPlacementType = 4 // In-Feed. Found in content, social, or product feeds.
- VideoPlacementTypeInterstitialSliderFloating VideoPlacementType = 5 // Interstitial/Slider/Floating. Covers the entire or a portion of screen area, but is always on screen while displayed (i.e.cannot be scrolled out of view). Note that a full-screen interstitial (e.g., in mobile) can bedistinguished from a floating/slider unit by the imp.instl field.
-)
diff --git a/openrtb2/volume_normalization_mode.go b/openrtb2/volume_normalization_mode.go
deleted file mode 100644
index 44e6475..0000000
--- a/openrtb2/volume_normalization_mode.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package openrtb2
-
-// 5.17 Volume Normalization Modes
-//
-// Types of volume normalization modes, typically for audio.
-type VolumeNormalizationMode int8
-
-const (
- VolumeNormalizationModeNone VolumeNormalizationMode = 0 // None
- VolumeNormalizationModeAdVolumeAverageNormalizedToContent VolumeNormalizationMode = 1 // Ad Volume Average Normalized to Content
- VolumeNormalizationModeAdVolumePeakNormalizedToContent VolumeNormalizationMode = 2 // Ad Volume Peak Normalized to Content
- VolumeNormalizationModeAdLoudnessNormalizedToContent VolumeNormalizationMode = 3 // Ad Loudness Normalized to Content
- VolumeNormalizationModeCustomVolumeNormalizationMode VolumeNormalizationMode = 4 // Custom Volume Normalization
-)
-
-// Ptr returns pointer to own value.
-func (m VolumeNormalizationMode) Ptr() *VolumeNormalizationMode {
- return &m
-}
-
-// Val safely dereferences pointer, returning default value (VolumeNormalizationModeNone) for nil.
-func (m *VolumeNormalizationMode) Val() VolumeNormalizationMode {
- if m == nil {
- return VolumeNormalizationModeNone
- }
- return *m
-}
diff --git a/openrtb3/README.md b/openrtb3/README.md
index 359d54b..9f8a0a4 100644
--- a/openrtb3/README.md
+++ b/openrtb3/README.md
@@ -1,3 +1,3 @@
-# openrtb3 [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/openrtb3?status.svg)](https://pkg.go.dev/github.com/mxmCherry/openrtb/v15/openrtb3)
+# openrtb3 [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/openrtb3?status.svg)](https://pkg.go.dev/github.com/mxmCherry/openrtb/v16/openrtb3)
[OpenRTB](https://iabtechlab.com/standards/openrtb/) [3.0](https://github.com/InteractiveAdvertisingBureau/openrtb) types for [Go programming language](https://golang.org/)
diff --git a/openrtb3/auction_type.go b/openrtb3/auction_type.go
index bcaf51a..4f9d607 100644
--- a/openrtb3/auction_type.go
+++ b/openrtb3/auction_type.go
@@ -9,5 +9,5 @@ const (
SecondPricePlus = 2
DealPrice = 3 // the value passed in flr is the agreed upon deal price
- // Values greater than 500 can be used for exchange-specific auction types.
+ // Values 500 and greater can be used for exchange-specific auction types.
)
diff --git a/openrtb3/loss_reason.go b/openrtb3/loss_reason.go
index 4d4ae3f..5ee7174 100644
--- a/openrtb3/loss_reason.go
+++ b/openrtb3/loss_reason.go
@@ -7,7 +7,7 @@ type LossReason int64
// LossReason options.
//
-// Values of 500+ are exchange specific values; should be communicated with buyers a priori.
+// Values 500+ are exchange specific values; should be communicated with buyers beforehand.
const (
LossWon LossReason = 0 // Bid Won
LossInternalError LossReason = 1 // Internal Error
@@ -31,11 +31,14 @@ const (
LossSizeNotAllowed LossReason = 203 // Creative Filtered - Size Not Allowed
LossIncorrectFormat LossReason = 204 // Creative Filtered - Incorrect Creative Format
LossAdvertiserExclusions LossReason = 205 // Creative Filtered - Advertiser Exclusions
- LossNotSecure LossReason = 206 // Creative Filtered - Not Secure
- LossLanguageExclusions LossReason = 207 // Creative Filtered - Language Exclusions
- LossCategoryExclusions LossReason = 208 // Creative Filtered - Category Exclusions
- LossAttributeExclusions LossReason = 209 // Creative Filtered - Creative Attribute Exclusions
- LossAdTypeExclusions LossReason = 210 // Creative Filtered - Ad Type Exclusions
- LossAnimationTooLong LossReason = 211 // Creative Filtered - Animation Too Long
- LossNotAllowedInDeal LossReason = 212 // Creative Filtered - Not Allowed in Deal
+ LossAppStoreIDExclusions LossReason = 206 // Creative Filtered - App Store ID Exclusions (ex App Bundle Exclusions in OpenRTB <=2.5)
+ LossNotSecure LossReason = 207 // Creative Filtered - Not Secure
+ LossLanguageExclusions LossReason = 208 // Creative Filtered - Language Exclusions
+ LossCategoryExclusions LossReason = 209 // Creative Filtered - Category Exclusions
+ LossAttributeExclusions LossReason = 210 // Creative Filtered - Creative Attribute Exclusions
+ LossAdTypeExclusions LossReason = 211 // Creative Filtered - Ad Type Exclusions
+ LossAnimationTooLong LossReason = 212 // Creative Filtered - Animation Too Long
+ LossNotAllowedInDeal LossReason = 213 // Creative Filtered - Not Allowed in Deal
+ LossInvalidSKAdNetwork LossReason = 214 // Creative Filtered - Invalid SKAdNetwork
+ LossAppBundleExclusions LossReason = 215 // Creative Filtered - App Bundle Exclusions
)
diff --git a/openrtb3/no_bid_reason.go b/openrtb3/no_bid_reason.go
index 64b554d..3782204 100644
--- a/openrtb3/no_bid_reason.go
+++ b/openrtb3/no_bid_reason.go
@@ -1,13 +1,11 @@
package openrtb3
-// NoBidReason represents OpenRTB No-Bid Reason Code enumeration.
-//
-// It lists the options for a bidder to signal the exchange as to why it did not offer a bid for the item.
+// NoBidReason lists the options for a bidder to signal the exchange as to why it did not offer a bid for the item.
type NoBidReason int64
// NoBidReason options.
//
-// Values of 500+ are exchange specific values; should be communicated with buyers a priori.
+// Values 500+ are exchange specific values; should be communicated with buyers beforehand.
const (
NoBidUnknownError NoBidReason = 0 // Unknown Error
NoBidTechnicalError NoBidReason = 1 // Technical Error
@@ -25,4 +23,6 @@ const (
NoBidAuthenticationUnavailable NoBidReason = 13 // Ads.cert Authentication Unavailable
NoBidAuthenticationViolation NoBidReason = 14 // Ads.cert Authentication Violation
NoBidInsufficientTime NoBidReason = 15 // Insufficient Auction Time
+ NoBidIncompleteSupplyChain NoBidReason = 16 // Incomplete SupplyChain
+ NoBidBlockedSupplyChainNode NoBidReason = 17 // Blocked SupplyChain Node
)
diff --git a/openrtb3/openrtb3_test.go b/openrtb3/openrtb3_test.go
index 0b417f4..987c93b 100644
--- a/openrtb3/openrtb3_test.go
+++ b/openrtb3/openrtb3_test.go
@@ -5,7 +5,7 @@ import (
"io/ioutil"
"path/filepath"
- . "github.com/mxmCherry/openrtb/v15/openrtb3"
+ . "github.com/mxmCherry/openrtb/v16/openrtb3"
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/gomega"
diff --git a/openrtb3/request.go b/openrtb3/request.go
index dffd22f..c24014e 100644
--- a/openrtb3/request.go
+++ b/openrtb3/request.go
@@ -39,7 +39,7 @@ type Request struct {
// integer; default 2
// Definition:
// Auction type, where 1 = First Price, 2 = Second Price Plus.
- // Values greater than 500 can be used for exchange-specific auction types.
+ // Values 500 and greater can be used for exchange-specific auction types.
AT AuctionType `json:"at,omitempty"`
// Attribute: