@adcp/client API Reference - v3.3.3
    Preparing search index...

    Interface GetMediaBuyDeliveryResponse

    Response payload for get_media_buy_delivery task

    interface GetMediaBuyDeliveryResponse {
        notification_type?: "scheduled" | "final" | "delayed" | "adjusted";
        partial_data?: boolean;
        unavailable_count?: number;
        sequence_number?: number;
        next_expected_at?: string;
        reporting_period: { start: string; end: string };
        currency: string;
        aggregated_totals?: {
            impressions: number;
            spend: number;
            clicks?: number;
            video_completions?: number;
            media_buy_count: number;
        };
        media_buy_deliveries: {
            media_buy_id: string;
            buyer_ref?: string;
            status: | "active"
            | "paused"
            | "completed"
            | "pending"
            | "failed"
            | "reporting_delayed";
            expected_availability?: string;
            is_adjusted?: boolean;
            pricing_model?: PricingModel;
            totals: DeliveryMetrics & { effective_rate?: number };
            by_package: (
                DeliveryMetrics & {
                    package_id: string;
                    buyer_ref?: string;
                    pacing_index?: number;
                    pricing_model: PricingModel1;
                    rate: number;
                    currency: string;
                    delivery_status?: | "completed"
                    | "delivering"
                    | "budget_exhausted"
                    | "flight_ended"
                    | "goal_met";
                    paused?: boolean;
                }
            )[];
            daily_breakdown?: { date: string; impressions: number; spend: number }[];
        }[];
        errors?: Error[];
        context?: ContextObject;
        ext?: ExtensionObject;
    }
    Index

    Properties

    notification_type?: "scheduled" | "final" | "delayed" | "adjusted"

    Type of webhook notification (only present in webhook deliveries): scheduled = regular periodic update, final = campaign completed, delayed = data not yet available, adjusted = resending period with updated data

    partial_data?: boolean

    Indicates if any media buys in this webhook have missing/delayed data (only present in webhook deliveries)

    unavailable_count?: number

    Number of media buys with reporting_delayed or failed status (only present in webhook deliveries when partial_data is true)

    sequence_number?: number

    Sequential notification number (only present in webhook deliveries, starts at 1)

    next_expected_at?: string

    ISO 8601 timestamp for next expected notification (only present in webhook deliveries when notification_type is not 'final')

    reporting_period: { start: string; end: string }

    Date range for the report. All periods use UTC timezone.

    Type Declaration

    • start: string

      ISO 8601 start timestamp in UTC (e.g., 2024-02-05T00:00:00Z)

    • end: string

      ISO 8601 end timestamp in UTC (e.g., 2024-02-05T23:59:59Z)

    currency: string

    ISO 4217 currency code

    aggregated_totals?: {
        impressions: number;
        spend: number;
        clicks?: number;
        video_completions?: number;
        media_buy_count: number;
    }

    Combined metrics across all returned media buys. Only included in API responses (get_media_buy_delivery), not in webhook notifications.

    Type Declaration

    • impressions: number

      Total impressions delivered across all media buys

    • spend: number

      Total amount spent across all media buys

    • Optionalclicks?: number

      Total clicks across all media buys (if applicable)

    • Optionalvideo_completions?: number

      Total video completions across all media buys (if applicable)

    • media_buy_count: number

      Number of media buys included in the response

    media_buy_deliveries: {
        media_buy_id: string;
        buyer_ref?: string;
        status:
            | "active"
            | "paused"
            | "completed"
            | "pending"
            | "failed"
            | "reporting_delayed";
        expected_availability?: string;
        is_adjusted?: boolean;
        pricing_model?: PricingModel;
        totals: DeliveryMetrics & { effective_rate?: number };
        by_package: (
            DeliveryMetrics & {
                package_id: string;
                buyer_ref?: string;
                pacing_index?: number;
                pricing_model: PricingModel1;
                rate: number;
                currency: string;
                delivery_status?: | "completed"
                | "delivering"
                | "budget_exhausted"
                | "flight_ended"
                | "goal_met";
                paused?: boolean;
            }
        )[];
        daily_breakdown?: { date: string; impressions: number; spend: number }[];
    }[]

    Array of delivery data for media buys. When used in webhook notifications, may contain multiple media buys aggregated by publisher. When used in get_media_buy_delivery API responses, typically contains requested media buys.

    Type Declaration

    • media_buy_id: string

      Publisher's media buy identifier

    • Optionalbuyer_ref?: string

      Buyer's reference identifier for this media buy

    • status: "active" | "paused" | "completed" | "pending" | "failed" | "reporting_delayed"

      Current media buy status. In webhook context, reporting_delayed indicates data temporarily unavailable.

    • Optionalexpected_availability?: string

      When delayed data is expected to be available (only present when status is reporting_delayed)

    • Optionalis_adjusted?: boolean

      Indicates this delivery contains updated data for a previously reported period. Buyer should replace previous period data with these totals.

    • Optionalpricing_model?: PricingModel
    • totals: DeliveryMetrics & { effective_rate?: number }
    • by_package: (
          DeliveryMetrics & {
              package_id: string;
              buyer_ref?: string;
              pacing_index?: number;
              pricing_model: PricingModel1;
              rate: number;
              currency: string;
              delivery_status?: | "completed"
              | "delivering"
              | "budget_exhausted"
              | "flight_ended"
              | "goal_met";
              paused?: boolean;
          }
      )[]

      Metrics broken down by package

    • Optionaldaily_breakdown?: { date: string; impressions: number; spend: number }[]

      Day-by-day delivery

    errors?: Error[]

    Task-specific errors and warnings (e.g., missing delivery data, reporting platform issues)

    context?: ContextObject
    ext?: ExtensionObject