@adcp/sdk API Reference - v10.0.1
    Preparing search index...

    Interface Package

    A specific product within a media buy (line item)

    interface Package {
        package_id: string;
        product_id?: string;
        budget?: number;
        pacing?: Pacing;
        pricing_option_id?: string;
        bid_price?: number;
        price_breakdown?: PriceBreakdown;
        impressions?: number;
        catalogs?: Catalog[];
        format_ids?: FormatReferenceStructuredObject[];
        format_option_refs?: FormatOptionReference[];
        format_kind?: CanonicalFormatKind;
        params?: {};
        targeting_overlay?: TargetingOverlay;
        measurement_terms?: MeasurementTerms;
        performance_standards?: PerformanceStandard[];
        committed_metrics?: CommittedMetric[];
        creative_assignments?: CreativeAssignment[];
        format_ids_to_provide?: FormatReferenceStructuredObject[];
        optimization_goals?: OptimizationGoal[];
        start_time?: string;
        end_time?: string;
        paused?: boolean;
        canceled?: boolean;
        cancellation?: {
            canceled_at: string;
            canceled_by: CanceledBy;
            reason?: string;
            acknowledged_at?: string;
        };
        agency_estimate_number?: string;
        creative_deadline?: string;
        context?: ContextObject;
        ext?: ExtensionObject;
    }
    Index

    Properties

    package_id: string

    Seller's unique identifier for the package

    product_id?: string

    ID of the product this package is based on. For packages created from an explicit create_media_buy package request, sellers MUST echo the request package's product_id on every response package object that represents that requested package.

    budget?: number

    Budget allocation for this package in the currency specified by the pricing option

    0

    pacing?: Pacing
    pricing_option_id?: string

    ID of the selected pricing option from the product's pricing_options array

    bid_price?: number

    Bid price for auction-based pricing. This is the exact bid/price to honor unless the selected pricing option has max_bid=true, in which case bid_price is the buyer's maximum willingness to pay (ceiling).

    0

    price_breakdown?: PriceBreakdown
    impressions?: number

    Impression goal for this package

    0

    catalogs?: Catalog[]

    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. Echoed from the create_media_buy request.

    format_ids?: FormatReferenceStructuredObject[]

    Legacy named-format IDs supplied for this package on create_media_buy. Sellers SHOULD echo this field whenever the request included it, including dual-emission cases where format_option_refs was the winning selector, so read surfaces preserve the original wire contract. Omitted means the request did not carry legacy format_ids unless the seller cannot reconstruct legacy requests created before this field was persisted.

    format_option_refs?: FormatOptionReference[]

    Structured 3.1+ format option references supplied for this package on create_media_buy. Sellers SHOULD echo this field whenever the request included it. Publisher-catalog-backed options are identified by { scope: "publisher", publisher_domain, format_option_id }; product-local options are identified by { scope: "product", format_option_id } and resolve only against this package's target product. Omitted means the request did not carry format_option_refs unless the seller cannot reconstruct legacy requests created before this field was persisted.

    format_kind?: CanonicalFormatKind
    params?: {}

    Parameters for the direct canonical selector in format_kind, echoed from the create_media_buy request whenever the request included it. Requires format_kind; omitted only when the request did not carry direct canonical params or when the seller cannot reconstruct legacy requests created before this field was persisted.

    targeting_overlay?: TargetingOverlay
    measurement_terms?: MeasurementTerms
    performance_standards?: PerformanceStandard[]

    Agreed performance standards for this package. When any entry specifies a vendor, creatives assigned to this package MUST include corresponding tracker_script or tracker_pixel assets from that vendor.

    committed_metrics?: CommittedMetric[]

    The binding reporting contract for this package — what the seller has agreed to populate in delivery reports. Each entry carries an explicit committed_at timestamp, so the array also serves as the contract amendment ledger: day-1 commitments share committed_at = create_media_buy.confirmed_at; mid-flight additions carry their own timestamps. When create_media_buy.confirmed_at is null for a provisional buy, sellers MUST omit committed_metrics until commitment. The first response that sets confirmed_at MAY include the initial committed-metrics set, and each such entry's committed_at MUST equal confirmed_at. The missing_metrics field on get_media_buy_delivery reconciles against this list, filtering to entries where committed_at < reporting_period.end (a metric committed mid-flight is only audited from its commitment timestamp forward). Sellers stamp the day-1 set on the create_media_buy response; mid-flight additions are appended via update_media_buy (append-only — sellers MUST reject attempts to modify or remove existing entries with validation_error, suggested code: IMMUTABLE_FIELD). Optional in v1; absence means the seller does not provide an audit-grade contract and missing_metrics falls back to the product's live available_metrics (a known audit gap — buyers SHOULD treat absence as 'no audit-grade contract' rather than 'clean delivery'). Each entry uses an explicit scope discriminator: standard for entries from the closed available-metric.json enum, vendor for vendor-defined metrics anchored on a BrandRef. The unified shape is symmetric with missing_metrics and aggregated_totals.metric_aggregates — same atomic unit (scope, metric_id, qualifier) across contract, diff, and delivery, so reconciliation collapses to a row-level join on the tuple. Replaces the parallel-array design that shipped briefly in #3510.

    creative_assignments?: CreativeAssignment[]

    Creative assets assigned to this package

    format_ids_to_provide?: FormatReferenceStructuredObject[]

    Format IDs that creative assets will be provided for this package

    optimization_goals?: OptimizationGoal[]

    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+.

    start_time?: string

    Flight start date/time for this package in ISO 8601 format. When omitted, the package inherits the media buy's start_time. Sellers SHOULD always include the resolved value in responses, even when inherited.

    date-time

    end_time?: string

    Flight end date/time for this package in ISO 8601 format. When omitted, the package inherits the media buy's end_time. Sellers SHOULD always include the resolved value in responses, even when inherited.

    date-time

    paused?: boolean

    Whether this package is paused by the buyer. Paused packages do not deliver impressions. Defaults to false.

    canceled?: boolean

    Whether this package has been canceled. Canceled packages stop delivery and cannot be reactivated. Defaults to false.

    cancellation?: {
        canceled_at: string;
        canceled_by: CanceledBy;
        reason?: string;
        acknowledged_at?: string;
    }

    Cancellation metadata. Present only when canceled is true.

    Type Declaration

    • canceled_at: string

      ISO 8601 timestamp when this package was canceled.

      date-time

    • canceled_by: CanceledBy
    • Optionalreason?: string

      Reason the package was canceled.

      500

    • Optionalacknowledged_at?: string

      ISO 8601 timestamp when the seller acknowledged the cancellation. Confirms inventory has been released and billing stopped. Absent until the seller processes the cancellation.

      date-time

    agency_estimate_number?: string

    Agency estimate or authorization number for this package. Echoed from the buyer's request. When present on the package, takes precedence over the media buy-level estimate number.

    100

    creative_deadline?: string

    ISO 8601 timestamp for creative upload or change deadline for this package. After this deadline, creative changes are rejected. When absent, the media buy's creative_deadline applies.

    date-time

    context?: ContextObject
    ext?: ExtensionObject