{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/plainrouter/main/json-schema/plainrouter-ad-test-list-read-schema.json", "title": "AdTestListRead", "x-generated": "2026-10-18", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/plainrouter-openapi.json#/components/schemas/AdTestListRead", "type": "object", "properties": { "tests": { "type": "object", "properties": { "current_page": { "type": "integer" }, "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "pattern": "^[0-7][0-9a-hjkmnp-tv-z]{25}$", "minLength": 26, "maxLength": 26 }, "workspace_id": { "type": "integer" }, "platform_ad_account_id": { "type": "integer" }, "ad_set_id": { "type": "string", "pattern": "^[0-9]+$", "maxLength": 128 }, "axis": { "type": "string", "enum": [ "hook", "angle", "visual", "offer", "format", "landing" ] }, "event_name": { "type": [ "string", "null" ], "description": "Legacy explicit event name; null for workspace-default mode." }, "conversion_definition_version": { "type": "integer", "enum": [ 1, 2 ] }, "conversion_events": { "type": "array", "description": "Immutable canonical choices. Version 1 exposes its original event choice.", "items": { "type": "string" }, "minItems": 1 }, "exclude_subscription_payments": { "type": "boolean", "description": "Subscription-payment exclusion captured at creation; false for version 1." }, "arrivals_floor": { "type": "integer" }, "count_health_click_threshold": { "type": [ "integer", "null" ], "description": "Link-click threshold frozen at conclusion; null until concluded or for legacy Tests." }, "minimum_conversions": { "type": "integer" }, "maximum_days": { "type": "integer" }, "maximum_spend_minor": { "type": [ "string", "null" ], "description": "Optional maximum in positive whole Meta minor units, using the same unit scale as Launch plan budget_amount_minor." }, "anomaly_threshold_percent": { "type": "string", "pattern": "^[0-9]+(?:\\.[0-9]+)?$" }, "first_day": { "type": "string", "format": "date" }, "timezone": { "type": "string" }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "members": { "type": "array", "items": { "type": "object", "properties": { "ad_id": { "type": "string", "pattern": "^[0-9]+$", "maxLength": 128 }, "position": { "type": "integer" }, "baseline_host": { "type": [ "string", "null" ], "description": "Immutable normalized landing host once the member has a baseline." }, "baseline_path": { "type": [ "string", "null" ], "description": "Immutable normalized landing path once the member has a baseline." } }, "required": [ "ad_id", "position" ] } }, "pause_proposals": { "type": "array", "items": { "type": "object", "properties": { "ad_id": { "type": "string", "pattern": "^[0-9]+$", "maxLength": 128 }, "status": { "type": "string", "enum": [ "pending", "proposed", "skipped", "expired" ] }, "reason": { "type": [ "string", "null" ], "description": "Stable reason code when the proposal was skipped or expired.", "enum": [ "already_paused", "deleted", "archived", "campaign_paused", "adset_paused", "decision_window_elapsed", null ] }, "decision_deadline_at": { "type": "string", "format": "date-time", "description": "Immutable deadline 24 hours after the Test's candidates are created on the database clock." } }, "required": [ "ad_id", "status", "reason", "decision_deadline_at" ] } }, "verdict": { "type": [ "object", "null" ], "properties": { "outcome": { "type": [ "string", "null" ], "enum": [ "winner", "no_clear_winner", "not_judged", "halted", null ] }, "winner_ad_id": { "type": [ "string", "null" ], "pattern": "^[0-9]+$", "maxLength": 128 }, "reason": { "type": [ "string", "null" ] }, "halt_details": { "type": [ "object", "null" ], "properties": { "ad_id": { "type": "string" }, "effective_status": { "type": "string", "enum": [ "DISAPPROVED", "WITH_ISSUES" ] }, "date": { "type": "string", "format": "date" }, "link_clicks": { "type": "integer" }, "counted_arrivals": { "type": "integer" }, "ad_test_member_id": { "type": "string", "pattern": "^[0-7][0-9a-hjkmnp-tv-z]{25}$", "minLength": 26, "maxLength": 26 }, "baseline": { "type": "object", "properties": { "host": { "type": "string" }, "path": { "type": "string" } }, "required": [ "host", "path" ] }, "observed_destinations": { "type": "array", "items": { "type": "object", "properties": { "host": { "type": "string" }, "path": { "type": "string" }, "counted_arrivals": { "type": "integer" } }, "required": [ "host", "path", "counted_arrivals" ] } } } }, "window_start": { "type": [ "string", "null" ], "format": "date" }, "window_end": { "type": [ "string", "null" ], "format": "date" }, "concluded_at": { "type": [ "string", "null" ], "format": "date-time" }, "members": { "type": "array", "items": { "type": "object", "properties": { "ad_id": { "type": "string", "pattern": "^[0-9]+$", "maxLength": 128 }, "state": { "type": "string", "enum": [ "not_delivered", "insufficient", "ranked", "facts_unavailable", "halted" ] }, "rank": { "type": [ "integer", "null" ] }, "spend": { "type": [ "string", "null" ] }, "impressions": { "type": [ "integer", "null" ] }, "counted_arrivals": { "type": [ "integer", "null" ] }, "recorded_conversions": { "type": [ "integer", "null" ], "description": "PlainRouter recorded conversions under this Test’s frozen definition. Version 1 retains its original recorded-count semantics." }, "admitted_conversions": { "type": [ "integer", "null" ], "description": "Admitted conversions are shown beside recorded conversions and are never substituted for them." }, "spend_per_recorded_conversion": { "type": [ "string", "null" ], "description": "Major-unit spend divided by PlainRouter recorded conversions; used only to compare members within this Test." }, "covered_days": { "type": "array", "items": { "type": "string", "format": "date" } } }, "required": [ "ad_id", "state", "rank", "spend", "impressions", "counted_arrivals", "recorded_conversions", "admitted_conversions", "spend_per_recorded_conversion", "covered_days" ] } }, "daily_facts": { "type": "array", "items": { "type": "object", "properties": { "date": { "type": "string", "format": "date" }, "ad_test_member_id": { "type": "string", "pattern": "^[0-7][0-9a-hjkmnp-tv-z]{25}$", "minLength": 26, "maxLength": 26 }, "ad_id": { "type": "string", "pattern": "^[0-9]+$", "maxLength": 128 }, "spend_minor": { "type": "string", "description": "Exact spend in Meta minor units for the account currency, including any stored fractional component.", "pattern": "^[0-9]+(?:\\.[0-9]+)?$" }, "spend": { "type": [ "string", "null" ], "description": "Account-currency spend in major units." }, "impressions": { "type": [ "integer", "null" ] }, "inline_link_clicks": { "type": [ "integer", "null" ] }, "counted_arrivals": { "type": [ "integer", "null" ] }, "recorded_conversions": { "type": [ "integer", "null" ] }, "admitted_conversions": { "type": [ "integer", "null" ] } }, "required": [ "date", "ad_test_member_id", "ad_id", "spend_minor", "spend", "impressions", "counted_arrivals", "recorded_conversions", "admitted_conversions" ] } } }, "required": [ "outcome", "winner_ad_id", "reason", "window_start", "window_end", "concluded_at", "members", "daily_facts" ] } }, "required": [ "id", "workspace_id", "platform_ad_account_id", "ad_set_id", "axis", "event_name", "conversion_definition_version", "conversion_events", "exclude_subscription_payments", "arrivals_floor", "minimum_conversions", "maximum_days", "maximum_spend_minor", "anomaly_threshold_percent", "first_day", "timezone", "currency", "created_at", "members", "pause_proposals", "verdict" ] } }, "first_page_url": { "type": [ "string", "null" ] }, "from": { "type": [ "integer", "null" ] }, "last_page": { "type": "integer" }, "last_page_url": { "type": [ "string", "null" ] }, "links": { "type": "array", "items": { "type": "object", "properties": { "active": { "type": "boolean" }, "label": { "type": "string" }, "url": { "type": [ "string", "null" ] } }, "required": [ "active", "label", "url" ] } }, "next_page_url": { "type": [ "string", "null" ] }, "path": { "type": "string" }, "per_page": { "type": "integer" }, "prev_page_url": { "type": [ "string", "null" ] }, "to": { "type": [ "integer", "null" ] }, "total": { "type": "integer" } }, "required": [ "current_page", "data", "first_page_url", "from", "last_page", "last_page_url", "links", "next_page_url", "path", "per_page", "prev_page_url", "to", "total" ] }, "observed_conversion_events_available": { "type": "boolean" }, "observed_conversion_events": { "type": "array", "items": { "type": "object", "properties": { "event_name": { "type": "string" }, "recorded_count": { "type": "integer" } }, "required": [ "event_name", "recorded_count" ] } } }, "required": [ "tests", "observed_conversion_events_available", "observed_conversion_events" ] }