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

    Interface ComplyTestControllerRequest

    Request payload for the comply_test_controller tool. Triggers seller-side state transitions for compliance testing. Sandbox only — sellers MUST NOT expose this tool in production. Naturally idempotent: each known scenario is either a lookup (list_scenarios) or a state-forcing operation whose target state is carried in the payload (force_*_status, simulate_*), so replays converge to the same observable state without needing an idempotency_key. The compliance harness drives this tool deterministically and does not rely on the seller's at-most-once replay cache.

    interface ComplyTestControllerRequest {
        adcp_version?: string;
        adcp_major_version?: number;
        scenario: string;
        params?: {
            creative_id?: string;
            account_id?: string;
            media_buy_id?: string;
            session_id?: string;
            action?: "hold" | "confirm";
            product_id?: string;
            opportunity_id?: string;
            proposal_id?: string;
            pricing_option_id?: string;
            plan_id?: string;
            rights_id?: string;
            fixture?: {};
            operation?:
                | "seed_inaccessible_item"
                | "query_eligibility"
                | "advance_time"
                | "recreate_catalog"
                | "prepare"
                | "expire_proposal"
                | "publish_zero_row"
                | "publish_nonempty"
                | "restate_snapshot"
                | "restate_after_received"
                | "omit_obligation"
                | "advance_past_status_deadline"
                | "advance_past_escalation"
                | "publish_official_adjustment"
                | "probe_scheduler_dst"
                | "suppress_readiness"
                | "advance_within_retention"
                | "revoke_access"
                | "publish_adjustment"
                | "revoke_grant"
                | "regrant"
                | "reduce_grant"
                | "set_account_timezone";
            target_health?: "delayed"
            | "action_required";
            received_reporting_revision_id?: string;
            advance_to?: "within_grace" | "past_grace";
            catalog_id?: string;
            catalog_generation?: string;
            item_id?: string;
            allowed_tasks?: string[];
            timezone?: string;
            target_time?: string;
            status?: string;
            rejection_reason?: string;
            purge_kind?: "soft" | "hard";
            reason_code?: CreativeEventReasonCode;
            reason_detail?: string;
            termination_reason?: string;
            impressions?: number;
            clicks?: number;
            plays?: number;
            dooh_metrics?: DoohMetrics;
            property_delivery?: {
                publisher_domain: string;
                identifier: {};
                impressions: number;
                spend: number;
            }[];
            installment_property_delivery?: {
                installment_ref: {};
                publisher_domain: string;
                identifier: {};
                impressions: number;
                spend: number;
            }[];
            installment_delivery?: {
                installment_ref: {};
                impressions?: number;
                spend: number;
            }[];
            conversions?: number;
            delivery_date?: string;
            conversion_value?: number;
            commissionable_value?: number;
            reported_spend?: { amount: number; currency: string };
            reach?: number;
            frequency?: number;
            reach_unit?: ReachUnit;
            reach_window?: {
                kind: "cumulative" | "period" | "rolling";
                period?: Duration;
            };
            viewability?: {
                vendor?: BrandReference;
                measurable_impressions?: number;
                viewable_impressions?: number;
                viewable_rate?: number;
                viewed_seconds?: number;
                viewed_seconds_percentiles?: {
                    p25: number;
                    p50: number;
                    p75: number;
                    p90: number;
                    p95: number;
                };
                viewed_seconds_histogram?: [
                    {
                        lower_bound_seconds: number;
                        upper_bound_seconds?: number;
                        impressions: number;
                    },
                    ...{
                        lower_bound_seconds: number;
                        upper_bound_seconds?: number;
                        impressions: number;
                    }[],
                ];
                standard?: ViewabilityStandard;
            };
            vendor_metric_values?: VendorMetricValue[];
            vendor_metric_values_by_package?: {
                [k: string]: VendorMetricValue[]
                | undefined;
            };
            not_yet_measurable_vendor_metrics?: {
                vendor: BrandReference;
                metric_id: string;
                qualifier?: Qualifier;
            }[];
            not_yet_measurable_vendor_metrics_by_package?: {
                [k: string]: | {
                    vendor: BrandReference;
                    metric_id: string;
                    qualifier?: Qualifier2;
                }[]
                | undefined;
            };
            spend_percentage?: number;
            arm?: "rejected"
            | "completed"
            | "input-required"
            | "submitted";
            task_id?: string;
            evaluation_id?: string;
            message?: string;
            reason?: string;
            suggestions?: string[];
            format_id?: string;
            vendor?: BrandReference;
            metrics?: { metric_id: string }[];
            tool?: string;
            upstream_name?: string;
            cache_age_seconds?: number;
            result?: ComplianceTaskCompletionData;
            since_timestamp?: string;
            endpoint_pattern?: string;
            limit?: number;
            attestation_mode?: "raw" | "digest";
            identifier_value_digests?: string[];
        };
        context?: ContextObject;
        ext?: ExtensionObject;
        account: { sandbox: true };
    }
    Index
    adcp_version?: string

    Release-precision AdCP version (VERSION.RELEASE, e.g. "3.0", "3.1", "3.1-beta"). On a request: the buyer's release pin — the seller validates against its supported_versions and returns VERSION_UNSUPPORTED on cross-major mismatch, or downshifts to the highest supported release within the same major. On a response: the release the seller actually served — clients SHOULD validate the response against that release's schema, not against their pin. Patches are not negotiated; surface them as build_version on capabilities for operational visibility. When omitted, falls back to adcp_major_version (deprecated) or server default. Buyers SHOULD emit both adcp_version and adcp_major_version through 3.x to remain compatible with sellers that only read the legacy field. NORMALIZATION: SDKs that read full-semver values from bundle metadata (e.g. ComplianceIndex.published_version = "3.1.0-beta.1") MUST normalize to release-precision ("3.1-beta.1") before emitting on the wire — meta-field values are NOT valid wire values.

    adcp_major_version?: number

    DEPRECATED in favor of adcp_version (release-precision string). Servers MUST continue to honor this field through 3.x. Removed in 4.0. Original semantics: the AdCP major version the buyer's payloads conform to. Sellers validate against their supported major_versions and return VERSION_UNSUPPORTED if unsupported. When omitted, the seller assumes its highest supported version.

    scenario: string

    Test scenario to execute. 'list_scenarios' discovers supported scenarios. 'reporting_subscription_probe' (experimental, media_buy.reporting_subscriptions) revokes, re-grants, or reduces the caller's own grant on a sandbox account, changes a sandbox account's timezone, or advances the sandbox clock, so storyboards can test reporting-subscription coverage across grants and cutovers against a remote seller. 'reset_state' takes no params and returns the authenticated caller's sandbox to a baseline; a runner that finds it in list_scenarios calls it once before each storyboard. It acts only on the caller's own sandbox state, and what it discards is implementation-defined except where a scenario names its reset effects: a seller that lists reporting_subscription_probe MUST also list reset_state, which MUST unpin the caller's sandbox clock (simulated_now reads the seller's wall clock again until the next advance_time) and discard every grant and timezone change the probe made for the caller. 'force_' and 'simulate_' trigger state transitions. 'reporting_core_lifecycle_probe' installs a caller/account-scoped Core fixture whose first elapsed obligation is visible before any report, advances its virtual clock into delayed or action_required, and can publish deterministic zero-row or non-empty revisions, restate a provisional revision, restate one the caller already received, or cross the consumer-status deadline and consumer-mismatch escalation boundaries, without waiting for wall-clock boundaries. 'force_hold_unavailable' (experimental, media_buy.hold_policy) makes the next refine_proposals finalize of one draft proposal fail with hold_unavailable, its batch siblings with batch_aborted, and is then consumed. Other scenarios provide deterministic sandbox probes for their documented lifecycle checks. Runners and sellers MUST accept unknown scenario strings - new scenarios may be added in additive releases.

    params?: {
        creative_id?: string;
        account_id?: string;
        media_buy_id?: string;
        session_id?: string;
        action?: "hold" | "confirm";
        product_id?: string;
        opportunity_id?: string;
        proposal_id?: string;
        pricing_option_id?: string;
        plan_id?: string;
        rights_id?: string;
        fixture?: {};
        operation?:
            | "seed_inaccessible_item"
            | "query_eligibility"
            | "advance_time"
            | "recreate_catalog"
            | "prepare"
            | "expire_proposal"
            | "publish_zero_row"
            | "publish_nonempty"
            | "restate_snapshot"
            | "restate_after_received"
            | "omit_obligation"
            | "advance_past_status_deadline"
            | "advance_past_escalation"
            | "publish_official_adjustment"
            | "probe_scheduler_dst"
            | "suppress_readiness"
            | "advance_within_retention"
            | "revoke_access"
            | "publish_adjustment"
            | "revoke_grant"
            | "regrant"
            | "reduce_grant"
            | "set_account_timezone";
        target_health?: "delayed"
        | "action_required";
        received_reporting_revision_id?: string;
        advance_to?: "within_grace" | "past_grace";
        catalog_id?: string;
        catalog_generation?: string;
        item_id?: string;
        allowed_tasks?: string[];
        timezone?: string;
        target_time?: string;
        status?: string;
        rejection_reason?: string;
        purge_kind?: "soft" | "hard";
        reason_code?: CreativeEventReasonCode;
        reason_detail?: string;
        termination_reason?: string;
        impressions?: number;
        clicks?: number;
        plays?: number;
        dooh_metrics?: DoohMetrics;
        property_delivery?: {
            publisher_domain: string;
            identifier: {};
            impressions: number;
            spend: number;
        }[];
        installment_property_delivery?: {
            installment_ref: {};
            publisher_domain: string;
            identifier: {};
            impressions: number;
            spend: number;
        }[];
        installment_delivery?: {
            installment_ref: {};
            impressions?: number;
            spend: number;
        }[];
        conversions?: number;
        delivery_date?: string;
        conversion_value?: number;
        commissionable_value?: number;
        reported_spend?: { amount: number; currency: string };
        reach?: number;
        frequency?: number;
        reach_unit?: ReachUnit;
        reach_window?: {
            kind: "cumulative" | "period" | "rolling";
            period?: Duration;
        };
        viewability?: {
            vendor?: BrandReference;
            measurable_impressions?: number;
            viewable_impressions?: number;
            viewable_rate?: number;
            viewed_seconds?: number;
            viewed_seconds_percentiles?: {
                p25: number;
                p50: number;
                p75: number;
                p90: number;
                p95: number;
            };
            viewed_seconds_histogram?: [
                {
                    lower_bound_seconds: number;
                    upper_bound_seconds?: number;
                    impressions: number;
                },
                ...{
                    lower_bound_seconds: number;
                    upper_bound_seconds?: number;
                    impressions: number;
                }[],
            ];
            standard?: ViewabilityStandard;
        };
        vendor_metric_values?: VendorMetricValue[];
        vendor_metric_values_by_package?: {
            [k: string]: VendorMetricValue[]
            | undefined;
        };
        not_yet_measurable_vendor_metrics?: {
            vendor: BrandReference;
            metric_id: string;
            qualifier?: Qualifier;
        }[];
        not_yet_measurable_vendor_metrics_by_package?: {
            [k: string]: | {
                vendor: BrandReference;
                metric_id: string;
                qualifier?: Qualifier2;
            }[]
            | undefined;
        };
        spend_percentage?: number;
        arm?: "rejected"
        | "completed"
        | "input-required"
        | "submitted";
        task_id?: string;
        evaluation_id?: string;
        message?: string;
        reason?: string;
        suggestions?: string[];
        format_id?: string;
        vendor?: BrandReference;
        metrics?: { metric_id: string }[];
        tool?: string;
        upstream_name?: string;
        cache_age_seconds?: number;
        result?: ComplianceTaskCompletionData;
        since_timestamp?: string;
        endpoint_pattern?: string;
        limit?: number;
        attestation_mode?: "raw" | "digest";
        identifier_value_digests?: string[];
    }

    Scenario-specific parameters. Required for all scenarios except list_scenarios.

    Type Declaration

    • Optionalcreative_id?: string

      Creative to transition (force_creative_status) or seed (seed_creative).

    • Optionalaccount_id?: string

      Account to transition, simulate, or seed. Used by force_account_status, simulate_budget_spend, and seed_account.

    • Optionalmedia_buy_id?: string

      Media buy to transition or purge (force_media_buy_status, force_media_buy_purge), simulate (simulate_delivery, simulate_budget_spend), or seed (seed_media_buy).

    • Optionalsession_id?: string

      Session to transition. Used by force_session_status.

    • Optionalaction?: "hold" | "confirm"

      force_media_buy_confirmation: hold the next create_media_buy (confirmed_at null), or confirm media_buy_id.

    • Optionalproduct_id?: string

      Product to seed or prepare for deterministic compact lifecycle testing. Used by seed_product, seed_pricing_option, compact_product_lifecycle_probe prepare, and compact_direct_buy_lifecycle_probe prepare.

    • Optionalopportunity_id?: string

      Open opportunity with later_proposals consent for which simulate_later_proposal makes the seller create one later proposal now, as it would after the creating task completed, including the proposal.created notification and any change-feed record. Experimental (media_buy.open_opportunities). The seller still enforces the consent window, max_count, and min_interval and fails the scenario when they forbid a proposal.

      1

      255

      ^[A-Za-z0-9_.:-]{1,255}$

    • Optionalproposal_id?: string

      Committed proposal whose hold the compact_product_lifecycle_probe expires, the holdable draft proposal whose next finalize force_hold_unavailable fails with hold_unavailable.

      1

    • Optionalpricing_option_id?: string

      Pricing option to seed, scoped to a product. Used by seed_pricing_option.

    • Optionalplan_id?: string

      Plan to seed. Used by seed_plan.

    • Optionalrights_id?: string

      Rights grant to seed. Used by seed_rights_grant.

    • Optionalfixture?: {}

      Arbitrary fixture payload carried by seed_* scenarios. Shape matches the domain object the seed scenario creates (account, product, creative, plan, media buy, pricing option, rights grant). Seller MAY reject malformed fixtures with INVALID_PARAMS. Kept permissive so storyboard authors can declare the minimum shape each test needs without the spec locking down every field.

    • Optionaloperation?:
          | "seed_inaccessible_item"
          | "query_eligibility"
          | "advance_time"
          | "recreate_catalog"
          | "prepare"
          | "expire_proposal"
          | "publish_zero_row"
          | "publish_nonempty"
          | "restate_snapshot"
          | "restate_after_received"
          | "omit_obligation"
          | "advance_past_status_deadline"
          | "advance_past_escalation"
          | "publish_official_adjustment"
          | "probe_scheduler_dst"
          | "suppress_readiness"
          | "advance_within_retention"
          | "revoke_access"
          | "publish_adjustment"
          | "revoke_grant"
          | "regrant"
          | "reduce_grant"
          | "set_account_timezone"

      Scenario-specific probe operation. catalog_item_availability_probe uses seed_inaccessible_item, query_eligibility, advance_time, and recreate_catalog. compact_product_lifecycle_probe uses prepare to make one seeded product's compact proposal, acceptance, operational-control, and MediaBuy readback path deterministic and expire_proposal to advance strictly beyond a committed proposal's stored expires_at and process the hold lapse. compact_direct_buy_lifecycle_probe uses prepare to make one seeded product's list, direct-purchase, operational-control, and readback path deterministic. reporting_core_lifecycle_probe uses prepare, advance_time, publish_zero_row, publish_nonempty, restate_snapshot, restate_after_received, omit_obligation, advance_past_status_deadline, and advance_past_escalation to exercise obligation availability, health deadlines, explicit reporting, provisional restatement, stale-received grace, buyer-side missing-obligation detection, counted consumer-status silence, and consumer-mismatch escalation. advance_past_status_deadline moves the clock strictly past expected_at plus the advertised automated_recovery_window_seconds without recording any consumer status, so obligation_counts.consumer_status_pending is gradable; advance_past_escalation moves it strictly past the open CONSUMER_STATUS_MISMATCH issue opened_at plus the advertised consumer_mismatch_escalation_seconds and returns both that boundary and any still-future stale_received_grace_deadline, so the escalation precedence rule is gradable. restate_snapshot publishes a new snapshot revision that immediately supersedes the current snapshot for the same logical slice and is invalid when the current revision is official. restate_after_received does the same restatement but only against the revision named in received_reporting_revision_id, so the stale-received grace projection can be graded live; it returns the grace deadline and advance_to positions the virtual clock inside or past it. Reliable Reporting tier probes use prepare plus publish_official_adjustment, probe_scheduler_dst, suppress_readiness, advance_within_retention, revoke_access, or publish_adjustment to seed deterministic Core-integrity, Managed Delivery, and Reconciled Billing lifecycle evidence. reporting_subscription_probe (experimental, media_buy.reporting_subscriptions) uses revoke_grant, regrant, reduce_grant, set_account_timezone, and advance_time to drive grants, account timezone cutovers, and the sandbox clock for reporting-subscription coverage.

    • Optionaltarget_health?: "delayed" | "action_required"

      Clock-derived health boundary selected by reporting_core_lifecycle_probe advance_time. The controller chooses the corresponding deterministic target time; callers do not supply timestamps.

    • Optionalreceived_reporting_revision_id?: string

      Revision the caller currently reports as received, required by reporting_core_lifecycle_probe restate_after_received. The seller MUST reject the operation unless this names the caller's current required revision for the fixture obligation, and a seller advertising consumer_status_task MUST additionally require a current received consumer status from this caller naming it. This binds the restatement to a real prior read instead of restating into a vacuum.

      1

      255

      ^[A-Za-z0-9_.:-]{1,255}$

    • Optionaladvance_to?: "within_grace" | "past_grace"

      Where reporting_core_lifecycle_probe restate_after_received leaves the virtual clock relative to the returned stale_received_grace_deadline. within_grace grades the delayed projection; past_grace grades the escalation to action_required. Repeating the operation is convergent: it reuses the committed restatement and only moves the clock.

    • Optionalcatalog_id?: string

      Catalog operated on by catalog_item_availability_probe.

      1

      255

    • Optionalcatalog_generation?: string

      Catalog incarnation operated on by catalog_item_availability_probe.

      1

      255

    • Optionalitem_id?: string

      Catalog item operated on by catalog_item_availability_probe.

      1

      255

    • Optionalallowed_tasks?: string[]

      reporting_subscription_probe reduce_grant: the complete allowed_tasks the caller's grant on account_id keeps, for example only get_reporting_status, sync_reporting_receipts, and sync_reporting_status to model a wind-down.

      64

    • Optionaltimezone?: string

      reporting_subscription_probe set_account_timezone: the account's new IANA timezone.

      1

      255

    • Optionaltarget_time?: string

      Deterministic sandbox clock target used by catalog_item_availability_probe advance_time and reporting_subscription_probe advance_time.

      date-time

    • Optionalstatus?: string

      Target status for the resource. Type depends on scenario: creative-status for force_creative_status, account-status for force_account_status, media-buy-status for force_media_buy_status. For force_session_status, must be 'complete' or 'terminated'.

    • Optionalrejection_reason?: string

      Reason for rejection. Used by force_creative_status and force_media_buy_status when status = rejected.

    • Optionalpurge_kind?: "soft" | "hard"

      Purge mode for force_creative_purge. soft retains a list_creatives tombstone; hard removes the creative entirely.

    • Optionalreason_code?: CreativeEventReasonCode
    • Optionalreason_detail?: string

      Human-readable detail for force_creative_status and force_creative_purge.

    • Optionaltermination_reason?: string

      Reason for termination (e.g., session_timeout, host_terminated, policy_violation). Used by force_session_status when status = terminated.

    • Optionalimpressions?: number

      Impressions to simulate. Used by simulate_delivery.

      0

      int

    • Optionalclicks?: number

      Clicks to simulate. Used by simulate_delivery.

      0

      int

    • Optionalplays?: number

      Raw DOOH or broadcast plays to add to delivery. Used by simulate_delivery for single-package buys; sellers MUST surface the cumulative value at totals.plays and by_package[0].plays in the next get_media_buy_delivery response. Multi-package simulations require a future package-scoped form and MUST reject this media-buy-scoped field.

      0

      int

    • Optionaldooh_metrics?: DoohMetrics

      DOOH delivery detail to inject. Used by simulate_delivery for single-package buys; the latest injected block replaces the previous simulated DOOH detail and MUST surface at totals.dooh_metrics and by_package[0].dooh_metrics. Multi-package simulations require a future package-scoped form and MUST reject this media-buy-scoped field.

    • Optionalproperty_delivery?: { publisher_domain: string; identifier: {}; impressions: number; spend: number }[]

      Property-grain rows for simulate_delivery on single-package buys; each MUST be a complete core/property-delivery-metrics.json row. The latest array replaces the previous one and is neither dated nor added to totals. Sandbox sellers MUST build by_property from exactly these rows (applying limit, sort_by, sort_direction), MUST NOT synthesize property delivery from catalog eligibility, and SHOULD validate each row against the full row schema. Injected rows are exempt from threshold suppression. Multi-package buys or delivery_date MUST be rejected with INVALID_PARAMS.

    • Optionalinstallment_property_delivery?: {
          installment_ref: {};
          publisher_domain: string;
          identifier: {};
          impressions: number;
          spend: number;
      }[]

      Installment x property rows for simulate_delivery on single-package buys; each MUST be a complete core/installment-property-delivery-metrics.json row, where installment_ref.collection_ref.publisher_domain is the collection owner and publisher_domain namespaces the host property. Same replace, undated, suppression-exempt, and rejection rules as property_delivery; sandbox sellers MUST build by_installment_property from exactly these rows.

    • Optionalinstallment_delivery?: { installment_ref: {}; impressions?: number; spend: number }[]

      Installment rows for simulate_delivery on single-package buys; each MUST be a complete core/installment-delivery-metrics.json row, including installment_status and publication when set; this item schema is loose, so sellers SHOULD validate each row against the full row schema. Same replace, undated, and rejection rules as installment_property_delivery; sandbox sellers MUST build by_installment from exactly these rows.

    • Optionalconversions?: number

      Conversions to simulate. Used by simulate_delivery.

      0

      int

    • Optionaldelivery_date?: string

      Calendar date, in the product's reporting_capabilities.timezone, attributable to this simulated delivery batch. Used by simulate_delivery to seed deterministic date-range tests. When get_media_buy_delivery supplies start_date or end_date, dated batches are included when delivery_date is greater than or equal to start_date and strictly less than end_date. Omit to preserve cumulative, unfiltered simulation behavior.

      date

    • Optionalconversion_value?: number

      Total attributed conversion value to simulate in the delivery reporting currency. Used by simulate_delivery.

      0

    • Optionalcommissionable_value?: number

      Settled attributed value eligible for revenue-share commission to simulate in the delivery reporting currency. Used by simulate_delivery.

      0

    • Optionalreported_spend?: { amount: number; currency: string }

      Spend as reported in delivery data. Does not affect budget. Used by simulate_delivery.

      • amount: number

        0

      • currency: string

        ^[A-Z]{3}$

    • Optionalreach?: number

      Unique reach count to inject into the simulated delivery row. Used by simulate_delivery. The unit of measurement matches the reach_unit declared on the media buy's optimization goal. When supplied, sellers MUST surface this value at totals.reach in the next get_media_buy_delivery response.

      0

    • Optionalfrequency?: number

      Average frequency per reach unit to inject. Used by simulate_delivery. When supplied, sellers MUST surface this value at totals.frequency, including frequency-only delivery. The measurement window for this frequency value is declared in reach_window when also present.

      0

    • Optionalreach_unit?: ReachUnit
    • Optionalreach_window?: { kind: "cumulative" | "period" | "rolling"; period?: Duration }

      Measurement window semantics to attach to the simulated reach and frequency values. Used by simulate_delivery. When present, sellers MUST populate reach_window on the delivery row so buyers can determine the window semantics (cumulative vs. period vs. rolling). Omitting this param produces a row with no reach_window — valid per schema but sum-unsafe. Mirrors the reach_window shape in delivery-metrics.json.

      • kind: "cumulative" | "period" | "rolling"

        Window kind. cumulative — no period field required. period and rolling — period field REQUIRED.

      • Optionalperiod?: Duration

        Duration of the measurement window. REQUIRED when kind is period or rolling. Matches the period field in delivery-metrics.json's reach_window block.

    • Optionalviewability?: {
          vendor?: BrandReference;
          measurable_impressions?: number;
          viewable_impressions?: number;
          viewable_rate?: number;
          viewed_seconds?: number;
          viewed_seconds_percentiles?: {
              p25: number;
              p50: number;
              p75: number;
              p90: number;
              p95: number;
          };
          viewed_seconds_histogram?: [
              {
                  lower_bound_seconds: number;
                  upper_bound_seconds?: number;
                  impressions: number;
              },
              ...{
                  lower_bound_seconds: number;
                  upper_bound_seconds?: number;
                  impressions: number;
              }[],
          ];
          standard?: ViewabilityStandard;
      }

      Viewability metrics to inject into simulated delivery. Uses the canonical delivery viewability shape, including viewed-seconds distributions. This media-buy-scoped form is valid only for a single-package buy, where the reference seller surfaces the same values at package and media-buy totals grain.

      • Optionalvendor?: BrandReference
      • Optionalmeasurable_impressions?: number

        Impressions where viewability could be measured. Excludes environments without measurement capability (e.g., non-Intersection Observer browsers, certain app environments). Coverage denominator for viewable_rate, viewed_seconds, and both viewed-seconds distributions — every duration statistic is computed over this same measurable population.

      • Optionalviewable_impressions?: number

        Impressions that met the viewability threshold defined by the measurement standard.

      • Optionalviewable_rate?: number

        Viewable impression rate (viewable_impressions / measurable_impressions). Range 0.0 to 1.0.

      • Optionalviewed_seconds?: number

        Average in-view duration per measurable impression, in seconds. Reporting-side counterpart to the viewed_seconds optimization metric in optimization-goal.json. Computed over measurable_impressions, not total impressions — the same denominator as viewable_rate. The viewability standard governs the threshold (e.g., MRC's 50% pixels for 1s display / 2s video) that defines when an impression is in view and therefore when the clock is running. Sellers reporting against a viewed_seconds optimization goal MUST populate this field.

      • Optionalviewed_seconds_percentiles?: { p25: number; p50: number; p75: number; p90: number; p95: number }

        Percentile summary of the per-impression in-view durations whose arithmetic mean is reported in viewed_seconds. This object MUST use the same reporting row, measurement vendor, viewability standard, and measurable_impressions population as viewed_seconds; sellers MUST omit it when measurable_impressions is zero. Percentiles use the nearest-rank definition: sort the N observed durations in ascending order and select rank ceil(p × N) (one-based) for percentile p. Values MUST be non-decreasing from p25 through p95. The structured metric identity viewed_seconds_percentiles makes this optional surface discoverable and requestable; it is not sortable and the nested object remains the canonical carrier.

        • p25: number

          25th-percentile in-view duration in seconds.

        • p50: number

          Median (50th-percentile) in-view duration in seconds.

        • p75: number

          75th-percentile in-view duration in seconds.

        • p90: number

          90th-percentile in-view duration in seconds.

        • p95: number

          95th-percentile in-view duration in seconds.

      • Optionalviewed_seconds_histogram?: [
            {
                lower_bound_seconds: number;
                upper_bound_seconds?: number;
                impressions: number;
            },
            ...{
                lower_bound_seconds: number;
                upper_bound_seconds?: number;
                impressions: number;
            }[],
        ]

        Bucketed counts of the per-impression in-view durations whose arithmetic mean is reported in viewed_seconds. Buckets MUST be ordered by ascending lower bound, MUST NOT overlap, and MUST partition every impression in the same measurable_impressions population exactly once; therefore the sum of impressions MUST equal measurable_impressions. Buckets need not be contiguous: a gap between consecutive bucket boundaries is permitted when no impressions fall within that range — the sum constraint enforces this implicitly, and validators MUST NOT independently require contiguity. Each bucket is half-open [lower_bound_seconds, upper_bound_seconds); only the final bucket MAY omit upper_bound_seconds, representing an unbounded upper range. Sellers choose boundaries, but buyers MUST combine histograms only when the complete boundary sequence, measurement vendor, and viewability standard match. The structured metric identity viewed_seconds_histogram makes this optional surface discoverable and requestable; it is not sortable and this nested array remains the canonical carrier.

        1

      • Optionalstandard?: ViewabilityStandard
    • Optionalvendor_metric_values?: VendorMetricValue[]

      Vendor-defined metric values to inject into the next delivery report. Used by simulate_delivery. The reference seller reconciles these rows against each package's seller-stamped committed_metrics contract.

    • Optionalvendor_metric_values_by_package?: { [k: string]: VendorMetricValue[] | undefined }

      Package-scoped vendor-defined values to inject, keyed by package_id. Used by simulate_delivery for multi-package buys. Sellers MUST use this form whenever more than one package could carry the same vendor/metric_id key; the legacy media-buy-scoped vendor_metric_values form is unambiguous only for a single-package buy.

    • Optionalnot_yet_measurable_vendor_metrics?: { vendor: BrandReference; metric_id: string; qualifier?: Qualifier }[]

      Committed vendor metrics that are not yet measurable for the simulated measurement window. Used by simulate_delivery to prove that a future metric is omitted from missing_metrics until its measurement window matures.

    • Optionalnot_yet_measurable_vendor_metrics_by_package?: {
          [k: string]:
              | { vendor: BrandReference; metric_id: string; qualifier?: Qualifier2 }[]
              | undefined;
      }

      Package-scoped committed vendor metrics that are not yet measurable for the simulated window, keyed by package_id. Used by simulate_delivery for multi-package buys so a deferral on one package never suppresses another package's overdue gap.

    • Optionalspend_percentage?: number

      Spend to this percentage of budget (0–100). Used by simulate_budget_spend.

      0

      100

    • Optionalarm?: "rejected" | "completed" | "input-required" | "submitted"

      Response arm for the next forced operation call. Used by force_create_media_buy_arm, force_get_products_arm, force_get_signals_arm, and force_get_creative_features_arm. 'submitted' is supported for all four operations; get_creative_features also supports 'completed' with a deterministic result; create_media_buy also supports 'input-required'; get_products also supports 'rejected'. Async completion after a submitted task is covered by force_task_completion; 'working' is an out-of-band progress signal, not an initial response arm.

    • Optionaltask_id?: string

      Deterministic task handle the seller MUST emit verbatim on the next forced operation response when arm is 'submitted'. The seller MUST accept this exact value on subsequent tasks/get or get_task_status calls within the same authenticated sandbox account + principal pair and MUST return REFERENCE_NOT_FOUND for the same task_id under any other account or principal. Sandbox task_ids are caller-opaque strings - the seller's production task-id format rules do not apply.

    • Optionalevaluation_id?: string

      Deterministic provider evaluation identity the seller MUST emit on the next forced get_creative_features submitted acknowledgement and preserve on its terminal completion result.

      1

      255

    • Optionalmessage?: string

      Optional human-readable explanation surfaced on the next forced operation response. Used by force_create_media_buy_arm, force_get_products_arm, force_get_signals_arm, and force_get_creative_features_arm for the submitted arm. Plain text only.

      2000

    • Optionalreason?: string

      Deterministic buyer-facing reason the seller MUST emit on the next get_products response when force_get_products_arm uses arm 'rejected'. Plain text only; MUST NOT expose confidential internal rules, inventory identifiers, credentials, or stack traces.

      1

      2000

    • Optionalsuggestions?: string[]

      Optional deterministic alternatives the seller MUST emit on the next get_products rejection. Used only by force_get_products_arm with arm 'rejected'.

      20

    • Optionalformat_id?: string

      DEPRECATED 3.x compatibility fixture. Legacy named-format ID to seed for seed_creative_format scenarios. The seller MUST expose it through the deprecated list_creative_formats projection for the duration of the compliance session. Canonical 3.2 scenarios seed creative.supported_formats capabilities instead.

    • Optionalvendor?: BrandReference
    • Optionalmetrics?: { metric_id: string }[]

      Measurement catalog entries to seed for the vendor. Used by seed_measurement_catalog. Shape mirrors get_adcp_capabilities.measurement.metrics[]; each metric_id is unique within the seeded vendor catalog.

    • Optionaltool?: string

      Tool name whose upstream dependency to affect. Used by force_upstream_unavailable. The seller marks the named upstream as unreachable for subsequent calls to this tool within the compliance session. Sellers MAY accept a wildcard ('*') to affect all tools.

    • Optionalupstream_name?: string

      Human-readable identifier for the upstream dependency to force unavailable (e.g., 'inventory-service', 'creative-agent'). Used by force_upstream_unavailable. When omitted, the seller marks its default upstream for the specified tool as unavailable. Sellers MUST include the same name in STALE_RESPONSE error.details.upstream.name on the affected response.

    • Optionalcache_age_seconds?: number

      Deterministic age of the stale cache entry used by force_upstream_unavailable. When supplied, the seller MUST emit this exact value in the matching STALE_RESPONSE error.details.cache_age_seconds on the next affected response. This lets the conformance runner bind the advisory code and its required detail fields to the same errors[] entry without assuming array order.

      0

      int

    • Optionalresult?: ComplianceTaskCompletionData
    • Optionalsince_timestamp?: string

      ISO 8601 timestamp; only return calls recorded at or after this time. Default: session start. Used by storyboard runners to scope upstream_traffic assertions to a specific step's window.

      date-time

    • Optionalendpoint_pattern?: string

      Optional server-side filter; reduces response size. Wildcard pattern matched against <METHOD> <URL>, e.g. 'POST * /audience/upload' or 'POST *'. When omitted, all recorded calls in the window are returned. Grammar (normative): * matches zero or more characters of any kind including /. No other characters have wildcard semantics — ? is a literal question mark, [ and ] are literal brackets, etc. There is no escape mechanism — * is always a wildcard; if literal-asterisk matching is required, callers omit endpoint_pattern and filter response-side. Implementations MUST anchor the pattern (full-string match, not substring search). This narrow grammar is intentional — endpoint_pattern exists to discriminate platform endpoints (e.g., POST * /audience/upload vs POST * /events/log), not to express full path-segment grammars. Cross-runner determinism depends on this pinning: a runner that ships POSIX-glob semantics (* per-segment, ? single-char-any) would grade the same storyboard differently than a runner picking the more permissive single-wildcard reading.

    • Optionallimit?: number

      Maximum number of calls to return. The response carries total_count and truncated so the runner can detect overflow.

      1

      1000

      int

    • Optionalattestation_mode?: "raw" | "digest"

      Requested response shape per recorded call. raw (default) returns full payload — the load-bearing assertion target for arbitrary payload_must_contain paths, and the existing v2.0.0 contract. digest returns only payload_digest_sha256 + payload_length + content_type + optional identifier_match_proofs[], so privacy-conscious adopters can support upstream_traffic conformance without raw-payload disclosure. Whether digest mode satisfies a given adopter's data-handling obligations (GDPR processor responsibilities, internal data-classification policy, contractual restrictions) is for that adopter's counsel to determine — the spec doesn't promise digest mode clears any specific legal bar. Synthetic-vectors-only still applies (see UpstreamTrafficSuccess top-level description in comply-test-controller-response.json): digest mode reduces what the runner sees, but the controller must still operate on synthetic test data, not production traffic — running queries against production payloads would let a runner with a precomputed digest set learn membership of arbitrary identifiers in the adopter's user base. Adopters MAY unilaterally downgrade a raw request to digest when their policy requires it; the response's per-call attestation_mode field echoes what was actually returned. Storyboards that strictly require raw introspection set attestation_mode_required: "raw" on their upstream_traffic check — calls returned in digest mode then grade not_applicable rather than failing.

    • Optionalidentifier_value_digests?: string[]

      When attestation_mode is digest, the runner MAY supply SHA-256 digests (lowercase hex, 64 chars) of identifier values it wants the controller to verify echo for. The controller scans each recorded call's payload for string tokens whose SHA-256 hash matches any digest in this list and returns booleans in recorded_calls[].identifier_match_proofs[]. Lets the runner verify identifier_paths echo without ever transmitting plaintext identifiers to the controller — the digest is the comparison key. Cap of 64 digests per query to bound the controller's work; storyboards with more identifiers SHOULD batch across multiple queries. Has no effect when attestation_mode is raw (the runner does the matching in-process against the full payload).

      64

    context?: ContextObject
    account: { sandbox: true }

    Sandbox account assertion. The runner MUST set sandbox: true on every comply_test_controller request. The seller MUST refuse the request (returning a structured error) if the targeted account is not a sandbox account in the seller's persisted records. This field is a caller-side declaration of intent — it does not grant sandbox status; sellers verify against their own account state. The (Sandbox) verification tier is defined by this gate: real production endpoints accept sandbox-flagged traffic and process it without real-world side effects, no separate test-mode endpoint required. See spec issue #3755 and the (Sandbox) framing in #4379.

    Type Declaration

    • sandbox: true

      MUST be true. The seller MUST verify the targeted account is sandbox by looking up the persisted account record, not by trusting this field. A request asserting sandbox: false schema-rejects before reaching the seller — defense-in-depth on top of the per-request gate.