Module adcp.types.generated_poc.media_buy.package_request
Classes
class PackageRequest (**data: Any)-
Expand source code
class PackageRequest(AdCPBaseModel): model_config = ConfigDict( extra='allow', ) buyer_ref: Annotated[ str, Field( description="Buyer's reference identifier for this package. Sellers SHOULD deduplicate requests with the same buyer_ref within a media buy, returning the existing package rather than creating a duplicate." ), ] product_id: Annotated[str, Field(description='Product ID for this package')] format_ids: Annotated[ list[format_id.FormatId] | None, Field( description='Array of format IDs that will be used for this package - must be supported by the product. If omitted, defaults to all formats supported by the product.', min_length=1, ), ] = None budget: Annotated[ float, Field(description="Budget allocation for this package in the media buy's currency", ge=0.0), ] pacing: pacing_1.Pacing | None = None pricing_option_id: Annotated[ str, Field( description="ID of the selected pricing option from the product's pricing_options array" ), ] bid_price: Annotated[ float | None, Field( description="Bid price for auction-based pricing options. This is the exact bid/price to honor unless selected pricing_option has max_bid=true, in which case bid_price is the buyer's maximum willingness to pay (ceiling).", ge=0.0, ), ] = None impressions: Annotated[ float | None, Field(description='Impression goal for this package', ge=0.0) ] = None start_time: Annotated[ AwareDatetime | None, Field( description="Flight start date/time for this package in ISO 8601 format. When omitted, the package inherits the media buy's start_time. Must fall within the media buy's date range." ), ] = None end_time: Annotated[ AwareDatetime | None, Field( description="Flight end date/time for this package in ISO 8601 format. When omitted, the package inherits the media buy's end_time. Must fall within the media buy's date range." ), ] = None paused: Annotated[ bool | None, Field( description='Whether this package should be created in a paused state. Paused packages do not deliver impressions. Defaults to false.' ), ] = False catalogs: Annotated[ list[catalog.Catalog] | None, Field( description='Catalogs this package promotes. Each catalog MUST have a distinct type (e.g., one product catalog, one store catalog). This constraint is enforced at the application level — sellers MUST reject requests containing multiple catalogs of the same type with a validation_error. Makes the package catalog-driven: one budget envelope, platform optimizes across items.' ), ] = None optimization_goals: Annotated[ list[optimization_goal.OptimizationGoal] | None, Field( description='Optimization targets for this package. The seller optimizes delivery toward these goals in priority order. Common pattern: event goals (purchase, install) as primary targets at priority 1; metric goals (clicks, views) as secondary proxy signals at priority 2+.', min_length=1, ), ] = None targeting_overlay: targeting.TargetingOverlay | None = None creative_assignments: Annotated[ list[creative_assignment.CreativeAssignment] | None, Field( description='Assign existing library creatives to this package with optional weights and placement targeting', min_length=1, ), ] = None creatives: Annotated[ list[creative_asset.CreativeAsset] | None, Field( description='Upload new creative assets and assign to this package (creatives will be added to library). Use creative_assignments instead for existing library creatives.', max_length=100, min_length=1, ), ] = None ext: ext_1.ExtensionObject | None = NoneBase model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so that unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config. Consumers who want strict validation can override withextra='forbid'.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 bid_price : float | Nonevar budget : floatvar buyer_ref : strvar catalogs : list[Catalog] | Nonevar creative_assignments : list[CreativeAssignment] | Nonevar creatives : list[CreativeAsset] | Nonevar end_time : pydantic.types.AwareDatetime | Nonevar ext : ExtensionObject | Nonevar format_ids : list[FormatId] | Nonevar impressions : float | Nonevar model_configvar optimization_goals : list[OptimizationGoal] | Nonevar pacing : Pacing | Nonevar paused : bool | Nonevar pricing_option_id : strvar product_id : strvar start_time : pydantic.types.AwareDatetime | Nonevar targeting_overlay : TargetingOverlay | None
Inherited members