Module adcp.types.generated_poc.create_media_buy_request
Classes
class CreateMediaBuyRequest (**data: Any)-
Expand source code
class CreateMediaBuyRequest(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) brand_manifest: Annotated[ brand_manifest_1.BrandManifest | AnyUrl, Field( description='Brand information manifest serving as the namespace and identity for this media buy. Provides brand context, assets, and product catalog. Can be provided inline or as a URL reference to a hosted manifest. Can be cached and reused across multiple requests.', examples=[ { 'data': { 'colors': {'primary': '#FF6B35'}, 'name': 'ACME Corporation', 'url': 'https://acmecorp.com', }, 'description': 'Inline brand manifest', }, { 'data': 'https://cdn.acmecorp.com/brand-manifest.json', 'description': 'URL string reference to hosted manifest', }, ], title='Brand Manifest Reference', ), ] buyer_ref: Annotated[str, Field(description="Buyer's reference identifier for this media buy")] context: Annotated[ dict[str, Any] | None, Field( description='Initiator-provided context included in the request payload. Agentsmust echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata.' ), ] = None end_time: Annotated[ AwareDatetime, Field(description='Campaign end date/time in ISO 8601 format') ] packages: Annotated[ list[package_request.PackageRequest], Field(description='Array of package configurations') ] po_number: Annotated[str | None, Field(description='Purchase order number for tracking')] = None reporting_webhook: ReportingWebhook | None = None start_time: Annotated[ str | AwareDatetime, Field( description="Campaign start timing: 'asap' or ISO 8601 date-time", title='Start Timing' ), ]Base model for AdCP types with spec-compliant serialization.
AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var brand_manifest : BrandManifest | pydantic.networks.AnyUrlvar buyer_ref : strvar context : dict[str, typing.Any] | Nonevar end_time : pydantic.types.AwareDatetimevar model_configvar packages : list[PackageRequest]var po_number : str | Nonevar reporting_webhook : ReportingWebhook | Nonevar start_time : str | pydantic.types.AwareDatetime
Inherited members
class ReportingFrequency (*args, **kwds)-
Expand source code
class ReportingFrequency(Enum): hourly = 'hourly' daily = 'daily' monthly = 'monthly'Create a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3Access them by:
- attribute access::
>>> Color.RED <Color.RED: 1>- value lookup:
>>> Color(1) <Color.RED: 1>- name lookup:
>>> Color['RED'] <Color.RED: 1>Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
Ancestors
- enum.Enum
Class variables
var dailyvar hourlyvar monthly
class ReportingWebhook (**data: Any)-
Expand source code
class ReportingWebhook(PushNotificationConfig): reporting_frequency: Annotated[ ReportingFrequency, Field( description='Frequency for automated reporting delivery. Must be supported by all products in the media buy.' ), ] requested_metrics: Annotated[ list[RequestedMetric] | None, Field( description="Optional list of metrics to include in webhook notifications. If omitted, all available metrics are included. Must be subset of product's available_metrics." ), ] = NoneBase model for AdCP types with spec-compliant serialization.
AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- PushNotificationConfig
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var model_configvar reporting_frequency : ReportingFrequencyvar requested_metrics : list[RequestedMetric] | None
Inherited members
class RequestedMetric (*args, **kwds)-
Expand source code
class RequestedMetric(Enum): impressions = 'impressions' spend = 'spend' clicks = 'clicks' ctr = 'ctr' video_completions = 'video_completions' completion_rate = 'completion_rate' conversions = 'conversions' viewability = 'viewability' engagement_rate = 'engagement_rate'Create a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3Access them by:
- attribute access::
>>> Color.RED <Color.RED: 1>- value lookup:
>>> Color(1) <Color.RED: 1>- name lookup:
>>> Color['RED'] <Color.RED: 1>Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
Ancestors
- enum.Enum
Class variables
var clicksvar completion_ratevar conversionsvar ctrvar engagement_ratevar impressionsvar spendvar video_completionsvar viewability