Module adcp.types.generated_poc.package_request

Classes

class PackageRequest (**data: Any)
Expand source code
class PackageRequest(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    bid_price: Annotated[
        float | None,
        Field(
            description='Bid price for auction-based CPM pricing (required if using cpm-auction-option)',
            ge=0.0,
        ),
    ] = None
    budget: Annotated[
        float,
        Field(description="Budget allocation for this package in the media buy's currency", ge=0.0),
    ]
    buyer_ref: Annotated[str, Field(description="Buyer's reference identifier for this package")]
    creative_ids: Annotated[
        list[str] | None,
        Field(
            description='Creative IDs to assign to this package at creation time (references existing library creatives)'
        ),
    ] = None
    creatives: Annotated[
        list[creative_asset.CreativeAsset] | None,
        Field(
            description='Full creative objects to upload and assign to this package at creation time (alternative to creative_ids - creatives will be added to library). Supports both static and generative creatives.',
            max_length=100,
        ),
    ] = None
    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
    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"
        ),
    ]
    product_id: Annotated[str, Field(description='Product ID for this package')]
    targeting_overlay: targeting.TargetingOverlay | None = None

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.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var bid_price : float | None
var budget : float
var buyer_ref : str
var creative_ids : list[str] | None
var creatives : list[CreativeAsset] | None
var format_ids : list[FormatId] | None
var model_config
var pacingPacing | None
var pricing_option_id : str
var product_id : str
var targeting_overlayTargetingOverlay | None

Inherited members