diff --git a/.changeset/auction-all-pricing.md b/.changeset/auction-all-pricing.md new file mode 100644 index 00000000..e0eb046c --- /dev/null +++ b/.changeset/auction-all-pricing.md @@ -0,0 +1,32 @@ +--- +"adcontextprotocol": minor +--- + +Add auction pricing for all pricing models + +Previously only CPM and vCPM supported both fixed and auction pricing. Now all pricing models support both variants: +- CPM, vCPM (already supported) +- CPC (Cost Per Click) +- CPCV (Cost Per Completed View) +- CPV (Cost Per View) +- CPP (Cost Per Point) +- Flat Rate + +**Schema Architecture:** +Each pricing model has its own schema file that supports both fixed and auction variants using a discriminated union: +- `is_fixed: true` → uses `rate` field for fixed pricing +- `is_fixed: false` → uses `price_guidance` field for auction pricing + +**7 pricing model schemas:** +- cpm-option.json +- vcpm-option.json +- cpc-option.json +- cpcv-option.json +- cpv-option.json +- cpp-option.json +- flat-rate-option.json + +**TypeScript type safety:** +Uses proper discriminated union with `is_fixed` as the discriminator, enabling TypeScript to narrow types correctly: +- `if (opt.is_fixed) { opt.rate... }` +- `else { opt.price_guidance... }` diff --git a/docs/media-buy/advanced-topics/pricing-models.mdx b/docs/media-buy/advanced-topics/pricing-models.mdx index 77becff8..1d0595eb 100644 --- a/docs/media-buy/advanced-topics/pricing-models.mdx +++ b/docs/media-buy/advanced-topics/pricing-models.mdx @@ -118,7 +118,7 @@ By accepting the product, buyers agree to use the declared measurement provider **Use Cases**: Video campaigns, audio ads, pre-roll video -**Example**: +**Fixed Example**: ```json { "pricing_option_id": "cpcv_usd_guaranteed", @@ -129,6 +129,21 @@ By accepting the product, buyers agree to use the declared measurement provider } ``` +**Auction Example**: +```json +{ + "pricing_option_id": "cpcv_usd_auction", + "pricing_model": "cpcv", + "currency": "USD", + "is_fixed": false, + "price_guidance": { + "floor": 0.08, + "p50": 0.12, + "p75": 0.15 + } +} +``` + **Billing**: Charged only when viewer completes 100% of the video/audio ad. Completion is measured by the declared measurement provider. --- @@ -138,9 +153,10 @@ By accepting the product, buyers agree to use the declared measurement provider **Use Cases**: Video campaigns with shorter completion requirements -**Example**: +**Fixed Example**: ```json { + "pricing_option_id": "cpv_usd_50pct", "pricing_model": "cpv", "rate": 0.08, "currency": "USD", @@ -151,6 +167,24 @@ By accepting the product, buyers agree to use the declared measurement provider } ``` +**Auction Example**: +```json +{ + "pricing_option_id": "cpv_usd_50pct_auction", + "pricing_model": "cpv", + "currency": "USD", + "is_fixed": false, + "price_guidance": { + "floor": 0.04, + "p50": 0.07, + "p75": 0.10 + }, + "parameters": { + "view_threshold": 0.5 + } +} +``` + **Billing**: Charged when viewer reaches threshold (e.g., 50% completion, 30 seconds) **Parameters**: @@ -163,9 +197,10 @@ By accepting the product, buyers agree to use the declared measurement provider **Use Cases**: Connected TV, linear TV, radio, audio streaming -**Example**: +**Fixed Example**: ```json { + "pricing_option_id": "cpp_usd_a18-49", "pricing_model": "cpp", "rate": 250.00, "currency": "USD", @@ -178,6 +213,25 @@ By accepting the product, buyers agree to use the declared measurement provider } ``` +**Auction Example**: +```json +{ + "pricing_option_id": "cpp_usd_a18-49_auction", + "pricing_model": "cpp", + "currency": "USD", + "is_fixed": false, + "price_guidance": { + "floor": 150.00, + "p50": 225.00, + "p75": 275.00 + }, + "parameters": { + "demographic": "A18-49", + "min_points": 50 + } +} +``` + **Billing**: Charged per rating point delivered to target demographic **Parameters**: @@ -219,12 +273,23 @@ Buyers should verify the measurement provider meets their campaign requirements **Use Cases**: Direct response campaigns, search ads, social advertising -**Example**: +**Fixed Example**: ```json { + "pricing_option_id": "cpc_usd_fixed", "pricing_model": "cpc", "rate": 1.50, "currency": "USD", + "is_fixed": true +} +``` + +**Auction Example**: +```json +{ + "pricing_option_id": "cpc_usd_auction", + "pricing_model": "cpc", + "currency": "USD", "is_fixed": false, "price_guidance": { "floor": 0.50, @@ -243,9 +308,10 @@ Buyers should verify the measurement provider meets their campaign requirements **Use Cases**: Sponsorships, takeovers, exclusive placements, branded content -**Example**: +**Fixed Example**: ```json { + "pricing_option_id": "flat_rate_usd_takeover", "pricing_model": "flat_rate", "rate": 50000.00, "currency": "USD", @@ -253,7 +319,22 @@ Buyers should verify the measurement provider meets their campaign requirements } ``` -**Billing**: Fixed cost for the entire campaign period +**Auction Example**: +```json +{ + "pricing_option_id": "flat_rate_usd_takeover_auction", + "pricing_model": "flat_rate", + "currency": "USD", + "is_fixed": false, + "price_guidance": { + "floor": 35000.00, + "p50": 45000.00, + "p75": 55000.00 + } +} +``` + +**Billing**: Fixed cost for the entire campaign period (fixed) or auction-determined price for the placement (auction) --- @@ -335,6 +416,8 @@ Publishers can offer the same product in multiple currencies: ## Fixed vs. Auction Pricing +**All pricing models** (CPM, vCPM, CPC, CPCV, CPV, CPP, and Flat Rate) support both fixed and auction pricing variants. + ### Fixed Pricing (`is_fixed: true`) - Publisher sets a fixed rate - Rate is guaranteed and predictable @@ -344,10 +427,27 @@ Publishers can offer the same product in multiple currencies: ### Auction Pricing (`is_fixed: false`) - Final price determined through auction - Publisher provides `price_guidance` with floor and percentiles -- Common for non-guaranteed inventory +- Common for non-guaranteed/programmatic inventory - Buyer submits `bid_price` in media buy request -**Auction Example**: +**Auction CPM Example**: +```json +{ + "pricing_option_id": "cpm_usd_auction", + "pricing_model": "cpm", + "currency": "USD", + "is_fixed": false, + "price_guidance": { + "floor": 8.00, + "p25": 10.00, + "p50": 12.00, + "p75": 15.00, + "p90": 18.00 + } +} +``` + +**Auction CPCV Example**: ```json { "pricing_option_id": "cpcv_usd_auction", diff --git a/static/schemas/source/core/pricing-option.json b/static/schemas/source/core/pricing-option.json index fc261735..9fb5f7be 100644 --- a/static/schemas/source/core/pricing-option.json +++ b/static/schemas/source/core/pricing-option.json @@ -2,19 +2,13 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "/schemas/core/pricing-option.json", "title": "Pricing Option", - "description": "A pricing model option offered by a publisher for a product. Each pricing model has its own schema with model-specific requirements.", + "description": "A pricing model option offered by a publisher for a product. Each pricing model supports both fixed rate (is_fixed: true, rate field) and auction-based (is_fixed: false, price_guidance field) pricing.", "oneOf": [ { - "$ref": "/schemas/pricing-options/cpm-fixed-option.json" + "$ref": "/schemas/pricing-options/cpm-option.json" }, { - "$ref": "/schemas/pricing-options/cpm-auction-option.json" - }, - { - "$ref": "/schemas/pricing-options/vcpm-fixed-option.json" - }, - { - "$ref": "/schemas/pricing-options/vcpm-auction-option.json" + "$ref": "/schemas/pricing-options/vcpm-option.json" }, { "$ref": "/schemas/pricing-options/cpc-option.json" diff --git a/static/schemas/source/index.json b/static/schemas/source/index.json index 2e2c00fa..a2c0a406 100644 --- a/static/schemas/source/index.json +++ b/static/schemas/source/index.json @@ -356,47 +356,6 @@ } } }, - "pricing-options": { - "description": "Individual pricing model schemas with model-specific validation. CPM and vCPM support both fixed and auction pricing; all other models are fixed-rate only.", - "schemas": { - "cpm-fixed-option": { - "$ref": "/schemas/pricing-options/cpm-fixed-option.json", - "description": "Cost Per Mille (CPM) fixed-rate pricing for direct/guaranteed deals" - }, - "cpm-auction-option": { - "$ref": "/schemas/pricing-options/cpm-auction-option.json", - "description": "Cost Per Mille (CPM) auction-based pricing for programmatic/non-guaranteed inventory" - }, - "vcpm-fixed-option": { - "$ref": "/schemas/pricing-options/vcpm-fixed-option.json", - "description": "Viewable Cost Per Mille (vCPM) fixed-rate pricing for viewability-guaranteed deals" - }, - "vcpm-auction-option": { - "$ref": "/schemas/pricing-options/vcpm-auction-option.json", - "description": "Viewable Cost Per Mille (vCPM) auction-based pricing for programmatic inventory with viewability guarantee" - }, - "cpc-option": { - "$ref": "/schemas/pricing-options/cpc-option.json", - "description": "Cost Per Click (CPC) fixed-rate pricing for performance campaigns" - }, - "cpcv-option": { - "$ref": "/schemas/pricing-options/cpcv-option.json", - "description": "Cost Per Completed View (CPCV) fixed-rate pricing for video/audio" - }, - "cpv-option": { - "$ref": "/schemas/pricing-options/cpv-option.json", - "description": "Cost Per View (CPV) fixed-rate pricing with threshold" - }, - "cpp-option": { - "$ref": "/schemas/pricing-options/cpp-option.json", - "description": "Cost Per Point (CPP) fixed-rate pricing for TV/audio with demographic measurement" - }, - "flat-rate-option": { - "$ref": "/schemas/pricing-options/flat-rate-option.json", - "description": "Flat rate pricing for DOOH and sponsorships" - } - } - }, "media-buy": { "description": "Media buy task request/response schemas", "supporting-schemas": { @@ -562,6 +521,39 @@ } } }, + "pricing-options": { + "description": "Individual pricing model schemas with model-specific validation. All pricing models support both fixed rate and auction-based pricing.", + "schemas": { + "cpm-option": { + "$ref": "/schemas/pricing-options/cpm-option.json", + "description": "Cost Per Mille (CPM) pricing - supports both fixed and auction-based pricing" + }, + "vcpm-option": { + "$ref": "/schemas/pricing-options/vcpm-option.json", + "description": "Viewable Cost Per Mille (vCPM) pricing - supports both fixed and auction-based pricing" + }, + "cpc-option": { + "$ref": "/schemas/pricing-options/cpc-option.json", + "description": "Cost Per Click (CPC) pricing - supports both fixed and auction-based pricing" + }, + "cpcv-option": { + "$ref": "/schemas/pricing-options/cpcv-option.json", + "description": "Cost Per Completed View (CPCV) pricing - supports both fixed and auction-based pricing" + }, + "cpv-option": { + "$ref": "/schemas/pricing-options/cpv-option.json", + "description": "Cost Per View (CPV) pricing with threshold - supports both fixed and auction-based pricing" + }, + "cpp-option": { + "$ref": "/schemas/pricing-options/cpp-option.json", + "description": "Cost Per Point (CPP) pricing for TV/audio - supports both fixed and auction-based pricing" + }, + "flat-rate-option": { + "$ref": "/schemas/pricing-options/flat-rate-option.json", + "description": "Flat rate pricing for DOOH and sponsorships - supports both fixed and auction-based pricing" + } + } + }, "adagents": { "description": "Authorized sales agents file format specification", "$ref": "/schemas/adagents.json", diff --git a/static/schemas/source/pricing-options/cpc-option.json b/static/schemas/source/pricing-options/cpc-option.json index 8fc44dd2..b6c167ac 100644 --- a/static/schemas/source/pricing-options/cpc-option.json +++ b/static/schemas/source/pricing-options/cpc-option.json @@ -2,40 +2,113 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "/schemas/pricing-options/cpc-option.json", "title": "CPC Pricing Option", - "description": "Cost Per Click fixed-rate pricing for performance-driven advertising campaigns", - "type": "object", - "properties": { - "pricing_option_id": { - "type": "string", - "description": "Unique identifier for this pricing option within the product (e.g., 'cpc_usd_fixed')" + "description": "Cost Per Click pricing - supports both fixed rate and auction-based pricing", + "oneOf": [ + { + "title": "CPC Fixed Rate", + "description": "Fixed CPC rate - common for performance campaigns", + "type": "object", + "properties": { + "pricing_option_id": { + "type": "string", + "description": "Unique identifier for this pricing option within the product" + }, + "pricing_model": { + "type": "string", + "const": "cpc", + "description": "Cost per click" + }, + "is_fixed": { + "type": "boolean", + "const": true, + "description": "Fixed rate pricing" + }, + "rate": { + "type": "number", + "description": "Fixed CPC rate (cost per click)", + "minimum": 0 + }, + "currency": { + "type": "string", + "description": "ISO 4217 currency code", + "pattern": "^[A-Z]{3}$", + "examples": ["USD", "EUR", "GBP", "JPY"] + }, + "min_spend_per_package": { + "type": "number", + "description": "Minimum spend requirement per package using this pricing option", + "minimum": 0 + } + }, + "required": ["pricing_option_id", "pricing_model", "is_fixed", "rate", "currency"], + "additionalProperties": false }, - "pricing_model": { - "type": "string", - "const": "cpc", - "description": "Cost per click" - }, - "rate": { - "type": "number", - "description": "Fixed CPC rate (cost per click)", - "minimum": 0 - }, - "currency": { - "type": "string", - "description": "ISO 4217 currency code", - "pattern": "^[A-Z]{3}$", - "examples": ["USD", "EUR", "GBP", "JPY"] - }, - "is_fixed": { - "type": "boolean", - "description": "Whether this is a fixed rate (true) or auction-based (false)", - "const": true - }, - "min_spend_per_package": { - "type": "number", - "description": "Minimum spend requirement per package using this pricing option, in the specified currency", - "minimum": 0 + { + "title": "CPC Auction", + "description": "Auction-based CPC pricing - common for programmatic performance campaigns", + "type": "object", + "properties": { + "pricing_option_id": { + "type": "string", + "description": "Unique identifier for this pricing option within the product" + }, + "pricing_model": { + "type": "string", + "const": "cpc", + "description": "Cost per click" + }, + "is_fixed": { + "type": "boolean", + "const": false, + "description": "Auction-based pricing" + }, + "price_guidance": { + "type": "object", + "description": "Pricing guidance for auction bidding", + "properties": { + "floor": { + "type": "number", + "description": "Minimum bid price - publisher will reject bids under this value", + "minimum": 0 + }, + "p25": { + "type": "number", + "description": "25th percentile winning price", + "minimum": 0 + }, + "p50": { + "type": "number", + "description": "Median winning price", + "minimum": 0 + }, + "p75": { + "type": "number", + "description": "75th percentile winning price", + "minimum": 0 + }, + "p90": { + "type": "number", + "description": "90th percentile winning price", + "minimum": 0 + } + }, + "required": ["floor"], + "additionalProperties": false + }, + "currency": { + "type": "string", + "description": "ISO 4217 currency code", + "pattern": "^[A-Z]{3}$", + "examples": ["USD", "EUR", "GBP", "JPY"] + }, + "min_spend_per_package": { + "type": "number", + "description": "Minimum spend requirement per package using this pricing option", + "minimum": 0 + } + }, + "required": ["pricing_option_id", "pricing_model", "is_fixed", "price_guidance", "currency"], + "additionalProperties": false } - }, - "required": ["pricing_option_id", "pricing_model", "rate", "currency", "is_fixed"], - "additionalProperties": false + ] } diff --git a/static/schemas/source/pricing-options/cpcv-option.json b/static/schemas/source/pricing-options/cpcv-option.json index c606c30f..f2bf80a9 100644 --- a/static/schemas/source/pricing-options/cpcv-option.json +++ b/static/schemas/source/pricing-options/cpcv-option.json @@ -2,40 +2,113 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "/schemas/pricing-options/cpcv-option.json", "title": "CPCV Pricing Option", - "description": "Cost Per Completed View (100% video/audio completion) fixed-rate pricing", - "type": "object", - "properties": { - "pricing_option_id": { - "type": "string", - "description": "Unique identifier for this pricing option within the product (e.g., 'cpcv_usd_guaranteed')" + "description": "Cost Per Completed View pricing for video/audio - supports both fixed rate and auction-based pricing", + "oneOf": [ + { + "title": "CPCV Fixed Rate", + "description": "Fixed CPCV rate - common for video/audio campaigns", + "type": "object", + "properties": { + "pricing_option_id": { + "type": "string", + "description": "Unique identifier for this pricing option within the product" + }, + "pricing_model": { + "type": "string", + "const": "cpcv", + "description": "Cost per completed view" + }, + "is_fixed": { + "type": "boolean", + "const": true, + "description": "Fixed rate pricing" + }, + "rate": { + "type": "number", + "description": "Fixed CPCV rate (cost per completed view)", + "minimum": 0 + }, + "currency": { + "type": "string", + "description": "ISO 4217 currency code", + "pattern": "^[A-Z]{3}$", + "examples": ["USD", "EUR", "GBP", "JPY"] + }, + "min_spend_per_package": { + "type": "number", + "description": "Minimum spend requirement per package using this pricing option", + "minimum": 0 + } + }, + "required": ["pricing_option_id", "pricing_model", "is_fixed", "rate", "currency"], + "additionalProperties": false }, - "pricing_model": { - "type": "string", - "const": "cpcv", - "description": "Cost per completed view (100% completion)" - }, - "rate": { - "type": "number", - "description": "Fixed CPCV rate (cost per 100% completion)", - "minimum": 0 - }, - "currency": { - "type": "string", - "description": "ISO 4217 currency code", - "pattern": "^[A-Z]{3}$", - "examples": ["USD", "EUR", "GBP", "JPY"] - }, - "is_fixed": { - "type": "boolean", - "description": "Whether this is a fixed rate (true) or auction-based (false)", - "const": true - }, - "min_spend_per_package": { - "type": "number", - "description": "Minimum spend requirement per package using this pricing option, in the specified currency", - "minimum": 0 + { + "title": "CPCV Auction", + "description": "Auction-based CPCV pricing - common for programmatic video/audio", + "type": "object", + "properties": { + "pricing_option_id": { + "type": "string", + "description": "Unique identifier for this pricing option within the product" + }, + "pricing_model": { + "type": "string", + "const": "cpcv", + "description": "Cost per completed view" + }, + "is_fixed": { + "type": "boolean", + "const": false, + "description": "Auction-based pricing" + }, + "price_guidance": { + "type": "object", + "description": "Pricing guidance for auction bidding", + "properties": { + "floor": { + "type": "number", + "description": "Minimum bid price - publisher will reject bids under this value", + "minimum": 0 + }, + "p25": { + "type": "number", + "description": "25th percentile winning price", + "minimum": 0 + }, + "p50": { + "type": "number", + "description": "Median winning price", + "minimum": 0 + }, + "p75": { + "type": "number", + "description": "75th percentile winning price", + "minimum": 0 + }, + "p90": { + "type": "number", + "description": "90th percentile winning price", + "minimum": 0 + } + }, + "required": ["floor"], + "additionalProperties": false + }, + "currency": { + "type": "string", + "description": "ISO 4217 currency code", + "pattern": "^[A-Z]{3}$", + "examples": ["USD", "EUR", "GBP", "JPY"] + }, + "min_spend_per_package": { + "type": "number", + "description": "Minimum spend requirement per package using this pricing option", + "minimum": 0 + } + }, + "required": ["pricing_option_id", "pricing_model", "is_fixed", "price_guidance", "currency"], + "additionalProperties": false } - }, - "required": ["pricing_option_id", "pricing_model", "rate", "currency", "is_fixed"], - "additionalProperties": false + ] } diff --git a/static/schemas/source/pricing-options/cpm-auction-option.json b/static/schemas/source/pricing-options/cpm-auction-option.json deleted file mode 100644 index 53778db1..00000000 --- a/static/schemas/source/pricing-options/cpm-auction-option.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "/schemas/pricing-options/cpm-auction-option.json", - "title": "CPM Auction Pricing Option", - "description": "Cost Per Mille (cost per 1,000 impressions) with auction-based pricing - common for programmatic/non-guaranteed inventory", - "type": "object", - "properties": { - "pricing_option_id": { - "type": "string", - "description": "Unique identifier for this pricing option within the product (e.g., 'cpm_usd_auction')" - }, - "pricing_model": { - "type": "string", - "const": "cpm", - "description": "Cost per 1,000 impressions" - }, - "currency": { - "type": "string", - "description": "ISO 4217 currency code", - "pattern": "^[A-Z]{3}$", - "examples": ["USD", "EUR", "GBP", "JPY"] - }, - "is_fixed": { - "type": "boolean", - "description": "Whether this is a fixed rate (true) or auction-based (false)", - "const": false - }, - "price_guidance": { - "type": "object", - "description": "Pricing guidance for auction-based CPM bidding", - "properties": { - "floor": { - "type": "number", - "description": "Minimum bid price - publisher will reject bids under this value", - "minimum": 0 - }, - "p25": { - "type": "number", - "description": "25th percentile winning price", - "minimum": 0 - }, - "p50": { - "type": "number", - "description": "Median winning price", - "minimum": 0 - }, - "p75": { - "type": "number", - "description": "75th percentile winning price", - "minimum": 0 - }, - "p90": { - "type": "number", - "description": "90th percentile winning price", - "minimum": 0 - } - }, - "required": ["floor"] - }, - "min_spend_per_package": { - "type": "number", - "description": "Minimum spend requirement per package using this pricing option, in the specified currency", - "minimum": 0 - } - }, - "required": ["pricing_option_id", "pricing_model", "price_guidance", "currency", "is_fixed"], - "additionalProperties": false -} diff --git a/static/schemas/source/pricing-options/cpm-fixed-option.json b/static/schemas/source/pricing-options/cpm-fixed-option.json deleted file mode 100644 index 92664b39..00000000 --- a/static/schemas/source/pricing-options/cpm-fixed-option.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "/schemas/pricing-options/cpm-fixed-option.json", - "title": "CPM Fixed Rate Pricing Option", - "description": "Cost Per Mille (cost per 1,000 impressions) with guaranteed fixed rate - common for direct/guaranteed deals", - "type": "object", - "properties": { - "pricing_option_id": { - "type": "string", - "description": "Unique identifier for this pricing option within the product (e.g., 'cpm_usd_guaranteed')" - }, - "pricing_model": { - "type": "string", - "const": "cpm", - "description": "Cost per 1,000 impressions" - }, - "rate": { - "type": "number", - "description": "Fixed CPM rate (cost per 1,000 impressions)", - "minimum": 0 - }, - "currency": { - "type": "string", - "description": "ISO 4217 currency code", - "pattern": "^[A-Z]{3}$", - "examples": ["USD", "EUR", "GBP", "JPY"] - }, - "is_fixed": { - "type": "boolean", - "description": "Whether this is a fixed rate (true) or auction-based (false)", - "const": true - }, - "min_spend_per_package": { - "type": "number", - "description": "Minimum spend requirement per package using this pricing option, in the specified currency", - "minimum": 0 - } - }, - "required": ["pricing_option_id", "pricing_model", "rate", "currency", "is_fixed"], - "additionalProperties": false -} diff --git a/static/schemas/source/pricing-options/cpm-option.json b/static/schemas/source/pricing-options/cpm-option.json new file mode 100644 index 00000000..a1c26067 --- /dev/null +++ b/static/schemas/source/pricing-options/cpm-option.json @@ -0,0 +1,114 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "/schemas/pricing-options/cpm-option.json", + "title": "CPM Pricing Option", + "description": "Cost Per Mille (cost per 1,000 impressions) pricing - supports both fixed rate and auction-based pricing", + "oneOf": [ + { + "title": "CPM Fixed Rate", + "description": "Fixed CPM rate - common for direct/guaranteed deals", + "type": "object", + "properties": { + "pricing_option_id": { + "type": "string", + "description": "Unique identifier for this pricing option within the product" + }, + "pricing_model": { + "type": "string", + "const": "cpm", + "description": "Cost per 1,000 impressions" + }, + "is_fixed": { + "type": "boolean", + "const": true, + "description": "Fixed rate pricing" + }, + "rate": { + "type": "number", + "description": "Fixed CPM rate (cost per 1,000 impressions)", + "minimum": 0 + }, + "currency": { + "type": "string", + "description": "ISO 4217 currency code", + "pattern": "^[A-Z]{3}$", + "examples": ["USD", "EUR", "GBP", "JPY"] + }, + "min_spend_per_package": { + "type": "number", + "description": "Minimum spend requirement per package using this pricing option", + "minimum": 0 + } + }, + "required": ["pricing_option_id", "pricing_model", "is_fixed", "rate", "currency"], + "additionalProperties": false + }, + { + "title": "CPM Auction", + "description": "Auction-based CPM pricing - common for programmatic/non-guaranteed inventory", + "type": "object", + "properties": { + "pricing_option_id": { + "type": "string", + "description": "Unique identifier for this pricing option within the product" + }, + "pricing_model": { + "type": "string", + "const": "cpm", + "description": "Cost per 1,000 impressions" + }, + "is_fixed": { + "type": "boolean", + "const": false, + "description": "Auction-based pricing" + }, + "price_guidance": { + "type": "object", + "description": "Pricing guidance for auction bidding", + "properties": { + "floor": { + "type": "number", + "description": "Minimum bid price - publisher will reject bids under this value", + "minimum": 0 + }, + "p25": { + "type": "number", + "description": "25th percentile winning price", + "minimum": 0 + }, + "p50": { + "type": "number", + "description": "Median winning price", + "minimum": 0 + }, + "p75": { + "type": "number", + "description": "75th percentile winning price", + "minimum": 0 + }, + "p90": { + "type": "number", + "description": "90th percentile winning price", + "minimum": 0 + } + }, + "required": ["floor"], + "additionalProperties": false + }, + "currency": { + "type": "string", + "description": "ISO 4217 currency code", + "pattern": "^[A-Z]{3}$", + "examples": ["USD", "EUR", "GBP", "JPY"] + }, + "min_spend_per_package": { + "type": "number", + "description": "Minimum spend requirement per package using this pricing option", + "minimum": 0 + } + }, + "required": ["pricing_option_id", "pricing_model", "is_fixed", "price_guidance", "currency"], + "additionalProperties": false + } + ] +} diff --git a/static/schemas/source/pricing-options/cpp-option.json b/static/schemas/source/pricing-options/cpp-option.json index 224c5c31..2bb5d152 100644 --- a/static/schemas/source/pricing-options/cpp-option.json +++ b/static/schemas/source/pricing-options/cpp-option.json @@ -2,58 +2,149 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "/schemas/pricing-options/cpp-option.json", "title": "CPP Pricing Option", - "description": "Cost Per Point (Gross Rating Point) fixed-rate pricing for TV and audio campaigns requiring demographic measurement", - "type": "object", - "properties": { - "pricing_option_id": { - "type": "string", - "description": "Unique identifier for this pricing option within the product (e.g., 'cpp_usd_p18-49')" - }, - "pricing_model": { - "type": "string", - "const": "cpp", - "description": "Cost per Gross Rating Point" - }, - "rate": { - "type": "number", - "description": "Fixed CPP rate (cost per rating point)", - "minimum": 0 - }, - "currency": { - "type": "string", - "description": "ISO 4217 currency code", - "pattern": "^[A-Z]{3}$", - "examples": ["USD", "EUR", "GBP", "JPY"] - }, - "is_fixed": { - "type": "boolean", - "description": "Whether this is a fixed rate (true) or auction-based (false)", - "const": true - }, - "parameters": { + "description": "Cost Per Point pricing for TV/audio with demographic measurement - supports both fixed rate and auction-based pricing", + "oneOf": [ + { + "title": "CPP Fixed Rate", + "description": "Fixed CPP rate - common for linear TV/audio buys", "type": "object", - "description": "CPP-specific parameters for demographic targeting and GRP requirements", "properties": { - "demographic": { + "pricing_option_id": { + "type": "string", + "description": "Unique identifier for this pricing option within the product" + }, + "pricing_model": { "type": "string", - "pattern": "^[PMWAC][0-9]{2}(-[0-9]{2}|\\+)$", - "description": "Target demographic in Nielsen format: P/M/W/A/C + age range. Examples: P18-49 (Persons 18-49), M25-54 (Men 25-54), W35+ (Women 35+), A18-34 (Adults 18-34), C2-11 (Children 2-11)" + "const": "cpp", + "description": "Cost per rating point" + }, + "is_fixed": { + "type": "boolean", + "const": true, + "description": "Fixed rate pricing" }, - "min_points": { + "rate": { "type": "number", - "description": "Minimum GRPs/TRPs required for this pricing option", + "description": "Fixed CPP rate (cost per rating point)", + "minimum": 0 + }, + "currency": { + "type": "string", + "description": "ISO 4217 currency code", + "pattern": "^[A-Z]{3}$", + "examples": ["USD", "EUR", "GBP", "JPY"] + }, + "parameters": { + "type": "object", + "description": "CPP-specific parameters", + "properties": { + "demographic": { + "type": "string", + "pattern": "^[PMWAC][0-9]{2}(-[0-9]{2}|\\+)$", + "description": "Target demographic in Nielsen format (e.g., P18-49, M25-54, W35+)" + }, + "min_points": { + "type": "number", + "description": "Minimum GRPs/TRPs required", + "minimum": 0 + } + }, + "required": ["demographic"], + "additionalProperties": false + }, + "min_spend_per_package": { + "type": "number", + "description": "Minimum spend requirement per package using this pricing option", "minimum": 0 } }, - "required": ["demographic"], + "required": ["pricing_option_id", "pricing_model", "is_fixed", "rate", "currency", "parameters"], "additionalProperties": false }, - "min_spend_per_package": { - "type": "number", - "description": "Minimum spend requirement per package using this pricing option, in the specified currency", - "minimum": 0 + { + "title": "CPP Auction", + "description": "Auction-based CPP pricing - common for programmatic TV/audio", + "type": "object", + "properties": { + "pricing_option_id": { + "type": "string", + "description": "Unique identifier for this pricing option within the product" + }, + "pricing_model": { + "type": "string", + "const": "cpp", + "description": "Cost per rating point" + }, + "is_fixed": { + "type": "boolean", + "const": false, + "description": "Auction-based pricing" + }, + "price_guidance": { + "type": "object", + "description": "Pricing guidance for auction bidding", + "properties": { + "floor": { + "type": "number", + "description": "Minimum bid price - publisher will reject bids under this value", + "minimum": 0 + }, + "p25": { + "type": "number", + "description": "25th percentile winning price", + "minimum": 0 + }, + "p50": { + "type": "number", + "description": "Median winning price", + "minimum": 0 + }, + "p75": { + "type": "number", + "description": "75th percentile winning price", + "minimum": 0 + }, + "p90": { + "type": "number", + "description": "90th percentile winning price", + "minimum": 0 + } + }, + "required": ["floor"], + "additionalProperties": false + }, + "currency": { + "type": "string", + "description": "ISO 4217 currency code", + "pattern": "^[A-Z]{3}$", + "examples": ["USD", "EUR", "GBP", "JPY"] + }, + "parameters": { + "type": "object", + "description": "CPP-specific parameters", + "properties": { + "demographic": { + "type": "string", + "pattern": "^[PMWAC][0-9]{2}(-[0-9]{2}|\\+)$", + "description": "Target demographic in Nielsen format (e.g., P18-49, M25-54, W35+)" + }, + "min_points": { + "type": "number", + "description": "Minimum GRPs/TRPs required", + "minimum": 0 + } + }, + "required": ["demographic"], + "additionalProperties": false + }, + "min_spend_per_package": { + "type": "number", + "description": "Minimum spend requirement per package using this pricing option", + "minimum": 0 + } + }, + "required": ["pricing_option_id", "pricing_model", "is_fixed", "price_guidance", "currency", "parameters"], + "additionalProperties": false } - }, - "required": ["pricing_option_id", "pricing_model", "rate", "currency", "is_fixed", "parameters"], - "additionalProperties": false + ] } diff --git a/static/schemas/source/pricing-options/cpv-option.json b/static/schemas/source/pricing-options/cpv-option.json index c2e5fa91..f5cd2966 100644 --- a/static/schemas/source/pricing-options/cpv-option.json +++ b/static/schemas/source/pricing-options/cpv-option.json @@ -2,71 +2,175 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "/schemas/pricing-options/cpv-option.json", "title": "CPV Pricing Option", - "description": "Cost Per View (at publisher-defined threshold) fixed-rate pricing for video/audio", - "type": "object", - "properties": { - "pricing_option_id": { - "type": "string", - "description": "Unique identifier for this pricing option within the product (e.g., 'cpv_usd_50pct')" - }, - "pricing_model": { - "type": "string", - "const": "cpv", - "description": "Cost per view at threshold" - }, - "rate": { - "type": "number", - "description": "Fixed CPV rate (cost per view)", - "minimum": 0 - }, - "currency": { - "type": "string", - "description": "ISO 4217 currency code", - "pattern": "^[A-Z]{3}$", - "examples": ["USD", "EUR", "GBP", "JPY"] - }, - "is_fixed": { - "type": "boolean", - "description": "Whether this is a fixed rate (true) or auction-based (false)", - "const": true + "description": "Cost Per View pricing with configurable view threshold - supports both fixed rate and auction-based pricing", + "oneOf": [ + { + "title": "CPV Fixed Rate", + "description": "Fixed CPV rate with view threshold", + "type": "object", + "properties": { + "pricing_option_id": { + "type": "string", + "description": "Unique identifier for this pricing option within the product" + }, + "pricing_model": { + "type": "string", + "const": "cpv", + "description": "Cost per view with threshold" + }, + "is_fixed": { + "type": "boolean", + "const": true, + "description": "Fixed rate pricing" + }, + "rate": { + "type": "number", + "description": "Fixed CPV rate (cost per view)", + "minimum": 0 + }, + "currency": { + "type": "string", + "description": "ISO 4217 currency code", + "pattern": "^[A-Z]{3}$", + "examples": ["USD", "EUR", "GBP", "JPY"] + }, + "parameters": { + "type": "object", + "description": "CPV-specific parameters", + "properties": { + "view_threshold": { + "oneOf": [ + { + "type": "number", + "description": "Percentage completion threshold (0.0 to 1.0)", + "minimum": 0, + "maximum": 1 + }, + { + "type": "object", + "description": "Time-based view threshold", + "properties": { + "duration_seconds": { + "type": "integer", + "description": "Seconds of viewing required", + "minimum": 1 + } + }, + "required": ["duration_seconds"], + "additionalProperties": false + } + ] + } + }, + "required": ["view_threshold"], + "additionalProperties": false + }, + "min_spend_per_package": { + "type": "number", + "description": "Minimum spend requirement per package using this pricing option", + "minimum": 0 + } + }, + "required": ["pricing_option_id", "pricing_model", "is_fixed", "rate", "currency", "parameters"], + "additionalProperties": false }, - "parameters": { + { + "title": "CPV Auction", + "description": "Auction-based CPV pricing with view threshold", "type": "object", - "description": "CPV-specific parameters defining the view threshold", "properties": { - "view_threshold": { - "oneOf": [ - { + "pricing_option_id": { + "type": "string", + "description": "Unique identifier for this pricing option within the product" + }, + "pricing_model": { + "type": "string", + "const": "cpv", + "description": "Cost per view with threshold" + }, + "is_fixed": { + "type": "boolean", + "const": false, + "description": "Auction-based pricing" + }, + "price_guidance": { + "type": "object", + "description": "Pricing guidance for auction bidding", + "properties": { + "floor": { + "type": "number", + "description": "Minimum bid price - publisher will reject bids under this value", + "minimum": 0 + }, + "p25": { + "type": "number", + "description": "25th percentile winning price", + "minimum": 0 + }, + "p50": { "type": "number", - "description": "Percentage completion threshold for CPV pricing (0.0 to 1.0, e.g., 0.5 = 50% completion)", - "minimum": 0, - "maximum": 1 + "description": "Median winning price", + "minimum": 0 }, - { - "type": "object", - "description": "Time-based view threshold for CPV pricing", - "properties": { - "duration_seconds": { - "type": "integer", - "description": "Seconds of viewing required (e.g., 30 for YouTube-style '30 seconds = view')", - "minimum": 1 + "p75": { + "type": "number", + "description": "75th percentile winning price", + "minimum": 0 + }, + "p90": { + "type": "number", + "description": "90th percentile winning price", + "minimum": 0 + } + }, + "required": ["floor"], + "additionalProperties": false + }, + "currency": { + "type": "string", + "description": "ISO 4217 currency code", + "pattern": "^[A-Z]{3}$", + "examples": ["USD", "EUR", "GBP", "JPY"] + }, + "parameters": { + "type": "object", + "description": "CPV-specific parameters", + "properties": { + "view_threshold": { + "oneOf": [ + { + "type": "number", + "description": "Percentage completion threshold (0.0 to 1.0)", + "minimum": 0, + "maximum": 1 + }, + { + "type": "object", + "description": "Time-based view threshold", + "properties": { + "duration_seconds": { + "type": "integer", + "description": "Seconds of viewing required", + "minimum": 1 + } + }, + "required": ["duration_seconds"], + "additionalProperties": false } - }, - "required": ["duration_seconds"], - "additionalProperties": false + ] } - ] + }, + "required": ["view_threshold"], + "additionalProperties": false + }, + "min_spend_per_package": { + "type": "number", + "description": "Minimum spend requirement per package using this pricing option", + "minimum": 0 } }, - "required": ["view_threshold"], + "required": ["pricing_option_id", "pricing_model", "is_fixed", "price_guidance", "currency", "parameters"], "additionalProperties": false - }, - "min_spend_per_package": { - "type": "number", - "description": "Minimum spend requirement per package using this pricing option, in the specified currency", - "minimum": 0 } - }, - "required": ["pricing_option_id", "pricing_model", "rate", "currency", "is_fixed", "parameters"], - "additionalProperties": false + ] } diff --git a/static/schemas/source/pricing-options/flat-rate-option.json b/static/schemas/source/pricing-options/flat-rate-option.json index 09882a5b..8cd13eb2 100644 --- a/static/schemas/source/pricing-options/flat-rate-option.json +++ b/static/schemas/source/pricing-options/flat-rate-option.json @@ -2,81 +2,195 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "/schemas/pricing-options/flat-rate-option.json", "title": "Flat Rate Pricing Option", - "description": "Flat rate pricing for DOOH, sponsorships, and time-based campaigns - fixed cost regardless of delivery volume", - "type": "object", - "properties": { - "pricing_option_id": { - "type": "string", - "description": "Unique identifier for this pricing option within the product (e.g., 'flat_rate_usd_24h_takeover')" - }, - "pricing_model": { - "type": "string", - "const": "flat_rate", - "description": "Fixed cost regardless of delivery volume" - }, - "rate": { - "type": "number", - "description": "Flat rate cost", - "minimum": 0 - }, - "currency": { - "type": "string", - "description": "ISO 4217 currency code", - "pattern": "^[A-Z]{3}$", - "examples": ["USD", "EUR", "GBP", "JPY"] - }, - "is_fixed": { - "type": "boolean", - "description": "Whether this is a fixed rate (true) or auction-based (false)", - "const": true - }, - "parameters": { + "description": "Flat rate pricing for DOOH and sponsorships - supports both fixed rate and auction-based pricing", + "oneOf": [ + { + "title": "Flat Rate Fixed", + "description": "Fixed flat rate - common for DOOH and sponsorships", "type": "object", - "description": "Flat rate parameters for DOOH and time-based campaigns", "properties": { - "duration_hours": { + "pricing_option_id": { + "type": "string", + "description": "Unique identifier for this pricing option within the product" + }, + "pricing_model": { + "type": "string", + "const": "flat_rate", + "description": "Flat rate pricing" + }, + "is_fixed": { + "type": "boolean", + "const": true, + "description": "Fixed rate pricing" + }, + "rate": { "type": "number", - "description": "Duration in hours for time-based flat rate pricing (DOOH)", + "description": "Fixed flat rate", "minimum": 0 }, - "sov_percentage": { - "type": "number", - "description": "Guaranteed share of voice as percentage (DOOH, 0-100)", - "minimum": 0, - "maximum": 100 + "currency": { + "type": "string", + "description": "ISO 4217 currency code", + "pattern": "^[A-Z]{3}$", + "examples": ["USD", "EUR", "GBP", "JPY"] }, - "loop_duration_seconds": { - "type": "integer", - "description": "Duration of ad loop rotation in seconds (DOOH)", - "minimum": 1 + "parameters": { + "type": "object", + "description": "Flat rate specific parameters (optional for DOOH)", + "properties": { + "duration_hours": { + "type": "number", + "description": "Duration in hours for DOOH pricing", + "minimum": 0 + }, + "sov_percentage": { + "type": "number", + "description": "Guaranteed share of voice percentage (0-100)", + "minimum": 0, + "maximum": 100 + }, + "loop_duration_seconds": { + "type": "integer", + "description": "Duration of ad loop rotation in seconds", + "minimum": 1 + }, + "min_plays_per_hour": { + "type": "integer", + "description": "Minimum ad plays per hour for frequency guarantee", + "minimum": 0 + }, + "venue_package": { + "type": "string", + "description": "Named venue package identifier" + }, + "estimated_impressions": { + "type": "integer", + "description": "Estimated impressions for the flat rate", + "minimum": 0 + }, + "daypart": { + "type": "string", + "description": "Specific daypart for time-based pricing" + } + }, + "additionalProperties": false }, - "min_plays_per_hour": { - "type": "integer", - "description": "Minimum number of times ad plays per hour (DOOH frequency guarantee)", + "min_spend_per_package": { + "type": "number", + "description": "Minimum spend requirement per package using this pricing option", "minimum": 0 + } + }, + "required": ["pricing_option_id", "pricing_model", "is_fixed", "rate", "currency"], + "additionalProperties": false + }, + { + "title": "Flat Rate Auction", + "description": "Auction-based flat rate - common for programmatic DOOH", + "type": "object", + "properties": { + "pricing_option_id": { + "type": "string", + "description": "Unique identifier for this pricing option within the product" }, - "venue_package": { + "pricing_model": { "type": "string", - "description": "Named venue package identifier for DOOH (e.g., 'times_square_network', 'airport_terminals')" + "const": "flat_rate", + "description": "Flat rate pricing" }, - "estimated_impressions": { - "type": "integer", - "description": "Estimated impressions for this flat rate option (informational, commonly used with SOV or time-based DOOH)", - "minimum": 0 + "is_fixed": { + "type": "boolean", + "const": false, + "description": "Auction-based pricing" }, - "daypart": { + "price_guidance": { + "type": "object", + "description": "Pricing guidance for auction bidding", + "properties": { + "floor": { + "type": "number", + "description": "Minimum bid price - publisher will reject bids under this value", + "minimum": 0 + }, + "p25": { + "type": "number", + "description": "25th percentile winning price", + "minimum": 0 + }, + "p50": { + "type": "number", + "description": "Median winning price", + "minimum": 0 + }, + "p75": { + "type": "number", + "description": "75th percentile winning price", + "minimum": 0 + }, + "p90": { + "type": "number", + "description": "90th percentile winning price", + "minimum": 0 + } + }, + "required": ["floor"], + "additionalProperties": false + }, + "currency": { "type": "string", - "description": "Specific daypart for time-based pricing (e.g., 'morning_commute', 'evening_prime', 'overnight')" + "description": "ISO 4217 currency code", + "pattern": "^[A-Z]{3}$", + "examples": ["USD", "EUR", "GBP", "JPY"] + }, + "parameters": { + "type": "object", + "description": "Flat rate specific parameters (optional for DOOH)", + "properties": { + "duration_hours": { + "type": "number", + "description": "Duration in hours for DOOH pricing", + "minimum": 0 + }, + "sov_percentage": { + "type": "number", + "description": "Guaranteed share of voice percentage (0-100)", + "minimum": 0, + "maximum": 100 + }, + "loop_duration_seconds": { + "type": "integer", + "description": "Duration of ad loop rotation in seconds", + "minimum": 1 + }, + "min_plays_per_hour": { + "type": "integer", + "description": "Minimum ad plays per hour for frequency guarantee", + "minimum": 0 + }, + "venue_package": { + "type": "string", + "description": "Named venue package identifier" + }, + "estimated_impressions": { + "type": "integer", + "description": "Estimated impressions for the flat rate", + "minimum": 0 + }, + "daypart": { + "type": "string", + "description": "Specific daypart for time-based pricing" + } + }, + "additionalProperties": false + }, + "min_spend_per_package": { + "type": "number", + "description": "Minimum spend requirement per package using this pricing option", + "minimum": 0 } }, + "required": ["pricing_option_id", "pricing_model", "is_fixed", "price_guidance", "currency"], "additionalProperties": false - }, - "min_spend_per_package": { - "type": "number", - "description": "Minimum spend requirement per package using this pricing option, in the specified currency", - "minimum": 0 } - }, - "required": ["pricing_option_id", "pricing_model", "currency", "is_fixed", "rate"], - "additionalProperties": false + ] } diff --git a/static/schemas/source/pricing-options/vcpm-auction-option.json b/static/schemas/source/pricing-options/vcpm-auction-option.json deleted file mode 100644 index d3a525e7..00000000 --- a/static/schemas/source/pricing-options/vcpm-auction-option.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "/schemas/pricing-options/vcpm-auction-option.json", - "title": "vCPM Auction Pricing Option", - "description": "Viewable Cost Per Mille (cost per 1,000 viewable impressions) with auction-based pricing - impressions meeting MRC viewability standard (50% pixels in-view for 1 second for display, 2 seconds for video)", - "type": "object", - "properties": { - "pricing_option_id": { - "type": "string", - "description": "Unique identifier for this pricing option within the product (e.g., 'vcpm_usd_auction')" - }, - "pricing_model": { - "type": "string", - "const": "vcpm", - "description": "Cost per 1,000 viewable impressions (MRC standard)" - }, - "currency": { - "type": "string", - "description": "ISO 4217 currency code", - "pattern": "^[A-Z]{3}$", - "examples": ["USD", "EUR", "GBP", "JPY"] - }, - "is_fixed": { - "type": "boolean", - "description": "Whether this is a fixed rate (true) or auction-based (false)", - "const": false - }, - "price_guidance": { - "type": "object", - "description": "Statistical guidance for auction pricing", - "properties": { - "floor": { - "type": "number", - "description": "Minimum acceptable bid price", - "minimum": 0 - }, - "p25": { - "type": "number", - "description": "25th percentile of recent winning bids", - "minimum": 0 - }, - "p50": { - "type": "number", - "description": "Median of recent winning bids", - "minimum": 0 - }, - "p75": { - "type": "number", - "description": "75th percentile of recent winning bids", - "minimum": 0 - }, - "p90": { - "type": "number", - "description": "90th percentile of recent winning bids", - "minimum": 0 - } - }, - "required": ["floor"] - }, - "min_spend_per_package": { - "type": "number", - "description": "Minimum spend requirement per package using this pricing option, in the specified currency", - "minimum": 0 - } - }, - "required": ["pricing_option_id", "pricing_model", "currency", "price_guidance", "is_fixed"], - "additionalProperties": false -} diff --git a/static/schemas/source/pricing-options/vcpm-fixed-option.json b/static/schemas/source/pricing-options/vcpm-fixed-option.json deleted file mode 100644 index b9287f29..00000000 --- a/static/schemas/source/pricing-options/vcpm-fixed-option.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "/schemas/pricing-options/vcpm-fixed-option.json", - "title": "vCPM Fixed Rate Pricing Option", - "description": "Viewable Cost Per Mille (cost per 1,000 viewable impressions) with guaranteed fixed rate - impressions meeting MRC viewability standard (50% pixels in-view for 1 second for display, 2 seconds for video)", - "type": "object", - "properties": { - "pricing_option_id": { - "type": "string", - "description": "Unique identifier for this pricing option within the product (e.g., 'vcpm_usd_guaranteed')" - }, - "pricing_model": { - "type": "string", - "const": "vcpm", - "description": "Cost per 1,000 viewable impressions (MRC standard)" - }, - "rate": { - "type": "number", - "description": "Fixed vCPM rate (cost per 1,000 viewable impressions)", - "minimum": 0 - }, - "currency": { - "type": "string", - "description": "ISO 4217 currency code", - "pattern": "^[A-Z]{3}$", - "examples": ["USD", "EUR", "GBP", "JPY"] - }, - "is_fixed": { - "type": "boolean", - "description": "Whether this is a fixed rate (true) or auction-based (false)", - "const": true - }, - "min_spend_per_package": { - "type": "number", - "description": "Minimum spend requirement per package using this pricing option, in the specified currency", - "minimum": 0 - } - }, - "required": ["pricing_option_id", "pricing_model", "rate", "currency", "is_fixed"], - "additionalProperties": false -} diff --git a/static/schemas/source/pricing-options/vcpm-option.json b/static/schemas/source/pricing-options/vcpm-option.json new file mode 100644 index 00000000..c34d8e26 --- /dev/null +++ b/static/schemas/source/pricing-options/vcpm-option.json @@ -0,0 +1,114 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "/schemas/pricing-options/vcpm-option.json", + "title": "vCPM Pricing Option", + "description": "Viewable Cost Per Mille (cost per 1,000 viewable impressions) pricing - supports both fixed rate and auction-based pricing", + "oneOf": [ + { + "title": "vCPM Fixed Rate", + "description": "Fixed vCPM rate - common for viewability-guaranteed deals", + "type": "object", + "properties": { + "pricing_option_id": { + "type": "string", + "description": "Unique identifier for this pricing option within the product" + }, + "pricing_model": { + "type": "string", + "const": "vcpm", + "description": "Cost per 1,000 viewable impressions" + }, + "is_fixed": { + "type": "boolean", + "const": true, + "description": "Fixed rate pricing" + }, + "rate": { + "type": "number", + "description": "Fixed vCPM rate (cost per 1,000 viewable impressions)", + "minimum": 0 + }, + "currency": { + "type": "string", + "description": "ISO 4217 currency code", + "pattern": "^[A-Z]{3}$", + "examples": ["USD", "EUR", "GBP", "JPY"] + }, + "min_spend_per_package": { + "type": "number", + "description": "Minimum spend requirement per package using this pricing option", + "minimum": 0 + } + }, + "required": ["pricing_option_id", "pricing_model", "is_fixed", "rate", "currency"], + "additionalProperties": false + }, + { + "title": "vCPM Auction", + "description": "Auction-based vCPM pricing - common for programmatic inventory with viewability guarantee", + "type": "object", + "properties": { + "pricing_option_id": { + "type": "string", + "description": "Unique identifier for this pricing option within the product" + }, + "pricing_model": { + "type": "string", + "const": "vcpm", + "description": "Cost per 1,000 viewable impressions" + }, + "is_fixed": { + "type": "boolean", + "const": false, + "description": "Auction-based pricing" + }, + "price_guidance": { + "type": "object", + "description": "Pricing guidance for auction bidding", + "properties": { + "floor": { + "type": "number", + "description": "Minimum bid price - publisher will reject bids under this value", + "minimum": 0 + }, + "p25": { + "type": "number", + "description": "25th percentile winning price", + "minimum": 0 + }, + "p50": { + "type": "number", + "description": "Median winning price", + "minimum": 0 + }, + "p75": { + "type": "number", + "description": "75th percentile winning price", + "minimum": 0 + }, + "p90": { + "type": "number", + "description": "90th percentile winning price", + "minimum": 0 + } + }, + "required": ["floor"], + "additionalProperties": false + }, + "currency": { + "type": "string", + "description": "ISO 4217 currency code", + "pattern": "^[A-Z]{3}$", + "examples": ["USD", "EUR", "GBP", "JPY"] + }, + "min_spend_per_package": { + "type": "number", + "description": "Minimum spend requirement per package using this pricing option", + "minimum": 0 + } + }, + "required": ["pricing_option_id", "pricing_model", "is_fixed", "price_guidance", "currency"], + "additionalProperties": false + } + ] +}