@adcp/sdk API Reference - v14.0.0-beta.6
    Preparing search index...

    Function adaptCreateMediaBuyRequestForV2

    • Adapt a create_media_buy request for a v2 server. Strips v3-only top-level fields, converts brand → brand_manifest, derives buyer_ref (top-level + per-package) from context.buyer_ref or idempotency_key, and adapts packages.

      v2.5 requires buyer_ref as the buyer's reference for THIS media buy, top-level + per-package. v3 removed the top-level field and moved buyer correlation into context.buyer_ref; idempotency_key carries the same client-controlled-unique-identity semantics. Preferring the caller's context.buyer_ref before falling back to idempotency_key preserves the buyer's stable reference on the wire when they provided one, and still satisfies v2.5 dedupe on replay when they did not. Caller-supplied top-level buyer_ref (if any) always wins.

      Parameters

      • request: any

      Returns any