Summary
Add channels field to Product and supported_channels to Property, using the AdCP v3 MediaChannel enum. This enables channel-based filtering in get_products and list_authorized_properties.
AdCP version: v3.0.0-beta.3 (adcp library 3.3.0)
AdCP v3 Channel Fields
On Product
class Product(AdCPBaseModel):
channels: list[MediaChannel] | None # e.g., ["display", "olv", "ctv"]
On Property
class Property(AdCPBaseModel):
supported_channels: list[MediaChannel] | None # e.g., ["display", "olv"]
MediaChannel Enum (19 values)
class MediaChannel(Enum):
display = 'display'
olv = 'olv' # Online video
social = 'social'
search = 'search'
ctv = 'ctv' # Connected TV
linear_tv = 'linear_tv'
radio = 'radio'
streaming_audio = 'streaming_audio'
podcast = 'podcast'
dooh = 'dooh' # Digital out-of-home
ooh = 'ooh' # Out-of-home
print = 'print'
cinema = 'cinema'
email = 'email'
gaming = 'gaming'
retail_media = 'retail_media'
influencer = 'influencer'
affiliate = 'affiliate'
product_placement = 'product_placement'
Current State
Products and properties don't expose channel information. The Product schema in src/core/schemas.py extends the library's Product but doesn't include channels. The Property model in the database doesn't track supported channels.
Implementation Plan
1. Database: Add channels to Product and Property models
Products already have a config structure; add channels as a JSON array. Properties need a supported_channels column.
2. Schema: Ensure library fields pass through
Since we extend the library Product/Property, the channels/supported_channels fields should already be on the base class. Verify they serialize correctly and aren't being excluded.
3. Admin UI: Channel configuration
Products need a way to configure which channels they support. Add multi-select in product configuration.
4. GAM adapter: Derive channels from line item type
- STANDARD/BULK → display
- VIDEO → olv
- SPONSORSHIP → display (typically)
Map GAM creative types to channels where possible.
5. Filtering
get_products could accept a channel filter in the brief or as an explicit parameter to return only products matching requested channels.
Files to Modify
| File |
Change |
src/core/schemas.py |
Ensure channels fields pass through |
src/core/database/models.py |
Add channels storage |
src/core/tools/products.py |
Expose channels in response |
src/core/tools/properties.py |
Expose supported_channels |
src/adapters/gam/adapter.py |
Derive channels from GAM config |
src/adapters/mock/adapter.py |
Support channels |
| Admin UI templates |
Channel configuration for products |
tests/unit/test_products.py |
Channel filtering tests |
Testing
Test cases:
- Product with channels returns them in get_products response
- Property with supported_channels returns them in list_authorized_properties
- GAM adapter correctly maps line item types to channels
- Products without channels configured return None (not empty list)
- Channel values match MediaChannel enum
Summary
Add
channelsfield to Product andsupported_channelsto Property, using the AdCP v3MediaChannelenum. This enables channel-based filtering inget_productsandlist_authorized_properties.AdCP version: v3.0.0-beta.3 (adcp library 3.3.0)
AdCP v3 Channel Fields
On Product
On Property
MediaChannel Enum (19 values)
Current State
Products and properties don't expose channel information. The
Productschema insrc/core/schemas.pyextends the library'sProductbut doesn't include channels. ThePropertymodel in the database doesn't track supported channels.Implementation Plan
1. Database: Add channels to Product and Property models
Products already have a config structure; add channels as a JSON array. Properties need a
supported_channelscolumn.2. Schema: Ensure library fields pass through
Since we extend the library Product/Property, the
channels/supported_channelsfields should already be on the base class. Verify they serialize correctly and aren't being excluded.3. Admin UI: Channel configuration
Products need a way to configure which channels they support. Add multi-select in product configuration.
4. GAM adapter: Derive channels from line item type
Map GAM creative types to channels where possible.
5. Filtering
get_productscould accept a channel filter in the brief or as an explicit parameter to return only products matching requested channels.Files to Modify
src/core/schemas.pysrc/core/database/models.pysrc/core/tools/products.pysrc/core/tools/properties.pysrc/adapters/gam/adapter.pysrc/adapters/mock/adapter.pytests/unit/test_products.pyTesting
Test cases: