@adcp/sdk API Reference - v17.0.0-rc.0
    Preparing search index...

    Interface MediaBuyDeliveryWebhookResult

    Payload-only delivery report result carried under core/mcp-webhook-payload.json result for task_type media_buy_delivery. This is not a top-level webhook POST body and does not include protocol envelope fields such as task_id or status. aggregated_totals is API-only (get_media_buy_delivery) and MUST NOT appear in this payload; see webhooks.mdx.

    interface MediaBuyDeliveryWebhookResult {
        notification_type:
            | "scheduled"
            | "final"
            | "delayed"
            | "adjusted"
            | "window_update";
        partial_data?: boolean;
        unavailable_count?: number;
        sequence_number?: number;
        next_expected_at?: string;
        reporting_period: { start: string; end: string; timezone?: string };
        currency?: string;
        attribution_window?: AttributionWindow;
        media_buy_deliveries: {
            media_buy_id: string;
            currency?: string;
            status:
                | "rejected"
                | "active"
                | "failed"
                | "pending"
                | "completed"
                | "pending_creatives"
                | "pending_start"
                | "paused"
                | "canceled"
                | "reporting_delayed";
            expected_availability?: string;
            is_adjusted?: boolean;
            is_final?: boolean;
            finalized_at?: string;
            pricing_model?: PricingModel;
            pacing_index?: number;
            totals: DeliveryMetrics & { effective_rate?: number };
            by_package: (
                DeliveryMetrics & {
                    package_id?: string;
                    pacing_index?: number;
                    pricing_model?: PricingModel;
                    rate?: number;
                    currency?: string;
                    delivery_status?: DeliveryStatus;
                    paused?: boolean;
                    is_final?: boolean;
                    finalized_at?: string;
                    measurement_window?: string;
                    supersedes_window?: string;
                    metric_values?: PackageDeliveryMetricValue[];
                }
            )[];
        }[];
        errors?: TaskErrorDetail[];
        sandbox?: boolean;
        context?: ContextObject;
        ext?: ExtensionObject;
    }
    Index
    notification_type:
        | "scheduled"
        | "final"
        | "delayed"
        | "adjusted"
        | "window_update"

    Type of delivery-report notification: scheduled = regular periodic update, final = campaign completed, delayed = data not yet available, adjusted = corrected data for the same window, window_update = a wider measurement window supersedes a prior window.

    partial_data?: boolean

    Indicates if any media buys in this webhook have missing or delayed data.

    unavailable_count?: number

    Number of media buys with reporting_delayed or failed status when partial_data is true.

    0

    int

    sequence_number?: number

    Sequential notification number for this reporting webhook stream.

    1

    int

    next_expected_at?: string

    ISO 8601 timestamp for the next expected notification. Omitted on final notifications.

    date-time

    reporting_period: { start: string; end: string; timezone?: string }

    Period covered by the delivery report. start and end are instants on the reporting timezone's period boundaries (the products' reporting_capabilities.timezone, echoed in timezone). They fall on UTC midnight only when that timezone is UTC.

    Type Declaration

    • start: string

      date-time

    • end: string

      date-time

    • Optionaltimezone?: string

      Reporting timezone applied to this report, as 'UTC' or an IANA timezone identifier. Same meaning as get_media_buy_delivery reporting_period.timezone. Sellers SHOULD return it whenever every reported media buy shares one reporting timezone.

      1

    currency?: string

    Deprecated in AdCP 3.2 and removed in AdCP 4.0. Optional legacy report-wide ISO 4217 currency code. It may be used only when every monetary value in the report has that denomination. A report can contain media buys with different currencies, so buyers MUST NOT interpret this field as an aggregation currency or evidence of currency conversion. Prefer media_buy_deliveries[].currency when present and package-level currency otherwise.

    ^[A-Z]{3}$

    attribution_window?: AttributionWindow
    media_buy_deliveries: {
        media_buy_id: string;
        currency?: string;
        status:
            | "rejected"
            | "active"
            | "failed"
            | "pending"
            | "completed"
            | "pending_creatives"
            | "pending_start"
            | "paused"
            | "canceled"
            | "reporting_delayed";
        expected_availability?: string;
        is_adjusted?: boolean;
        is_final?: boolean;
        finalized_at?: string;
        pricing_model?: PricingModel;
        pacing_index?: number;
        totals: DeliveryMetrics & { effective_rate?: number };
        by_package: (
            DeliveryMetrics & {
                package_id?: string;
                pacing_index?: number;
                pricing_model?: PricingModel;
                rate?: number;
                currency?: string;
                delivery_status?: DeliveryStatus;
                paused?: boolean;
                is_final?: boolean;
                finalized_at?: string;
                measurement_window?: string;
                supersedes_window?: string;
                metric_values?: PackageDeliveryMetricValue[];
            }
        )[];
    }[]

    Delivery rows for one or more media buys included in this notification.

    Type Declaration

    • media_buy_id: string

      Seller's media buy identifier.

    • Optionalcurrency?: string

      ISO 4217 denomination for monetary values in this media-buy delivery row, including totals, package spend, and currency-denominated package rates. Sellers SHOULD populate this field whenever all monetary values in the row share one currency. For AdCP-authored buys it MUST equal the media-buy currency, and every by_package[].currency MUST equal it. For a legacy or externally created mixed-currency buy, omit this field and all monetary or money-derived values from row totals; report those values only at package level with each package's own currency. AdCP does not perform currency conversion.

      ^[A-Z]{3}$

    • status:
          | "rejected"
          | "active"
          | "failed"
          | "pending"
          | "completed"
          | "pending_creatives"
          | "pending_start"
          | "paused"
          | "canceled"
          | "reporting_delayed"

      Current media buy lifecycle or reporting status. This is distinct from the webhook envelope's top-level task status.

    • Optionalexpected_availability?: string

      When delayed data is expected to be available. Present when status is reporting_delayed.

      date-time

    • Optionalis_adjusted?: boolean

      Indicates this row contains updated data for a previously reported period.

    • Optionalis_final?: boolean

      Whether this row's delivery data is final for the reporting period.

    • Optionalfinalized_at?: string

      Timestamp when this row became final. Present only when is_final is true.

      date-time

    • Optionalpricing_model?: PricingModel
    • Optionalpacing_index?: number

      Aggregate media-buy delivery pace relative to the media-buy pacing plan. Authoritative for seller-optimized buys.

      0

    • totals: DeliveryMetrics & { effective_rate?: number }
    • by_package: (
          DeliveryMetrics & {
              package_id?: string;
              pacing_index?: number;
              pricing_model?: PricingModel;
              rate?: number;
              currency?: string;
              delivery_status?: DeliveryStatus;
              paused?: boolean;
              is_final?: boolean;
              finalized_at?: string;
              measurement_window?: string;
              supersedes_window?: string;
              metric_values?: PackageDeliveryMetricValue[];
          }
      )[]

      Metrics broken down by package.

    errors?: TaskErrorDetail[]

    Task-specific delivery errors or warnings.

    sandbox?: boolean
    context?: ContextObject